Jamba C++ API 7.5.0
Loading...
Searching...
No Matches
GUIVstParameter< T >::Editor Class Reference

Wrapper to edit a single parameter. More...

#include <GUIVstParameter.h>

Inherits EditorType.

Public Member Functions

tresult commit () override
 Editor (Editor const &)=delete
 Editor (GUIRawVstParamEditor iRawEditor, std::shared_ptr< IParamConverter< T > > iConverter)
Editoroperator= (Editor const &)=delete
tresult rollback () override
 Call this if you want to revert to the original value of the parameter (when the editor is created).
tresult setValue (ParamType const &iValue) override
 Change the value of the parameter.
bool updateValue (ParamType const &iValue) override
 Change the value of the parameter.
 ~Editor () override

Private Attributes

std::shared_ptr< IParamConverter< T > > fConverter
GUIRawVstParamEditor fRawEditor

Detailed Description

template<typename T>
class pongasoft::VST::GUI::Params::GUIVstParameter< T >::Editor

Wrapper to edit a single parameter.

Usage:

// from a CView::onMouseDown callback fMyParamEditor = fParameter.edit(myParamID); fParamEditor->setValue(myValue);

// from a CView::onMouseMoved callback fParamEditor->setValue(myValue);

// from a CView::onMouseUp/onMouseCancelled callback fMyParamEditor->commit();

Constructor & Destructor Documentation

◆ Editor() [1/2]

template<typename T>
Editor ( GUIRawVstParamEditor iRawEditor,
std::shared_ptr< IParamConverter< T > > iConverter )
inlineexplicit

◆ ~Editor()

template<typename T>
~Editor ( )
inlineoverride

◆ Editor() [2/2]

template<typename T>
Editor ( Editor const & )
delete

Member Function Documentation

◆ commit()

template<typename T>
tresult commit ( )
inlineoverride

◆ operator=()

template<typename T>
Editor & operator= ( Editor const & )
delete

◆ rollback()

template<typename T>
tresult rollback ( )
inlineoverride

Call this if you want to revert to the original value of the parameter (when the editor is created).

This has no effect if commit() has already been called

◆ setValue()

template<typename T>
tresult setValue ( ParamType const & iValue)
inlineoverride

Change the value of the parameter.

Note that nothing happens if you have called commit or rollback already

◆ updateValue()

template<typename T>
bool updateValue ( ParamType const & iValue)
inlineoverride

Change the value of the parameter.

Note that nothing happens if you have called commit or rollback already

Returns
true if the value was updated

Member Data Documentation

◆ fConverter

template<typename T>
std::shared_ptr<IParamConverter<T> > fConverter
private

◆ fRawEditor

template<typename T>
GUIRawVstParamEditor fRawEditor
private

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