News: 1732642209

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

FLTK hits 1.4, arrives speaking Wayland and with better HiDPI support

(2024/11/26)


FLTK, one of the oldest and most stable FOSS toolkits for programming GUI apps, is back with new shiny.

[1]FLTK 1.4 was swiftly followed by a minor bugfix, [2]version 1.4.0.1 . Although the project never went away and there has been a continuous slow trickle of minor versions, it's over 13 years since the last major point release, [3]version 1.3.0 in June 2011.

These days, it's a C++ library whose name stands for the "fast light toolkit", which is descriptive. However, the initials originally came from the fl_ prefix to functions in the [4]Forms Library of Silicon Graphics's proprietary IRIX Unix. FLTK started out as a compatible replacement for the SGI Forms Library, as described in the [5]project's history , which also reveals that FLTK is pronounced "full tick".

[6]

(As it happens, another FOSS GUI library also started out as a replacement for the SGI one: [7]XForms . XForms is still around too, although more aimed at plain old C rather than C++. In another instance of an initialism being redefined, XForms was the [8]original toolkit used for the XFCE desktop. Xfce 3 was rewritten to use Gtk instead, and since then its name is written in [9]sentence case instead.)

[10]

[11]

The biggest change is that FLTK now has better support for greater-than-standard-definition displays:

FLTK 1.4 adds support for HighDPI displays under Linux/Unix and Windows and improves HighDPI support on macOS. The initial screen scaling factor is read from the system and application windows can be zoomed (in/out/reset) by the user with ctrl/+/-/0 shortcuts, respectively.

It's also natively able to use the Wayland display protocol under both Linux and FreeBSD.

FLTK was originally built for the [12]Nuke visual-effects app , although since version 5 that's moved to using Qt instead. FLTK is also used in some moderately well-known FOSS apps, such as the [13]recently-revived Dillo lightweight web browser and the [14]FLWM window manager , as seen in the [15]ultralightweight Tiny Core Linux .

Another tool which uses FLTK is the [16]Equinox Desktop Environment , or EDE for short. EDE also hasn't seen an update in a similarly long time: the project was rebooted in about 2009, and [17]this 2013 interview suggests that the long gap before the release of EDE 2.0 in 2012 was due to trying to rebuild it on FLTK 2. That effort [18]began in 2002 , but FLTK 2 never happened, although there are still mentions of it in the [19]FLTK documentation .

[20]

Now that there's a new major release in the FLTK 1.x codebase, perhaps some more activity in related projects such as Dillo and EDE will follow.

Perhaps FLTK could even attract the attention of other desktops that have a slower, more measured development cycle. It took years of work to port Xfce from Gtk 2 to Gtk 3: The Register reported on the project's [21]core components moving to Gtk 3 back in 2019. Just a year later, [22]Gtk 4 débuted.

Five years after this, Xfce 4.20 is [23]expected next month and should have preliminary Wayland support at last… but Gtk 4 remains an as-yet-uncharted future path – and maybe a step too far.

[24]

[25]As we've noted before , the GNOME development team is, shall we say, not famed for playing nice with other desktops. Gtk 4 is intended for use with the GNOME desktop version 40 and later, and that's all. If it's useful to anyone else, great, but we see no signs that this an important objective.

[26]Lightweight LXQt 2.0.0 updates to same toolkit as KDE Plasma 6

[27]Steam cuts the cord for legacy Windows and macOS

[28]LXQt packs Wayland punch with 2.1 release

[29]A sit-down with Ubuntu founder Mark 'SABDFL' Shuttleworth

Just as modern GNOME doesn't offer much room for end-user customization, Gtk 4 [30]blocks users from customizing themes . It doesn't go out of its way to help programmers, either: for instance, the Gtk documentation on [31]migrating from Gtk 3 to Gtk 4 says:

GtkMenu , GtkMenuBar and GtkMenuItem are gone

The docs describe menus as "heavily relying on X11-centric concepts" that "were hard to adjust to other windowing systems." (This sounds strange to us, as we seem to recall menu bars originated on the Apple Lisa and Mac, and only came to Windows and X11 later, but what do we know?) At any rate, Gtk 4 seems very far from ideal for a traditionalist environment like Xfce.

