Jamba C++ API  4.0.0
GUIVstParameter< T >::Editor Class Reference

Wrapper to edit a single parameter. More...

#include <GUIVstParameter.h>

Inherits EditorType.

Public Member Functions

tresult commit () override
 
 Editor (GUIRawVstParamEditor iRawEditor, std::shared_ptr< IParamConverter< T >> iConverter)
 
 Editor (Editor const &)=delete
 
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). More...
 
tresult setValue (ParamType const &iValue) override
 Change the value of the parameter. More...
 
bool updateValue (ParamType const &iValue) override
 Change the value of the parameter. More...
 
 ~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]

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

◆ ~Editor()

~Editor ( )
inlineoverride

◆ Editor() [2/2]

Editor ( Editor const &  )
delete

Member Function Documentation

◆ commit()

tresult commit ( )
inlineoverride

◆ operator=()

Editor& operator= ( Editor const &  )
delete

◆ rollback()

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()

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()

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

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

◆ fRawEditor

GUIRawVstParamEditor fRawEditor
private

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