Checking out FLTK

Posted on:October 25 2007

I've been using a lot of UI libraries in the past, from pure Win32 C code to MFC, AWT, SWT, Swing, Irrlichts own gui stuff, Qt, wxWidgets, and a lot more. Today I wanted to write a small test program for my game audio library which would need some simple user interface, and all of these libraries didn't really meet my requirements. I also wanted to make the test program open source as example program later, so the requirements for the UI library I had were the following: Small, fast, simple, with all the basic widgets, based no C++ or C, free or LGPL at maximum and cross-platform: Because irrKlang runs on these platforms I needed it to work on Linux, MacOSX and Windows. Sounds though, but I found some candidates, and after studying the web pages of them, I decided to give FLTK a try.


I downloaded it, and after very short time, I had a basic program with a window, some buttons and other widgets on it running, as can be seen on the right. The program should already compile and work on all three platforms, but I only tried it out on Windows yet. FLTK doesn't seem to use native widgets and does everything itself. The result is that the API is a bit unusual (you have to care for widget redraws for yourself for example), and that the widgets look somehow a bit strange, but for small applications, FLTK really is a good choice IMO. It features a UI Designer which generates C++ code, you only need some very few lines of code to set up your UI and the programs created with it, even if statically linked are very small - so there is a reason why it is named 'Fast Light Toolkit'. ;) I think I will use it for other small UI progams in the future too, because it is really handy.





Comments:


Did you use the 1.1.* branch (which only gets bugfixes but no new features) or the 2.* branch?
wolfgke
Quote
2007-10-25 22:28:00


Isn't that Windows Vista :-P. Anyways FLTK sounds like a cool UI lib.
leo
Quote
2007-10-26 10:15:00


yes, used the 1.1 version, because I didn't see that much differences to the 2.0 version and prefered a stable version.
niko
Quote
2007-10-26 13:58:00


Where did you get the UI designer for fltk?
Joe
Quote
2007-10-26 19:42:00


It's named 'fluid', it comes with the SDK
niko
Quote
2007-10-29 23:30:00


Yes FLTK is quite good, I think I'll probably use it for my next projects. The main drawback of FLTK is that it doesn't have cross-platform printing support... yet.
Raedwulf
Quote
2007-10-30 09:42:00


Add comment:


Posted by:


Enter the missing letter in: "?nternational"


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons