Skip to main content.
June 21st, 2005

Gadgets, widgets, buttons, windows and libraries

Today I was… sleepy ! Yesterday night, I realized that I had no sleeping pills.. without them it’s always an issue.. especially for the day after !

zzzzzzzzz

Since last week, I did some research about writing GUI applications. More specifically, I wanted to give a try to those publicly available libraries such as wxWidgets and FLTK. Those libraries have great support. They are all more or less multi-platform, they come with lots of sample code and documentation.. So I figured, now that I’ve got a bit more acquainted with C++, that I’d give a try again and see if they looked any nicer from last time I checked them.
wxWidgets code doesn’t compile straight away under VS.NET. I had to make some manual changes to some library names, then it worked. It’s all based on sub-classing, something that I don’t particularly like. Also, events are handled using a lot of defines (so much for C++ design 8). The nice thing is that the GUI on Windows, really does look like Windows.. and not worse, like for FLTK.
FLTK as a much cleaner programming interface, a window is an object and it’s created when it’s needed, without inheritance. Unfortunately, even the edit boxes seem to be somewhat custom. So, the Japanese input is lost (some patch does support it). Also the file requester is completely custom, and definitely not as nice as the standard MS Windows one.

So, I’m back to my application framework. It’s not multi-platform, there is comparatively very little work behind, but it’s my code and it’s much simpler to use.

All this started because I thought of creating a few windows to hook to the video-capture library, to get the output in other color-spaces, to begin some testing. Instead I decided to procrastinate and do this little excursion into the world of GUI frameworks.
In the end I’m not too disappointed to find out that I don’t need to jump into a new adventure with some new huge, cross-platform library.

Posted by Davide Pasca in Uncategorized

This entry was posted on Tuesday, June 21st, 2005 at 1:48 am and is filed under Uncategorized. You can follow any responses to this entry through the comments RSS 2.0 feed. You can leave a response, or trackback from your own site.

4 Responses to “Gadgets, widgets, buttons, windows and libraries”

  1. Anonymous says:

    Its interesting to note that on all game projects that I’ve worked on so far the UI programmer always tries to invent some ultimate generic UI system. But later on each UI screen needs some customization so in the end the number of ‘generic’ features of the UI system is usually almost the same as the humber of custom features =)

  2. ragin' lion says:

    Which one do you think is actually better? I have been thinking about (re)learning MFC; I haven’t used it in years and have forgotten most those annoying little details.

    There was some news a few months ago about TrollTech releasing an OpenSource version Qt for Windows. I used Qt a little in the past, it wasn’t too bad. Probably among the best of all the multi-platform GUI libraries available.

  3. Davide Pasca says:

    Personally I prefer to use CreateWindow() to build windows, buttons, etc. With some light wrapping on my side.
    I never used MFC, and I I looked at wxWidgets and FLTK too briefly.
    As usual, I don’t like to bet my life on anything. If something gets too complex, then it’s a problem or will be a problem 8)

    The multi-platform thing, it’s more a feature than anything. It means that it will make it simple to port a certain application one day on some other platforms. But generally, most applications that are started aren’t finished not even on one platform.

    Also one has to ask himself what’s the real goal. Most of the time, most of the menues & buttons are probably needed for small apps, tests etc.. where form has little impact..

    When form becomes important, that’s where customization starts to come in.. and that’s what Mr.Rince was (anonimously 8P) talking about !

  4. ragin' lion says:

    “Multi-platform” in this case means “learn once, use anywhere”. There was a time I did some programming under OS X, it was a serious pain using Carbon. I know Apple suggests using Cocoa, and the like, but I really didn’t want to deal with writing things in ObjectiveC.

    Most of the time I find myself wanting to get real work done rather than having to learn a new API simply because the APIs one already knows don’t exist on a different platform.

    Thank goodness PS3 is using OpenGL! 8P

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>