ASPiK SDK
Loading...
Searching...
No Matches
GUI Scaling

You can use a built-in feature in your ASPiK GUI to allow scaling of the GUI size. There is already a secret PluginParameter setup for you that scales the GUI size. You can find it in your plugincore.cpp file as a "Bonus Parameter" and you only need to connect it up to an Option Menu control (you can also use a segment button for this). In the GUI Designer, drag an Option Menu control to the canvas along with a text label to identify it. Set the Option Menu attributes as follows:

• menu-popup-style: checked (ON)
• font and colors: set how you like
• control-tag: select the reserved value SCALE_GUI_SIZE


Save your work and close the editor window. Then, rebuild and reload the plugin (if needed) and test the new GUI. You can make selections to scale the GUI size as shown below (NOTE: Pro Tools has a minimum GUI size; when the size is smaller than that minimum, it will add margins as shown in the "smaller" versions here):





You can find the code that does this scaling in the PluginGUI.cpp file's PluginGUI::valueChanged( ) method. The function named scaleGUISize( ) performs the scaling and you can certainly change and customize this as you like, for example you might want to provide only a sub-set of the scaling sizes.