I love the GTK+ GUI toolkit. It is fast, looks simple and clean, and is a snap to program in C. wxWidgets is C++ only and a bit on the complex side, the Win32 API is unnecessarily complex and is proprietary, and the less said about Qt (anything but “cute”), the better. What kind of toolkit requires one to code in nonstandard C++ that has to be translated to standard C++ through an intermediary tool (moc)? Qt, please die.
One thing that gets me about GTK+ sometimes, though, is the documentation. Even though there is a lot of it, it does not have a lot of examples and specifics on exactly how to do things. If you’re reading, GTK+ documenters, more examples would be wonderful, thanks.
Fortunately, they added one thing to a standard (full, which means on non-sourcebased systems, the library and the development packages) install that is a wonderful addition to the standard documentation: gtk-demo. If you have the full GTK+ packages installed, go try it out (from a command prompt). “Demo” applications for things such as this are usually woefully simplistic — they are generally a “hey, look what this package can do” program, and little else. gtk-demo, on the other hand, not only gives you a lot of small demonstration GTK applications, it also provides the source code behind them, to show you exactly what to do to achieve a certain effect. Need to know how to do a text expander? Double-click “Expander” and get the sample app, then click the “Source” tab on the right side of the main window to get full commented code for the text expander widget.
There are a couple of interesting effects in there, too, such as the “Pixbufs” code, which show icons rotating and scaling in a circular motion, and “Multiple Views” (under “Text Widget”), that shows how to insert widgets, images, colors, hyperlinks, etc, into a text field. Useful for rich text-type applications. The rest may be more mundane to the average viewer, but to a GTK+ coder, it’s a wealth of information.
I love little things like this.