LMMS
Loading...
Searching...
No Matches
Steinberg::Vst::EditControllerEx1 Class Reference

#include <vsteditcontroller.h>

Inheritance diagram for Steinberg::Vst::EditControllerEx1:
Steinberg::Vst::EditController Steinberg::Vst::IUnitInfo Steinberg::Vst::ComponentBase Steinberg::Vst::IEditController Steinberg::Vst::IEditController2 Steinberg::FUnknown Steinberg::FObject Steinberg::IPluginBase Steinberg::Vst::IConnectionPoint Steinberg::IPluginBase Steinberg::FUnknown Steinberg::IDependent Steinberg::FUnknown Steinberg::FUnknown Steinberg::FUnknown Steinberg::FUnknown

Public Member Functions

 EditControllerEx1 ()
 ~EditControllerEx1 () override
tresult PLUGIN_API terminate () SMTG_OVERRIDE
bool addUnit (Unit *unit)
bool addProgramList (ProgramList *list)
ProgramListgetProgramList (ProgramListID listId) const
tresult notifyProgramListChange (ProgramListID listId, int32 programIndex=kAllProgramInvalid)
int32 PLUGIN_API getUnitCount () SMTG_OVERRIDE
tresult PLUGIN_API getUnitInfo (int32 unitIndex, UnitInfo &info) SMTG_OVERRIDE
int32 PLUGIN_API getProgramListCount () SMTG_OVERRIDE
tresult PLUGIN_API getProgramListInfo (int32 listIndex, ProgramListInfo &info) SMTG_OVERRIDE
tresult PLUGIN_API getProgramName (ProgramListID listId, int32 programIndex, String128 name) SMTG_OVERRIDE
tresult PLUGIN_API getProgramInfo (ProgramListID listId, int32 programIndex, CString attributeId, String128 attributeValue) SMTG_OVERRIDE
tresult PLUGIN_API hasProgramPitchNames (ProgramListID listId, int32 programIndex) SMTG_OVERRIDE
tresult PLUGIN_API getProgramPitchName (ProgramListID listId, int32 programIndex, int16 midiPitch, String128 name) SMTG_OVERRIDE
virtual tresult setProgramName (ProgramListID listId, int32 programIndex, const String128 name)
UnitID PLUGIN_API getSelectedUnit () SMTG_OVERRIDE
tresult PLUGIN_API selectUnit (UnitID unitId) SMTG_OVERRIDE
tresult PLUGIN_API getUnitByBus (MediaType, BusDirection, int32, int32, UnitID &) SMTG_OVERRIDE
tresult PLUGIN_API setUnitProgramData (int32, int32, IBStream *) SMTG_OVERRIDE
virtual tresult notifyUnitSelection ()
void PLUGIN_API update (FUnknown *changedUnknown, int32 message) SMTG_OVERRIDE
Public Member Functions inherited from Steinberg::Vst::EditController
 EditController ()
tresult PLUGIN_API setComponentState (IBStream *state) SMTG_OVERRIDE
tresult PLUGIN_API setState (IBStream *state) SMTG_OVERRIDE
tresult PLUGIN_API getState (IBStream *state) SMTG_OVERRIDE
int32 PLUGIN_API getParameterCount () SMTG_OVERRIDE
tresult PLUGIN_API getParameterInfo (int32 paramIndex, ParameterInfo &info) SMTG_OVERRIDE
tresult PLUGIN_API getParamStringByValue (ParamID tag, ParamValue valueNormalized, String128 string) SMTG_OVERRIDE
tresult PLUGIN_API getParamValueByString (ParamID tag, TChar *string, ParamValue &valueNormalized) SMTG_OVERRIDE
ParamValue PLUGIN_API normalizedParamToPlain (ParamID tag, ParamValue valueNormalized) SMTG_OVERRIDE
ParamValue PLUGIN_API plainParamToNormalized (ParamID tag, ParamValue plainValue) SMTG_OVERRIDE
ParamValue PLUGIN_API getParamNormalized (ParamID tag) SMTG_OVERRIDE
tresult PLUGIN_API setParamNormalized (ParamID tag, ParamValue value) SMTG_OVERRIDE
tresult PLUGIN_API setComponentHandler (IComponentHandler *handler) SMTG_OVERRIDE
IPlugView *PLUGIN_API createView (FIDString) SMTG_OVERRIDE
tresult PLUGIN_API setKnobMode (KnobMode mode) SMTG_OVERRIDE
tresult PLUGIN_API openHelp (TBool) SMTG_OVERRIDE
tresult PLUGIN_API openAboutBox (TBool) SMTG_OVERRIDE
tresult PLUGIN_API initialize (FUnknown *context) SMTG_OVERRIDE
virtual tresult beginEdit (ParamID tag)
 to be called before a serie of performEdit
