Gtk Qt Wxwidgets Comparison Essay

Comparing IUP with Other Interface Toolkits

Why to still maintain IUP if today we have so many other popular toolkits?

This is a question we always ask to ourselves before going on for another year.

To answer that question we must first define the characteristics of the reference toolkit, list the available toolkits and compare them with the reference and with IUP.

We would like a toolkit that has:

  • Portability. That provides an abstraction for Graphical User Interface in Windows, UNIX and Macintosh. Also called Cross platform and multi-platform GUI toolikit.
  • Free License and Open Source. This means that we can also produce commercial applications. The pure GPL license can not be used but the LGPL can but must contain an exception stating that derived works in binary form may be distributed on the user's own terms. This is a solution that satisfies those who wish to produce GPL'ed software and also those producing proprietary software. Many libraries are distributed with this license combination.
  • Small and Simple API. This is rare. Many libraries assume that an Interface toolkit is also a synonymous of a system abstraction and accumulate thousands of extra functions that are not related to User Interface. At Tecgraf we like many small libraries instead of one big library. Almost all available toolkits today are in C++ only, so C applications are excluded, also this means a hundred classes to include and understand each member function. The use of attributes makes a lot of things more elegant and simpler to understand.
  • Native Look & Feel. Many toolkits draw their own controls. This gives an uniformity among systems, but also a disparity among the available applications in the same system. Native controls are also faster because they are drawn by the system. But the problem is what's "native" in UNIX? Some commercial applications in UNIX start using Motif as the "native" option. It was the official standard but because of license restrictions, before the OpenMotif event, the system became old and some good alternatives were developed, including GTK and Qt.

Toolkits

With these characteristics in mind we select some of the available toolkits:

NameLicenseLast UpdateVersionLanguagePlatformsControlsTeamComments

FOX

LGPL*1997-2016/051.7.56Win, X2great look, license restrictions

FLTK

LGPL*1998-2014/111.3.3Win, X, Mac4was from

GTK+

LGPL*1997-2016/033.20Win, X, Mac11target for

Qt

LGPL1994-2016/065.7Win, X, Macown(many)Is free for Non Commercial, a dual-licensing model, basis of KDE, Emulates the native look and feel

wxWidgets

LGPL*1992-2016/023.1Win, X, Macnative6X can use Motif or GTK, has many contributors

IUP

MIT1994-2016/073.19CWin, X, Macnative2

Table Last Update: July 2016

More toolkits can be found here: The GUI Toolkit, Framework Page and List of widget toolkits.
An interesting article can be found here: Bad UI of the Week: The Cross-Platform User Interface.

Discussion

FOX has a great look but the license can be restrictive in some cases.

FLTK promises a new version with a better look and new features, but there are no concrete release dates. The FLTK documentation also does not help.

GTK+ can be used as a replacement for Motif, but not as a fully "portable" toolkit since it is was originally target for X-Windows. Nowadays GTK+ is a great free C toolkit. But some predefined dialogs could be the native ones, like the File Selection, specially in Windows. The Windows port has a look and feel very similar to the Windows native look and feel, but it is different from a native application. A MacOS X port without using X-Windows is on the way, but very slowly. Unfortunately the Windows port has been orphan for some time and there is no release of new binaries for a while.

wxWidgets is an excellent choice because of the native controls and its portability.

Qt had several license limitations, but since mid 2009 a new license model take place and it became more attractive. It is a very stable and powerful toolkit. Nowadays in terms of professional development Qt is the most prominent one.

It is hard to compare IUP with wxWidgets and Qt since they are much more than an User Interface Toolkit. They are complete development platforms that include several secondary libraries not related to User Interface. In IUP we focus only in Graphical User Interface. Also both have a heavy C++ API with some very complex constructions that may be more complex to understand.

Developing IUP

IUP has a C API, only has functions for Graphical User Interface, and uses "Native Controls" in Windows, Motif and GTK+. These are the major differences between IUP and other toolkits. Because of that IUP is small, fast and very powerful.

We have a small but very active team and we have many Tecgraf and foreign applications that today use IUP, collaborating for its evolution. Our objective is to surpass the Tecgraf needs, keeping backward compatibility and improving the internal code.

IUP does not have a wide localization feature, it only includes support for messages in English, Spanish and Portuguese.

Why Not Mac? The first Mac driver was developed for MacOS 9 and had several memory limitations so it was abandoned. With Mac OS X we have the opportunity to do something better. Today IUP runs on Mac OS X using X11 with Motif or GTK. We plan for the future to build a native driver, but it is not a Tecgraf priority.

Why Still Motif? Motif is very important for non Linux systems, some Tecgraf applications run on old AIX, SGI and Sun systems, that only have Motif installed and we can not force the installation of other toolkits like GTK.

.. "Make it Reusable, Make it Simple, Make it Small" ...

I need to write an application that will be visually indistinguishable from something written natively for Windows XP/Vista/7 using whatever comes by default with the most modern Visual Studio. But I'm developing using MinGW and Vim (in C++).

In particular, I want the following controls to be native on the above three versions of Windows: form chrome, buttons, check boxes, menus, combo boxes, progress bars, scrollbars, rich text boxes. This will be enough for me.

I know that if you load GdiPlus and other things like as needed, and use Windows API to instantiate controls, then the OS will substitute its version of GdiPlus or other library, so it will look like XP style controls on XP, Vista on Vista, etc.

But I don't want to use plain Windows API, because even retrieving the default font takes half a page of code, and similar stories whatever I want to do. So I'd like to use a toolkit.

wxWidgets, Qt, GTK+, FLTK seem like the most widely used. But they are all cross-platform. I've used cross-platform applications, and many of them have foreign GUI controls (I call them widgets). So my question is: which of these toolkits can be made to produce true native-looking UI controls listed above, appearing correctly on the three versions of MSWin listed above?

I've typed each of them +" windows" into Google Images, but it's hard to tell, except that FLTK probably can't do it. Many of you must know the answer off the top of your head...

c++windowsuser-interfacegtkwxwidgets

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *