So i’m experimenting with juce, I’m on a very early, basic stage. Please forgive these rookie questions.
Anyway, I have created a test project using the Introjucer. If I understand it correct it creates Main.cpp that starts and ends everything.
This then creates a MainWindow class derived from DocumentWindow, Then there is the MainComponent class that is added to the MainWindow.
If I understand the documentation correct, I’m not supposed to fiddle to much with the MainWindow class it is just a container, my stuff should go in the MainComponent part.
Ok, so I want to use the ApplicationCommandManager, I had a look at the HostDemo and the JuceDemo.
These are structured in a different way. Here the CommandManager is global, and the targets registered in the Main file. and there is only one MainComponent, that inherits from DocumentWindow and a bunch of other classes.
In the code that the introdjucer creates this is not possible, as the MainComponent is not available after it has been added to the MainWindow.
So what I ask is, where should the main ApplcationCommandManager (And other such objects) live?
How do you guys structure your code. Keep in mind that I am used to languages/frameworks where most of the GUI (placing of elements, linking of actions, setting of properties) is handled “under the hood” not hard coded.
Hope my question even makes sense, I’m just a bit confused as to what should go where.