VST 3 Interfaces VST 3.6.11 SDK for developing VST Plug-in

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups Pages
Public Member Functions | Static Public Attributes | List of all members
IComponentHandler2 Class Referenceabstract
VST 3 Interfaces to be implemented by the Host | VST 3 Interfaces defined in version 3.1.0

Extended Host callback interface IComponentHandler2 for an edit controller. More...

`#include <ivsteditcontroller.h>`

Inheritance diagram for IComponentHandler2:

## Public Member Functions
virtual tresult | setDirty (TBool state)=0
| Tells host that the Plug-in is dirty (something besides parameters has changed since last save), if true the host should apply a save before quitting. More...
virtual tresult | requestOpenEditor (FIDString name=ViewType::kEditor)=0
| Tells host that it should open the Plug-in editor the next time it's possible. More...
virtual tresult | startGroupEdit ()=0
| Starts the group editing (call before a IComponentHandler::beginEdit), the host will keep the current timestamp at this call and will use it for all IComponentHandler::beginEdit / IComponentHandler::performEdit / IComponentHandler::endEdit calls until a finishGroupEdit (). More...
virtual tresult | finishGroupEdit ()=0
| Finishes the group editing started by a startGroupEdit (call after a IComponentHandler::endEdit). More...
Public Member Functions inherited from FUnknown
virtual tresult | queryInterface (const TUID _iid, void **obj)=0
virtual uint32 | addRef ()=0
virtual uint32 | release ()=0

## Static Public Attributes
static const FUID | iid
Static Public Attributes inherited from FUnknown
static const FUID | iid

## Detailed Description

Extended Host callback interface IComponentHandler2 for an edit controller.

- [host imp]
- [extends IComponentHandler]
- [released: 3.1.0]

One part handles:

- Setting dirty state of Plug-in
- requesting the host to open the editor

The other part handles parameter group editing from Plug-in UI. It wraps a set of IComponentHandler::beginEdit / IComponentHandler::performEdit / IComponentHandler::endEdit functions (see IComponentHandler) which should use the same timestamp in the host when writing automation. This allows for better synchronizing multiple parameter changes at once.

# Examples of different use cases

//--------------------------------------
// in case of multiple switch buttons (with associated ParamID 1 and 3)
// on mouse down :
hostHandler2->startGroupEdit ();
hostHandler->beginEdit (1);
hostHandler->beginEdit (3);
hostHandler->performEdit (1, 1.0);
hostHandler->performEdit (3, 0.0); // the opposite of paramID 1 for example
....
// on mouse up :
hostHandler->endEdit (1);
hostHandler->endEdit (3);
hostHandler2->finishGroupEdit ();
....
....
//--------------------------------------
// in case of multiple faders (with associated ParamID 1 and 3)
// on mouse down :
hostHandler2->startGroupEdit ();
hostHandler->beginEdit (1);
hostHandler->beginEdit (3);
hostHandler2->finishGroupEdit ();
....
// on mouse move :
hostHandler2->startGroupEdit ();
hostHandler->performEdit (1, x); // x the wanted value
hostHandler->performEdit (3, x);
hostHandler2->finishGroupEdit ();
....
// on mouse up :
hostHandler2->startGroupEdit ();
hostHandler->endEdit (1);
hostHandler->endEdit (3);
hostHandler2->finishGroupEdit ();

See also
  IComponentHandler
  IEditController

## Member Function Documentation

virtual tresult setDirty | ( | TBool | state | ) |
| pure virtual

Tells host that the Plug-in is dirty (something besides parameters has changed since last save), if true the host should apply a save before quitting.

virtual tresult requestOpenEditor | ( | FIDString | name = `ViewType::kEditor` | ) |
| pure virtual

Tells host that it should open the Plug-in editor the next time it's possible.

You should use this instead of showing an alert and blocking the program flow (especially on loading projects).

virtual tresult startGroupEdit | ( |  | ) |
| pure virtual

Starts the group editing (call before a IComponentHandler::beginEdit), the host will keep the current timestamp at this call and will use it for all IComponentHandler::beginEdit / IComponentHandler::performEdit / IComponentHandler::endEdit calls until a finishGroupEdit ().

virtual tresult finishGroupEdit | ( |  | ) |
| pure virtual

Finishes the group editing started by a startGroupEdit (call after a IComponentHandler::endEdit).

## Member Data Documentation

const FUID iid
| static

Empty

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