News Archive (1999-2012) | 2013-current at LinuxGizmos | Current Tech News Portal |    About   

Article: Introducing wxEmbedded — wxWindows support for small devices

Oct 3, 2002 — by LinuxDevices Staff — from the LinuxDevices Archive — 20 views

Robert Roebling has announced the first beta release of wxEmbedded, a new open source graphical windowing environment for small devices. Here is a brief overview from Roebling about wxEmbedded, along with some background on the wxWindows project from which wxEmbedded is derived . . .



Introducing wxEmbedded

The first beta release of wxEmbedded is now available. wxEmbedded is the project name for support for small devices in wxWindows (mainly PDAs, currently). wxWindows is a free GUI library (described further below) which uses native controls instead of drawing them itself. Wherever a feature is missing, wxWindows will provide its own replacement. In the case of wxEmbedded, we use X11 as our backend; and since X11 has no controls at all, we provide the complete GUI ourselves.

There is support for the GTK library as a backend for wxWindows (in both version 1.2 and the new version 2.0), so if GTK were to become the open source standard for PDA GUIs, wxEmbedded would be able to switch over to its GTK backends (or use both).

Here are the first screen shots taken from the frame-buffer on an iPaq running the X11 version of wxWindows (wxX11). As an example, I have taken the nice Life! demo that comes with wxWindows. The images show various classes of wxWindows, including the file open dialog, the message box, a scrolled window and menus.

Further information about wxEmbedded, including binaries for a cross-compilation tool-chain with X11 support and screen-shots, is available here.

Note that this is the first public version of wxEmbedded, so it is likely to have bugs and not-yet-implemented features. Notably, there is no socket support in the X11 backend yet.

Background on wxWindows

wxEmbedded is part of the wxWindows project, a 9-1/2 year old project which was started by Julian Smart. Back then, it was a C++ GUI library supporting some basic GUI features for 16-bit Windows and XView — which at that time were two of the most popular user interfaces.

The library was rewritten completely around four years ago, resulting in wxWindows 2.0, and thereafter the project's focus shifted to supporting 32-bit Windows and Unix through the GTK and Motif toolkits. By being (almost) the only toolkit that relies on native widgets, wxWindows is practically the only way to write cross-platform apps with, for example, native Windows XP look and feel.

Additionally, features were added which went beyond simple GUI aspects, such as imaging, network classes, string and other container classes, Unicode support (so far for Windows and GTK 2.0), multithreading support, stream classes for data and text formating, a very popular HTML display engine, and even database support through an ODBC interface. Later additions included language bindings for Python, Perl, Lua, Basic, and JavaScript, with wxPython being by far the most popular. Also, a port to MacOS 9 and X was added and is now fully functional. In addition, several GUI builder projects were started with different complexities and different goals; wxDesigner is the most complete of these. Recently, a port to OS/2 Presentation Manager has been added (Dave Webster).

wxWindows is the base for many free (Audacity, Mahogany, GNU Enterprise) and several hundred commercial software projects. The latter is encouraged by a very liberal license — more liberal than the LGPL.

Going embedded

Until about a year ago, wxWindows always made use of existing widget sets. But with the emerging PDA and embedded markets, this was becoming a liability since wxWindows would obviously not run on a framebuffer or X11 device. Therefore, a company-financed effort was started (and finished) to write our own themable, 'pure' wxWindows widget-set that could be used on top of 'simple' drawing libraries providing only graphics primitives.

The first such library was the MGL library written by SciTech. Through the wxMGL port, wxWindows apps indeed run on QNX and DOS (!) as well as many other systems supported by MGL. What was missing was a direct port to X11, which was becoming more interesting since X11 had been ported to PDAs by Compaq and others.

Since I am the author of the GTK version of wxWindows, and indeed the author of much of the low-level drawing code in wxWindows as a whole, Julian Smart and I wrote the required X11 routines (this took only about three weeks) to make wxX11 run nicely without any other toolkit around. I then bought an iPaq, read about two dozen how-tos, readmes, and five mailing lists, and downloaded everything needed to get a functional X11 cross-compiling environment. The tool-chain on my homepage is the only X11 tool-chain which you can download and 'just run' for cross-compilation as far as I can see — and I looked very carefully to find one to spare me all that work. (It can be used without wxWindows.)

wxWindows has been developed by about a dozen volunteers. The main work on the X11 backend, the adaptations of the library to make it look nice on mini-screens (with run-time screen layout tests), and the cross-compilation work was done by me. Vadim Zeitlin (who has a PhD in physics) is the author of the new widget set (he also maintains most of the Windows port).

Other contributors work in various countries and industries. For example, Julian Smart started at the Artificial Intelligence labs at the University of Edinburgh, and recently worked for the embedded department of Red Hat on the eCos project.

Future plans

We would like to add support for Windows CE. We already have support for Windows and we have some real WinAPI Gurus on the team, but this has just not happened yet, although one guy actually did send a patch to make wxWindows compile for Windows CE. Being able to write apps for Linux PDAs and for PocketPCs from a single source is our 'official' goal.

wxX11 is not perfect either. For example, we need to adapt the font dialog to PDA screen size, and maybe add printing through IrDA. Integration with the MatchBox WM is already quite good, as the screenshots demonstrate, but we might try to get a common metal look through the theme support in wxX11 (I have already started work in that).



About the author: Robert Roebling is a medical doctor. He wrote his thesis on bacterial toxins, and currently works in the pre-surgical epilepsy department in the Deptartment of Neurology of the University of Ulm, Germany. He is responsible for much of the neuro-imaging in his department, and works on software for detection of cerebral lesions that lead to epilepsy. Roebling also studied Computer Sciences, as his second subject at the University of Freiburg, Germany.





 
This article was originally published on LinuxDevices.com and has been donated to the open source community by QuinStreet Inc. Please visit LinuxToday.com for up-to-date news and articles about Linux and open source.



Comments are closed.