Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Programming IT Technology

GUI Toolkits for the X Window System 353

TeachingMachines writes "Leslie Polzer has written a nice summary of the current state of GUI Toolkits for the X Windows System (article title of the same name). Those of you who are planning to spend hours and hours scouring the Internet for a mature cross-platform GUI toolkit may save some time and trouble by reading this summary. Leslie's review covers the pros and cons of using GTK+, Trolltech QT, FLTK, wxWindows, and the FOX Toolkit."
This discussion has been archived. No new comments can be posted.

GUI Toolkits for the X Window System

Comments Filter:
  • what no TK? (Score:2, Informative)

    by Anonymous Coward
    what no TK?
    • Re:what no TK? (Score:5, Informative)

      by DavidNWelton ( 142216 ) on Tuesday August 12, 2003 @10:20AM (#6675608) Homepage
      1) Tk is very fast to develop with. You can get good gui's out quickly.

      2) So now you want to do a complex, involved gui? You can do that too. Don't like stuff that was thrown together quickly by people who don't know anything about GUI design fool you. It's hard work, and it takes a different set of skills. Just because Tk made GUI programming available to just about everyone, don't judge it on the results of everyone trying to do GUI's!

      3) Tk has been around for a while, is well tested, well known, and well built. It is the toolkit of choice for Tcl, Python, and lots of other languages.

      4) Of course, it is open source, and lots of people use it and know it. If you want to improve it, you can.
      • Re:what no TK? (Score:2, Interesting)

        by arivanov ( 12034 )
        Have you ever tried to program using the perl bindings? I have done it in the past and was extremely annoyed by the fact that it is a non-stop moving target. It also broke quite often. I ended up abandoning the entire stuff.

        Looking at the review FLTK has apparently grown up some perl bindings. This may be quite interesting...
        • Re:what no TK? (Score:5, Informative)

          by lunenburg ( 37393 ) on Tuesday August 12, 2003 @10:58AM (#6676080) Homepage
          Have you ever tried to program using the perl bindings? I have done it in the past and was extremely annoyed by the fact that it is a non-stop moving target. It also broke quite often. I ended up abandoning the entire stuff.

          Yup, sure have [lunenburg.org]. I've been working with this app for going on three years, producing useful releases every 4-5 months or so, and haven't run across a "moving target" in Perl/Tk. Aside from bugfixes, I haven't had to go back and change any of my code or work around any brokenness in new Perl/Tk releases.

          Granted, my app doesn't tax the outer limits of the Tk bindings, but for what I do, I've found Perl/Tk to be a stable and adequate cross-platform toolkit.
        • annoying perl (Score:3, Flamebait)

          by axxackall ( 579006 )
          Programming on Perl is annoying in general, by itself, no matter with TK or something else.

          Just try Tcl/Tk or Python/Tkinter and enjoy.

    • Re:what no TK? (Score:2, Interesting)

      by andrewl6097 ( 633663 ) *
      Exactly. The coolest part about TK (well, at least tkinter for python) is that you can "connect" a widget and a variable - someone edits the widget, and the variable changes value, automatically. Saves a LOT of code that would otherwise listen for event -> get widget value -> set variable value.
    • Re:what no TK? (Score:4, Informative)

      by __aavhli5779 ( 690619 ) on Tuesday August 12, 2003 @05:27PM (#6680432) Journal
      More importantly... What, no GNUstep?

      It's amazing how much GNUstep [gnustep.org] is overlooked given that it is the only toolkit whose featureset can compete with qt. Just like qt, GNUstep is a full framework covering much more than simply building a GUI, and can thus be the foundation of an entire application/environment. The OpenStep frameworks (of which GNUstep is an open-source rewrite) address everything from low-level primitives (collection classes, advanced memory management with garbage collection) to networking, file operations, GUI operations (with a graphical IDE and GUI builder modeled after NeXT, now Apple's Project Builder/Interface Builder) and more.

      If more attention were paid to GNUstep, it would get the usage that it deserves. I find it superior to almost every toolkit except for qt (with which it competes neck-to-neck in terms of featureset and consistency), and any Mac OS X or OpenStep/NeXTStep programmer will give a glowing recommendation. Plus, it uses Objective-C :)
  • One thing missed (Score:5, Insightful)

    by Doesn't_Comment_Code ( 692510 ) on Tuesday August 12, 2003 @09:57AM (#6675344)
    The one thing I don't like about toolkits (not mentioned in her list of cons) is that if you distribute the source code, whoever is compiling needs to have the toolkit.

    I've tried to compile and install programs before and spent a lot of time trying to track down the toolkit libraries.

    This is not a good reason to abondon using toolkits, but it is one negative aspect to take into consideration.

    • Exactly (Score:5, Interesting)

      by Anonymous Coward on Tuesday August 12, 2003 @10:07AM (#6675464)
      I need to write GUI code that works on all Linux, all HP-UX, all SUN Solaris, all SGI platforms without requiring more than a simple "make".

      Our customers would not like it if I told them to find and install version 1.2 of GTK and stuff like that, because in all honestly, on any platform other than Linux most of these toolkit libraries have no simple install mechanism and tend to be buggy.

      So Xlib all the way... Simple and it runs on even a 10 year old version of Linux.

      • Re:Exactly (Score:5, Interesting)

        by RevAaron ( 125240 ) <`moc.liamtoh' `ta' `noraaver'> on Tuesday August 12, 2003 @01:04PM (#6677587) Homepage
        I too need to write GUI apps that just work on a number of platforms- Mac OS X, Mac OS Classic, Windows, Linux, IRIX and Solaris, and have it work with a simple ./configure; make.

        Luckily, I don't have to use Xlib, although the display system for X11 probably uses Xlib. I use Squeak Smalltalk [squeak.org], and can distribute my application with the virtual machine for the specific platform, or as Unix source for somebody to compile if they're on a more obscure platform. This can be easily included with my tarball- no need to download stuff seperately. It is also a small addition to my own code, so it's not like you're adding a big download or hassle.

        GTK+, Qt and the desktop libraries that accompany them, on the otherhand, *are* a big hassle. Most Linux systems have a version (or two!) of one or both of those libraries, but often enough when deploying, you still have to have them install the version you wrote your app against- and you better believe it's not quick and easy!
      • Re:Exactly (Score:3, Insightful)

        by AvitarX ( 172628 )
        Why don't you do what normal software distributers do?

        Include GTK 1.2 and then have your instal check if it is needed, if it is install it.

        Like when I buy a game I get DirectX with it. I guess installing that library is gonna kill me.

        There is no reason you can't include GTK 1.2 since it is Open source.

        Of course the bugginess is another issue, and obviously if that is the case you cannot use it, but I see no reason you can't make it easy to install by modifying your make script.

        Even the Gimp was an eas
    • This is a strange comment. It is like saying, "The one thing I don't like about C++ is that if you distribute the source code, whoever is compiling needs to have the compiler."

      Of course you need the toolkit library if source code uses it.
    • Back before Qt and Gtk crowded out everything else from the free Unix world, that was a huge problem. You'd find something promising on Freshmeat and then have to track down FLTK or WINGs or whatever else it required.

      Seems like less of a problem nowadays, despite all the people complaining, "Now we have TWO toolsets to deal with!" Most Linux users have the KDE and GNOME (or GTK, at least) libraries available, and Windows and Mac users typically aren't in a position to compile anything anyway. It's tracking

    • Re:One thing missed (Score:5, Interesting)

      by Telex4 ( 265980 ) on Tuesday August 12, 2003 @10:30AM (#6675736) Homepage
      One way to avoid this problem of dependencies, and also to really boost the useability of your app, is to try hard to separate the GUI from the "guts" of the application, so it is reasonably easy to write multiple UIs (GUI or CLI) for the same application. Then you, or others, can come and develop new UIs for themselves. For example, when I started developing QuickRip, I began with a (Py)Qt interface. Someone requested a CLI interface, so I made the separation, and gave QuickRip two interfaces. Now some (Py)Gtk developers are adding a Gtk interface, because they don't want to use Qt. Lovely.

      Of course this approach is only usually worth it when most of the hard work is done in the guts, and when the UI itself isn't that much work to redo in a different toolkit. Nor does it work when you need a feature than is only available in a specific toolkit. But in many instances, it works fine.

      So often there's no need to choose between toolkits... just choose them all! :)

      When wxWindows gets decent support for toolkits other than Gtk+, it will make this even more trivial.
      • Re:One thing missed (Score:3, Interesting)

        by cheezit ( 133765 )
        I've done this multiple times. It's easy to do when you write from scratch with this approach, much harder to retrofit, but it comes down to the same issue....CLI apps tend to have a scriptlike UI, whereas decent GUI apps *demand* that multiple actions be available to the user at any time.

        This requires that the application logic be converted into an event-driven state-machine model. Some CLI apps just can't make the transition without a rewrite.

        Once the transition is done, though, you are right...you ca
  • X Programming In C (Score:5, Informative)

    by dodell ( 83471 ) <dodell@nOsPaM.sitetronics.com> on Tuesday August 12, 2003 @10:01AM (#6675386) Homepage
    It still takes a really long time to find documentation on writing stuff for X in the first place. For instance, I was getting into creating a window manager at one point and found it extremely difficult to find documents about how to acutally program for X. Widget toolkits are not enough in some cases. Some books about low-level X programming are at:

    http://www.pconline.com/~erc/xwind2nd.htm
    http: //www.pconline.com/~erc/advxwnd.htm

    Unfortunately, I've lost the URLs for the X API docs and containing really good example documentation on X Windows programming in C. If anybody has these URLs, I'd appreciate it, since it took me several days of searching to dig them up and I can't find them anymore (harddrive crashes suck).
    • by Mandrake ( 3939 )
      I highly recommend the X Programming manuals by ORA - particularly volumes 0 and 1. the rest are fluff, imnsho.

      volume 1 does contain some documentation about writing a window manager, but it is really insufficient. if you're looking for appropriate documentation on what it should do, you can find the icccm documentation online somewhere (most modern window managers are NOT icccm compliant however)

      • by AJWM ( 19027 ) on Tuesday August 12, 2003 @10:46AM (#6675938) Homepage
        the rest are fluff, imnsho.

        Hardly. If you're doing Xlib programming (Vol 1), then you'll also want Vol 2 (Xlib Reference Manual). Granted, Vol 3 (X Users Guide) probably won't tell X programmers much they don't know, and if you're using one of the non- Xt-derived toolkits (GTK, Qt, etc) then the later volumes (4 & 5, Xt Programming and Reference Manuals respectively, and 6, Motif) aren't necessary -- unless you ever hope to figure out how some of the older code out there works.

        Nobody uses XView (Vol 7) any more (do they?) and the X Window SysAdmin's Guide (Vol 8) is useful only to sysadmins of large X-based thin client installations (such as Largo City FL, perhaps?), but I wouldn't exactly call them "fluff".

        (And yeah, I've got the whole set, including both "regular" and "Motif" editions of some, plus the R6 supplement, and the "Nutshell" volume -- which is actually pretty handy as a desk reference over the thicker volumes. But then I've been doing X Windows programming since late X10 days circa 1987.)

    • XFree86 (and X in general) actually comes with substantial documentation for all of this stuff, although it needs to get formatted during the build process. What's mainly lacking, I think, is a sufficiently detailed overview of the API. There's nothing that actually tells you where to look for the clipboard, how to tell things to the window manager, and even things like the best way to get a client-side color array to appear as an image.
    • by Anonymous Coward on Tuesday August 12, 2003 @10:33AM (#6675779)
      http://tronche.com/gui/x

      has a good X api reference
    • by thames ( 558443 ) on Tuesday August 12, 2003 @10:39AM (#6675842)
      I have the following links (I'm trying to write a window manager myself... :-)
      I hope these are the ones you lost:

      http://www.xfree86.org//4.3.0/manindex3.html
      ht tp://tronche.com/gui/x/icccm/
      http://tronche.com/ gui/x/xlib/
      http://x.holovko.ru/Xlib/contents.htm l

      Hope someone finds them usefull...
      Creating a window manager, is actually quiet fun, as long as you have others code to look at...
  • by Anonymous Coward on Tuesday August 12, 2003 @10:01AM (#6675388)
    It's far more easily cross platform than the competitors. It's a rich GUI toolkit, not limited by least-common-denominator weirdnesses, and backed by a world class rendering layer (java 2D).

    Todays Java is not at all what old Java was. It's far faster, and only getting faster with each release, than in the past, far more reliable, far more complete, etc.

    • > Why would you want to use anything but Swing?

      Short Answer is: S.W.T.
      Long Answer is: here [google.com].

    • by truth_revealed ( 593493 ) on Tuesday August 12, 2003 @10:32AM (#6675754)
      Why a native C/C++ GUI toolkit?

      - can distribute a statically linked 2 meg executable - quick to install
      - typically only 2 megs of resident RAM used by running program
      - virtually zero startup time
      - much more responsive GUI
      - still runs well on hardware more than 4 years old

      Why not Swing?

      - don't want the 40 meg downloadable JRE footprint
      - don't want Java version hell for your users/customers
      - don't want the 40 Meg of resident RAM required by the smallest running Swing program
      - requires the latest hardware for decent speed.
    • Fonts! (Score:3, Insightful)

      by r6144 ( 544027 )
      On linux the best looking fonts are anti-aliased TrueType, which Swing doesn't support. Bitmap fonts also look good when not scaled, but it is also very non-obvious (if not impossible) to make them the default in Swing apps. So we are left with ugly non-antialiased TrueType fonts. Ugh!

      (Well, maybe it is the fonts that are not as good as Windows fonts... But if you want to work with international text, even Window's unantialiased non-bitmap Chinese fonts look VERY ugly.)

      • On linux the best looking fonts are anti-aliased TrueType, which Swing doesn't support.

        I think that must depend on whose VM you are using. I found that to be true of the Blackdown, but Sun's VM does antialias truetype fonts with no trouble at all. This isn't a great example, but look at the captions of this [ntlworld.com].
  • For Pure Sadism - (Score:2, Insightful)

    by EnderWiggnz ( 39214 )
    Try using KDevelop 1.2!!!!

    yippeee!!!! wheeelah....

    yeh baby!!!
  • by Anonymous Coward on Tuesday August 12, 2003 @10:04AM (#6675422)
    This made the article useless. I wonder if he has ever tried QT. It just works! No futzing around. He is biased because you have to pay for the windows port.
  • -1 Troll(tech) (Score:5, Insightful)

    by CausticWindow ( 632215 ) on Tuesday August 12, 2003 @10:04AM (#6675423)

    This article reads like a Qt flamefest.

    I don't see how Qt's "business like homepage" should have anything to do with how good a toolkit Qt is. The "free for linux not for w32" is of course a valid point, but it's the only one.

    • Re:-1 Troll(tech) (Score:5, Insightful)

      by LizardKing ( 5245 ) on Tuesday August 12, 2003 @10:16AM (#6675563)

      This article reads like a Qt flamefest.

      Certainly does. He also dislikes C, yet he programs using GTK+. I guess he must be a fan of gtkmm. Frankly, I get the impression that the articles author is a little bit inexperienced, and would be better off learning Java and its Swing API. That will give him a decent grounding in MVC architecture, while keeping him otherwise occupied so that he doesn't write any more articles :)

      Chris

    • Re:-1 Troll(tech) (Score:5, Insightful)

      by Des Herriott ( 6508 ) on Tuesday August 12, 2003 @10:26AM (#6675680)
      Yep, the author obviously has some kind of beef with Qt.

      "Commercial" and "proprietary" are not at all the same thing, but the author believes you need to pay to sell Qt applications. Wrong - you are permitted to sell GPL-licenced software.

      The fact that the toolkit is large and takes a long time to compile (a few hours on a moderate-spec PC) is irrelevant. You don't need to recompile your toolkit every day, and you get binary Qt packages with most Linux distributions anyway.

      "Business-oriented main website" is a non-argument, as you say.

      "Main branch depending on one company" is a non-argument, since even if Trolltech folded tomorrow, a GPL-licenced Qt can be picked up by volunteers, just like any other free toolkit.

      The namespace concern is the only minus point with any merit - on the other hand, I don't see Gtk+ using namespaces either, and that wasn't mentioned as a minus point, was it? (Yes, I know Gtk+ is written in C - but that doesn't alter the fact that it too does not use namespaces)

      This article wasn't a summary, it was a soapbox rant.
      • In my experience, compiling applications for Qt
        also takes a while. A lot of the Qt classes use
        shared data. They are often used by value in
        parameters and class members.

        Therefore Qt header files tend to include lots of
        other Qt headers. Since there currently is no PCH
        support, compile times go up quite a bit.
      • Re:-1 Troll(tech) (Score:4, Interesting)

        by Pr0xY ( 526811 ) on Tuesday August 12, 2003 @11:42AM (#6676608)
        also, the author misses a another buig point. I spoke to trolltech support about having to release code under GPL using the free liscense, and they agreed to only have it apply to code that actually included QT code.

        For example, I have written an emulator which I havent open sourced yet, and 95% of the code is ANSI C++. Why should i need to open source the whole thing? I found them very accomidating in the fact that I would only have to open source the the parts that actually used the QT classes.

        All in all QT is the best object oriented toolkit out there, they are a very professional company and a previsouly noted this should be a moot point when anylizing the toolkit itself.

        proxy
    • Re:-1 Troll(tech) (Score:5, Insightful)

      by Xerithane ( 13482 ) <xerithane AT nerdfarm DOT org> on Tuesday August 12, 2003 @10:28AM (#6675708) Homepage Journal
      I don't see how Qt's "business like homepage" should have anything to do with how good a toolkit Qt is.

      Considering that Trolltech is a business, I think it does reflect the quality of Qt. If Trolltech was a business, and their website looked like half the other OSS projects out there, nobody would take them seriously.

      The "free for linux not for w32" is of course a valid point, but it's the only one.

      That isn't even a valid point. Qt 2.3 for Win32, free. [trolltech.com]
    • by Balinares ( 316703 ) on Tuesday August 12, 2003 @11:03AM (#6676136)
      I have to agree. Sounds like someone with an axe to pick and yet trying to come across as an "oh look at me I'm knowledgeable and unbiased!" kind of writer. Feh.

      So, let's see.

      First of all, isn't it funny how the author omits to mention how a clean and thoroughly engineered class hierarchy can help you design more modular software that will be much easier to maintain and refactor? Or do people really think that the KDE project has been improving at the pace it has by mere luck?

      > Very business-oriented main Web site

      That's a problem how? Do you really MIND that the site provides info for people other than geeks, along with, you know, a completely up to date documentation for each version?

      > Main branch depending on one company

      This is either pure ignorance or a lie. Typical underhanded FUD. The main branch is GPL'ed, and the KDE Foundation was established to keep the main branch GPL'ed no matter what happens to Trolltech.
      http://www.kde.org/whatiskde/kdefreeqt foundation.p hp

      > Commercial developers and people wanting portability have to pay

      Commercial developpers *ARE* allowed to sell GPL apps, dammit. THIS is the way of Free Software business.
      And Qt 2 is available under for GPL on all the main platforms. That's for portability. Only Qt 3 for Windows requires a commercial license (this wasn't always the case, but according to interviews I read some Windows developpers would routinely use the GPL version in closed source apps, so Trolltech had to discontinue the GPL license on Windows. Thank you, guys. Thank you so much.)

      > Huge sources and binaries, library itself takes ages to compile

      That's C++ for you, dude. Install a binary package next time.
      Additionally, and just because I'm pissed and am most willing to nitpick the bullshit out of existence, 1) Qt ships will ALL the major distribs, and a majority of minor ones -- no need to recompile it, and 2) You don't need to recompile it either for use with older software, as the API is backwards compatible -- which is not the case of all the APIs out there, which he blissfully omitted.

      > Objects not referred by namespace but simple literal prefix "Q"

      And that's a problem how?

      > Dominant Microsoft Windows look

      This is either pure ignorance or a lie. I won't even enumerate the number of looks Qt comes with *natively*.

      In fact, this is so close to the usual Qt FUD you can hear from certain people that I strongly suspect that the whole purpose of the article was a clumsy attempt at slowing the growing popularity of Qt. Well, sorry, but such retarded FUD won't last three minutes on Slashdot. We may be a bunch of bickering nerds at times, but we know our shit.

      If you don't like Qt and are concerned about its growing supremacy, which is your absolute right, then contribute to competing projects to help them improve. Trying to smear shit on competitors will only make your side look desperate. Is this what you want?

      Rant other. Let the moderation begin, I have karma to burn.
    • Qt has THE BEST object-oriented design that I have seen, by far. The widget hierarchy, methods, etc... have a very clean and consistent implementation. Also, the documentation is fantastic! It is always current wrt. the library.

      - The ease of code integration into Designer by OO derivation is fantastic.
      - The speed at which GUI apps can be developed, using TT's Designer is great!
      - The qmake program, while not as capable as automake etc..., is still simple and easy to use. Plus, it takes care of his whi
    • Re:-1 Troll(tech) (Score:3, Informative)

      by mnmn ( 145599 )
      We have been evaluating GUI APIs for two projects we will be starting, and it came to QT, GTK+ and FLTK. It seems like we will go with QT despite the cost because theyre really a professional company with a complete API thats well documented and well used by large apps, uses win32 API very efficiently (see how fast opera the browser is) and comes in embedded versions too, which was one of our requirements. GTK+ for win32 is not mature enough although it competes with QT on unix quite well. It also has short
  • by dollargonzo ( 519030 ) on Tuesday August 12, 2003 @10:06AM (#6675452) Homepage
    one of the biggest problems in writing a RAD graphics software is that lots of users want it to interface with a lot of different toolkits, such as motif, qt, gtk, tk, xt, etc. obviously, it would be nice if they all just chose one, but that will not happen anytime soon. now, we[the company in mind] are thinking of writing our own low level toolkit (since the software currently doesn't have its own widgets). this is basically how new toolkits come into existence and the user base is forced to choose at yet another fork in the road. *sigh*

    • Use wxWindows. It uses GTK on Linux/Unix or Motif if it isn't availiable, and it uses the Win32 API on Windows. The only place it wouldn't look normal is if someone was using it in a KDE environment but most people using KDE are using Gnome apps as well and most distros use themes to make them look the same there.

      Either that or build on top of Mozilla and use XUL.
  • Why the Qt bashing? (Score:5, Interesting)

    by arvindn ( 542080 ) on Tuesday August 12, 2003 @10:08AM (#6675478) Homepage Journal
    Look at the last paragraph of the article:

    I personally think Qt is made irrelevant by both of the others because they are not missing anything Qt offers. The tools that come with Qt may not be bundled with them, but comparable tools do exist and can be used free of charge, and most often as Free Software. Qt's biggest weaknesses are its relic called "MOC" and its business orientation. Yes, it's GPL, but not for MS Windows, so you're not really free. FOX and (especially) wxWindows offer similarly advanced sets of widgets and techniques, so you might as well throw Qt away. In terms of portability, it's the same, and wxWindows even adds OS/2 portability. Believe me, I don't want to be unfair to Trolltech or upset dedicated Qt developers. I tried to be objective, and that's my objective conclusion. Maybe we can discuss this point in the comments for this article.

    There is a disturbing trend of recent articles that engage in Qt/KDE bashing. Can't help wondering whether it is really a coincidence or not. For instance, here's another freshmeat editorial [freshmeat.net] from a few months back.

    • well, to be fair, moc really is a pain in the behind. the fact that it doesn't let you use any c preprocessor macros for things like header include files make it difficult to support cross compilation for a wide variety of platforms without doing additional non-cpp (auto-tools style) preprocessing, which means you have to forego their make-building utilities... which means that you lose their ease of cross-platform compiling. this is particularly apparent (at least to me) when trying to build a dual mode
      • > the fact that it doesn't let you use any c preprocessor macros for things like header include files make it difficult to support cross compilation for a wide variety of platforms without doing additional non-cpp

        Huh? Qt lets you use C preprocessor macros in header include files.
    • Why is it bashing to point out that QT is not free software? If people are looking for a free cross platform toolkit, QT isn't it.
  • wxwindows - wxpython (Score:4, Informative)

    by nuggz ( 69912 ) on Tuesday August 12, 2003 @10:10AM (#6675509) Homepage
    Cross platform, native widgets.

    Combined with python it is very simple and easy.
    I wouldn't make commercial apps, but for small development, it's my choice.
  • by r6144 ( 544027 ) <r6k.sohu@com> on Tuesday August 12, 2003 @10:11AM (#6675519) Homepage Journal
    If you are developing a cross-platform high-level GUI application, just use toolkits. You don't need the flexibility of Xlib.

    However, for those developing low-level X programs such as window managers and XIM servers that need to meddle with (say) ICCCM details, you are probably better off just using Xlib --- just like programs doing low-level I/O are better off using low-level functions instead of stdio.

    Note that even in some cross-platform applications some non-portable stuff is needed in order to tune user experience, for example you may find a cool new feature of recent window managers accessible via ICCCM beneficial (albeit not essential) to your application, but toolkits haven't integrated such things yet. Therefore, it is very important that toolkits give access to low-level things like Window/Atom/Pixmap IDs so that bypassing it occasionally is possible. I don't know about others, but GTK does well in this regard.

  • by Anonymous Coward
    I'd be nice to be able to static link into
    one giant executable. I hate having the
    incompatible libraries problem. It's like
    DLL hell in windows. It'd be nice to have
    a full featured GUI library (and other tools)
    that can create one big executable file.
    GTK programs require a DLL in windows.
    WxWindows programs require GTK libraries on
    Linux.
    • The FLTK library mentioned is intended to be statically linked into applications.
    • If you install the static versions of the libraries you use, then you can link statically:

      $ gcc -L/usr/X11R6/lib -L /usr/lib/gcc-lib/i386-redhat-linux/3.2/ -static -o hewx ../source/he.o ../source/hebuffer.o ../source/heexpr.o ../source/hemisc.o ../source/heobject.o ../source/heparse.o ../source/heres.o ../source/herun.o ../source/heset.o ../source/stringfn.o hewx.o hewxwin.o hejpeg.o hepath.o hesound.o hevideo.o -lwx_gtk-2.4 -lgtk -lgdk -lpthread -lmikmod -lstdc++ -lsupc++ -lglib -lgthread -lX11 -lm -ljp

    • If you can live with a non-giant executable too, maybe a Starpack could interest you: a complete Tcl/Tk runtime system, plus your own app, all in one executable file, starting from under 1 MB. Zero installation.
      See http://www.equi4.com/starkit/
  • Documentation (Score:5, Insightful)

    by lunenburg ( 37393 ) on Tuesday August 12, 2003 @10:12AM (#6675532) Homepage
    For me, it came down to documentation. I have a moderately complicated GUI Perl app [lunenburg.org] (Perl because it was the language I was most familiar with). I looked into various toolkits, like wxPerl, GTK/Perl, QT/Perl, but ended up using good ol' reliable Perl/Tk.

    The big advantage with picking up Perl/Tk was that the O'Reilly books [oreilly.com] were extremely informative - good examples on each widget, how they interoperate, how to use them, and larger program examples. The documentation for the other toolkits I considered basically consisted of "look at the arguments this C++ function takes, and use it," which didn't make for an easy time picking things up (wxPerl was the worst in that regard). While an experienced C++ programmer might not have a hard time with that, it was way over my head.

    As a result, though, I have a decent app that runs on X11 and Win32. With the great PAR [perl.org] archiver, I can even package the app up in a nice bundle.

    Good times.
    • Re:Documentation (Score:5, Informative)

      by DavidNWelton ( 142216 ) on Tuesday August 12, 2003 @11:07AM (#6676191) Homepage
      Many have enjoyed how easy Tk is to use and how x-platform (and
      x-language) compatible it is, much easier and more stable than other
      toolkits mentioned.

      A common complaint has been the default Motif look and feel on unix
      (this is easy to change, but many don't bother changing the
      defaults). This is about to change. Tk 8.5, currently in development,
      is going to represent a major revamp of Tk. Basic things like updated
      default look and feel as well as enhancing the core widget base (there
      are 100s of widgets for Tk, but only 15 in the "core").

      This is also meant to target all Tk users (not just Tcl users). There
      are lots of widgets out there only available to Tcl/Tk users that
      could be made available to Perl/Python/Ruby/R/Lua/etc if a better
      framework were used so widget authors understood the basics of having
      their widgets used by multiple languages. Numerous other enhancements
      are planned, all to be done on a tight schedule (we don't like waiting
      for software). You can see the a wiki for this work being built at
      http://tcl.projectforum.com/tk/
  • Missed the best (Score:5, Informative)

    by norwoodites ( 226775 ) <pinskia@gm3.14159ail.com minus pi> on Tuesday August 12, 2003 @10:14AM (#6675551) Journal
    He missed the best: GNUStep.
    GNUStep uses Objective-C and is a clone of the OpenStep API's and is pretty stable.
    To write a simple Application you do not have to write that much code any more.
    • Re:Missed the best (Score:5, Informative)

      by roard ( 661272 ) on Tuesday August 12, 2003 @10:39AM (#6675840) Homepage
      I agree, it's quite shameful that he didn't even dared to mention it.

      GNUstep is a true object oriented framework, running on Linux and other Unices, and there is even a port for Windows in early stage. It's an OpenStep implementation, as MacOS X's Cocoa, thus you could port GNUstep applications on MacOS X and MacOS X application on GNUstep very easily. GNUstep also has great RAD tools like Gorm, modeled after NeXT's InterfaceBuilder.

      GNUstep supports distributed objects out of the box, has a great database library (you just deal with objects, define a link between thoses objects and your database's model, and hop, no need to SQL), support scripting very easily, uses the PostScript imaging model (no need to maintain two versions of your code for display and printing), etc.

      A good example of a GNUstep application compiling both on MacOSX and GNUstep is GNUMail, available on http://www.collaboration-world.com/gnumail ...

      I urge people to check http://www.gnustep.org website :-)

      You could find informations and articles about GNUstep on http://www.roard.com/docs , there is also the gnustep's wiki (http://wiki.gnustep.org), a good GNUstep's site for news on http://www.gnustep.us and a great guide for installing GNUstep (http://gnustep.made-it.com)

      It's really a shame that so few people contribute to this great project...
    • Re:Missed the best (Score:5, Interesting)

      by UnuMondo ( 642324 ) on Tuesday August 12, 2003 @10:59AM (#6676100) Homepage
      I agree. I came across GNUstep two months ago and was amazed by its incredibly simple API. I quickly made my first app, Charmap [nongnu.org], a character map which uses Unicode.org's standards files to provide a wealth of information about any character. This was easy and fast because GNUstep provided solid Unicode/UTF-8 support from the start. While for example GTK was a pain to use until 2.0 with regards to non-Latin scripts, GNUstep at the same time had one of the most advanced string classes.

      Not only is GNUstep concise and simple, but because Apple's Cocoa is also an implementation of the OPENSTEP standard, one can use Cocoa docs in GNUstep programming. This allows the programmer to tap into abundant resources online and in print.

      If you're interested in what's going on in the GNUstep world, my favourite resource is www.gnustep.us, which lists the latest news and updates. I hope I don't sound like a karma whore, I'm just super-enthused about a fantastic API that doesn't get the attention it deserves.
  • by Junks Jerzey ( 54586 ) on Tuesday August 12, 2003 @10:15AM (#6675558)
    The author claims it is not free software. The FLTK site claims otherwise:

    FLTK comes with complete free source code. FLTK is available under the terms of the GNU Library General Public License.

    We have ammended the LGPL to explicitly allow static linking of FLTK (or any modified version of FLTK) to your software. The LGPL is not clear on this and we definately want to allow it.
  • by ChiefArcher ( 1753 ) on Tuesday August 12, 2003 @10:17AM (#6675579) Homepage Journal
    Program in what you like...
    Although programming in QT won't get it included into gnome and programming in GTK won't get it included in KDE.

    A lot of apps people develop never see the light of day... I've programmed hundreds of little apps for the various companies I've worked for.. I programmed in what I liked.. and what I was used to...

    Just because you need to create a little app with a textbox and a button doesn't mean you need to include the HEAVY libraries of gtk/qt/gnome/kde.

    Just my thought.

    ChiefArcher
  • by AJWM ( 19027 ) on Tuesday August 12, 2003 @10:25AM (#6675671) Homepage
    Yeah, I RTFA and know he disses them with "too hard, too much like Xlib" (actually they're built on Xt, which is built on top of Xlib).

    But anybody who thinks Xt is "too hard" probably is out of their depth programming GUIs anyway. (Now, if you think it's ugly, that's a whole 'nother discussion...) And nothing else gives you that level of flexibility and control. (Well, nothing else sane -- if you want to code direct to the X protocol, go right ahead...)
    • Took the words right out of my mouth. I've be writting GUIs and graphics applications for X since X11R3. Xlib has a bit of a curve to it, but if you have any background at all in computer science and graphics, it isn't too hard to understand the abstractions. The X Window System has a long and interesting history. [wikipedia.org]

      Xlib still has a lot going for it, espcially in terms of availability on the various UNIX variants out there and one of it's often overlooked features, especially by younger less experienced
  • by Anonymous Coward on Tuesday August 12, 2003 @10:27AM (#6675697)
    I can't believe this author missed the one toolkit that's been making so much wave in the last year, namely Java/SWT.

    It's the toolkit used to create the Eclipse IDE from IBM, similar in approach to wxWindows...i.e. renders using native widgets on each platfrom (win32 APIs on Windows, GTK+ 2.0 on Linux, Aqua on Mac OS X), but with the same common API on all platforms.

    Did I mention coding in Java is much easier than fighting with ancient macros in C or C++?

    Plus, SWT apps start up real fast and consume much less resources than the infamous default Java SWING toolkit. Just look at the difference in responsiveness between Eclipse and NetBeans (I call it the Molasses IDE in tribute to its speed).

    SWT is the future of Java GUI and because it renders with native widgets it's the way to go for the future.

    Did I mention it's open-source and 100% free on all platforms, including windows (unlike Qt).

    Plus...you get access to all the standard Java libs (db access, xml processing, web services, threasing, etc...)
  • by avdi ( 66548 ) on Tuesday August 12, 2003 @10:30AM (#6675735) Homepage
    The article's biggest strike against Qt is "Very business-oriented main Web site". What the hell is that about? "I'm shocked, shocked! to find marketing going on in this business!". Clue to the author: Qt is made by a company called Trolltech. Companies exist to make money for their employees and shareholders. One of the ways they do that is by (gasp) marketing themselves on the web. That particular company has gone to great lengths to accomodate free software developers; but they still have to make money somehow. If you object to their business model, just say so. But objecting to the fact that their corporate website is "very business oriented" is like objecting to the fact that Slashdot is "very geek oriented".
    • What the author claims as a weakness is actually a strength. Qt/UNIX is distributed under the GPL, which means that it can be used for free software development with the same freedom and same restrictions as any other GPL'd software library. However, if you can't comply with the terms of the GPL (because you are doing proprietary, closed software development) then with a normal GPL'd library you'd be SOL, but TrollTech gives you the option to pay them some money and obtain Qt under a commercial license.

      Thi
    • by WNight ( 23683 ) on Tuesday August 12, 2003 @11:43AM (#6676620) Homepage
      What's is it with all of the "Poor Trolltech" sentiment in this thread? If their GUI library isn't available on Windows without paying money for a development kit and a license it's not as useful as free cross-platform libraries.

      If I write some neat program for myself and friends in Linux, it'd be nice to do it with a GUI library that'd let me, with a minimum of porting hassles, release it for friends in Windows as well. Not worth the $1500 dev kit, but still handy.

      Or perhaps if I was starting as a shareware developer. $1500 isn't much when the money starts coming in, but it's a lot up front.

      Being that portability to Windows is a handy thing, I think the issue of QT being a business and charging for that ability is directly on topic.

      Yes, we know, for the trillionth time, that the job of a company is to make money, yada, yada, yada... That doesn't mean that our job is to supply a company with money.
  • The article did leave out one other toolkit VDK and the VDKbuilder. VDK is a wrapper around gtk+, and vdk builder is a rad tool styled after Borland.

    URLS: http://vdkbuilder.sourceforge.net/ and
    http://www.programmers.net/artic/Motta/vdkbui lder/ vdkbuilder.html

  • While we're talking about GUIs, does anyone know where I can find some good documentation of GUI development standards online? I've done a number of Google searches but haven't found anything comprehensive.

    Some developers on my team are absolutely abysmal at GUI development and, whenever we question them, they always say that what they're doing "follows the standard", which is total bulls--t. (They're just lazy and don't want to take the time to do it right.) Among other atrocities, they convinced our f
  • There is no mention of Windows.Forms at all. While mono may not be mature yet (I dunno, I haven't tried it), there is little doubt that it will be extremely popular. Once Python, Ruby and Perl implement some degree of interoperation with .net I expect Windows Forms will be the most popular GUI toolkit across C#, Visual Basic, Ruby, Python and Perl.

    My US$0.02
    • On the contrary, there's plenty of doubt.

      Ximian have just been taken over by Novell, for starters.

      Or do you really think that they're more interested in Mono than Exchange Connector?
  • PHP-GTK (Score:3, Interesting)

    by mcrbids ( 148650 ) on Tuesday August 12, 2003 @10:45AM (#6675922) Journal
    Officially, PHP-GTK is at version 0.5.2 - "alpha".

    I've written a 20,000 line software package in PHP-GTK and I can say that while GTK 1.2 is a bit funky, it's quite powerful and very stable.

    Binding Gtk with the power and rapid development speed of PHP, using an IDE such as Dev-PHP results in an environment that's blissful, stable, and cross-platform.

    The aforementioned application is currently in the midst of a very successful Beta on Windows, and once released, will be shortly released for Linux and Macintosh. To "compile" the software we used the Ioncube Encoder.

    Gotta love it, eh?
  • by syrja ( 315703 )
    Well, how many of you have really tested all mentioned GUI toolkits? I did that some time ago and ended up using FLTK, basically because of reasons mentioned in article: standard C++, free, light and stable Win32 support.
  • QT != evil (Score:4, Interesting)

    by scharkalvin ( 72228 ) on Tuesday August 12, 2003 @10:51AM (#6675994) Homepage
    "What you get when you download Qt 2/3 is the free X11 version ("Qt Free Edition") which enables you to write non-commercial applications for The X Window System. When you want to create commercial, proprietary, or non-free software, or want to compile your program for Windows or embedded systems, you'll have to pay for the Qt Professional or Enterprise version (both are quite expensive). Qt tried to specify this in their own license (the "QPL") because they felt the GPL could cause them some problems (please see freshmeat article #180 for more information). From Qt 2.2 and upwards, you can now freely choose between the QPL and GPL before building the libraries. That's the whole story; if you feel I missed an important point, feel free to correct me (Qt flames go straight to /dev/null, though). You can read more about Trolltech's licensing issues in freshmeat articles #170, #172, and the one mentioned above."

    The author probably doesn't understand the GPL. All of the other tool kits distributed under the GPL can be used in commerical applications and SO CAN THE GPL'ed version of QT. You just have to accept the terms of the GPL to do so, IE: your application must be open sourced! In this sense QT has an avantage! If you buy their commerical license you may then close source your application. What they have done is allow you to pay extra to by-pass the GPL. How is this an evil thing? The other kits do NOT give you a choice, it's the GPL or nothing! Choice is good. QED.
    QT != evil.
  • The article says the Xlib API function prototypes are still K&R. That's horrible. Since I assume
    all toolkits are built on Xlib wouldn't it benefit
    everyone if somebody (eg one of the toolkit makers)
    fixed this horrible state of affairs.

    In fact *any* improvement to Xlib be great for everyone. This suggest it would be a great area for somebody like IBM to fund.
  • by dentar ( 6540 )
    Tcl/Tk allows you to write GUIs very quickly without the need for C/C++, but you can mix 'em up with C/C++ if you like.

    Downside: The widgets aren't pretty.
    Upside: I can whip out a GUI in a day!
  • My 2 cents (Score:5, Informative)

    by truth_revealed ( 593493 ) on Tuesday August 12, 2003 @11:14AM (#6676276)
    Qt:
    - most polished GUI of the bunch, great documentation, great portability, looks great.
    - typesafe callbacks
    - smallest learning curve - very easy to use.
    - downside: price, MOC preprocessor, very long compiles.
    - recommendation: if you have the money - go buy it.

    FLTK:
    - perhaps the fastest and has the smallest memory footprint of the bunch.
    - small size comes with a price - the look and feel is noticably "off" and often you get non-standard widget behavior.
    - void* based event callbacks
    - fastest compiles

    FOX:
    - programs look quite professional
    - non typesafe events void* pointers that are a royal pain in the butt to use, and are very poorly documented.
    - lack of virtual functions for most GUI classes - must use table dispatch for each new class to override behavior.
    - only supports UNIX (X11) and Windows
    - only has Windows 2000 look on any platform, but looks quite good nonetheless with minimal flicker
    - small user base
    - no CVS access - maintained by one individual

    WxWindows:
    - supports the most platforms, has native look.
    - large community of support
    - many interpreted language bindings
    - different behavior on different platforms
    - widgets flicker like crazy
    - not very stable in my experience
  • What about XVT? (Score:3, Informative)

    by Xentax ( 201517 ) on Tuesday August 12, 2003 @11:27AM (#6676403)
    I thought XVT was "out there" along with these other tools. Is it too small to show up on the radar, or is something else going on? (www.xvt.com [xvt.com] for the curious)

    Xentax
  • by Chalst ( 57653 ) on Tuesday August 12, 2003 @11:30AM (#6676424) Homepage Journal
    The author seems to have a bee in his bonnet about using name munging. While it is inelegant, there is the virtue of simplicity in the arrangement, and the important issue is what sort of risks name munging creates for programmers. The Common LISP module&macro system has shown that name munging need not be problematic in practice.

    On the other hand, the interface to namespaces can be a liability in terms of complexity and hurdles to learning.

    In either case I'd like to see more analysis.

  • by Andy Tai ( 1884 ) on Tuesday August 12, 2003 @12:20PM (#6677101) Homepage
    This may be of interest: a web page that lists almost all GUI toolkits out there, for virtually all platforms (Windows, X Windows, MacOS, etc.) and all major languages (C, C++, Java, Perl, Python, etc.)

    The GUI Toolkit, Framework Page [atai.org]
    at http://www.atai.org/guitool/

  • by MichaelCrawford ( 610140 ) on Tuesday August 12, 2003 @12:54PM (#6677488) Homepage Journal
    The ZooLib [zoolib.org] cross-platform application toolkit has been around for thirteen years, making it even more mature than wxWindows. Yet it is still in active development.

    It's just not very well known yet because it's only been in open source since the fall of 2000. Prior to that it was a proprietary API for the use of Andy Green and his clients Learning in Motion [motion.com], who used it for such products as the client-server educational database Knowledge Forum [knowledgeforum.com].

    ZooLib is written in C++, and can produce native executables for Linux/X11, Windows, BeOS, and Mac OS (classic and carbon) with very little need for platform-specific client code.

    It makes only very basic use of platform-specific code internally, which is kept encapsulated, so it wouldn't be very hard to port it to a completely new platform. Porting to a new Unix platform that uses X11 shouldn't be more than a day's work, for example. Porting to a platform that had a completely alien GUI API would be a few weeks of work for someone familiar with both the platform and ZooLib.

    ZooLib's website has a piece I wrote about why cross-platform frameworks are good for developers:

Order and simplification are the first steps toward mastery of a subject -- the actual enemy is the unknown. -- Thomas Mann

Working...