Re: [gtkmm] gtkmm vs wxGTK



michael sherman og ge com wrote:
I have a question.
Why would one use gtkmm and not wxGTK?

Mike

Well that's entirely a matter of personal preference and project requirements really. wxWidgets has the advantage of being cross-platform - you can use pretty much the same API on Windows, UNIX, Mac OS X, OS/2 and so forth and get the native GUI look and feel as a result. This is great, but it's also a disadvantage - I've never seen a cross-platform GUI system which can take advantage of everything the platform in question has to offer, because it has to target some common base. This is especially true of Mac OS X, but that's likely not a concern if you're pondering gtkmm and wxGTK.

I'll admit I'm not very familiar with wxGTK's API (I've only really used wxWidgets through the wxHaskell bindings), but I'll throw in some things which I really, really like about gtkmm:

- uses C++-style APIs just about everywhere, right down to the string class
- no preprocessor tricks or custom language extensions; everything's in pure C++
- makes it dead easy to subclass GTK+ objects in C++
- everything you can do in GTK+ you can do in gtkmm (or at least, I've not yet seen anything you can't do that wasn't a real edge case)
- considerably more concise than GTK+ code in the native C API
- a happy, noncompulsory memory management system via containership, Gtk::manage and conventional new/delete operations

But I suspect if you really need to go cross-platform and you're not just talking about platforms where X11 is an acceptable display target, wxWidgets wins in a big way. But I've just looked at the tutorial slides from FOSDEM 2003 and it just seems... ugly. Anything written all in capitals like the event table stuff really makes me worry. Looks like Windows programming. Ewwww. gtkmm in general is conceptually clean, and that is a big bonus in my experience.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]