I wonder if anyone can point me to sort of the "state of the art" for building a complex GUI with JUCE?
I've run into several ways of laying out JUCE components, but I'm not sure if there's a "best practice" or "most modern" way of doing it. For a simple GUI, any method would work, but for one with a lot of components that will likely grow and change in the future, I want a flexible and powerful method. Here are the options I've found so far:
* The JuceDemo app Widgets demo, particularly the ButtonsPage, uses straightforward setBounds calls on components. This is easy enough to understand, but not maintainable as a GUI evolves.
* The JuceDemo LookAndFeel demo uses a lot of removeFromLeft() and reduced() calls on Rectangle objects. Maybe a little better, but still close to hard-coded.
* The Introjucer has a GUI builder, but it's missing a lot of things. Many components can't be added directly, there's no built-in way to align multiple components together, I really wish I could group components, etc. There are alignment and anchoring options in the x/y/width/height values for components, but they're cumbersome to use - I wish I could alt-click or something to make one component align with another. Instead, you have to choose from a popup menu which can get difficult to navigate when you have a lot of components.
* The Component::setBounds method that takes a String expression is very cool, and I'm using it in some places, but I'd rather not have to organize this for every individual text label, checkbox, and button that I need in a GUI.
What I'd love is something like a way to express a GUI via JSON, including grid layouts, row and column layouts, etc., then load that GUI description into a window and show it. This system would also be sensitive to string length, so for example, if a label string was changed from "Width" to "Maximum image width", the label would expand, as well as shift other elements in the layout to make room for the new string. Maybe it wouldn't need to do a new layout at runtime, but at least the next time the JSON was loaded/parsed.
I've seen some posts here about layout managers, but they seemed like individual efforts that were maybe rather old and not maintained. Is there anything like this out there that I should evaluate?
Or is there some other approach I should take?
Below is an example screenshot. This is taken from the Photoshop preferences dialog. Suppose this was in JUCE, and under the Ray Tracer options I wanted to add another checkbox, "Indirect Illumination". A layout system would make this easy, but direct calls to setBounds or even using the Introjucer GUI tool would be painful. I'd have to set the location and size of the checkbox, then resize the "Interactive Rendering" group box, then resize the "Available VRAM" box to match, then shift around other boxes to make everything fit, etc. I think this example shows why one might want a layout system instead of positioning components one-by-one.