I only have two GUI controls in my plugin currently: a filter frequency Slider and a oscillator selector ComboBox. Each is in its own Component child class, Filter and Oscillator.
To reduce UI-based code duplication, I changed my Filter/Oscillator components to inherit from ModuleComponent instead of Component.
The important class attribute of ModuleComponent is a type-flexible user interface control. The control could be various types: ComboBox (oscillator selector), Slider (filter frequency), etc. I will always know the type at compile time. I will then draw this component, as well as setting other parameters, in resized()/paint().
How can I get this kind of type flexibility? I have tried using various kinds of pointers and I am getting compile errors, and it is messy.
Thank you for any help!