Why Use GTK+?
An anonymous reader writes "IBM DeveloperWorks is running an interesting student article that introduces users to the world of GTK+. It explains what GTK+ is, why you should consider using it, and the benefits it provides. Together with the rest of the series, this installment provides enough introductory information that, if you decide to use GTK+ in your own projects, you'll know where to look for further materials."
One interesting consideration when determining what toolkit to go with is that the GUI toolkit for Nokia's new internet tablet is GTK+.
Save your wrists today - switch to Dvorak
GTK+ is a graphical user interface (GUI) tool kit.
Why does yahoo do this
Yeah, right. How big is the latest vbrunxxx.dll?
What the hell is wrong with printf?
You have QT Designer that is part of the QT Toolkit.
No, I'm not kidding: a dialog box with three buttons should be:
D(H:50,W:200){M:"Quit without saving?",B1:"Save"(do_save()),B2:"Don't Save"(no_op&exit()),B3:"Cancel"(drop_quit())};
These guys love to use it but it is more of a political issue than a technological one.
And now, If you'll excuse me, I've got some work to finish on Photoshop vi.
Yes Gimp still uses the Gimp Tool Kit.
vbrunxxx.dll? That's nothing. Try the .NET runtime, and talk about bloat again.
The creatures outside looked from Alt-Right to Antifa; but already it was impossible to say which was which.
No one distributes software on floppies any more. 6-8MB added to your installer isn't a BIG deal. It translates into another 30sec worth of download. If its a burden on anyone, it's a burden on your webservers.
.NET apps onto w98 systems (it won't install on anything earlier), it's a 21MB hair ball and a real paint to install. Once my employer made the decision to port their entire app base to .NET, which made development LOTS easier, but we went from a 5meg install to a 30meg nightmare that wouldn't run on w95 no matter what (still an issue believe it or not).
The Advantage of course is that for that 6-8meg, it installs with virtually no hassles, and all the way back to w95.
I've dealt with numerous ditribution issues, and while sysadmins are worried about the package size, mostly they are worried about hassle. Try shoe horning
The GTK pack isn't HUGE and it installs with virtually no problems. If download size is a problem the NSIS2 installer does support on the fly package downloads.
I would rather be ashes than dust!
Are there any cross platform (linux, mac, windows) GUI RAD tools ala Builder, yet?
Yes -- wxDesigner is a very nice RAD for use with the wxWidgets GUI-building environment. wxWidgets is a cross-platform GUI framework which uses native widgets. On Linux, it uses GTK+. On Windows, it uses Windows widgets. On Mac, it uses Mac widgets. There are other somewhat-supported platforms. This approach contrasts with that of the Qt framework -- another cross-platform builder (which is excellent), which implements all its own widgets on each platform. Also unlike Qt, wxWidgets is not bound by the GPL -- you're pretty much free to do as you like with it (i.e. incorporating it into commercial apps, without the requirement that you release your source code, or pay any licensing fee). wxDesigner is a very nice GUI RAD builder for wxWidgets. It's not free, but it's cheap. You definitely get your money's worth.
> GTK+ is a graphical user interface (GUI) tool kit.
And all this time I thought everyone was talking about a game called "Grand Theft Potassium Ion".
Sheesh, evil *and* a jerk. -- Jade
People do rave about the Qt docs I know.
Sorry, but what's wrong with http://developer.gnome.org/doc/API/2.0/gtk/, with every supporting library also document at http://developer.gnome.org/doc/API/?
Though when things get really tough and I absolutely have to know the little details, I like to hit the source http://cvs.gnome.org/viewcvs/gtk%2B/gtk/ instead.
Why not wxWidgets? It's more flexible if you ask me. It simply wraps the native GUI stuff, or an other toolkit like GTK+.
I don't have any numbers, but I think the performance would be better and the distribution size shouldn't suffer much (as with Qt or GTK+).
IBM seems to skip over one of the biggest reasons to NOT use GTK+ - it just doesn't look right on Windows. I'm not sure who said it but a commentator suggested a while ago that one of the reasons open-source programs weren't overtaking closed source was due to a lack of polish (which does of course cover more than just appearance); he used GAIM vs. MSN Messenger as an example. The jarring difference between controls in GTK+ or Java or even Mozilla to some extent vs Win32 is important when you're creating an application for normal end users. In my opinion, that difference can look unprofessional. I would figure that the issue of appearance could be mitigated but it hasn't yet so I don't know for sure.
A question for someone who knows more about GUI toolkits: What are the issues involved in matching the appearance between toolkit controls and the native controls?
No one distributes software on floppies any more. 6-8MB added to your installer isn't a BIG deal. It translates into another 30sec worth of download. If its a burden on anyone, it's a burden on your webservers.
I think you meant to say it IS a big deal, since it translates to 30 MINUTES of extra download time on a dial-up line, which unfortunately most users are still stuck with. Even broadband lines aren't all 1.5Mb/s.
if it depends on 6-8 MB for GTK
Our cross-platform "hello world" program including Gtk is about 300K compressed in total on Windows.
Rich.
libguestfs - tools for accessing and modifying virtual machine disk images
And MFC.DLL is the equivalent of maybe half of glib and the stubs for the rest of the libs. Count all your non-Office OCX files; those are delivering the rest of the equivalent capability
All's true that is mistrusted
One issue that I like to look at when I'm thinking about GUI toolkits is the question of what programming languages does it support.
I often need to rapidly prototype a graphical UI, and one that's not just a standard set of static attributes. I find that for these cases the graphical layout tools fall down pretty quickly, and I'm back to writing code to make the UI.
Now, if I'm going to be writing code for GUI prototypes, I want code that I can write, test, and show off fast. I don't want to start a language war, but to me that says "not C++."
So a big question for me is "what other languages does your toolkit support easily?" Is there a good perl interface? python? scheme? What can I use to lash it together quickly?
For this kind of thing, sadly enough, it seems like the venerable Tcl + Tk combination is still hard to beat.
And when you need an alternative language APIs, we need documentation that is native to those languages. All too many of these toolkits provide some rudimentary alternative UI, but it's just an export of the C++ API, and the programmer is expected to read the C++ documentation, and mentally convert that to the appropriate perl, python or what-have-you alternative.
So what are the easy cross-platform, scripting UI alternatives? Tcl + Tk, python + wxWidgets, and what else? Any way to get at those Swing libraries without heavy lifting with Java?
I haven't read the article, since GTK+ is already my preferred GUI toolkit. And this in spite of the fact that I run KDE as my primary desktop! I run both Gnome and KDE, and my choice of KDE over Gnome is based more on organization and flexibility than it is on the underlying GUI toolkit.
As background: My wrote my first GUI programs back in the days of Window 3.1, and while most of my work is on data-crunching engines, I do write quite a few GUI applications. I need to rapidly generate an interface, back it with code, and have it presentable on Windows and Linux.
As a programmer, I don't like QT. It feels klunky, bloated; nor do I find QT Designer all that friendly. Beyond matters of taste and comfort, TrollTech requires a commercial license for certain tools (e.g., a MathML widget) that I can obtain under GPL for GTK+.
I'm rather fond of Glade. Most of my GTK+ GUI programs are in C, some in C++; I define an interface in Glade, fill in the appropriate functions, and I'm ready to rock and roll.
GTK+ 2.8 brought with it Cairo, a very nice drawing toolkit. I just put together a little interactive graphics application, just to better familiarize myself with Cairo, and the result is quite nice.
In the near future, I'll be writing some very extensive OpenGL applications, and I'll likely wrap these in a GTK+ GUI. If something better comes along, I'll try it -- but for now, GTK+ provides what I need. Your mileage may vary.
All about me