Newbie help with GUI


#1

Hi!
i’m trying to modify the “hello world” demo plugin and put a simple slider on the GUI using the GUI Editor in Introjucer.
I can add a new component in the files tree but i can’t understand how to insert the stuff in the PluginEditor.cpp.
I don’t understand why the GUI Editor does not work on the PluginEditor.cpp but only if i add a New GUI Component.
But how to integrate the New GUI Component in the PluginEditor.cpp?
sorry for the newbieness :slight_smile:
thanks and all the best


#2

The GUI editor can’t just edit any old piece of code that you throw at it, it can only work with files that it generates and manages itself.

What I would do would be to create a GUI component and then add that class to your editor comp as a child. You could create a GUI component and modify its parent class and constructors so that it’s derived from AudioProcessorEditor, but it’s probably cleaner to keep them separate.


#3

[quote=“jules”]The GUI editor can’t just edit any old piece of code that you throw at it, it can only work with files that it generates and manages itself.

What I would do would be to create a GUI component and then add that class to your editor comp as a child. You could create a GUI component and modify its parent class and constructors so that it’s derived from AudioProcessorEditor, but it’s probably cleaner to keep them separate.[/quote]

thanks jules!
a little example? :slight_smile: