StretchableLayoutManager


#1

I imagine this class hasn’t been touched for a thousand years! I have a small request;

Any chance of a new layOutComponents() function that takes a more modern input? It’s like there’s a nipple on show - the rest of the library’s nipples are all covered up, but this function brazenly demands an olde-worlde array! :open_mouth: some of juce’s darker corners are full of spiders :open_mouth: :open_mouth:


#2

Alternatively (if you don’t agree with taking, say, a const Array<Component*>& input, it’d probably be enough to just add a note to the docs that suggests using a HeapBlock<Component*> for generating the passing parameter.


#3

True, that’s quite an ancient class! But I don’t particularly dislike its use of a raw array… Whenever I’ve used it, I’ve always needed to call it with a constant set of objects, so passing a const array seems pretty sensible. I take your point though, it does look a bit old-fashioned these days, I’ll have a look at it next time I’m doing a bit of spring-cleaning!


#4

I was trying to use it for a dynamic list of timelines (so had alternating bars), but it turned out it didn’t really work in the way I expected it to anyway. I didn’t want the decision-making part of it (so stretching one should only affect the positions of those after it, and not resize any but one). In the end I made a new list class, where each item is held in a container component with a bottom-only resizable border component; resizing one updates the positions of the containers below it. Works a treat. (just posting that in case it proves to be a useful suggestion to anyone else :slight_smile: )