VSTGUI  4.2
Graphical User Interface Framework not only for VST plugins
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
VST3Editor Class Reference

VST3 Editor with automatic parameter binding. More...

+ Inheritance diagram for VST3Editor:
+ Collaboration diagram for VST3Editor:

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)
 
bool requestResize (const CPoint &newSize)
 
Steinberg::tresult PLUGIN_API queryInterface (const ::Steinberg::TUID iid, void **obj)
 
virtual int32_t getTagForName (UTF8StringPtr name, int32_t registeredTag) const
 
virtual CControlListenergetControlListener (UTF8StringPtr controlTagName)
 
virtual int32_t controlModifierClicked (VSTGUI::CControl *pControl, VSTGUI::CButtonState button)
 return 1 if you want the control to not handle it, otherwise 0 More...
 

Protected Types

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

Protected Member Functions

 ~VST3Editor ()
 
void init ()
 
ParameterChangeListenergetParameterChangeListener (int32_t tag)
 
void recreateView ()
 
void syncParameterTags ()
 
bool enableEditing (bool state)
 
bool PLUGIN_API open (void *parent, const PlatformType &type)
 
void PLUGIN_API close ()
 
void beginEdit (int32_t index)
 
void endEdit (int32_t index)
 
CViewcreateView (const UIAttributes &attributes, IUIDescription *description)
 
CViewverifyView (CView *view, const UIAttributes &attributes, IUIDescription *description)
 
IControllercreateSubController (UTF8StringPtr name, IUIDescription *description)
 
CMessageResult notify (CBaseObject *sender, IdStringPtr message)
 
Steinberg::tresult PLUGIN_API onSize (Steinberg::ViewRect *newSize)
 
Steinberg::tresult PLUGIN_API canResize ()
 
Steinberg::tresult PLUGIN_API checkSizeConstraint (Steinberg::ViewRect *rect)
 
Steinberg::tresult PLUGIN_API findParameter (Steinberg::int32 xPos, Steinberg::int32 yPos, Steinberg::Vst::ParamID &resultTag)
 
virtual void valueChanged (CControl *pControl)
 
virtual void controlBeginEdit (CControl *pControl)
 
virtual void controlEndEdit (CControl *pControl)
 
virtual void controlTagWillChange (CControl *pControl)
 
virtual void controlTagDidChange (CControl *pControl)
 
void onViewAdded (CFrame *frame, CView *view)
 
void onViewRemoved (CFrame *frame, CView *view)
 
void onMouseEntered (CView *view, CFrame *frame)
 
void onMouseExited (CView *view, CFrame *frame)
 
CMouseEventResult onMouseMoved (CFrame *frame, const CPoint &where, const CButtonState &buttons)
 a mouse move event happend on the frame at position where. If the observer handles this, the event won't be propagated further More...
 
CMouseEventResult onMouseDown (CFrame *frame, const CPoint &where, const CButtonState &buttons)
 a mouse down event happend on the frame at position where. If the observer handles this, the event won't be propagated further More...
 
int32_t onKeyDown (const VstKeyCode &code, CFrame *frame)
 should return 1 if no further key down processing should apply, otherwise -1 More...
 
int32_t onKeyUp (const VstKeyCode &code, CFrame *frame)
 should return 1 if no further key up processing should apply, otherwise -1 More...
 

Protected Attributes

UIDescriptiondescription
 
VST3EditorDelegatedelegate
 
IControlleroriginalController
 
ParameterChangeListenerMap paramChangeListeners
 
std::string viewName
 
std::string xmlFile
 
bool tooltipsEnabled
 
bool doCreateView
 
bool editingEnabled
 
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)

Member Typedef Documentation

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

Constructor & Destructor Documentation

VST3Editor ( Steinberg::Vst::EditController *  controller,
UTF8StringPtr  templateName,
UTF8StringPtr  xmlFile 
)

+ Here is the call graph for this function:

VST3Editor ( UIDescription desc,
Steinberg::Vst::EditController *  controller,
UTF8StringPtr  templateName,
UTF8StringPtr  xmlFile = 0 
)

+ Here is the call graph for this function:

~VST3Editor ( )
protected

+ Here is the call graph for this function:

Member Function Documentation

void beginEdit ( int32_t  index)
protected
Steinberg::tresult PLUGIN_API canResize ( )
protected
Steinberg::tresult PLUGIN_API checkSizeConstraint ( Steinberg::ViewRect *  rect)
protected
void PLUGIN_API close ( )
protected
void controlBeginEdit ( CControl pControl)
protectedvirtual

Reimplemented from CControlListener.

+ Here is the call graph for this function:

void controlEndEdit ( CControl pControl)
protectedvirtual

Reimplemented from CControlListener.

+ Here is the call graph for this function:

virtual int32_t controlModifierClicked ( VSTGUI::CControl pControl,
VSTGUI::CButtonState  button 
)
inlinevirtualinherited