virtual tresult performEdit (ParamID tag, ParamValue valueNormalized)
 will inform the host about the value change
virtual tresult endEdit (ParamID tag)
 to be called after a serie of performEdit
virtual tresult startGroupEdit ()
 calls IComponentHandler2::startGroupEdit() if host supports it
virtual tresult finishGroupEdit ()
 calls IComponentHandler2::finishGroupEdit() if host supports it
virtual void editorDestroyed (EditorView *)
 called from EditorView if it was destroyed
virtual void editorAttached (EditorView *)
 called from EditorView if it was attached to a parent
virtual void editorRemoved (EditorView *)
 called from EditorView if it was removed from a parent
virtual ParametergetParameterObject (ParamID tag)
virtual tresult getParameterInfoByTag (ParamID tag, ParameterInfo &info)
virtual tresult setDirty (TBool state)
virtual tresult requestOpenEditor (FIDString name=ViewType::kEditor)
IComponentHandlergetComponentHandler () const
Public Member Functions inherited from Steinberg::Vst::ComponentBase
 ComponentBase ()
 ~ComponentBase () override
FUnknowngetHostContext () const
IConnectionPointgetPeer () const
IMessageallocateMessage () const
tresult sendMessage (IMessage *message) const
tresult sendTextMessage (const char8 *text) const
tresult sendMessageID (const char8 *messageID) const
virtual tresult receiveText (const char8 *text)
tresult PLUGIN_API connect (IConnectionPoint *other) SMTG_OVERRIDE
tresult PLUGIN_API disconnect (IConnectionPoint *other) SMTG_OVERRIDE
tresult PLUGIN_API notify (IMessage *message) SMTG_OVERRIDE
Public Member Functions inherited from Steinberg::FObject
 FObject ()
 default constructor...
 FObject (const FObject &)
 overloaded constructor...
virtual ~FObject ()
 destructor...
FObjectoperator= (const FObject &)
 overloads operator "=" as the reference assignment
virtual FClassID isA () const
 a local alternative to getFClassID ()
virtual bool isA (FClassID s) const
 evaluates if the passed ID is of the FObject type
virtual bool isTypeOf (FClassID s, bool=true) const
 evaluates if the passed ID is of the FObject type
int32 getRefCount ()
 returns the current interface reference count
FUnknownunknownCast ()
 get FUnknown interface from object
tresult PLUGIN_API queryInterface (const TUID _iid, void **obj) SMTG_OVERRIDE
 please refer to FUnknown::queryInterface ()
uint32 PLUGIN_API addRef () SMTG_OVERRIDE
 please refer to FUnknown::addref ()
uint32 PLUGIN_API release () SMTG_OVERRIDE
 please refer to FUnknown::release ()
void PLUGIN_API update (FUnknown *, int32) SMTG_OVERRIDE
 empty virtual method that should be overridden by derived classes for data updates upon changes
virtual void addDependent (IDependent *dep)
 adds dependency to the object
virtual void removeDependent (IDependent *dep)
 removes dependency from the object
virtual void changed (int32 msg=kChanged)
 Inform all dependents, that the object has changed.
virtual void deferUpdate (int32 msg=kChanged)
 Similar to triggerUpdates, except only delivered in idle (usefull in collecting updates).
virtual void updateDone (int32)
 empty virtual method that should be overridden by derived classes
virtual bool isEqualInstance (FUnknown *d)

Protected Types

using ProgramListVector = std::vector<IPtr<ProgramList>>
using ProgramIndexMap = std::map<ProgramListID, ProgramListVector::size_type>
using UnitVector = std::vector<IPtr<Unit>>

Protected Attributes

UnitVector units
ProgramListVector programLists
ProgramIndexMap programIndexMap
UnitID selectedUnit
Protected Attributes inherited from Steinberg::Vst::EditController
IComponentHandlercomponentHandler
IComponentHandler2componentHandler2
ParameterContainer parameters
Protected Attributes inherited from Steinberg::Vst::ComponentBase
IPtr< FUnknownhostContext
IPtr< IConnectionPointpeerConnection
Protected Attributes inherited from Steinberg::FObject
int32 refCount
 COM-model local reference count.

