wxDesigner - info

info about wxDesigner

Info about wxDesigner

wxDesigner is a tool written to make creating dialogs for wxWidgets based programs easy and fast.

wxWidgets is a cross-platform toolkit and it thus cannot make use of native resource formats as they typically exist for many platforms. For that reason, wxWidgets has been optimized over time to make writing dialogs by hand as easy as possible, but this approach has limitations as soon as dialogs reach a certain complexity. Even without the inevitable number of typos, writing nice looking dialogs is a hassle and reordering the items in a dialog often amounts to rewriting the dialog from scratch. In addtion to being quite some work, writing dialogs also requires a profound and exact knowledge of the syntax used for creating and positioning dialog items.

Another problem when writing dialogs using the wxWidgets library is that some users might want to make use of the RAD features of the Python bindings during development, but create a native binary using C++ at the end. This would entail rewriting (or at least reediting considerably) all dialog related code.

wxDesigner offers a solution to both problems. Its interface allows anyone somewhat familiar with wxWidgets to create aesthetically pleasant and cross-platform dialogs in a matter of minutes. Higher-level features such as supporting copy/cut/paste, infinite undo/redo and previewing make quick testing easy and safe. Additionally, all dialogs can be used in C++, Python, Perl and C# - making co-development easier than ever.

One of the most important problems of cross-platform dialog design is that dialog items (aka widgets) tend to have a different size on different platforms. Typically, a Motif widget has rather large borders, whereas a Windows control tries to use as little space as possible. Addionally, the user is often able to change the font size or choose a different "skin" or "theme" for all dialogs, resulting in different proportions etc. Last not least, the size of widgets can vary if dialogs get translated into other languages, as a word usually has a different length in different languages.

Many traditional dialog editors ignore these problems and leave the burden of rewriting or redesigning to the programmer, whereas wxDesigner uses wxWidgets' smart layout system based on so called sizers, which treat dialog items as groups laid out in certain patterns, such as in a simple row or column or more complex grids. Since sizers query the controls about the individual size requirements at run-time, changes in font sizes etc won't do any harm, the dialog will grow or shrink accordingly. wxDesigner makes using sizers easier than ever, since it allows for changing the sizer type on the fly, inserting sizers into an existing hierarchy of sizers with a single mouse-click and copying any pasting dialog items or sizers containing various dialog items to and from the clipboard.

The next step when writing GUI programs and dialogs in particular is to add event handlers. This can only be done in the form of source code, and therefore wxDesigner supports generating source code, either new files, new classes, event handlers or getter functions to get access to the controls in the dialog. All this is integrated in a syntax-highlighting source code editor that is part of wxDesigner.