fldtk 1.0.0
Full-D-tick: A complete D port of FLTK (Fast Light Toolkit), including Fluid support for exporting D source
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
This package provides sub packages which can be used individually:
fldtk:fluid - Fluid, FLTK's UI designer, ported to emit D source files
fldtk
fldtk (Full-D-tick) is a complete port of FLTK, the Fast Light Toolkit, to the D programming language. It is not a binding layer: the toolkit is reimplemented as native D code, so the only things it links against are the system's own libraries (Xlib, OpenGL, ...), not a compiled FLTK. It also includes a port of Fluid, FLTK's UI designer, which exports D source files instead of C++.
fldtk has the look and feel of FLTK, and its API follows FLTK's closely,
expressed in ordinary D: callbacks are delegates, labels are strings, memory is
garbage-collected, and Fl_Widget is fl.widget.Widget.
Example
import fl;
import std;
void main()
{
auto win = new Window(100, 100, 400, 300, "fldtk smoke test: Button");
auto btn = new Button(20, 20, 360, 260, "Click!"); // auto-parents into win (Group.current())
win.end(); // not really needed here
win.show();
fl.run();
}
which produces a window with a clickable button.
<img width="412" height="333" alt="button" src="/sitelet?url=https%3A%2F%2Fgithub.com%2Fuser-attachments%2Fassets%2Fc1d54510-d5fb-4408-87cd-b63c48e08104" />
Status
The library and Fluid run stably on Linux/X11 and on Windows. A Linux/Wayland driver has not been started yet; macOS is out of scope for now.
What is in the box:
- Widgets: buttons, valuators and sliders, menus, text input and editing, browsers, tables, trees, tabs, scroll, pack, flex and grid layouts, a help viewer, a terminal widget, file choosers, dialogs, and the rest of FLTK's widget set, with FLTK's box types and schemes (base, gtk+, gleam, plastic, oxy).
- Fluid, both the interactive designer and the headless
fluid -c file.flconverter that writes D source. - Images, decoded natively in D: PNG, JPEG, GIF (including animated), SVG, BMP, ICO, XPM, XBM and PNM.
- OpenGL windows (with FLTK widgets drawn over them) and the GLUT compatibility layer.
- Platform services: clipboard, drag and drop, multi-monitor and scaling support, input methods, and printing.
- FLTK's demo and example programs, ported to D (
source/test/,source/examples/).
The main known gaps are the Wayland driver, a Cairo backend, and complex-script
text shaping (text is drawn through Xft; replacing it with Pango is planned).
PORTING.md tracks the port file by file: what is complete, what
is partial and why, and what is deliberately left out. Suspected bugs in FLTK
itself, found while porting, are collected in FLTK_ISSUES.md.
Building
You need a D compiler (dmd, ldc or gdc) and dub. On Linux the development
packages for X11, Xft, Xinerama, fontconfig, Xcursor, Xfixes, Xext, OpenGL,
GLU, GLEW and zlib must be installed. Then, from the repository root:
dub build # the library: ./libfldtk.so
rdmd buildfluid.d # the Fluid designer: ./fluid
rdmd buildsamples.d # the demo programs: ./build/
BUILDING.md has the details, including how to compile your own
programs against the library and the Windows instructions.
It should be mentioned that dmd and gdc have both been tested to work. ldc has not been tested.
Documentation
BUILDING.md: building and using the library, Fluid and the samplesPORTING.md: porting status, module by moduleCONVENTIONS.md: how FLTK maps onto D, and the design decisions behind itFLUID_DIALECT.md: the.fldialect Fluid reads and writes for DTRANSLITERATION_GUIDE.md: converting FLTK's C++.flfiles to DBENCHMARKS.md: performance comparisons with FLTK. This document is not very up to date
Contributing
Bug reports and pull requests are welcome. Where fldtk behaves differently from FLTK, it may or may not have been by design. Deliberatre deviations from FLTK should have been documented clearly in the source or in PORTING.md.
License
- Registered by Steef Boerrigter
- 1.0.0 released a day ago
- sxmboer/fldtk
- BSL-1.0
- Copyright 2026 Steef Boerrigter
- Authors:
- Sub packages:
- fldtk:fluid
- Dependencies:
- none
- Versions:
-
Show all 2 versions1.0.0 2026-Oct-05 ~main 2026-Oct-05 - Download Stats:
-
-
1 downloads today
-
1 downloads this week
-
1 downloads this month
-
1 downloads total
-
- Score:
- 0.0
- Short URL:
- fldtk.dub.pm