Cross-platform C++ GUI toolkit with ~80 widget classes, OpenGL/GLUT integration, drawing primitives, image support, printing, and FLUID visual builder. Supports X11, Wayland, Windows, macOS with HiDPI scaling. Use when building desktop GUI apps in C++, subclassing Fl_Widget for custom controls, embedding OpenGL, or migrating from GLUT/FreeGLUT.
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
Cross-platform C++ GUI toolkit with ~80 widget classes, OpenGL/GLUT integration, drawing primitives, image support, printing, and FLUID visual builder. Supports X11, Wayland, Windows, macOS with HiDPI scaling. Use when building desktop GUI apps in C++, subclassing Fl_Widget for custom controls, embedding OpenGL, or migrating from GLUT/FreeGLUT.
FLTK 1.4.5
Overview
Fast Light Toolkit (FLTK) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11 and Wayland), Windows, and macOS. It provides modern GUI functionality with minimal footprint — suitable for static linking. FLTK includes ~80 widget classes, OpenGL/GLUT emulation, drawing primitives, image support (PNG, JPEG, SVG, GIF, BMP, ICO, XPM, PNM), printing to PDF/PostScript/EPS/SVG, and the FLUID visual UI builder.
Key features:
Small footprint: ~1MB library, designed for static linking
HiDPI support: Per-screen scale factors (1.0–2.5+), FLTK_SCALING_FACTOR env var
Wayland + X11 hybrid: Automatic backend selection on Linux (FLTK_BACKEND env var)
Event-driven model: Fl::run() main loop with callbacks, idle functions, timers
OpenGL integration: Fl_Gl_Window for embedded OpenGL, GLUT compatibility via <FL/glut.H>
When to Use
Building desktop GUI applications in C++ across Linux, Windows, macOS
Creating custom widgets by subclassing Fl_Widget or Fl_Group
Embedding OpenGL rendering with Fl_Gl_Window
Migrating from GLUT/FreeGLUT using <FL/glut.H> compatibility header
Needing a lightweight toolkit suitable for static linking
Building applications requiring printing (PDF, PostScript, EPS, SVG)
Widget hierarchy: All widgets derive from Fl_Widget. Container widgets derive from Fl_Group. Windows derive from Fl_Window (which derives from Fl_Group). Widgets created between group->begin() and group->end() are automatically added to the group.
Event loop: Fl::run() processes events until all windows close. For custom loops, call Fl::wait() repeatedly. Events flow through widget handle() methods; return non-zero to claim an event.
Coordinates: Top-left origin (0,0). All positions relative to the enclosing window or group. FLTK 1.4+ uses scale-independent units (multiplied by screen scale factor for actual pixels).
Resizing: Set group->resizable(widget) on a child widget. That widget absorbs all size change; other widgets resize proportionally based on overlap with imaginary cross-lines from the resizable widget's edges.