Fast Light Toolkit

from Wikipedia, the free encyclopedia
Fast Light Toolkit

Logo of the FLTK project
Screenshot from FLTK
Basic data

Current  version 1.3.5
( March 3, 2019 )
operating system unixoid system
programming language C ++
category GUI toolkit
License LGPL with exception
www.fltk.org

FLTK ( abbr. F ast L ight T ool K it, pronunciation: full tick ) is one of Bill Spitzak developed GUI toolkit for 3D - graphics programming and includes an OpenGL -connection.

FLTK makes it possible to create programs that look and function the same everywhere, as long as they have been compiled for the corresponding operating system . FLTK is free software and contains its own GUI designer fluid ( abbreviation FL TK U ser I nterface D esigner)

In contrast to libraries like Qt and wxWidgets , FLTK only provides functionality for a user interface. This is the reason why FLTK is so compact and is usually statically linked in applications . The license conditions of FLTK contain a clear statement that allows static linking also for non-LGPL programs. Despite the static integration of the FLTK library, a hello world program is only a little over 100 kB in size.

Origin of the designation FLTK

The FLTK toolkit was originally designed to be compatible with the SGI Workstations Forms library . A derived variant of this library for X11 called XForms is used in most Unix operating systems. In the Forms library, the names of all functions and structures begin with "fl_". This has been retained in the new implementation and runs through all the new methods and widgets of the library written in C ++. The prefix “FL” was therefore also used as the name for the new library.

After FL was published as open source software , it turned out that it was impossible to find the project on the Internet by searching for “FL” (FL is also the postal abbreviation for Florida ). After much debate and the search for a suitable new name for the toolkit, which was already in productive use by many people, Bill Spitzak presented the backronym "FLTK" with the meaning "Fast Light Tool Kit" as a replacement .

Sample code

Here is a small example of a window with an "Okay" button :

# include <FL/Fl.H>
# include <FL/Fl_Double_Window.H>
# include <FL/Fl_Button.H>

void ok_callback(Fl_Widget*, void*) {
   ...
}

int main(int argc, char *argv[]) {
   Fl_Double_Window *w = new Fl_Double_Window(330, 190);
   Fl_Button *b = new Fl_Button(110, 130, 100, 35, "Okay");
   b->callback(ok_callback);
   w->end();
   w->show(argc, argv);
   return Fl::run();
}

compatibility

Programs written with FLTK can usually be compiled on many operating systems without changes to the source code and run there "natively", i.e. at full speed.

FLTK supports Windows (from Windows 2000) ( Cygwin , Visual C ++ and MinGW ), Apple macOS PPC, Intel 32 and 64 bit ( Makefile , Xcode ), most Unix implementations (BSD, IRIX etc.) with X11 (Makefile, CMake ), as well as embedded devices with microwindows . External developers have ported FLTK to other platforms, e.g. B. OS / 2 , AmigaOS , Classic Mac and others.

See also

Web links

Individual evidence

  1. Release 1.3.5 . March 3, 2019 (accessed July 4, 2019).
  2. http://www.fltk.org/articles.php?L364+I0+TFAQ+P1+Q