ASPiK SDK
VSTGUI::VST3Editor Class Reference

VST3 Editor with automatic parameter binding. More...

#include <vst3editor.h>

Inheritance diagram for VSTGUI::VST3Editor:
VSTGUI::IController VSTGUI::IViewAddedRemovedObserver VSTGUI::IMouseObserver VSTGUI::IControlListener

Classes

struct  KeyboardHook
 

Public Member Functions

 VST3Editor (Steinberg::Vst::EditController *controller, UTF8StringPtr templateName, UTF8StringPtr xmlFile)
 
 VST3Editor (UIDescription *desc, Steinberg::Vst::EditController *controller, UTF8StringPtr templateName, UTF8StringPtr xmlFile=0)
 
bool exchangeView (UTF8StringPtr templateName)
 
void enableTooltips (bool state)
 
bool setEditorSizeConstrains (const CPoint &newMinimumSize, const CPoint &newMaximumSize)
 
void getEditorSizeConstrains (CPoint &minimumSize, CPoint &maximumSize) const
 
bool requestResize (const CPoint &newSize)
 
void setZoomFactor (double factor)
 
double getZoomFactor () const
 
void setAllowedZoomFactors (std::vector< double > zoomFactors)
 
Steinberg::tresult PLUGIN_API queryInterface (const ::Steinberg::TUID iid, void **obj) override
 
- Public Member Functions inherited from VSTGUI::IController
virtual int32_t getTagForName (UTF8StringPtr name, int32_t registeredTag) const
 
virtual IControlListenergetControlListener (UTF8StringPtr controlTagName)
 
- Public Member Functions inherited from VSTGUI::IControlListener
virtual int32_t controlModifierClicked (CControl *pControl, CButtonState button)
 return 1 if you want the control to not handle it, otherwise 0
 

Protected Types

typedef std::map< int32_t, ParameterChangeListener * > ParameterChangeListenerMap
 

Protected Member Functions

void init ()
 
double getAbsScaleFactor () const
 
ParameterChangeListenergetParameterChangeListener (int32_t tag) const
 
void recreateView ()
 
void syncParameterTags ()
 
void save (bool saveAs=false)
 
bool enableEditing (bool state)
 
bool PLUGIN_API open (void *parent, const PlatformType &type) override
 
void PLUGIN_API close () override
 
void beginEdit (int32_t index) override
 
void endEdit (int32_t index) override
 
CViewcreateView (const UIAttributes &attributes, const IUIDescription *description) override
 
CViewverifyView (CView *view, const UIAttributes &attributes, const IUIDescription *description) override
 
IControllercreateSubController (UTF8StringPtr name, const IUIDescription *description) override
 
CMessageResult notify (CBaseObject *sender, IdStringPtr message) override
 
bool beforeSizeChange (const CRect &newSize, const CRect &oldSize) override
 
Steinberg::tresult PLUGIN_API onSize (Steinberg::ViewRect *newSize) override
 
Steinberg::tresult PLUGIN_API canResize () override
 
Steinberg::tresult PLUGIN_API checkSizeConstraint (Steinberg::ViewRect *rect) override
 
Steinberg::tresult PLUGIN_API findParameter (Steinberg::int32 xPos, Steinberg::int32 yPos, Steinberg::Vst::ParamID &resultTag) override
 
virtual void valueChanged (CControl *pControl) override
 
virtual void controlBeginEdit (CControl *pControl) override
 
virtual void controlEndEdit (CControl *pControl) override
 
virtual void controlTagWillChange (CControl *pControl) override
 
virtual void controlTagDidChange (CControl *pControl) override
 
void onViewAdded (CFrame *frame, CView *view) override
 
void onViewRemoved (CFrame *frame, CView *view) override
 
void onMouseEntered (CView *view, CFrame *frame) override
 
void onMouseExited (CView *view, CFrame *frame) override
 
CMouseEventResult onMouseMoved (CFrame *frame, const CPoint &where, const CButtonState &buttons) override
 a mouse move event happend on the frame at position where. If the observer handles this, the event won't be propagated further
 
CMouseEventResult onMouseDown (CFrame *frame, const CPoint &where, const CButtonState &buttons) override
 a mouse down event happend on the frame at position where. If the observer handles this, the event won't be propagated further
 

Protected Attributes

KeyboardHookkeyboardHook {nullptr}
 
UIDescriptiondescription {nullptr}
 
VST3EditorDelegatedelegate {nullptr}
 
IControlleroriginalController {nullptr}
 
ParameterChangeListenerMap paramChangeListeners
 
std::string viewName
 
std::string xmlFile
 
bool tooltipsEnabled {true}
 
bool doCreateView {false}
 
bool editingEnabled {false}
 
bool requestResizeGuard {false}
 
double contentScaleFactor {1.}
 
double zoomFactor {1.}
 
std::vector< double > allowedZoomFactors
 
CPoint minSize
 
CPoint maxSize
 
CRect nonEditRect
 

Detailed Description

VST3 Editor with automatic parameter binding.

The VST3Editor class represents the view for a VST3 plug-in. It automatically binds the VST3 parameters to VSTGUI control tags and it includes an inline UI editor for rapid development.

Setup

Add the following code to your Steinberg::Vst::EditController class:

IPlugView* PLUGIN_API MyEditController::createView (FIDString name)
{
if (strcmp (name, ViewType::kEditor) == 0)
{
return new VST3Editor (this, "view", "myEditor.uidesc");
}
return 0;
}

To activate the inline editor you need to define the preprocessor definition "VSTGUI_LIVE_EDITING=1". Rebuild your plug-in, start your prefered host, instanciate your plug-in, open the context menu inside your editor and choose "Enable Editing". Now you can define tags, colors, fonts, bitmaps and add views to your editor.

See Inline UI Editing for VST3 (WYSIWYG)


The documentation for this class was generated from the following files: