FLUID (Fast Light User Interface Designer) is a graphical editor that generates C++ source code and header files for creating FLTK-based graphical user interfaces. FLUID stores UI designs inDocumentation 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.
.fl project files and transforms them into ready-to-compile C++ code.
What is FLUID?
FLUID is a visual interface design tool that enables developers to:- Design UIs visually through drag-and-drop functionality
- Generate C++ code automatically from visual layouts
- Preview interfaces in real-time as you design
- Organize UI hierarchically using a tree-based widget browser
- Integrate with build systems like CMake or custom IDEs
Why Use a Visual Designer?
Visual UI designers like FLUID offer several advantages over manual coding:Faster Development
- Position and size widgets visually rather than calculating coordinates
- See immediate results without compile/run cycles
- Copy and paste widget groups for rapid prototyping
Better Consistency
- Use alignment guides and grids for pixel-perfect layouts
- Apply consistent spacing and sizing across all widgets
- Maintain design standards with reusable templates
Easier Maintenance
- Modify layouts without hunting through source code
- Visual hierarchy makes complex UIs easier to understand
- Changes to the design don’t require manual code refactoring
Reduced Errors
- No manual coordinate calculations
- Automatic code generation eliminates syntax errors
- Preview functionality catches layout issues early
FLUID Capabilities
FLUID supports the complete FLTK widget set and advanced features:Widget Support
- All FLTK widgets: buttons, inputs, browsers, menus, and more
- Container widgets: windows, groups, tabs, scrolls, grids, flex layouts
- Specialized widgets: trees, tables, terminals, help viewers
- Custom widgets: subclass any FLTK widget type
Code Organization
- Functions: Generate C++ functions that create UI elements
- Classes: Create complete widget classes with methods
- Code blocks: Insert custom C++ code anywhere in the hierarchy
- Declarations: Define variables and forward declarations
- Comments: Document your design with inline comments
Advanced Features
- Internationalization: Built-in support for gettext and POSIX catalogs
- Resource embedding: Include images and binary data directly in code
- Shell commands: Execute build scripts from within FLUID
- Templates: Save and reuse project templates
- Live code preview: See generated C++ code in real-time
Workflow Modes
Interactive Mode: Design UIs visually with full WYSIWYG editing Command-line Mode: Generate code automatically during buildsGenerated Code Structure
FLUID generates two files from each.fl project:
Header File (.h)
Contains:- Forward declarations for all widgets
- Class definitions for custom widget classes
- Public function prototypes
- External variable declarations
Source File (.cxx)
Contains:- Complete widget initialization code
- Callback function implementations
- All custom C++ code from code blocks
- Resource data (images, binary files)
Example Structure
For a simple window with a button:FLUID Workflow
The typical FLUID development process:- Design: Create UI visually in FLUID’s interactive mode
- Generate: Write C++ source and header files
- Compile: Build generated code with your application
- Link: Create final executable with FLTK library
- Integrate: Access UI elements from other C++ modules
Small Projects
FLUID can handle complete application development:- Design entire UI in a single
.flfile - Use shell commands to compile directly from FLUID
- Rapid prototyping without external build systems
Medium Projects
Integrate with IDEs or build systems:- Pre-generate C++ files in interactive mode
- Let IDE handle compilation and linking
- Use FLUID for UI design, code editor for logic
Large Projects
Command-line integration with build pipelines:- Include
.flfiles in version control - Generate code automatically during builds
- Reference external resources (images, i18n files)
- Run FLUID as external tool in CMake or Make
File Format
FLUID projects are stored as plain-text.fl files:
- Human-readable: Can be edited manually if needed
- Version control friendly: Text format works well with Git/SVN
- Hierarchical structure: Reflects the widget tree organization
- Backward compatible: Newer FLUID versions read older files
Getting Help
- Interactive help: Double-click any widget to see its properties
- Code preview: View generated code in real-time (Edit > Show Code View)
- Tooltips: Hover over controls for quick help
- Examples: Study
.flfiles in FLTK’stest/andexamples/directories
Next Steps
Getting Started
Create your first FLUID project
Interface Guide
Learn the FLUID interface
File Format
Understand .fl file structure
FLTK Documentation
Complete FLTK reference