Layout manager in Juce or any third-party example code to look at?


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:

The FlexBox looks very good to me, another one (older) is StretchableLayoutManager.

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?

1 Like

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 ?