FLTK

From Wikipedia, the free encyclopedia

FLTK
The Main Page of Wikipedia as seen in Dillo 0.8.4
Example application: Dillo
Stable release: 1.1.7  (January 17, 2006) [+/-]
Preview release: 2.0.x-r5528  (October 27, 2006) [+/-]
OS: Unix/Linux/BSD (X11), Mac OS X, Windows
Use: Widget toolkit
License: GNU Lesser General Public License
Website: www.fltk.org/

The "Fast, Light Toolkit" (pronounced "fulltick") has been developed by Bill Spitzak for 3D graphics programming and has an interface to OpenGL. Nevertheless it is well-suited for first steps in GUI programming. It allows for writing programs which look the same on all supported operating systems.

FLTK is free Software and includes fluid (FLTK User Interface Designer), a GUI designer.

In contrast to libraries like Qt and wxWidgets, FLTK restricts itself to GUI functions. Therefore it is small and is usually linked to statically. The size of "Hello World" program with FLTK is only about 100 KiB.

Contents

[edit] Using FLTK in programming languages

FLTK was primarily designed for the C++ programming language. However, bindings exist for other object-oriented programming languages, for example Python and Ruby.

The following example creates a window with an "Okay" Button:

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

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

[edit] Software built on FLTK

[edit] See also

[edit] External links

In other languages