Additional Inherited Members

Public Types inherited from Steinberg::IDependent
enum  ChangeMessage {
  kWillChange , kChanged , kDestroyed , kWillDestroy ,
  kStdChangeMessageLast = kWillDestroy
}
Static Public Member Functions inherited from Steinberg::Vst::EditController
static KnobMode getHostKnobMode ()
 return host knob mode
Static Public Member Functions inherited from Steinberg::FObject
static FClassID getFClassID ()
 return Class ID as an ASCII string (statically)
static void setUpdateHandler (IUpdateHandler *handler)
 set method for the local attribute
static IUpdateHandlergetUpdateHandler ()
 get method for the local attribute
static bool classIDsEqual (FClassID ci1, FClassID ci2)
 compares (evaluates) 2 class IDs
static FObjectunknownToObject (FUnknown *unknown)
 pointer conversion from FUnknown to FObject
Static Public Attributes inherited from Steinberg::FObject
static const FUID iid
Static Public Attributes inherited from Steinberg::IDependent
static const FUID iid
Static Public Attributes inherited from Steinberg::FUnknown
static const FUID iid
Static Public Attributes inherited from Steinberg::IPluginBase
static const FUID iid
Static Public Attributes inherited from Steinberg::Vst::IConnectionPoint
static const FUID iid
Static Public Attributes inherited from Steinberg::Vst::IEditController
static const FUID iid
Static Public Attributes inherited from Steinberg::Vst::IEditController2
static const FUID iid
Static Public Attributes inherited from Steinberg::Vst::IUnitInfo
static const FUID iid
Static Protected Attributes inherited from Steinberg::Vst::EditController
static KnobMode hostKnobMode = kCircularMode
Static Protected Attributes inherited from Steinberg::FObject
static IUpdateHandlergUpdateHandler = nullptr

Detailed Description

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

Member Typedef Documentation

◆ ProgramIndexMap

using Steinberg::Vst::EditControllerEx1::ProgramIndexMap = std::map<ProgramListID, ProgramListVector::size_type>
protected

◆ ProgramListVector

◆ UnitVector

using Steinberg::Vst::EditControllerEx1::UnitVector = std::vector<IPtr<Unit>>
protected

Constructor & Destructor Documentation

◆ EditControllerEx1()

Steinberg::Vst::EditControllerEx1::EditControllerEx1 ( )

◆ ~EditControllerEx1()

Steinberg::Vst::EditControllerEx1::~EditControllerEx1 ( )
override

Member Function Documentation

◆ addProgramList()

bool Steinberg::Vst::EditControllerEx1::addProgramList ( ProgramList * list)

Adds a given program list.

◆ addUnit()

bool Steinberg::Vst::EditControllerEx1::addUnit ( Unit * unit)

Adds a given unit.

◆ getProgramInfo()

tresult PLUGIN_API Steinberg::Vst::EditControllerEx1::getProgramInfo ( ProgramListID listId,
int32 programIndex,
CString attributeId,
String128 attributeValue )
virtual

Gets for a given program list ID, program index and attributeId the associated attribute value.

Implements Steinberg::Vst::IUnitInfo.

◆ getProgramList()

ProgramList * Steinberg::Vst::EditControllerEx1::getProgramList ( ProgramListID listId) const

Returns the ProgramList associated to a given listId.

◆ getProgramListCount()

int32 PLUGIN_API Steinberg::Vst::EditControllerEx1::getProgramListCount ( )
virtual

Component intern program structure. Gets the count of Program List.

Implements Steinberg::Vst::IUnitInfo.

◆ getProgramListInfo()

tresult PLUGIN_API Steinberg::Vst::EditControllerEx1::getProgramListInfo ( int32 listIndex,
ProgramListInfo & info )
virtual

Gets for a given index the Program List Info.

Implements Steinberg::Vst::IUnitInfo.

◆ getProgramName()

tresult PLUGIN_API Steinberg::Vst::EditControllerEx1::getProgramName ( ProgramListID listId,
int32 programIndex,
String128 name )
virtual

Gets for a given program list ID and program index its program name.

Implements Steinberg::Vst::IUnitInfo.

