FLTK


Fast Light Toolkit is a cross-platform widget library for graphical user interfaces, developed by Bill Spitzak and others. Made to accommodate 3D graphics programming, it has an interface to OpenGL, but it is also suitable for general GUI programming.
Using its own widget, drawing and event systems abstracted from the underlying system-dependent code, it allows for writing programs which look the same on all supported operating systems.
FLTK is free and open-source software, licensed under GNU Lesser General Public License with an added clause permitting static linking from applications with incompatible licenses.
In contrast to user interface libraries like GTK, Qt, and wxWidgets, FLTK uses a more lightweight design and restricts itself to GUI functionality. Because of this, the library is very small, and is usually statically linked. It also avoids complex macros, separate code preprocessors, and use of some advanced C++ features: templates, exceptions, and run-time type information or, for FLTK 1.x, namespaces. Combined with the modest size of the package, this makes it relatively easy to learn for new users.
These advantages come with corresponding disadvantages. FLTK offers fewer widgets than most GUI toolkits and, because of its use of non-native widgets, does not have native look-and-feel on any platform.

Meaning of the name

FLTK was originally designed to be compatible with the Forms Library written for Silicon Graphics machines. In that library, all functions and structures start with fl_. This naming was extended to all new methods and widgets in the C++ library, and this prefix FL was taken as the name of the library. After FL was released as open source, it was discovered that searching "FL" on the Internet was a problem, because it is also the abbreviation for Florida. After much debating and searching for a new name for the toolkit, which was already in use by several people, Bill Spitzak came up with Fast Light Tool Kit.

Architecture

FLTK is an object-oriented widget toolkit written in the programming language C++. While GTK is mainly for the X Window System, FLTK works on other platforms, including Microsoft Windows, and OS X. HTML5 and Wayland back-ends are in development. FLTK2 has gained experimental support for optionally using the cairo graphics library.

Language bindings

A library written in one programming language may be used in another language if language bindings are written. FLTK has a range of bindings for various languages.
FLTK was mainly designed for, and is written in, the programming language C++. However, bindings exist for other languages, for example Lua, Perl, Python, Ruby, Rust and Tcl.
For FLTK 1.x, this example creates a window with an Okay button:

  1. include
  2. include
  3. include
int main

GUI designers

FLTK includes Fast Light User Interface Designer, a graphical GUI designer that generates C++ source and header files.

Use

Many programs and projects use FLTK, including:
This version history is an example of the sometimes tumultuous nature of open-source development.

1.0.x

This is a prior stable version, now unmaintained.

1.1.x

This is a prior stable version, now unmaintained.

2.0 branch

This was a development branch, long thought to be the next step in FLTK's evolution, with many new features and a cleaner programming style. It never achieved stability, and development has largely ceased. The branch is inactive now.

1.2.x

This was an attempt to take some of the best features of 2.0 and merge them back into the more popular 1.1 branch. It is no longer developed.

1.3.x

Current stable release. Provides UTF-8 support.

1.4.x

Current development branch. Adds more features to 1.3.

3.0 branch

This branch is mostly a conceptual model for future work. Now inactive.