ASPiK SDK
Loading...
Searching...
No Matches
Registering a Sub-Controller

Although it is generally not needed, you can design a sub-controller that can be registered with the PluginCore just like the custom views. All you need to do is:

• derive the sub-controller from ICustomView so that it exposes the same messaging system as a custom view
• add registration code in the PluginGUI::createSubController( ) function (note that it is already there in the knob linking example code so you can lift it from that)
• In the PluginCore::processMessage( ) function, respond to the PLUGINGUI_REGISTER_SUBCONTROLLER message in the identical way as you did for the custom view objects - save the ICustomView pointer and use it to communicate with the sub-controller object (see the custom view example for the knob control as an example)
• The same rules apply to registered sub-controllers - the ICustomView pointer will never go out of scope and will always be valid. You can then use it to communicate with the sub-controller object - for example, you might change the sub-controller's functionality or enable/disable it remotely.

You can do just about anything with the combination of custom views and sub-controllers in VSTGUI4 - just look at any VST3 plugin GUI developed at Steinberg - they use custom views and sub-controllers all over their GUIs.