Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
Check out the new SourceForge HTML5 internet speed test! No Flash necessary and runs on all devices. ×

Why Use GTK+? 356

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."
This discussion has been archived. No new comments can be posted.

Why Use GTK+?

Comments Filter:
  • Does gimp still use GTK+ of some version or some other for its toolkit?
  • Nokia (Score:5, Informative)

    by ultrabot ( 200914 ) on Tuesday December 27, 2005 @05:32AM (#14343803)
    One interesting consideration when determining what toolkit to go with is that the GUI toolkit for Nokia's new internet tablet is GTK+.
    • Re:Nokia (Score:4, Informative)

      by Anonymous Coward on Tuesday December 27, 2005 @06:12AM (#14343907)
      It's actually a modified version of GTK+, with some components removed (those that they felt weren't needed given the constraints of the device) and some new stuff added in (mainly the "Hildon" libraries) for creating new applications that can take advantage of the device-specific widgets and layout.
      • Re:Nokia (Score:3, Informative)

        by ebassi ( 591699 )
        The interesting bit is that, thanks to the Maemo project, Nokia is gving back to the community some of the changes made to the GTK libraries - namely, the stylus mode and other issues that emerged during development of the Hildon platform library.
  • What is GTA? (Score:3, Informative)

    by earthstar ( 748263 ) on Tuesday December 27, 2005 @05:32AM (#14343804) Journal
    For those who didnt RTA,

    GTK+ is a graphical user interface (GUI) tool kit.
    That is, it's a library (or, in fact, a collection of several closely related libraries) that allow you to create GUI-based applications. Think of GTK+ as a toolbox in which you can find many ready building blocks for creating GUIs.

    Originally, GTK+ was created as a spin-off of another well-known open source project: the GNU Image Manipulation Program (GIMP). While working on early GIMP versions, Peter Mattis and Spencer Kimball created GTK (which stands for GIMP Toolkit) as an alternative to the Motif tool kit, which at that time was not free. (The plus sign was added to the name later, when the tool kit gained object-oriented features and extensibility.)

    That was almost 10 years ago. Today, a lot of activity is still going on with the latest GTK+ version -- 2.8 -- and while GIMP certainly continues to be one of the best-known programs using GTK+, it is by far not the only one. Literally thousands of applications have been written for GTK+, and at least two major desktop environments (Xfce and GNOME) use GTK+ to provide a full working environment for users.
  • Interestingly... (Score:5, Informative)

    by Lendrick ( 314723 ) on Tuesday December 27, 2005 @05:33AM (#14343808) Homepage Journal
    These all apply to Qt as well. To each their own. :)

    • It's both modern and actively developed and maintained, with a vibrant surrounding community.
    • It offers a wide array of options for extending your work to as many people as possible, including a sophisticated framework for internationalization, localization, and accessibility.
    • It's simple and easy to use, both for developers and users.
    • It's well designed, flexible, and extensible.
    • It's free software with a liberal open source license.
    • It's portable, both from the user's and the developer's perspective.

    • Re:Interestingly... (Score:3, Informative)

      by Anonymous Coward
      QT/X11 is indeed free software, but what about QT/w32 ?
      Also, you are allowed to use GTK+ for proprietary projects (LGPL). The free QT is GPL.
      • Re:Interestingly... (Score:3, Informative)

        by FidelCatsro ( 861135 ) *
        QT/w32 is believe is now GPL as are all version , but you may also purchase a commercial license if you so wish .
        • Re:Interestingly... (Score:3, Informative)

          by doctormetal ( 62102 )

          QT/w32 is believe is now GPL as are all version , but you may also purchase a commercial license if you so wish

          Yes, QT for windows is GPL, but you must buy commercial licenses because it is GPL and not LGPL.

          If you make an application using a GPL library your application is a derrived work, which means it is also GPL.

          If you use a LGPL library, your application does not have to be open source, but it must mention somewhere it uses the library.

      • QT/X11 is indeed free software, but what about QT/w32 ?

        It's also free software, though this was a new thing for version 4.

        Also, you are allowed to use GTK+ for proprietary projects (LGPL). The free QT is GPL.

        And when comparing OOo to gnome office gnome people cite being GPL rather than LGPL as an advantage.

    • Re:Interestingly... (Score:5, Informative)

      by adolfojp ( 730818 ) on Tuesday December 27, 2005 @05:50AM (#14343851)
      It's free software with a liberal open source license.
      Eh... not quite, unless you plan to make open source software exclusively. http://www.trolltech.com/products/qt/licensing.htm l [trolltech.com]
      The same thing applies to MySQL but people seem to mistake the GPL for the LGPL.
      • This is so typical.

        CEO: Open Source is bad, we can't sell product X, we must give it away freely!
        OpenSource Advocate: Why not? Dual-license it, GPL for free stuff, $$$ for commercial usage. .... elsewhere...

        A: Why not use X?
        B: Its bad, because it is dual-licensed!

        You see a problem here? Telling people that you can sell your stuff AND releasing it as OS and at the same time yelling against it because its only GPL for non-commercial stuff?
        • by adolfojp ( 730818 ) on Tuesday December 27, 2005 @06:17AM (#14343919)
          You make a very good point.

          I like to call the GPL the viral open source license. Everything it touches is also made open by default.

          You would be surprised by the number of developers that I know that developed their apps using MySQL and then had to pay for the comercial license many months later because they didn't read the fine print. Lets just say that if they had known beforehand they would have charged a little more for their applications ;-)

          I am not against the GPL. I am just amused by the large number of people that advocate it fanatically and yet don't understand it.

          Cheers,
          Adolfo
          • Re:Interestingly... (Score:4, Informative)

            by hughk ( 248126 ) on Tuesday December 27, 2005 @08:25AM (#14344254) Journal
            If you visit their website [mysql.com], you will find that MySQL are quite up front about their dual licensing policy [mysql.com].

            If you want to use it from something like Perl/PHP whatever, you will find the license cost is zero. If you want to incorporate it as part of an in-house system, there is no issue. It is only if you want to build non-GPL software for distribution. OTOH, you will find that many commercial users have no issues with paying for support. Although not as full featured as Oracle 10g, it costs a tad less.


          • The virality of the GPL does not cross the barrier of a database connection. Troll?
            • by Nugget ( 7382 ) <nugget@distributed.net> on Tuesday December 27, 2005 @09:05AM (#14344411) Homepage
              It absolutely does if you're using the mysql libraries to connect to the mysql database. Rather than being sanely LGPL'd, the mysql connector libraries are GPL which precludes their use in non-GPL codebases. So, unless you're a GPL developer, you need to purchase a commercial license for mysql (or find a database with less restrictive licensing).

              The fact that you're ignorant of this crucual detail (which is the foundation of mysql ab's ability to make money) reinforces the GP's point.
            • Re:Interestingly... (Score:5, Informative)

              by cortana ( 588495 ) <sam@@@robots...org...uk> on Tuesday December 27, 2005 @09:06AM (#14344414) Homepage
              The MySQL client libraries are under the GPL, not the LGPL.

              MySQL even claim that if you implement your own client, it speaks the MySQL protocol, and as such is a derivative work of the MySQL server and so must be made available under the GPL [mysql.com].
              • by Tellalian ( 451548 ) on Tuesday December 27, 2005 @10:29AM (#14344915)
                It'd be interesting to see if such a "claim" would ever hold up in court. You'd think if it did, AOL or MSN would have sued Gaim years ago for breaking their "license". Commonsense would dictate if Gaim can implement a proprietary protocol for interoperability, than anyone could implement MySQL's protocol for the same reason. I don't have a reference on hand, but I believe a court decided client-server interaction didn't constitute a level of usage where licenses like the GPL were applicable.
              • Re:Interestingly... (Score:3, Interesting)

                by jonored ( 862908 )
                Leaves me wondering if you could successfully play linking games to keep your software non-GPLed when you distribute it. Construct a general database interface API (or find a compatibly licensed one - not GPL...), write your app to use that API, and distribute it. Also distribute a module that is GPLed that talks to the mysql database. The user links the module with the app, and the GPL asserts itself on this new derivative work; the end user cannot distribute this work without distributing full source; bu
        • Re:Interestingly... (Score:3, Informative)

          by agurkan ( 523320 )
          its only GPL for non-commercial stuff
          you cannot do this. it is either GPL or not, if it is GPL you cannot have "non-commercial" attached to it.
          i can develop stuff with a dual-licensed library (GPL and proprietary; say with Qt) and and sell my stuff while distributing the library or its derivative works relying on GPL. however, then i have to release my own work as GPL as well; and my first customer can undersell me, because i cannot restrict further copying. only if i want to restrict further copying
      • by rsidd ( 6328 )
        Eh... not quite, unless you plan to make open source software exclusively.

        I just hate the GNU zealots. Qt just can't win can they. The entire GNU project is founded on the idea that proprietary software is bad (Stallman even wrote an essay [gnu.org] on why you shouldn't use the LGPL, and renamed the first L from "Library" to "Lesser" to discourage use). But when Qt is using GPL, suddenly the GNU zealots turn around and say, hey that's bad, you can't write proprietary software with it! In fact Qt has the perfect

        • Re:Interestingly... (Score:5, Informative)

          by adolfojp ( 730818 ) on Tuesday December 27, 2005 @06:46AM (#14343982)
          ... I dislike disingenuous articles like the present developerworks article which pretends that GTK+ is the only toolkit that exists.

          From the article:
          In actuality, modern GUI tool kits do more than merely avoid duplication. They offer many advanced capabilities that users have come to expect in their applications and which wouldn't be attainable otherwise because the time and work investment in such tool kits exceeds whatever you could spend on a single application. Therefore, if using a GUI in your application is important to you, use a tool kit. There's simply no other way. Now, the only question left is, which tool kit should you use?
          The author makes it very clear to the reader that other GUI toolkits exist. Since he likes GTK+ he writes an article advocating it. It is not meant as a comparison between different toolkits. It is meant as an introduction to one of them.
          Also, considering the wealth of GUI toolkits avaliable [wikipedia.org], his article would loose focus quickly if he meant to mention all of them.
        • I just hate the GNU zealots. ... But when Qt is using GPL, suddenly the GNU zealots turn around and say, hey that's bad, you can't write proprietary software with it!

          I hate people who make sweeping generalizations (zing). I'm a GNU zealot and I think Trolltech rocks for using the GPL for QT. I have no patience for proprietary software and I look forward to a time when software like QT is the norm rather than the exception.

          Also I think that the majority of GNU zealots would feel the same way about QT

        • I just hate the GNU zealots. Qt just can't win can they. The entire GNU project is founded on the idea that proprietary software is bad

          No, the GNU project is founded on the idea that it is beneficial for people to share contributions to software freely. Troll Tech has adopted the GPL, but it's not being run like an open source project.

          But when Qt is using GPL, suddenly the GNU zealots turn around and say,

          AFAIK, GNU zealots generally have nothing against Qt.

          In fact Qt has the perfect business model

          So does th
          • All projects, whether open source or not, have disgretion over what contributions get added. Trolltech is no different. It's developed run like an open source project, because it's not wholely an open source project! The commercial licenses pay for the development of the open source code that Trolltech gives away for free. Trolltech employes a great many open source community developers.

            GTK+ is no more cheaper than Qt, unless you are talking about closed source projects. Gtker's seem to like to advocate pro
        • Wow! You just didn't read the article at all did you rsidd?

          The grandparent had a list of attributes from the article which he said could apply equally to QT or GTK. The parent then pointed out that one of the listed attributes:

          It's free software with a liberal open source license.

          Applys only to GTK - not to QT.

          The parent was correct. From the article:

          Liberal open source license means that these conditions are not terribly restrictive, and the degree of freedom you get is significant. Most importantly, G

        • by squiggleslash ( 241428 ) on Tuesday December 27, 2005 @09:25AM (#14344503) Homepage Journal
          But when Qt is using GPL, suddenly the GNU zealots turn around and say, hey that's bad, you can't write proprietary software with it
          I'm trying to work out why you'd assume that someone criticising a product for not letting you produce proprietary software that uses it is a "GNU zealot". Is the GP known to you and always ranting on about GNU and how wonderful the GPL, or are you just making an assumption?

          If the GP is genuinely against a license because it means a library cannot be linked against a proprietary program, then they're not a "GNU" (or FSF, or GPL) zealot. They may be a zealot, but they're not a GNU one.

          Many Free Software people, which is a diverse group encompassing many opinions, eschew the GPL for precisely this reason and consider themselves active opponents of it. One example would be the OpenBSD team, and Theo DeRaadt in particular, who is strongly against the GPL because he wants his work to be freely available even to those who'd not make public the source of their released changes.

          These are legitimate opinions. Your characterization is as bad as someone who sees, say, Bush criticised for not proposing a clearly religiously-motivated supreme court nominee, and then Bush criticised for reversing his position, withdrawing the nominee, and making an apparently religiously-inspired one, as "Christian Conservative Zealots not letting Bush win". They're different critics.

  • GTK is fine, but as long as it takes a few megabytes to download, only Linux applications will use it. Take a look at The GIMP for example: it is ok to download GTK because it is a big program, but who would develop a small application ( 1MB) if it depends on 6-8 MB for GTK ? On the other hand, Linux users rejoice, as they have good distributions with good dependency resolvers.
  • It is just a tool (Score:2, Interesting)

    by Anonymous Coward
    It's interesting that they advocate using it vs Win32 in their examples. You really don't have a choice of the overhead for a Win32 system. You do have a choice of ignoring the overhead for GTK+. This overhead is why the POSIX and OS/2 implementations in Windows NT and later were never particularly useful. They used additional overhead (and they translated into Win32 function calls anyways!). GTK+ doesn't have this second problem (as far as I know) but it will still require additional overhead. If tha
    • What..

      The Posix subsystem doesn't use the win32 api's, It uses the NT api's which are limited. The win32 subsystem and unix one can't even communicate to each other directly. You can't use the posix api's with the win32 ones since they are running under what seems to be a different operating system them.

      Interix is what it used to be called, But now microsoft calls it SFU windows Services For Unix. Which is a misleading name.

      Anyways. I can't tell you too many details.

      To get thinking about it. In a

      • Just to complete the information you gave:

        The original Posix subsystem that Microsoft provided was rather limited and therefore not very useful. However a company called Internix create a software package that built upon the Posix subsystem but provided a complete Unix like environment with shell and all the standard tools.
        A couple of years ago, Microsoft bought Internix and now provides the software for free to Windows users. Their main purpose of the software is to allow people using applications that run
  • by xtal ( 49134 ) on Tuesday December 27, 2005 @05:39AM (#14343826)
    a better question might be.. "why use a gui"

    For in house stuff I've been on a command line, or straight GLUT kick if I need to display graphics or data in a quick and dirty fashion. Obviously that's not going to work for everything, but you'd be suprised how far it goes.

    Are there any cross platform (linux, mac, windows) GUI RAD tools ala Builder, yet?
  • GUI? (Score:5, Funny)

    by Anonymous Coward on Tuesday December 27, 2005 @05:40AM (#14343829)
    What the hell is wrong with printf?
    • Re:GUI? (Score:5, Funny)

      by archeopterix ( 594938 ) * on Tuesday December 27, 2005 @06:15AM (#14343912) Journal
      What the hell is wrong with printf?
      Yeah, everyone seems so excited about printf. Having spent 40 years programming computers I can tell you its another fad.

      Thousands of developers all over the world are misled with the apparent ease of printf'ing the text to the stdout. They all miss the most important fact: the printf doesn't actually generate the text! You still have to supply it, although the printf marketeers might want you to think otherwise.

      Another thing - where are the mathematical foundations for printf? Relational databases rely on solid theory that dates back to 1795. Printf enthusiasts cannot deny the fact that it just lacks proper scientific support. It's a sad thing that giant amounts of investors' money are poured into a technology that relies on a wishy-washy muddy set of 'format specifiers'. Haha, 'format specifiers'! I challenge you to come up with a proper mathematical definition for that!

      And a final death blow to the whole 'printf' craze. It has no support whatsoever for colors or blinking text! Young printf-bamboozled programmers all over the world realize they're using a purely academic technology when the real world requirements call for a blinking 'Hello world\n' or a colourful 'Foobar'!

      • It has no support whatsoever for colors
        "\e[32mReally?\e[0m\n"

        or blinking text!
        "\e[5mHello world\e[0m\n"

        ... when the real world requirements call for a blinking 'Hello world\n' or a colourful 'Foobar'!
        "\e[5mHello world\n\e[0;34;1mF\e[36mo\e[32mo\e[33mb\e[31ma\e[3 5mr\e[0m\n"

        (spell \e as \033 to make stone-age compilers like AIX cc happy)
  • by Chaffar ( 670874 ) on Tuesday December 27, 2005 @05:54AM (#14343858)
    Martin Fink
    Tells it
    like it is:
    The question
    is NOT why
    you should use
    GTK+,
    but WHY NOT?
    _______
    Click here
    to read more
  • Tempting.... (Score:3, Interesting)

    by ardor ( 673957 ) on Tuesday December 27, 2005 @05:54AM (#14343859)
    to start a Gtk+ vs. Qt Flamewar here. Gtk+ is easier to install & handle (moc can be a real PITA sometimes), but until Gtk+ gets a really GOOD documentation and API, I'll stick with Qt. No, neither google nor devhelp are adequate. I want a reference as well done as the Qt one. Does such a thing exist?
  • by Hosiah ( 849792 ) on Tuesday December 27, 2005 @05:59AM (#14343872)
    I'm not a very big fan of *any* GUI toolkit. GUIs are a pain to program in anyway, no matter what language or library you use. GTK is much easier if you hook it up with Glade, which drains some of the pain from the experience. Personally, for small jobs, I'm more apt to use Tcl/Tk, which is very brief. Literally, I will be unhappy with *every* GUI toolkit until I find one where you can express an entire dialog box in a SINGLE LINE (I don't care how Perl-like the syntax!) and get on with your life.

    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())};

    • Literally, I will be unhappy with *every* GUI toolkit until I find one where you can express an entire dialog box in a SINGLE LINE

      Umm... you're supposed to roll that yourself. Write either a wrapper function or a macro for the common stuff you do with your toolkit. That, or move on from C to a more applicative language like lisp or ocaml.

      I mean, it's a five-minute thing to write the D wrapper you want; do it and move on with your life.

      • Recently the PLASH [beasts.org] project had to override the standard GTK file open dialog box to achieve certain security related aims. This was somewhat complicated by the fact that there is no standard GTK file open dialog box function ;).

        Also it would be one less function that has to be written and maintained across the thousands of projects that use GTK.

    • by ichin4 ( 878990 ) on Tuesday December 27, 2005 @06:23AM (#14343934)

      Um, you mean like this C# code?

      DialogResult result = MessageBox.Show("Quit without saving?", "", MessageBoxButtons.YesNoCancel);

      Many slashdotters like to drone on about how evil business practices got Microsoft where it is today. But one thing that definitely helped is that, for much of GUI history, it's been easier to write GUI code for Windows than for almost any other platform.

      • by Techster ( 132804 ) on Tuesday December 27, 2005 @06:49AM (#14343985) Homepage
        Not even close to what the OP wanted. Yours just specifies text, an empty title, and the fact that it has three buttons (yes, no, cancel). You still need a block statement to handle the response, not to mention the fact that width and height will be determined automagically.

        His code specified the height, width, alternate text for the buttons (which some of us want without having to make a new dialog at times) and methods/functions to perform when the buttons are activated. Currently, a wrapper/class/function is the only way to accomplish all that in one line.
        • not to mention the fact that width and height will be determined automagically ... His code specified the height, width

          I know it differs from what the OP asked for, but how is automatically determining width and height a bad thing? To prove my point, I encourage you to give a specific size for your dialog box and then come back and tell me how it looks when you change your default font to something that a person with vision problems would use. Dynamically computing dialog sizes is A Good Thing(TM).
      • /me blinks
        /me laughs hard

        "Uhm, we _need_ to change 'No' button to 'Review' - that should be easy to do, right? 5 seconds worth, right?" - so said the boss.
        • 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.
      • DialogResult result = MessageBox.Show("Quit without saving?", "", MessageBoxButtons.YesNoCancel);

        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:: null,0,1))

        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

    • by Theatetus ( 521747 ) on Tuesday December 27, 2005 @06:28AM (#14343947) Journal

      Then again, actually GTK has what you want anyways, despite my earlier response rant:

      mywidget = gtk_dialog_new_with_buttons("Quit without saving?", GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, "Save", GTK_RESPONSE_OK, "Don't Save", GTK_RESPONSE_CANCEL);
    • >I will be unhappy with *every* GUI toolkit until I find one where you can express an entire dialog box in a SINGLE LINE (I don't care how Perl-like the syntax!) and get on with your life.

      I'm pretty sure you can do this with Visual Basic.. happy now?
    • OK, wise guys, I used the classic "yes/no/cancel" as an EXAMPLE knowing that everybody would understand the concept. Yes, I know yesnocancel is standard. My example would work for EVERY three-button dialog, not JUST yesnocancel.

      *Ahem* and let's belay the jabber about the *cough* *cough* "superiority" of so-called "Windows-programming". I tried C++ in Windows, and I was least impressed of all my programming experiences. We're talking GNU/Linux hence the name "GTK" which stands for "GIMP" tool kit, and "GIM

  • It seems that most of the information would be true for any toolkit, and it isn't clear what toolkit they are attempting to contrast GTK+ with. The only alternative they mention is "writing your own UI code".

    It doesn't seem to give any information about GTK+ itself, even what the difference between GTK+ and plain GTK is (I am guessing that GTK+ is simply the C++ bindings for GTK).

    Basically, I think this introduction is too simplified and high level. I imagine that anyone who ever even considered writ

  • wxWindow (Score:2, Interesting)

    by DesiStud ( 937990 )
    Hey u all forgot wxWindow. That's strange. I think it is a strong competitor of GTK+ and Qt. Isn't it
  • wxWidgets? (Score:4, Informative)

    by El_Muerte_TDS ( 592157 ) on Tuesday December 27, 2005 @07:51AM (#14344134) Homepage
    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+).
  • I'm always game to discuss the state of the art in cross-platform GUIs, as it's always changing and usually for the better... but this is not an article. My first grade homework was twice as deep. This article reeks of GTK+ advocacy for the sake of it... "why GTK?" and no mention of the alternatives? It doesn't say more than gtk.org's main page, for heaven's sake. It's more like "why should you read my next article"!

    Maybe if the following parts say something interesting, it would be worthy of making it to t
  • Yes but... (Score:5, Informative)

    by wwahammy ( 765566 ) on Tuesday December 27, 2005 @08:02AM (#14344172)
    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?
    • Nothing looks 'right' on Windows. Even after you turn off the godawful 'my first computer' style, every other app is determined to implement its own widget set. :)

      Fortunatly I only boot into Windows to play the odd game, but when I do, programs that use the gtk-wimp [sourceforge.net] theme don't look out of place at all.

      At the end of the day, however, the only way to have a cross-platform application to feel native on any platform is to implement a completly separate, native interface. Use GTK+ for Gnome, Qt for KDE, Cocoa f
  • Other languages (Score:4, Interesting)

    by rpg25 ( 470383 ) on Tuesday December 27, 2005 @11:29AM (#14345318)
    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?
    • Re: Other languages (Score:3, Informative)

      by Black Parrot ( 19622 ) *
      > 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 [gtk.org], 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
  • Why I chose GTK+ (Score:4, Informative)

    by ChaoticCoyote ( 195677 ) on Tuesday December 27, 2005 @12:15PM (#14345666) Homepage

    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 [cairographics.org], 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. [coyotegulch.com]

    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.

  • by obeythefist ( 719316 ) on Tuesday December 27, 2005 @11:54PM (#14350102) Journal
    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).

Take an astronaut to launch.

Working...