wxEmbedded: wxWidgets for embedded applications |
Contents1. Introduction to wxEmbedded
2.2 wxWidgets for GTK+ 2.3 wxWidgets for Nano-X 2.4 wxWidgets for Microwindows 2.5 wxWidgets for MGL 2.6 wxWidgets for Windows CE 2.7 wxWidgets for Palm OS |
Of the four ports listed, all but wxWinCE and wxGTK use the wxUniversal themed widget set, which implements the widgets entirely using wxWidgets primitives. The WIN32 theme is a very authentic reproduction of the Win9x look and feel, and users would be hard pressed to tell the difference.
Other ports are possible, such as a Linux framebuffer port.
Let's examine each of the embedded ports in turn.
wxX11 can optionally be compiled in Unicode mode, and text will be rendered using Pango.
Status: this port is 95% working, with a small number of areas that need attention, such as clipboard, text selection, tab navigation and speed optimization.
To get and build wxWidgets for X11, download wxWidgets from the CVS repository, and follow the instructions in docs/x11/install.txt. Or, download the wxX11 development snapshot. See also Getting Started for notes on downloading and using the ARM cross-compiler.
![]() |
The wxWidgets Life! demo under GPE on the iPaq |
To get and build wxWidgets for GTK+, go to the download page. You can also download from the CVS repository. See the instructions in docs/gtk/install.txt.
For more information about wxGPE, Robert Roebling's port to GPE, see here. Older screenshots are available below.
This is similar enough to X11 to allow the port to use the X11 code, with API replacements and some #ifdefing.
Status: this port is 70% working, with areas that need attention including transparent pixmap drawing, clipboard, text selection, tab navigation and speed optimization.
To get and build wxWidgets for Nano-X, download wxWidgets from the CVS repository, and follow the instructions in docs/x11/install.txt and docs/x11/readme-nanox.txt.
Essentially it's the wxMSW (desktop WIN32) port, with compatibility files and #ifdefs for Microwindows, and using wxUniversal for the widgets. Unlike the Nano-X API, only one process can use the Microwindows WIN32 API at a time, because the GUI calls are not marshalled. This severely restricts the usefulness of this port, although several applications can be merged into one to emulate a multi-process environment.
Status: this port is 70% working, with areas that need attention including transparent pixmap drawing, clipboard, text selection, tab navigation and speed optimization. Because of the limitations discussed above, this port is not being actively maintained and so tweaking may be required to get it to compile from CVS.
To get and build wxWidgets for Microwindows, download wxWidgets from the CVS repository, or get the latest wxMSW development snapshot from here, and follow the instructions in docs/microwin/readme.txt.
wxMGL is the port that wxUniversal was originally written to support. SciTech Software have done us an enormous favour by sponsoring wxMGL and wxUniversal.
Status: this port is 99% working, with samples running on DOS. Issues remaining include minor window manager refresh problems. See SciTech's wxMGL page for information and screenshots. You can download MGL from here.
To get and build wxWidgets for MGL, download wxWidgets from the CVS repository, and follow the instructions in docs/mgl/install.txt (instructions coming soon).
Status: the minimal sample and others are running under emulation using eVC++ 3 and 4 and the latest wxWidgets CVS (or wxWidgets 2.5.2). For a screenshot of the minimal sample running on an iPAQ and industrial hardware, see this page.
To compile wxWinCE:
For more information, including a to-do list, please visit (and contribute to) the wxWinCE Wiki page.
![]() |
wxEmulator with an iPAQ skin |
wxEmulator will help developers to see how their host-targetted applications will behave on a PDA-style screen. Since the target will be running an X server (and Linux kernel) with similar capabilities to the host, this is a reasonable way to do development before cross-compiling and uploading to the target. It also makes life easier for developers who don't have access to hardware, or people just wishing to experiment. Of course, it doesn't emulate the available memory on the target or other target-specific features, since the applications simply run on the host.
A screenshot of wxEmulator with an iPAQ skin running twm and the wxWidgets fractal demo is here.
A screenshot of wxEmulator running Matchbox and the wxWidgets toolbar demo is here.
To compile wxEmulator, download the wxX11 distribution and compile utils/emulator/src. You will need to have Xnest in your path; you can download Xnest from the XFree86 site. See utils/emulator/docs/readme.txt for more information. There is currently a problem on some Linux systems whereby the Xnest window does not integrate with the emulator window: fixes are invited for this!
The existing desktop application development tools can be used too, including:
The suite might include components such as:
![]() The Life! demo running on the iPAQ |
Download the cross-compiler archive here (27 Mb) and copy it (as root) into
/usr/local
Unpack it by calling
tar -xzvf ArmX11ToolChain.tar.bz2
which will create a new directory called arm. Set the path like this:
export PATH=/usr/local/arm:/usr/local/arm/bin:$PATH
Configure your package with:
configure --x-includes=/usr/local/arm/X11R6/include --x-libraries=/usr/local/arm/X11R6/lib --host=arm-linux --build=i586-linux
Get the sources from wxWidgets' CVS repository using the 2_4_BRANCH tag, or download the latest version of wxX11 from the here. You need 2.3.4 or above.
Configure with the options given above. For reasons of efficiency and for removing features which make no sense for PDAs, we suggest adding the following switches to the configure command:
--with-x11 --without-gtk --prefix=/usr/local/arm --enable-no_rtti --enable-no_exceptions --disable-threads --disable-sockets --disable-joystick --disable-mdi --disable-printarch --disable-postscript --disable-resources --disable-prologio --with-zlib=builtin --with-libpng=builtin --with-libjpeg=builtin --with-libtiff=builtin --prefix=/usr/local/arm
For simplicity, you can use this shell script which will configure wxX11 as described above. You may need to edit it so that it actually finds configure. The script assumes configure to be in the parent directory by default. Install the library with make install as root.
For compiling your own programme set the PATH environment variable as described above and use the wx-config utility to get the compile options and link flags.
For a particularly easy way to install a dual boot system for WindowsCE and Familiar look here.
For more information about cross-compilation, see Building TinyX for Handhelds and Building X Client Programs for the iPAQ on the handhelds.org site.
Instead of cross-compiling, you can use the Public Development Cluster at Compaq's Cambridge Research Laboratory.
You can reduce code size by configuring with only the wxWidgets classes and features that you need. You may also wish to add new options to the configuration system to increase the granularity. For example, you could make the themes configurable - at present all themes are compiled into wxWidgets, and each theme represents a substantial amount of code.
If you wish to run several wxWidgets applications on your target, then it makes sense to use the shared library version of wxWidgets. The shared library is about 2.5 MB.
wxWidgets for X11 does not require GTK+, GDK or even the Xt toolkit, so you may be able to remove these components from your embedded Linux distribution.