23#include <public.sdk/source/vst/vsteditcontroller.h>
24#include <vstgui4/vstgui/lib/cframe.h>
31#include <vstgui4/vstgui/plugin-bindings/vst3editor.h>
47 explicit GUIController(
char const *iXmlFileName =
"Views.uidesc",
48 char const *iMainViewName =
"view");
62 IUIDescription
const *iDescription,
63 IController *iBaseController) {
return nullptr; }
67 tresult PLUGIN_API
initialize(FUnknown *context)
override;
73 IPlugView *PLUGIN_API
createView(
const char *name)
override;
76 void didOpen(VST3Editor *editor)
override;
79 void willClose(VST3Editor *editor)
override;
85 tresult PLUGIN_API
setState(IBStream *state)
override;
88 tresult PLUGIN_API
getState(IBStream *state)
override;
91 tresult PLUGIN_API
notify(IMessage *message) SMTG_OVERRIDE;
95 const IUIDescription *iDescription,
96 VST3Editor *iEditor)
override;
138 tresult
sendMessage(IPtr<IMessage> iMessage)
override;
142 bool showDialog(std::string iTemplateName)
override;
bool dismissDialog() override
Dismisses the currently shown dialog.
Definition GUIController.cpp:279
tresult PLUGIN_API setState(IBStream *state) override
Restore the state (UI only!) (ex: after loading preset or project).
Definition GUIController.cpp:176
virtual IController * createCustomController(UTF8StringPtr iName, IUIDescription const *iDescription, IController *iBaseController)
Subclasses should override this method to return the custom controller or nullptr if it doesn't match...
Definition GUIController.h:61
bool showDialog(std::string iTemplateName) override
This method is called with the name of the template to use for the dialog.
Definition GUIController.cpp:262
tresult PLUGIN_API initialize(FUnknown *context) override
Called at first after constructor.
Definition GUIController.cpp:54
Optional< ModalViewSessionID > fModalViewSession
Definition GUIController.h:172
~GUIController() override
Definition GUIController.cpp:46
bool maybeShowDialog()
Shows the dialog if necessary.
Definition GUIController.cpp:296
std::string fDialogTemplateName
Definition GUIController.h:169
tresult PLUGIN_API getState(IBStream *state) override
Called to save the state (UI only!) (before saving a preset or project).
Definition GUIController.cpp:188
void willClose(VST3Editor *editor) override
Definition GUIController.cpp:153
virtual bool switchToMainView()
Switch back to the main view.
Definition GUIController.h:122
SharedPointer< UIDescription > fUIDescription
Definition GUIController.h:166
tresult PLUGIN_API notify(IMessage *message) SMTG_OVERRIDE
Called to handle a message (coming from RT).
Definition GUIController.cpp:200
IPlugView *PLUGIN_API createView(const char *name) override
Create the view.
Definition GUIController.cpp:129
GUIController(char const *iXmlFileName="Views.uidesc", char const *iMainViewName="view")
Definition GUIController.cpp:34
void didOpen(VST3Editor *editor) override
Definition GUIController.cpp:143
void registerParameters(ParamAware *iParamAware)
Definition GUIController.cpp:94
Views::CustomUIViewFactory * fViewFactory
Definition GUIController.h:157
virtual bool switchToView(char const *iViewName)
This method should be called to display a totally different (root) view.
Definition GUIController.cpp:241
tresult PLUGIN_API setComponentState(IBStream *state) override
Sets the component state (after setting the processor) or after restore.
Definition GUIController.cpp:162
virtual GUIState * getGUIState()=0
Subclasses must implement this method to return the state.
tresult PLUGIN_API terminate() override
Called at the end before destructor.
Definition GUIController.cpp:107
ITransportControl * fTransportControl
Definition GUIController.h:178
VSTGUI::VST3Editor * fVST3Editor
Definition GUIController.h:175
ITransportControl * findTransportControl() const
Returns the low level transport control (nullptr when no transport control is available).
Definition GUIController.h:128
TransportControlHandler getTransportControlHandler() const
Returns the convenient transport control handler.
Definition GUIController.h:131
IController * createSubController(UTF8StringPtr iName, const IUIDescription *iDescription, VST3Editor *iEditor) override
Called when a sub controller needs to be created.
Definition GUIController.cpp:229
IPtr< IMessage > allocateMessage() override
Allocates a message instance.
Definition GUIController.cpp:213
std::string fCurrentViewName
Definition GUIController.h:163
VSTGUI::CKnobMode fDefaultKnobMode
Definition GUIController.h:153
std::string fMainViewName
Definition GUIController.h:160
char const *const fXmlFileName
Definition GUIController.h:150
tresult sendMessage(IPtr< IMessage > iMessage) override
Sends the given message to the peer.
Definition GUIController.cpp:221
Defines the interface to show or dismiss a modal/dialog window which is a window that captures all ev...
Definition IDialogHandler.h:46
This class is inherited by classes who want to be aware of parameters and be notified when they chang...
Definition ParamAware.h:64
This class is a thin wrapper around the ITransportControl interface to expose it as convenient method...
Definition TransportControlHandler.h:49
Custom view factory to give access to vst parameters.
Definition CustomViewFactory.h:32
Abstraction for allocating and sending a message.
Definition MessageProducer.h:34
Definition DrawContext.cpp:25