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
You have QT Designer that is part of the QT Toolkit.
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.
Biased by my own project wyoGuide (see http://developers.slashdot.org/comments.pl?sid=172 263&cid=14343909) I can say that wxWidgets is probably the best choice for cross-platform development.
O. Wyss
See http://wyoguide.sf.net/papers/Cross-platform.html
Then again, actually GTK has what you want anyways, despite my earlier response rant:
All's true that is mistrusted
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.
No, the current stable win32 GTK+ runtime is 3.5 MB. Here's the download page.
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?
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
No problem is insoluble in all conceivable circumstances.
Sean Egan's Open Source Messaging Application Development: Building and Extending Gaim covers basic to intermediate GTK+ programming [with sockets, no less] quite nicely. He meticulously describes everything he does with numerous examples. He never skimps on the details and even gives insights into his own thinking on most problems.
It's a very, very good read, even for non-Gaim developers. On the plus side, you'll be supporting open-source development if you purchase it.
I don't know about the C# message dialog, but Java's Swing has a very similar method to which you can add an array of new names for the buttons. I would expect the C# method to allow for the same.
Centralization breaks the internet.
In many industries, this is the preferred method. I know our company increasingly is offered (and purchases) laboratory information management systems (LIMS) and curated databases with various front-ends that are Java apps.
.Net holds some promise here. It won't be useful in our industry until it's well-supported outside Windows, but I imagine that there's other industries that still have less heterogeneous environments...
Comment as you will, they have actually proven to perfom exceptionally well and been quite resilient and easy to install across a variety of platforms (like most in our industry, we have a combination of Windows, Mac OSX, and Linux desktops with Solaris, Irix, and HP/UX servers).
For things like Linux, the ability to treat jar-files as native executables (using the binfmt-misc mechanism) makes it dead-simple to deploy apps.
This is not entirely unique to Java.
I whole-heartedly favor cross-platform VMs to whatever extent they are appropriate and I really don't buy the "jarring difference in appearance" argument. Clipboard interoperability, maybe; hosting native media widgets, sure, but button textures? Dumb.
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
> 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 GTK+, see http://www.gtk.org/bindings.html, where they have a status table for ~28 languages. Presumably the Qt site does the same thing.
> 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.
FWIW, the GtkAda project does provide pretty good documentation, both a User's Guide and a Reference Manual. There are holes sometimes, but they usually tell me everything I need to know.
Sheesh, evil *and* a jerk. -- Jade
How is that easier than this example from the Qt dcoumentation:
QMessageBox::question(this,tr("Overwrite File?"),tr("A file called %1 already exists.Do you want to overwrite it?").arg(filename),tr("&Yes"),tr("&No"),QString:
Note that Qt provides translation to your local language and choice of button text and keyboard shortcut as well.
for much of GUI history, it's been easier to write GUI code for Windows than for almost any other platform.
Maybe I don't know much about GUI history, but at least from the late 1980s when I started writing GUI code for VAXstations until today I have never noticed anything as being easier in MS-Windows. The Petzold book was well written, and maybe that's why you think it was easy, but any advantage that MS-Windows had stopped there. I have written or supported GUI code in Xwindow, Motif, Qt, MFC, OWL, Gtk, FLTK, Tk, wxWinodws, Java, and maybe a few others that I can't remember right now.
My personal choice of toolkit for new projects is Qt, due to three factors: an excellent API, the absolutely best documentation of all those I mentioned above, and a good set of development software, consisting of kdevelop and Qt Designer.
Yet another slashdot article referring to a product without explaining the purpose of said product.
GTK+ is a toolkit for GIMP.
GIMP is an open sourced graphics manipulation package (think Photoshop but free as in speech and beer).
I am government man, come from the government. The government has sent me. -- G.I.R.