Using a row/column approach to building interfaces
Karsten Pedersen
Oct 04, 2020
Hello all,
(This was originally mis-posted as an "issue" on the FLTK GitHub page. I was suggested to forward it here. I have also made a number of updates).
I notice that FLTK doesn't really focus on using rows and columns to lay out interfaces (i.e similar to CSS3/Flexbox module, Gtk, wxWidgets, Qt, etc). And yet this functionality would be very simple to
implement as a Fl_Row, Fl_Col classes extending Fl_Group. I have put
together an initial prototype (some minor testing on Win32, OpenBSD and
with some of the different "themes").
https://github.com/osen/FL_Flex
This project provides Fl_Flex (the layout class) and two demos. One is attempting to create a real world login screen (which can be fairly fiddly) and the other is an artificial demonstration of some random grid based layouts.
Normally I would simply stick to the "native" way suggested by the
toolkit (in this case FLUID, etc). However one big benefit to the row /
column approach is that it seems to be the lowest common denominator for most toolkits (when it comes to a resizing strategy) giving us a good
way of porting to and from the different UI systems with minimal change
of design.
Let me know what you think. If you like the idea but don't have any
time for maintenance or further integration of it, I am happy to invest
some time on it since I will be using FLTK for a few internal projects
for the next few months at the very least.
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.