|
|
Hi Albrecht,
Thanks for your suggestion. I have had a read and play with a number of different ways that interfaces are built with FLTK and the Fl_Pack in particular does come really close. However it seems to be a little limited in terms of allowing the user to state which multiple elements should expand. I.e I am not yet convinced that it would be able to provide some of the layouts provided by my quick demo (screenshot on the github link). Or at least, I haven't been able to.
That said, some of it could be my relatively recent knowledge of FLTK (so
certainly if you guys agree that all the existing solutions can provide any
layout required, I am inclined to believe you!)
I think another that came really close was using multiple Fl_Groups such as in the very last diagram on this page: https://www.fltk.org/doc-1.4/resize.html. However, there are still a few areas where this alone cannot quite suffice (i.e centering a single element in the middle). I have seen suggestions of inheriting from and overriding the resize() function of Fl_Group which is effectively how Fl_Flex was born; initially I just wanted to center something.
I also note that having to mix and match a number of different layout systems to achieve the desired result may end up being more complex than something like Fl_Flex.
Now, I understand that not everyone likes laying out UI in rows and columns (kinda like misusing classic tables in HTML!), but it is also consistent with a number of other GUI systems which might also be a benefit here for porting between systems. At the moment there is no "minimum child size" machinery but if that is added, this approach is also generally pretty effective for avoiding resize issues such as overlapping elements if the window size is reduced.
Many thanks,
Karsten
On Sunday, October 4, 2020 at 4:31:07 PM UTC+1 Albrecht Schlosser wrote:
On 10/4/20 4:10 PM Karsten Pedersen wrote:
> 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
Hi Karsten,
thanks for your contribution.
This post is not meant as a final reply to your suggestion (didn't
view/test/evaluate it yet), but a first question: did you already
consider using Fl_Pack which provides both a horizontal (row) and
vertical (column) mode?
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/e066e25c-604a-4b8c-991f-d02b31949281n%40googlegroups.com.
[ Direct Link to Message ] | |
|
| |