The Importance of the GUI in Cross Platform Development
In contrast to the well-focused, Linus-centered Linux kernel development, everyone has their own idea for GUI toolkits and proceeds in their own direction. They usually only make it 90% of the way. A new toolkit comes along, reduplicates the first 90%, then fades away or is overtaken by another toolkit that charges ahead but never reaches the goal. These GUI toolkit development projects cannot seem to sustain the energy and support needed to add that last 10%. The contents of this “last 10%” vary, but usually include such things as support for internationalized input methods and fonts, and threads. This is frustrating, to say the least.
If I had my way, Fresco would be the number one toolkit for everyone to work on. However, I can't force anyone to do that, and I can't do it all myself. Many others, with different favorites, are in a similar predicament.
Not everyone will share my taste (understatement), but here are my thumbnails of some of the most promising candidates. Note that most of my own interest in cross-platform development has been for Linux (UNIX/X11) and Windows. If a solution also supports Macintosh and OS/2, it's merely an extra bonus. I have favored toolkits that are free and unencumbered of odious licensing restrictions. There are about 100 GUI Toolkits listed on the “GUI Toolkit, Framework Page”, so clearly this is just a small sampling.
Fresco is an object-oriented user-interface toolkit, designed by Mark Linton, among others. Mark Linton led the development of the InterViews toolkit at Stanford, and he seems to have learned a lot about GUI API design from that experience. Fresco is implemented in C++ (Ada and Java versions are also available) but the programming interface is written in IDL (Interface Definition Language) and so it is language neutral. Fresco uses CORBA and supports distributed graphical embedding. It supports structured graphics and resolution independence. It supports X, Windows and Macintosh. Widget implementations are exposed through kits which can allow a different look and feel on each platform; however, only a Motif look and feel has been implemented.
With Fresco it is very easy to extend widgets and write new ones. I wrote a simple, yet flexible table widget in a couple of hours. It uses the concept of a DAG (directed acyclic graph) of glyphs, which can be figures, layouts or widgets. The DAG includes full 2-D transformation information, which makes for some impressive demos. One example is a drawing editor that embeds a copy of itself in the drawing, scaled and rotated, that is still fully functional. It is both cool and powerful. For layouts it uses TeX's concept of boxes and glue, which is also convenient and powerful.
However, I guess Fresco is one of those things that is almost too good to be true. Originally a contender as a new X consortium standard, the companies that sponsored the work have abandoned it, and commercial UNIX is going with Motif instead. This places a lot of responsibility on anyone who decides to use Fresco. If there is anything you need, you'll probably have to write it yourself. The two biggest missing pieces are support for printing and for the system clipboard/selection. Fresco needs more widgets, more polishing, and more documentation, i.e., it needs more people working with it and on it.
I recommend looking at the design of Fresco even if you don't plan on using it. Fresco may just be ahead of its time. Look for some of the concepts included in Fresco to be hailed as brand new revolutionary technology in the next 10 years.
OpenStep is a GUI API (along with some non-GUI functions) originally based on the NextStep system. GNUstep is a free implementation of OpenStep. It is a work in progress and has not really reached a usable state yet.
The API seems above average. One nice feature is the use of the powerful Display Postscript for screen drawing which makes printing close to trivial.
The biggest issue is that it uses Objective-C. I don't feel like learning one more language, but after years of trying to find the best solution to the GUI toolkit issue, I may. With the recent Apple-Next hype going on, OpenStep could get enough momentum and hype behind it that using it for free software could pay off. Apple has adopted OpenStep as the future direction for the MAC API, and they will also provide an implementation for Windows. However, the future success of Apple and OpenStep is unclear.
GNUStep is licensed under the LGPL so it can be used in both free and commercial programs.
wxWindows was one of the first free C++ cross-platform GUI toolkits. It takes the wrapper approach to providing cross-platform functionality, wrapping either Motif or XView on X and Windows widgets on Windows. There is also a partial port of an older version of wxWindows to Macintosh.
wxWindows has much practical functionality and lots of development activity, but it suffers from the disadvantages of wrapping other widget libraries rather than implementing its own. It's not as consistent and flexible as it could be. Different platforms often have different functionality and different bugs, and development between platforms is not always in sync; therefore, you have to be careful that your program actually works on all platforms.
There are many extra high-level widgets written in wxWindows, such as tables and HTML viewers. wxWindows also provides some higher-level architecture functionality such as a Doc/View and Print Preview, although I have not personally tested these.
If your program doesn't require more advanced interfaces than provided by the common functionality of the simple native widgets across platforms, wxWindows is a good, practical choice.
A new version of wxWindows in the works, version 2.0, will have some changes in the API in an attempt to make it more functional. There is also a project to make wxWindows wrap the GTK widget library, and a project to implement generic widgets using wxWindows drawing calls. It is too early to predict how these changes and additions will affect the future of wxWindows.
- Readers' Choice Awards 2013
- IBM Will Minimize Impact of Future Disasters
- RSS Feeds
- New Products
- Sublime Text: One Editor to Rule Them All?
- December 2013 Issue of Linux Journal: Readers' Choice
- Linux Systems Administrator
- Senior Perl Developer
- Technical Support Rep
- Tech Tip: Really Simple HTTP Server with Python
- Reply to comment | Linux Journal
12 hours 58 min ago
- It's Jupiter
13 hours 57 min ago
- GIMP is certainly a graphic
14 hours 59 min ago
- Thanks For Your Sharing
19 hours 45 min ago
- Studying linux, and looking
23 hours 10 min ago
- voting for Best Linux Distribution
1 day 7 hours ago
- tizen vs android
1 day 11 hours ago
- i switch my choice from KDE
1 day 12 hours ago
1 day 15 hours ago
- Belanja Online
1 day 17 hours ago