Friday, October 27, 2006

wxWidgets at Firebird Conference 2006

The fourth worldwide Firebird Conference will convene at Andels Hotel in Prague, Czech Republic, on Sunday November 12. Notice one of the talks: "Developing Cross-Platform Applications with Firebird and wxWidgets" by Milan Babuskov. Be there!

Wednesday, October 18, 2006 website issues

As mentioned in a comment on a previous post, the website is currently blank and has been so for a few hours now. Robin Dunn mentioned on the users mailing list that the likely cause is that is currently down; alternate addresses such as

Still appear to work.

Recently in the past there were also issues with speed of the site as well, possibly concerning sourceforge hosting; specifically image loading. Sometimes images would only load half the time. Images were shifted to and from an alternate server (run by Kevin Olliver) in an attempt to provide a temporary fix for the issue.

Saturday, October 14, 2006

Right-To-Left layout (RTL) support in wxWidgets

Here is some information about the support for locales with right-to-left (RTL) layout out in wxWidgets. As you probably know, RTL-support is required mostly of Hebrew, Arabic and Farsi. It has been decided that wxWidgets should follow mostly the Windows API and Windows approach for displaying RTL text and layout in applications. This approach is described in a document at MSDN here. In short, all coordinates for drawing and for window positioning are mirrored horizontally which means that (apart from bitmap mirroring) little has to be done at the user level. Also, the various native Win32 controls are modified to support RTL design.

This is different from what is done under GTK+, where no coordinates are mirrored. Instead, every app needs to mirror everything itself, even if the job of mirroring controls is mostly done within GTK+'s layout container automatically. As far as drawing within wxWidgets is concerned, coordinates are mirrored at the wxDC level in the GTK+ port. Some more information about GTK's RTL support can be found here.

I have added two screenshots from the popular FileZilla application running in the "ar_EG" (Egyptian variant of Arab) locale (screenshots in parts thanks to Tim Kosse). Since the tree control in the Linux screenshot is using generic wxWidgets code, this also demonstrates how drawing and scrolling is mirrored for user windows.

Below is a screenshot using wxWidgets and GTK 2.4.9.

Here is roughly the same screenshot using Windows 2000.

Thursday, October 12, 2006

wxWidgets 2.7.1 released

12th October 2006: wxWidgets 2.7.1 (a development release) is now available for download via

The main changes since 2.7.0 are detailed below. We would be grateful for testing as we work towards 2.8.0 release within the next few weeks. However please be aware that 2.7.1 is not production quality.

wxMac defaults to using the more advanced Core Graphics implementation - this is a work in progress, and we would like to hear of any problems. You can edit include/wx/mac/carbon/chkconf.h to switch Core Graphics off.


The wxWidgets Team

Changes in 2.7.1


- Added wxDir::FindFirst() (Francesco Montorsi).
- Added wxPlatformInfo class (Francesco Montorsi).
- Added wxLocale::IsAvailable() (Creighton).
- Added Malay translations (Mahrazi Mohd Kamal)
- Added reference counting for wxVariant
- For consistency, all classes having Ok() method now also have IsOk() one, use
of the latter form is preferred although the former hasn't been deprecated yet

All (GUI):

- Support for right-to-left text layout (started by Diaa Sami during Google Summer of
Code, with a lot of help from Tim Kosse and others).
- wxAnimationCtrl added (Francesco Montorsi)
- Added wxAboutBox() function for displaying the standard about dialog
- Added wxID_PAGE_SETUP standard id.
- Added wxSize::IncBy() and DecBy() methods.
- Added wxTextCtrl::IsEmpty()
- Added file type parameter to wxTextCtrl::LoadFile, wxTextCtrl::SaveFile for
consistency with wxRichTextCtrl.
- wxRichTextCtrl: fixed range out-by-one bug to be consistent with wxTextCtrl API,
fixed some attribute bugs and added wxRichTextStyleComboCtrl.
- Added wxWindow::IsDoubleBuffered()


- Implemented wxComboBox::SetEditable().
- wxSemaphore::Post() returns wxSEMA_OVERFLOW as documented (Christian Walther)
- Fixed a bug whereby static controls didn't use the correct text colour if the
parent's background colour had been set (most noticeable when switching to a
high-contrast theme).
- Respect wxBU_EXACTFIT style in wxToggleButton (Alexander Borovsky)


- Add parameter to the --enable-universal_binary configure option for the path
to the SDK.


- Automatically use stock items for menu items with standard ids.
- Setting cursor now works for all controls.
- Implemented right-to-left support
- Implemented left indentation and tab stops support in wxTextCtrl (Tim Kosse).


