VST 3 SDK  VST 3.6.14
SDK for developing VST Plug-in
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups Pages
EditControllerEx1 Class Reference

Advanced implementation (support IUnitInfo) for a VST 3 edit controller. More...

#include <vsteditcontroller.h>

+ Inheritance diagram for EditControllerEx1:

Public Types

using ProgramIndexMap = (EditControllerEx1, EditController) DEFINE_INTERFACES DEF_INTERFACE(IUnitInfo) END_DEFINE_INTERFACES(EditController) REFCOUNT_METHODS(EditController) protected std::map< ProgramListID, ProgramListVector::size_type >
 
using UnitVector = std::vector< IPtr< Unit >>
 

Public Member Functions

 EditControllerEx1 ()
 
 ~EditControllerEx1 () override
 
tresult terminate () SMTG_OVERRIDE
 
bool addUnit (Unit *unit)
 Adds a given unit. More...
 
bool addProgramList (ProgramList *list)
 Adds a given program list. More...
 
ProgramListgetProgramList (ProgramListID listId) const
 Returns the ProgramList associated to a given listId. More...
 
tresult notifyProgramListChange (ProgramListID listId, int32 programIndex=kAllProgramInvalid)
 Notifies the host about program list changes. More...
 
int32 getUnitCount () SMTG_OVERRIDE
 
tresult getUnitInfo (int32 unitIndex, UnitInfo &info) SMTG_OVERRIDE
 
int32 getProgramListCount () SMTG_OVERRIDE
 
tresult getProgramListInfo (int32 listIndex, ProgramListInfo &info) SMTG_OVERRIDE
 
tresult getProgramName (ProgramListID listId, int32 programIndex, String128 name) SMTG_OVERRIDE
 
tresult getProgramInfo (ProgramListID listId, int32 programIndex, CString attributeId, String128 attributeValue) SMTG_OVERRIDE
 
tresult hasProgramPitchNames (ProgramListID listId, int32 programIndex) SMTG_OVERRIDE
 
tresult getProgramPitchName (ProgramListID listId, int32 programIndex, int16 midiPitch, String128 name) SMTG_OVERRIDE
 
virtual tresult setProgramName (ProgramListID listId, int32 programIndex, const String128 name)
 
UnitID getSelectedUnit () SMTG_OVERRIDE
 
tresult selectUnit (UnitID unitId) SMTG_OVERRIDE
 
tresult getUnitByBus (MediaType, BusDirection, int32, int32, UnitID &) SMTG_OVERRIDE
 
tresult setUnitProgramData (int32, int32, IBStream *) SMTG_OVERRIDE
 
virtual tresult notifyUnitSelection ()
 Notifies the host about the selected Unit. More...
 
void update (FUnknown *changedUnknown, int32 message) SMTG_OVERRIDE
 
- Public Member Functions inherited from EditController
 EditController ()
 
tresult setComponentState (IBStream *state) SMTG_OVERRIDE
 
tresult setState (IBStream *state) SMTG_OVERRIDE
 
tresult getState (IBStream *state) SMTG_OVERRIDE
 
int32 getParameterCount () SMTG_OVERRIDE
 
tresult getParameterInfo (int32 paramIndex, ParameterInfo &info) SMTG_OVERRIDE
 
tresult getParamStringByValue (ParamID tag, ParamValue valueNormalized, String128 string) SMTG_OVERRIDE
 
tresult getParamValueByString (ParamID tag, TChar *string, ParamValue &valueNormalized) SMTG_OVERRIDE
 
ParamValue normalizedParamToPlain (ParamID tag, ParamValue valueNormalized) SMTG_OVERRIDE
 
ParamValue plainParamToNormalized (ParamID tag, ParamValue plainValue) SMTG_OVERRIDE
 
ParamValue getParamNormalized (ParamID tag) SMTG_OVERRIDE
 
tresult setParamNormalized (ParamID tag, ParamValue value) SMTG_OVERRIDE
 
