Documentation Index
Fetch the complete documentation index at: https://mintlify.com/fltk/fltk/llms.txt
Use this file to discover all available pages before exploring further.
Introduction to FLTK
The Fast Light Tool Kit (FLTK) is a cross-platform C++ GUI toolkit for UNIX®/Linux® (X11 or Wayland), Microsoft® Windows®, and macOS®. FLTK provides modern GUI functionality without bloat and supports 3D graphics via OpenGL® and its built-in GLUT emulation. Originally developed by Bill Spitzak, FLTK is currently maintained by a small group of developers across the world with a central repository on GitHub.Get started
Quick start
Build your first FLTK application in under 5 minutes
Installation
Install FLTK on Linux, Windows, or macOS
Hello world
Step-by-step guide to creating your first window
API reference
Complete API documentation for all FLTK classes
Why FLTK?
FLTK stands out as a GUI toolkit for developers who value efficiency, simplicity, and cross-platform compatibility.Cross-platform native support
Write once, compile anywhere. FLTK runs natively on:- Linux/Unix: X11 or Wayland backends with Cairo and Pango support
- Windows: Native Win32 API with GDI+ antialiasing
- macOS: Native Cocoa framework for both Intel and Apple Silicon
Lightweight and fast
FLTK’s core design philosophy prioritizes minimal overhead:- Small binary size - applications start in milliseconds
- Low memory footprint ideal for embedded systems
- Direct rendering without unnecessary abstraction layers
- Single header inclusion model for faster compilation
Mature and stable
FLTK has been in active development since 1998:- Battle-tested in production environments worldwide
- Stable API with careful consideration for backwards compatibility
- LGPL license with static linking exception - use freely in commercial software
- Active community and responsive maintainers
Modern C++ features
FLTK 1.5 embraces modern C++ while maintaining simplicity:- C++11 standard requirement enables cleaner, safer code
- Standard library integration with
std::stringsupport - Smart pointer compatibility for memory management
- Template-based event handling
Key features
Rich widget set
Rich widget set
FLTK includes over 70 built-in widgets:
- Standard controls: buttons, sliders, input fields, menus
- Advanced widgets: browser, table, tree, tabs, wizard
- Text editing: full-featured editor with syntax highlighting support
- File choosers: native file dialogs on all platforms
- Custom drawing: create your own widgets with simple draw() override
OpenGL integration
OpenGL integration
Built-in OpenGL support with GLUT emulation:
Fl_Gl_Windowclass for 3D graphics- Hardware-accelerated rendering
- Cross-platform OpenGL context management
- Compatible with modern OpenGL 3+ shaders
Image support
Image support
Comprehensive image handling capabilities:
- Built-in support: PNG, JPEG, BMP, XPM, XBM
- SVG rendering and creation with built-in library
- Animated GIF playback and control
- Image manipulation: scaling, rotation, color adjustment
International text
International text
Full Unicode and internationalization support:
- UTF-8 text rendering throughout the toolkit
- Pango integration for complex scripts (Arabic, Hindi, Thai)
- Right-to-left text support
- Multiple font support including TrueType on all platforms
FLUID GUI designer
FLUID GUI designer
Interactive interface designer included:
- Visual layout editor with drag-and-drop
- Code generation for C++ classes
- Live preview of interface designs
- Integration with CMake and build systems
Architecture overview
FLTK uses a simple, event-driven architecture:- Window hierarchy: Windows contain widgets in parent-child relationships
- Event loop:
Fl::run()processes events until all windows close - Callbacks: Functions triggered by user interactions
- Automatic layout: Widgets manage their own drawing and event handling
What’s new in FLTK 1.5
FLTK 1.5 requires C++11 and uses CMake exclusively for building.
- C++11 baseline: Modern language features throughout the API
- CMake only: Simplified, consistent build system across platforms
- Enhanced Wayland support: First-class support for Wayland on Linux
- Improved text rendering: Better Pango integration and Unicode handling
- Pen/stylus support: Pressure-sensitive input on supporting hardware
- Better HiDPI: Automatic scaling on high-resolution displays
Community and support
Get help and connect with other FLTK developers:- Mailing list: FLTK General
- GitHub Discussions: Q&A section
- Bug reports: FLTK bug tracker
- Website: www.fltk.org
License
FLTK is free software under the GNU Library General Public License (LGPL) with exceptions that permit static linking. This means you can:- Use FLTK in commercial applications
- Statically link FLTK into proprietary software
- Distribute FLTK-based applications under any license
- Modify FLTK source (modifications must remain LGPL)
The LGPL with static linking exception makes FLTK ideal for commercial software development while keeping the toolkit itself open source.
Next steps
Install FLTK
Set up your development environment
Build your first app
Create a working application in 5 minutes