- Added wxTLW::UseNativeDecorations() and UseNativeDecorationsByDefault()

Wednesday, October 11, 2006

Towards quality in wxWinCE 2.8

The most mature ports of our toolkit (wxGTK, wxMSW and wxMac) are nearly equally advanced in terms of features. The development on them is "easy" - they all have the same screen sizes, keyboards, pointing devices, and sounds so once a wrapper around their native API is in place, the ports can share a common wxWidgets infrastructure for events, placement of controls etc.

A few releases earlier we started work on a new family of ports that are increasingly demanded by the market: handhelds, phones and PDAS. See more about it at

wxWinCE is the name given to wxMSW when compiled on Windows CE devices. We have a dedicated section in our manual about this port, see:

Are you a wxWinCE user? What do you miss most? When and how do you use #ifdef __WXWINCE__ in your code? Do you have some own improvements to this port? Please share any opinions and findings about the current state of the wxWinCE port on wx-dev and (for bugs and patches) the SourceForge trackers, and let's make it better together for future releases.

Tuesday, October 10, 2006

Google Summer of Code 2006: wxWidgets projects summary

Google Summer of Code 2006 is over, and it's time to take stock of what's been achieved. We had nearly 20 proposals, and in the end three projects went ahead. All of the three have contributed useful code, and needless to say we're in awe of Google's programme that gave so much and asked for so little in return. Open source in general, and wxWidgets in particular, just took another big leap this forward this summer. Thank you Google! And of course a big thank you to the three students, and to others who submitted applications - perhaps they will be working on GSoC 2007. Meanwhile, there's still the page of project suggestions for people looking for contribution ideas.

Here then are summaries of the projects.

wxWidgets Package Manager

This project promises to make it easy for people to use the many available third-party wxWidgets components, which often have unique installation methods that take time to understand. What started off as one application has become a suite of three: wxPackageManager, wxPackager and wxp.

wxPackageManager is a GUI application that lets you browse local and remote package repositories, view a summary and details of the packages, and then download, compile, install, and uninstall them.

wxPackager is another GUI application that helps you create and edit a package description file, and upload the compressed package archive to a remote repository.

wxp is a command-line utility that allows you to perform all tasks exposed by the wxPackageManager and wxPackager GUI and also create and maintain repositories of packages.

Francesco Montorsi has already worked on valuable wxWidgets enhancements, but has excelled himself in this project, bringing a high standard of coding and attention to detail. It needed a fairly broad range of skills including knowledge of GUI design and implementation, network programming, multithreading, and XML. The project will make a significant difference to the ease of use of wxWidgets components when the package format is taken up by component authors. It’s doubtful if the package manager would have been built without the support of Google.


The CVS repository where the sources are hosted:

The server which hosts the latest release of the three programs:

Screenshots of wxPackageManager and wxPackager on Windows:

The Package Manager on Windows XP:

Network class improvements

Angel Vidal’s project involved a range of fixes and enhancements to the wxWidgets network classes. These include unifying socket code for each plaform and rationalising common code; applying patches and updating the SourceForge trackers; adding proxy support for Connect() calls; improving UDP socket support; and testing on Linux 32/64, MSW and Mac OS X.

These improvements haven’t yet been incorporated into the main development branch, but we hope that after a little more work the result will be far better and more easily maintainable network code than in wxWidgets at present.

Angel's code is available in the SOC2006_SOCKET CVS branch.

Right To Left language support

As befits a framework developed by a group of people from many different countries, wxWidgets has long had facilities to help with internationalization and localization issues, but until now it had no support for RTL (right to left) scripts such as Arabic or Hebrew as we didn't have either the resources or knowledge of these languages necessary to implement it. Diaa Mahmoud Sami Abdel-Ghani started on the project to change this and to add full RTL support, including mirroring of the GUI elements, to the library. The project started well enough with the discussions of the API changes needed for this and, relatively soon thereafter, Diaa wrote the code to allow wxWidgets applications to show up correctly in Arabic locale under Microsoft Windows. Unfortunately, after the mid-term point almost no more work had been done until the very last few days of the program, and so the initial goals hadn't been fully achieved which led the mentor to give a negative final evaluation. Nevertheless, the project was far from being a complete failure as all code written by Diaa was integrated into the main wxWidgets sources and several people, notably Tim Kosse and Robert Roebling, were motivated enough by this to fix the remaining bugs and add RTL support for the GTK+ port.

So, while this project wasn't an unmitigated success from the student's point of view, it definitely helped wxWidgets as it has gained RTL support - probably imperfect but incomparably better than no RTL support at all. It wouldn't have happened without GSoC.

The RTL support is in CVS HEAD (2.7).