tresult setComponentHandler (IComponentHandler *handler) SMTG_OVERRIDE
 
IPlugViewcreateView (FIDString) SMTG_OVERRIDE
 
tresult setKnobMode (KnobMode mode) SMTG_OVERRIDE
 
tresult openHelp (TBool) SMTG_OVERRIDE
 
tresult openAboutBox (TBool) SMTG_OVERRIDE
 
tresult initialize (FUnknown *context) SMTG_OVERRIDE
 
virtual tresult beginEdit (ParamID tag)
 to be called before a serie of performEdit More...
 
virtual tresult performEdit (ParamID tag, ParamValue valueNormalized)
 will inform the host about the value change More...
 
virtual tresult endEdit (ParamID tag)
 to be called after a serie of performEdit More...
 
virtual tresult startGroupEdit ()
 calls IComponentHandler2::startGroupEdit() if host supports it More...
 
virtual tresult finishGroupEdit ()
 calls IComponentHandler2::finishGroupEdit() if host supports it More...
 
virtual void editorDestroyed (EditorView *)
 called from EditorView if it was destroyed More...
 
virtual void editorAttached (EditorView *)
 called from EditorView if it was attached to a parent More...
 
virtual void editorRemoved (EditorView *)
 called from EditorView if it was removed from a parent More...
 
virtual ParametergetParameterObject (ParamID tag)
 Gets for a given tag the parameter object. More...
 
virtual tresult getParameterInfoByTag (ParamID tag, ParameterInfo &info)
 Gets for a given tag the parameter information. More...
 
virtual tresult setDirty (TBool state)
 Calls IComponentHandler2::setDirty (state) if host supports it. More...
 
virtual tresult requestOpenEditor (FIDString name=ViewType::kEditor)
 Calls IComponentHandler2::requestOpenEditor (name) if host supports it. More...
 
IComponentHandlergetComponentHandler () const
 
- Public Member Functions inherited from ComponentBase
 ComponentBase ()
 
 ~ComponentBase () override
 
FUnknowngetHostContext () const
 Returns the hostContext (set by the host during initialize call). More...
 