return 1 if you want the control to not handle it, otherwise 0

Reimplemented in DelegationController.

+ Here is the caller graph for this function:

void controlTagDidChange ( CControl pControl)
protectedvirtual

Reimplemented from CControlListener.

+ Here is the call graph for this function:

void controlTagWillChange ( CControl pControl)
protectedvirtual

Reimplemented from CControlListener.

+ Here is the call graph for this function:

IController * createSubController ( UTF8StringPtr  name,
IUIDescription description 
)
protectedvirtual

Reimplemented from IController.

+ Here is the call graph for this function:

CView * createView ( const UIAttributes attributes,
IUIDescription description 
)
protectedvirtual

Reimplemented from IController.

+ Here is the call graph for this function:

bool enableEditing ( bool  state)
protected

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void enableTooltips ( bool  state)
void endEdit ( int32_t  index)
protected
bool exchangeView ( UTF8StringPtr  templateName)

+ Here is the call graph for this function:

Steinberg::tresult PLUGIN_API findParameter ( Steinberg::int32  xPos,
Steinberg::int32  yPos,
Steinberg::Vst::ParamID &  resultTag 
)
protected

+ Here is the call graph for this function:

virtual CControlListener* getControlListener ( UTF8StringPtr  controlTagName)
inlinevirtualinherited

Reimplemented in DelegationController.

+ Here is the caller graph for this function:

void getEditorSizeConstrains ( CPoint minimumSize,
CPoint maximumSize 
)
ParameterChangeListener * getParameterChangeListener ( int32_t  tag)
protected

+ Here is the caller graph for this function:

virtual int32_t getTagForName ( UTF8StringPtr  name,
int32_t  registeredTag 
) const
inlinevirtualinherited

Reimplemented in DelegationController.

+ Here is the caller graph for this function:

void init ( )
protected

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

CMessageResult notify ( CBaseObject sender,
IdStringPtr  message 
)
protected

+ Here is the call graph for this function:

int32_t onKeyDown ( const VstKeyCode code,
CFrame frame 
)
protectedvirtual

should return 1 if no further key down processing should apply, otherwise -1

Implements IKeyboardHook.

+ Here is the call graph for this function:

int32_t onKeyUp ( const VstKeyCode code,
CFrame frame 
)
protectedvirtual

should return 1 if no further key up processing should apply, otherwise -1

Implements IKeyboardHook.

CMouseEventResult onMouseDown ( CFrame frame,
const CPoint where,
const CButtonState buttons 
)
protectedvirtual

a mouse down event happend on the frame at position where. If the observer handles this, the event won't be propagated further

Reimplemented from IMouseObserver.

+ Here is the call graph for this function:

void onMouseEntered ( CView view,
CFrame frame 
)
inlineprotectedvirtual

Implements IMouseObserver.

void onMouseExited ( CView view,
CFrame frame 
)
inlineprotectedvirtual

Implements IMouseObserver.

CMouseEventResult onMouseMoved ( CFrame frame,
const CPoint where,
const CButtonState buttons 
)
inlineprotectedvirtual

a mouse move event happend on the frame at position where. If the observer handles this, the event won't be propagated further

Reimplemented from IMouseObserver.

Steinberg::tresult PLUGIN_API onSize ( Steinberg::ViewRect *  newSize)
protected
void onViewAdded ( CFrame frame,
CView view 
)
protectedvirtual
void onViewRemoved ( CFrame frame,
CView view 
)
protectedvirtual

Implements IViewAddedRemovedObserver.

+ Here is the call graph for this function:

bool PLUGIN_API open ( void *  parent,
const PlatformType &  type 
)
protected
Steinberg::tresult PLUGIN_API queryInterface ( const ::Steinberg::TUID  iid,
void **  obj 
)
void recreateView ( )
protected
bool requestResize ( const CPoint newSize)

+ Here is the caller graph for this function:

bool setEditorSizeConstrains ( const CPoint newMinimumSize,
const CPoint newMaximumSize 
)

+ Here is the call graph for this function:

void syncParameterTags ( )
protected

+ Here is the call graph for this function:

void valueChanged ( CControl pControl)
protectedvirtual

Implements CControlListener.

+ Here is the call graph for this function:

CView * verifyView ( CView view,
const UIAttributes attributes,
IUIDescription description 
)
protectedvirtual

Reimplemented from IController.

+ Here is the call graph for this function:

Member Data Documentation

VST3EditorDelegate* delegate
protected
UIDescription* description
protected
bool doCreateView
protected
bool editingEnabled
protected
CPoint maxSize
protected
CPoint minSize
protected
CRect nonEditRect
protected
IController* originalController
protected
ParameterChangeListenerMap paramChangeListeners
protected
bool tooltipsEnabled
protected
std::string viewName
protected
std::string xmlFile
protected

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