◆ getProgramPitchName()

tresult PLUGIN_API Steinberg::Vst::EditControllerEx1::getProgramPitchName ( ProgramListID listId,
int32 programIndex,
int16 midiPitch,
String128 name )
virtual

Gets the PitchName for a given program list ID, program index and pitch. If PitchNames are changed the plug-in should inform the host with IUnitHandler::notifyProgramListChange.

Implements Steinberg::Vst::IUnitInfo.

◆ getSelectedUnit()

UnitID PLUGIN_API Steinberg::Vst::EditControllerEx1::getSelectedUnit ( )
inlinevirtual

Gets the current selected unit.

Implements Steinberg::Vst::IUnitInfo.

◆ getUnitByBus()

tresult PLUGIN_API Steinberg::Vst::EditControllerEx1::getUnitByBus ( MediaType type,
BusDirection dir,
int32 busIndex,
int32 channel,
UnitID & unitId )
inlinevirtual

Gets the according unit if there is an unambiguous relation between a channel or a bus and a unit. This method mainly is intended to find out which unit is related to a given MIDI input channel.

Implements Steinberg::Vst::IUnitInfo.

◆ getUnitCount()

int32 PLUGIN_API Steinberg::Vst::EditControllerEx1::getUnitCount ( )
inlinevirtual

Returns the flat count of units.

Implements Steinberg::Vst::IUnitInfo.

◆ getUnitInfo()

tresult PLUGIN_API Steinberg::Vst::EditControllerEx1::getUnitInfo ( int32 unitIndex,
UnitInfo & info )
virtual

Gets UnitInfo for a given index in the flat list of unit.

Implements Steinberg::Vst::IUnitInfo.

◆ hasProgramPitchNames()

tresult PLUGIN_API Steinberg::Vst::EditControllerEx1::hasProgramPitchNames ( ProgramListID listId,
int32 programIndex )
virtual

Returns kResultTrue if the given program index of a given program list ID supports PitchNames.

Implements Steinberg::Vst::IUnitInfo.

◆ notifyProgramListChange()

tresult Steinberg::Vst::EditControllerEx1::notifyProgramListChange ( ProgramListID listId,
int32 programIndex = kAllProgramInvalid )

Notifies the host about program list changes.

◆ notifyUnitSelection()

tresult Steinberg::Vst::EditControllerEx1::notifyUnitSelection ( )
virtual

Notifies the host about the selected Unit.

◆ selectUnit()

tresult PLUGIN_API Steinberg::Vst::EditControllerEx1::selectUnit ( UnitID unitId)
inlinevirtual

Sets a new selected unit.

Implements Steinberg::Vst::IUnitInfo.

◆ setProgramName()

tresult Steinberg::Vst::EditControllerEx1::setProgramName ( ProgramListID listId,
int32 programIndex,
const String128 name )
virtual

◆ setUnitProgramData()

tresult PLUGIN_API Steinberg::Vst::EditControllerEx1::setUnitProgramData ( int32 listOrUnitId,
int32 programIndex,
IBStream * data )
inlinevirtual

Receives a preset data stream.

  • If the component supports program list data (IProgramListData), the destination of the data stream is the program specified by list-Id and program index (first and second parameter)
    • If the component supports unit data (IUnitData), the destination is the unit specified by the first parameter - in this case parameter programIndex is < 0).

Implements Steinberg::Vst::IUnitInfo.

◆ terminate()

tresult PLUGIN_API Steinberg::Vst::EditControllerEx1::terminate ( )
virtual

This function is called before the plug-in is unloaded and can be used for cleanups. You have to release all references to any host application interfaces.

Reimplemented from Steinberg::Vst::EditController.

◆ update()

void PLUGIN_API Steinberg::Vst::EditControllerEx1::update ( FUnknown * changedUnknown,
int32 message )
virtual

Inform the dependent, that the passed FUnknown has changed.

Implements Steinberg::IDependent.

Member Data Documentation

◆ programIndexMap

ProgramIndexMap Steinberg::Vst::EditControllerEx1::programIndexMap
protected

◆ programLists

ProgramListVector Steinberg::Vst::EditControllerEx1::programLists
protected

◆ selectedUnit

UnitID Steinberg::Vst::EditControllerEx1::selectedUnit
protected

◆ units

UnitVector Steinberg::Vst::EditControllerEx1::units
protected

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