home contents changes options help

by Robin Rowe 11/25/05

What's FLTK?

FLTK is a GUI toolkit that's free, open source, very small, fast and portable (Linux, Windows, Macintosh). It has a modified LGPL license that allows static linking. Advantages of FLTK have been discussed previously in Why Migrate from GTK to FLTK. Having chosen FLTK, now what?

Which Platforms

Robin Rowe (that's me) is the CinePaint person in charge of FLTK maintenance. I have Win32 (XP), Linux (Debian, etc.), Mac OS X (G5), and Linux64 (Athlon64 and Sparc64). Unfortunately, having more machines doesn't equate to having more time to use them. I do most of my development on the Windows platform because I'm faster with Visual C++ than with g++ or xcode.

What's Different About CinePaint's version of FLTK

FLTK is available in stable 1.x and unstable 2.x versions. We're using 1.1.6. The 2.x version supports themes and internationalization. Because of our project's emphasis on stability we've made the conservative choice of FLTK 1.x. Don't ask us when we're going to offer 2.x. We don't know yet, and don't want to think about that before we have a stable release of CinePaint using FLTK 1.x. Regarding internationalization, there's a patch (UTF-8) available for FLTK 1.x. Whether we should adopt that as a stopgap or wait for 2.x has yet to be researched. Note that FLTK development by FLTK.org on the 1.x branch has officially ceased. Our changes are the only active development on FLTK 1.x.

Our version of FLTK 1.1.6 in CinePaint CVS is significantly different from the library as provided by http://fltk.org. We've done some code clean-up. Our version is (void*)(int) cast clean. Modern C++ compilers generate annoying warnings when casting between (void*) and int. And on Win64 it actually matters, because there sizeof(void*)!=sizeof(int). Functions I've added to FLTK called int2ptr() and ptr2int() fix the pointer conversion warnings. Those should be used exclusively. Never cast between pointers and ints directly because it can cause bugs in Win64. My conversion functions are found in fltk/FL/Fl.H. Those warnings and other have been corrected in our version of FLTK. On Win32 it builds with just a few warnings. (There were a lot.) To have FLTK compile clean without any warnings on all platforms is our intention. Still working on it.

Our FLTK version has a new VC++ 7 project file to get rid of any crud. Our version lacks a project file to build FLTK as a DLL. Because FLTK is so small, we're using it as a static lib only. In general, CinePaint plug-ins will not have a direct dependancy on FLTK, and therefore could have no size savings benefit if dynamic linking to FLTK. Not being able to find the FLTK dll or finding the wrong version of FLTK dll compiled with the wrong flags is a typical problem for FLTK apps. The advantage of static linking is less to go wrong.


FLUID is the interactive GUI-builder for FLTK. It is included as an application with FLTK. Like FLTK, we've created a new VC++ 7 project file from scratch and made minor fixes in our version.


In this screenshot is shown a dialog from Splat (on right) that was generated by Fluid. Don't expect me to be able to answer any hard questions about Fluid. While it may be great for rapid application development, I haven't used it.

FLTK Links