ASPiK SDK
Loading...
Searching...
No Matches
VSTGUI4 Objects

The VSTGUI library is chock full of GUI control objects. These include the most common plugin GUI controls:

• Knobs
• Sliders
• Buttons and switches
• Text labels
• Text edit controls
• Menus and drop-down displays
• VU meters
• Track-pads (aka XY-pads)
• Background images

In addition, there are many other types of controls and views, including:

• View containers (for aggregating sets of controls or other views)
• Splitter Views with drag-able pane-splitters
• Table views (rows and columns)
• Animation Views (for embedding animated content)
• A piano keyboard control
• Custom views for displaying plugin information (e.g. waveforms, graphs, etc…)

All of the VSTGUI library control objects that may be visible on the GUI are derived from the mother-of-all views called CView. This object primarily defines functions for drawing to the screen and handling mouse click events. Any library object that is capable of transmitting or receiving a plugin parameter value of some kind is derived from CControl which defines functions for getting and setting values as well as establishing a link to a specific parameter via a control-tag, or what we call a controlID.


CControl is derived from CView so it inherits the view’s drawing and mouse event functions. One interesting example is the CTextLabel object. Ordinarily, you use these labels as static text controls – for example, you might place a text label “Filter Type” above a control that allows the user to select a filter, and “Filter Q” below the knob that adjusts the filter Q. In these cases, there are no links to any underlying plugin parameters – there is only static text to display. However, you might decide to place text on the UI, which is constantly updated and changing, such as a counter or other timing display. In this case, you would need to link the text control to an underlying plugin parameter’s controlID. Therefore, the CTextLabel is derived from CControl rather than just CView.

Although there is absolutely zero C++ code for you to write in order to generate your plugin GUI, there are some concepts and details about the various VSTGUI objects that you need to know in order to make the GUI design process as simple as possible. There are some common design aspects to all of the VSTGUI controls that you should understand.

• The control’s size is specified in screen pixels (sometimes called logical units)
• The control’s location on the GUI is specified as an x-y coordinate pair that designates the top and left coordinates of the rectangle that defines the object’s dimension; these coordinates are automatically set for you when you use the drag-and-drop GUI designer
• Most controls are linked to an underlying plugin parameter via the parameter’s controlID value which is called a control-tag or simply tag in VSTGUI parlance
• Most controls require a graphics file (always packaged as a Portable Network Graphics or PNG file) to render the final control object; if you forget to assign a graphics file, then the control will appear to be invisible, though clicking on the invisible control will usually still work properly. A few controls require two graphics files, for example the VU meter object requires a graphic for the ON state and another for the OFF state.

Here is a breakdown of the GUI controls we will be using along with their requirements or other information related to their creation. We will discuss some techniques to simplify the GUI design even further a bit later, allowing you to create GUIs very rapidly. These include auto-sizing and GUI templates. The VSTGUI objects presented here can be divided into two groups: controls that specifically require one or more graphics (PNG) files and those for which graphics are optional or not used.

Objects that require graphics files:
• CAnimKnob
• CKickButton
• COnOffButton
• CVuMeter

Objects that do not require graphics files:
• COptionMenu
• CSegmentButton
• CTextButton
• CTextLabel
• CTextEdit