Beware: 2.7.1 Coming Tomorrow

wxWidgets 2.7.1 will be released on Wednesday October 11 2006 (I thought the year was worth mentioning, especially for people used to our usual release schedules). So today you have the last chance to test your code using the latest cvs sources or the last daily snapshot and let us know about any new problems in 2.7.1 so that we could fix them before the release (and, of course, break something else to compensate for it).

Please pay attention to the documented incompatible changes in the beginning of docs/changes.txt, especially if you hadn't used 2.7.0 before.

Thank you for testing!

Sunday, October 08, 2006

wxFileDialog and Windows Vista

There are some changes regarding the native file dialog
in Windows Vista. Perhaps best explained by a shell
developer here: If one changes properties of the native
file dialog, one gets the "old" file dialog from Windows XP.

Here's an example of the difference: ("Old" is the first menu
option from the filedialog portion of the dialog sample, "New"
is the second.)



The problem is that the dialogs sample uses
> dialog.CentreOnParent();
which causes Vista to revert to the "old" file dialog.

So, if you are using common dialogs just keep an
eye out if you customize it all; as even centering it
with its parent could change the appearance of it.
In fact, calling any wxWindow method can be
problematic as it can make the look of a common
dialog non-native, or it may not work at all (in
some cases on some platforms setting the
background color doesn't work, for example).

I posted on the mailing list awhile back,
but sometimes it is a lot better with pictures :D.

Also, it still happens with RC2, which is supposively
the last release before RTM (Release To Market),
so it is likely that this will stay.

For those to wish to interact with the new Windows
Vista file dialog API, they can use the IFileDialogXXX
COM interfaces. This also includes derivatives
such as IFileOpenDialog. Hopefully wxWidgets
won't end up having to support a seperate file
dialog interface; but then I guess one could
just pImpl it as well.

March of progress in action: wxAboutBox()

Finally, 13 years after its beginning, wxWidgets has gained this mostly indispensable feature of any modern GUI toolkit: the possibility to show the standard "About" dialog with one line of code. As of today, wxAboutBox() function can be used to create a dialog box like this
GTK+ About Dialog
or like that
Mac OS X About Dialog
or, if all else fails, like this
Generic About Dialog under Windows

The generic dialog is not finished however as the best way to implement is seems to be using yet another new control: the hypothetical wxCollapsiblePane. The hope is to have it soon, finish wxGenericAboutDialog next, and release 2.7.1 immediately thereafter.

What would you like to see out of wxBlog?

What would like to see out of wxBlog?

Current ideas are:
- Weekly recaps
- Just major events

Maybe this with personal commentary by
developers and former developers?

This blog was started not really out of
personal need, but more out of some of
the ideas on the developer's mailing list. I
(Ryan) will of course try to have a little fun
every now and then as well.

Feel free to comment!

Early October and a bit of September recap

The wxDataViewCtrl class gotten some documentation.
wxDataViewCtrl aims to be a replacement for wxListCtrl
and wxTreeCtrl.

A standardized, and sometimes native, way for showing
an about dialog was added to CVS. The main way to do
this is through the wxAboutBox() function .

There is a bit of discussion over the status of the
SOC2006_SOCKET branch of CVS. This was the branch
started as part of Google's summer of code to make
improvements to the wxSocket APIs and implementation.

Changes to the wxIcon API on wxMac were also proposed
in order to better interact with the native Carbon API. Ports
are often inconsistant on the ease of use with
Native APIs; for example wxMac does not have a streamlined
way to interact with all types of window handles, such as
wxWindow::AssociateHandle; often times this is due to
the design of the Native API itself.

New classes for graphics were added, including wxGraphicsPath
and wxGCDC, in order to interact with APIs such as GDI+
on Windows and Cairo. There is currently no documentation
for the classes, however. The interface is available through

2.8 Release Schedule

Welcome to the wxBlog!

There is a bit of a flurry on the development side lately
in an effort to get out a 2.8 release. According to a recent
thread on wx-dev (the developer mailing list), there are several
reasons for this. The most prevalent reason appears to be the
impending release of Leopard (or OSX 10.5), the next version of
the macintosh operating system. Stefan Csomor, the lead of the
mac port of wxWidgets, expressed that the mac port of
wxWidgets was not "up to snuff" enough for leopard.

A possible part of the reasoning is that wxWidgets
is included in Tiger (OSX 10.4), and is going to be included
in Leopard as well.

Several possible targets were discussed. Stefen expressed a
desire to get the final 2.8 release in time for Leopard,
possibly as soon as the end of the month (November 1). Some
others discussed an end-of-year target.

Currently discussions are underway for the release of 2.7.1, the
next development version.