Searching in the forum, it is not clear for me if any layout manager is available in Juce? Or if any “recommendation” of how to implement automatic layout in a component, as soon as the requirements are a bit sophisticated, like displaying hierarchy of components with vertical or horizontal placement, minimum/preferred size constraints…this sort of thing. Or any third-party code or project to look at?
Thanks in advance.
You might check this thread out:
FYI for people who like layout…
On the develop branch we’ve pushed an implementation of a JUCE FlexBox implementation: FlexBox and FlexItem are the classes involved, and I’ve added a demo page to the big demo app that shows some basic tests.
We’ve not had chance to do a tutorial yet, or even to use it in any of the rest of our code, but would be interested to know what you guys make of it, especially if you’re already familiar with FlexBox on the web. Keen to know if you think the way we’ve do…
The FlexBox looks very good to me, another one (older) is
Or I once did a layout module for creating xml defined layouts, inspired by QtDesigner:
which works for me (except for the drag and drop in the layouteditor, that might need some fixing)…
Would recommend avoiding StretchableLayoutManager - it’s very very old, and probably will get deprecated eventually. Flexbox should cover all the same stuff, plus much more.
While you are at it, could you please add a cross platform deprecation macro for classes as well, in analogy with those already existing for methods and functions?
I wrote a GUI designer for my use, so can do most of what you have there, shows hierarchy, bounds, names, ids, drag drop in realtime, code generation etc… works for me / my needs.
Is this ‘GUI designer’ source code available somewhere ?