Jamba C++ API
4.2.0
|
Override from this class if you need to implement a (custom) view specific to a given plugin. More...
#include <CustomView.h>
Inherits TView, and StateAware< TGUIState >.
Inherited by PluginCustomView< TGUIState >, and PluginView< TView, TGUIState >.
Public Member Functions | |
template<typename... Args> | |
StateAwareView (const CRect &iSize, Args &&...args) | |
Protected Member Functions | |
void | initState (GUIState *iGUIState) override |
Overriden to call both ParamAware::initState() and StateAware::initState() More... | |
Additional Inherited Members | |
Public Attributes inherited from StateAware< TGUIState > | |
TGUIState::PluginParameters const * | fParams {} |
Gives direct access to parameters (ex: fParams->fBypassParam ) More... | |
TGUIState * | fState {} |
Gives access to the GUI state (ex: fState->fLabelA ) More... | |
Override from this class if you need to implement a (custom) view specific to a given plugin.
When writing a "generic" view (for example, a MomentaryButtonView
), you deal with parameters by their ids, since the view is meant to work with many parameters. But if you write a view that is very specific to a given plugin, it makes the code easier to write and more type safe if you tie the view to the state.
By inheriting from this class you automatically get access to all the parameters of your plugin (via StateAware::fParams
) as well as the GUI state (via StateAware::fState
).
TView | the parent view (must be a subclass of CView ) |
TGUIState | type of the gui state for the plugin (must be a subclass of GUIState ) |
|
inlineexplicit |
|
inlineoverrideprotectedvirtual |
Overriden to call both ParamAware::initState()
and StateAware::initState()
Reimplemented from StateAware< TGUIState >.