23#include <public.sdk/source/vst/vsteditcontroller.h>
24#include <vstgui4/vstgui/lib/cframe.h>
30#include <vstgui4/vstgui/plugin-bindings/vst3editor.h>
46 explicit GUIController(
char const *iXmlFileName =
"Views.uidesc",
47 char const *iMainViewName =
"view");
61 IUIDescription
const *iDescription,
62 IController *iBaseController) {
return nullptr; };
66 tresult PLUGIN_API
initialize(FUnknown *context)
override;
72 IPlugView *PLUGIN_API
createView(
const char *name)
override;
75 void didOpen(VST3Editor *editor)
override;
78 void willClose(VST3Editor *editor)
override;
84 tresult PLUGIN_API
setState(IBStream *state)
override;
87 tresult PLUGIN_API
getState(IBStream *state)
override;
90 tresult PLUGIN_API
notify(IMessage *message) SMTG_OVERRIDE;
94 const IUIDescription *iDescription,
95 VST3Editor *iEditor)
override;
131 tresult
sendMessage(IPtr<IMessage> iMessage)
override;
135 bool showDialog(std::string iTemplateName)
override;
bool dismissDialog() override
Dismisses the currently shown dialog.
Definition GUIController.cpp:274
tresult PLUGIN_API setState(IBStream *state) override
Restore the state (UI only!) (ex: after loading preset or project).
Definition GUIController.cpp:171
virtual IController * createCustomController(UTF8StringPtr iName, IUIDescription const *iDescription, IController *iBaseController)
Subclasses should override this method to return the custom controller or nullptr if doesn't match th...
Definition GUIController.h:60
bool showDialog(std::string iTemplateName) override
This method is called with the name of the template to use for the dialog.
Definition GUIController.cpp:257
tresult PLUGIN_API initialize(FUnknown *context) override
Called at first after constructor.
Definition GUIController.cpp:53
Optional< ModalViewSessionID > fModalViewSession
Definition GUIController.h:165
~GUIController() override
Definition GUIController.cpp:45
bool maybeShowDialog()
Shows the dialog if necessary.
Definition GUIController.cpp:291
std::string fDialogTemplateName
Definition GUIController.h:162
tresult PLUGIN_API getState(IBStream *state) override
Called to save the state (UI only!) (before saving a preset or project).
Definition GUIController.cpp:183
void willClose(VST3Editor *editor) override
Definition GUIController.cpp:148
virtual bool switchToMainView()
Switch back to the main view.
Definition GUIController.h:121
SharedPointer< UIDescription > fUIDescription
Definition GUIController.h:159
tresult PLUGIN_API notify(IMessage *message) SMTG_OVERRIDE
Called to handle a message (coming from RT).
Definition GUIController.cpp:195
IPlugView *PLUGIN_API createView(const char *name) override
Create the view.
Definition GUIController.cpp:124
GUIController(char const *iXmlFileName="Views.uidesc", char const *iMainViewName="view")
Definition GUIController.cpp:33
void didOpen(VST3Editor *editor) override
Definition GUIController.cpp:138
void registerParameters(ParamAware *iParamAware)
Definition GUIController.cpp:89
Views::CustomUIViewFactory * fViewFactory
Definition GUIController.h:150
virtual bool switchToView(char const *iViewName)
This method should be called to display a totally different (root) view.
Definition GUIController.cpp:236
tresult PLUGIN_API setComponentState(IBStream *state) override
Sets the component state (after setting the processor) or after restore.
Definition GUIController.cpp:157
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:102
VSTGUI::VST3Editor * fVST3Editor
Definition GUIController.h:168
IController * createSubController(UTF8StringPtr iName, const IUIDescription *iDescription, VST3Editor *iEditor) override
Called when a sub controller needs to be created.
Definition GUIController.cpp:224
IPtr< IMessage > allocateMessage() override
Allocates a message instance.
Definition GUIController.cpp:208
std::string fCurrentViewName
Definition GUIController.h:156
VSTGUI::CKnobMode fDefaultKnobMode
Definition GUIController.h:146
std::string fMainViewName
Definition GUIController.h:153
char const *const fXmlFileName
Definition GUIController.h:143
tresult sendMessage(IPtr< IMessage > iMessage) override
Sends the given message to the peer.
Definition GUIController.cpp:216
Defines the interface to show or dismiss a modal/dialog window which is a window that captures all ev...
Definition IDialogHandler.h:47
This class is inherited by classes who want to be aware of parameters and be notified when they chang...
Definition ParamAware.h:65
Custom view factory to give access to vst parameters.
Definition CustomViewFactory.h:32
Abstraction for allocating and sending a message.
Definition MessageProducer.h:35
Definition DrawContext.cpp:25