IConnectionPointgetPeer () const
 Returns the peer for the messaging communication (you can only use IConnectionPoint::notify for communicate between peers, do not try to cast peerConnection. More...
 
IMessageallocateMessage ()
 Allocates a message instance (don't forget to release it). More...
 
tresult sendMessage (IMessage *message)
 Sends the given message to the peer. More...
 
tresult sendTextMessage (const char8 *text)
 Sends a simple text message to the peer (max 255 characters). More...
 
virtual tresult receiveText (const char8 *text)
 Receives a simple text message from the peer (max 255 characters). More...
 
tresult connect (IConnectionPoint *other) SMTG_OVERRIDE
 
tresult disconnect (IConnectionPoint *other) SMTG_OVERRIDE
 
tresult notify (IMessage *message) SMTG_OVERRIDE
 
- Public Member Functions inherited from FUnknown
virtual tresult queryInterface (const TUID _iid, void **obj)=0
 
virtual uint32 addRef ()=0
 
virtual uint32 release ()=0
 

Public Attributes

UnitVector units
 
ProgramListVector programLists
 
ProgramIndexMap programIndexMap
 
UnitID selectedUnit
 
- Public Attributes inherited from EditController
OBJ_METHODS(EditController,
ComponentBase)
DEFINE_INTERFACES
DEF_INTERFACE(IEditController)
DEF_INTERFACE(IEditController2)
END_DEFINE_INTERFACES(ComponentBase)
REFCOUNT_METHODS(ComponentBase)
protected IComponentHandler2
componentHandler2
 
ParameterContainer parameters
 
- Public Attributes inherited from ComponentBase
OBJ_METHODS(ComponentBase,
FObject) DEFINE_INTERFACES
DEF_INTERFACE(IPluginBase)
DEF_INTERFACE(IConnectionPoint)
END_DEFINE_INTERFACES(FObject)
REFCOUNT_METHODS(FObject)
protected IPtr
< IConnectionPoint
peerConnection
 

Additional Inherited Members

- Static Public Member Functions inherited from EditController
static KnobMode getHostKnobMode ()
 return host knob mode More...
 
- Static Public Attributes inherited from EditController
static KnobMode hostKnobMode = kCircularMode
 
- Static Public Attributes inherited from IPluginBase
static const FUID iid
 
- Static Public Attributes inherited from FUnknown
static const FUID iid
 
- Static Public Attributes inherited from IConnectionPoint
static const FUID iid
 
- Static Public Attributes inherited from IEditController
static const FUID iid
 
- Static Public Attributes inherited from IEditController2
static const FUID iid
 
- Static Public Attributes inherited from IUnitInfo
static const FUID iid
 

Detailed Description

Advanced implementation (support IUnitInfo) for a VST 3 edit controller.

Member Typedef Documentation

using ProgramIndexMap = (EditControllerEx1, EditController) DEFINE_INTERFACES DEF_INTERFACE (IUnitInfo) END_DEFINE_INTERFACES (EditController) REFCOUNT_METHODS (EditController) protected std::map<ProgramListID, ProgramListVector::size_type>
using UnitVector = std::vector<IPtr<Unit>>

Constructor & Destructor Documentation

~EditControllerEx1 ( )
override

Member Function Documentation

tresult terminate ( )
virtual

Reimplemented from EditController.

Reimplemented in SingleComponentEffect.

bool addUnit ( Unit unit)

Adds a given unit.

bool addProgramList ( ProgramList list)

Adds a given program list.

ProgramList * getProgramList ( ProgramListID  listId) const

Returns the ProgramList associated to a given listId.

tresult notifyProgramListChange ( ProgramListID  listId,
int32  programIndex = kAllProgramInvalid 
)

Notifies the host about program list changes.

int32 getUnitCount ( )
inlinevirtual

Implements IUnitInfo.

tresult getUnitInfo ( int32  unitIndex,
UnitInfo info 
)
virtual

Implements IUnitInfo.

int32 getProgramListCount ( )
virtual

Implements IUnitInfo.

tresult getProgramListInfo ( int32  listIndex,
ProgramListInfo info 
)
virtual

Implements IUnitInfo.

tresult getProgramName ( ProgramListID  listId,
int32  programIndex,
String128  name 
)
virtual

Implements IUnitInfo.

tresult getProgramInfo ( ProgramListID  listId,
int32  programIndex,
CString  attributeId,
String128  attributeValue 
)
virtual

Implements IUnitInfo.

tresult hasProgramPitchNames ( ProgramListID  listId,
int32  programIndex 
)
virtual

Implements IUnitInfo.

tresult getProgramPitchName ( ProgramListID  listId,
int32  programIndex,
int16  midiPitch,
String128  name 
)
virtual

Implements IUnitInfo.

tresult setProgramName ( ProgramListID  listId,
int32  programIndex,
const String128  name 
)
virtual
UnitID getSelectedUnit ( )
inlinevirtual

Implements IUnitInfo.

tresult selectUnit ( UnitID  unitId)
inlinevirtual

Implements IUnitInfo.

tresult getUnitByBus ( MediaType  ,
BusDirection  ,
int32  ,
int32  ,
UnitID  
)
inlinevirtual

Implements IUnitInfo.

tresult setUnitProgramData ( int32  ,
int32  ,
IBStream  
)
inlinevirtual

Implements IUnitInfo.

tresult notifyUnitSelection ( )
virtual

Notifies the host about the selected Unit.

void update ( FUnknown changedUnknown,
int32  message 
)

Member Data Documentation

UnitVector units
ProgramListVector programLists
ProgramIndexMap programIndexMap
UnitID selectedUnit
Empty

Copyright ©2019 Steinberg Media Technologies GmbH. All Rights Reserved. This documentation is under this license.