Maybe the Xfce developers could weigh up moving to FLTK instead. Perhaps one of these fancy [32]"AI" coding assistants could be trained to help? After all, it's essentially a very big complicated search-and-replace operation. ®

Get our [33]Tech Resources



[1] https://www.fltk.org/articles.php?L1955

[2] https://github.com/fltk/fltk/releases/tag/release-1.4.0-1

[3] https://github.com/fltk/fltk/releases/tag/release-1.3.0

[4] https://edoras.sdsu.edu/doc/Python-Docs-2.5/lib/module-fl.html

[5] https://www.fltk.org/doc-1.1/intro.html

[6] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2Z0ZTDzfmiQq7f-id6OBKeQAAARc&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0

[7] http://xforms-toolkit.org/

[8] https://linux.fandom.com/wiki/Xfce

[9] https://dictionary.cambridge.org/dictionary/english/sentence-caseP

[10] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44Z0ZTDzfmiQq7f-id6OBKeQAAARc&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[11] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33Z0ZTDzfmiQq7f-id6OBKeQAAARc&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0

[12] https://www.foundry.com/products/nuke-family/nuke

[13] https://www.theregister.com/2024/05/07/dillo_browser_v3_1/

[14] https://flwm.sourceforge.net/

[15] https://www.theregister.com/2024/03/04/tiny_core_linux_15/

[16] https://edeproject.org/

[17] https://eerielinux.wordpress.com/2013/06/21/an-interview-with-the-ede-developer/

[18] https://www.fltk.org/articles.php?L100+I1390+T+P1+Q

[19] https://www.fltk.org/doc-2.0/html/intro.html

[20] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44Z0ZTDzfmiQq7f-id6OBKeQAAARc&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0

[21] https://www.theregister.com/2019/08/19/lightweight_linux_desktop_xfce/

[22] https://blog.gtk.org/2020/12/16/gtk-4-0/

[23] https://www.theregister.com/2024/10/07/xfce_420_and_mint_221/

[24] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/front&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33Z0ZTDzfmiQq7f-id6OBKeQAAARc&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0

[25] https://www.theregister.com/2022/06/09/gnome_mutter_variable_refresh_rate/

[26] https://www.theregister.com/2024/04/20/lxqt2_updates_to_qt6/

[27] https://www.theregister.com/2024/11/20/valve_steam_legacy_os/

[28] https://www.theregister.com/2024/11/15/lxqt_21/

[29] https://www.theregister.com/2024/11/11/mark_shuttleworth_ubuntu_interview/

[30] https://www.theregister.com/2022/03/28/gnome_42_inconsistent_themes/P

[31] https://docs.gtk.org/gtk4/migrating-3to4.html#gtkmenu-gtkmenubar-and-gtkmenuitem-are-gone/

[32] https://www.theregister.com/2024/09/30/ai_code_helpers_invent_packages/

[33] https://whitepapers.theregister.com/



ethindp

If XFCE does move to FLTK, maybe that will incentivize the FLTK devs to add accessibility to the toolkit? (Or maybe not?) As it currently stands FLTK apps are completely inaccessible to Orca.

"GtkMenu, GtkMenuBar and GtkMenuItem are gone"

keithpeter

One hopes the QT project continues to see the merit in having support for a UI that includes menus.

https://doc.qt.io/qt-6/qtwidgets-mainwindows-menus-example.html

I have hopes for LXQt as a simple menu-supporting desktop.

Icon: for the FLTKers.

V1.4 development has been interesting

Will Godfrey

I haven't tried it since the got scaling sorted out, but in the main it's looking pretty good. It's also fast too (as its name implies), and prides itself on being lightweight - it certainly is that!

Coding it can be 'interesting' but once you get the hang of it you can customise it to a degree that's quite impossible with either GTK or KDE. For the stuff I work with we'll stick to V 1.3.x until it bubbles up in the mainstream distros.

karlkarl

Also (shameless plug)...

It now has a FlexBox-like layout system (Fl_Flex) included for people who prefer good ol' table based layouts.

https://github.com/fltk/fltk/blob/master/FL/Fl_Flex.H

Upstream accepted that as one of my contributions. My Fl_Flow wasn't quite as accepted (understandably).

https://github.com/osen/Fl_Flow

Somehow, the world always affects you more than you affect it.