Base class from which the actual controller inherits from.
More...
#include <GUIController.h>
Inherits EditController, VST3EditorDelegate, IMessageProducer, and IDialogHandler.
|
| IController * | createSubController (UTF8StringPtr iName, const IUIDescription *iDescription, VST3Editor *iEditor) override |
| | Called when a sub controller needs to be created. More...
|
| |
| IPlugView *PLUGIN_API | createView (const char *name) override |
| | Create the view. More...
|
| |
| void | didOpen (VST3Editor *editor) override |
| |
| tresult PLUGIN_API | getState (IBStream *state) override |
| | Called to save the state (UI only!) (before saving a preset or project) More...
|
| |
| tresult PLUGIN_API | initialize (FUnknown *context) override |
| | Called at first after constructor. More...
|
| |
| bool | maybeShowDialog () |
| | Shows the dialog if necessary. More...
|
| |
| tresult PLUGIN_API | notify (IMessage *message) SMTG_OVERRIDE |
| | Called to handle a message (coming from RT) More...
|
| |
| void | registerParameters (ParamAware *iParamAware) |
| |
| tresult PLUGIN_API | setComponentState (IBStream *state) override |
| | Sets the component state (after setting the processor) or after restore. More...
|
| |
| tresult PLUGIN_API | setState (IBStream *state) override |
| | Restore the state (UI only!) (ex: after loading preset or project) More...
|
| |
| virtual bool | switchToMainView () |
| | Switch back to the main view. More...
|
| |
| virtual bool | switchToView (char const *iViewName) |
| | This method should be called to display a totally different (root) view. More...
|
| |
| tresult PLUGIN_API | terminate () override |
| | Called at the end before destructor. More...
|
| |
| void | willClose (VST3Editor *editor) override |
| |
Base class from which the actual controller inherits from.
Handles most of the "framework" logic, (state loading/saving in a thread safe manner, registering VST parameters...) so that the actual controller code deals mostly with business logic.
◆ GUIController()
| GUIController |
( |
char const * |
iXmlFileName = "Views.uidesc", |
|
|
char const * |
iMainViewName = "view" |
|
) |
| |
|
explicit |
◆ ~GUIController()
◆ allocateMessage()
| IPtr< IMessage > allocateMessage |
( |
| ) |
|
|
overridevirtual |
◆ createCustomController()
| virtual IController* createCustomController |
( |
UTF8StringPtr |
iName, |
|
|
IUIDescription const * |
iDescription, |
|
|
IController * |
iBaseController |
|
) |
| |
|
inlinevirtual |
Subclasses should override this method to return the custom controller or nullptr if doesn't match the name.
◆ createSubController()
| IController * createSubController |
( |
UTF8StringPtr |
iName, |
|
|
const IUIDescription * |
iDescription, |
|
|
VST3Editor * |
iEditor |
|
) |
| |
|
overrideprotected |
Called when a sub controller needs to be created.
◆ createView()
| IPlugView * createView |
( |
const char * |
name | ) |
|
|
overrideprotected |
◆ didOpen()
| void didOpen |
( |
VST3Editor * |
editor | ) |
|
|
overrideprotected |
◆ dismissDialog()
Dismisses the currently shown dialog.
- Returns
true if there was a dialog shown or false otherwise
Implements IDialogHandler.
◆ getGUIState()
Subclasses must implement this method to return the state.
◆ getState()
| tresult getState |
( |
IBStream * |
state | ) |
|
|
overrideprotected |
Called to save the state (UI only!) (before saving a preset or project)
◆ initialize()
| tresult initialize |
( |
FUnknown * |
context | ) |
|
|
overrideprotected |
Called at first after constructor.
◆ maybeShowDialog()
Shows the dialog if necessary.
◆ notify()
| tresult notify |
( |
IMessage * |
message | ) |
|
|
protected |
Called to handle a message (coming from RT)
◆ registerParameters()
| void registerParameters |
( |
ParamAware * |
iParamAware | ) |
|
|
protected |
◆ sendMessage()
| tresult sendMessage |
( |
IPtr< IMessage > |
iMessage | ) |
|
|
overridevirtual |
◆ setComponentState()
| tresult setComponentState |
( |
IBStream * |
state | ) |
|
|
overrideprotected |
Sets the component state (after setting the processor) or after restore.
◆ setState()
| tresult setState |
( |
IBStream * |
state | ) |
|
|
overrideprotected |
Restore the state (UI only!) (ex: after loading preset or project)
◆ showDialog()
| bool showDialog |
( |
std::string |
iTemplateName | ) |
|
|
overridevirtual |
This method is called with the name of the template to use for the dialog.
It should be a template defined in the xml file (.uidesc) as a top level template.
- Note
- Because the view is modal it must include a way for the user to dismiss it, like a button.
- Parameters
-
| iTemplateName | the name of the top level template to use |
- Returns
true if the dialog was shown and false if there was a problem (for example iTemplateName does not refer to a valid top level template name)
Implements IDialogHandler.
◆ switchToMainView()
| virtual bool switchToMainView |
( |
| ) |
|
|
inlineprotectedvirtual |
Switch back to the main view.
◆ switchToView()
| bool switchToView |
( |
char const * |
iViewName | ) |
|
|
protectedvirtual |
This method should be called to display a totally different (root) view.
Example: with xxx.uidesc like this one, you would call switchToView("compact_view");
<vstgui-ui-description version="1">
<!-- Main view opened on creation -->
<template class="CViewContainer" name="view" ...>
</template>
<!-- Secondary view you can switch to -->
<template class="CViewContainer" name="compact_view" ...>
</template>
<vstgui-ui-description
- Returns
true if switching worked
◆ terminate()
Called at the end before destructor.
◆ willClose()
| void willClose |
( |
VST3Editor * |
editor | ) |
|
|
overrideprotected |
◆ fCurrentViewName
| std::string fCurrentViewName |
|
private |
◆ fDefaultKnobMode
| VSTGUI::CKnobMode fDefaultKnobMode {VSTGUI::CKnobMode::kLinearMode} |
|
protected |
◆ fDialogTemplateName
| std::string fDialogTemplateName {} |
|
private |
◆ fMainViewName
| std::string fMainViewName |
|
private |
◆ fModalViewSession
| Optional<ModalViewSessionID> fModalViewSession {} |
|
private |
◆ fUIDescription
| SharedPointer<UIDescription> fUIDescription {} |
|
private |
◆ fViewFactory
◆ fVST3Editor
| VSTGUI::VST3Editor* fVST3Editor {} |
|
private |
◆ fXmlFileName
| char const* const fXmlFileName |
|
protected |
The documentation for this class was generated from the following files: