Jamba  3.0.2
pongasoft::VST::GUI::Params::GUIVstParameter< T >::Editor Class Reference

#include <GUIVstParameter.h>

Public Member Functions

tresult commit ()
 
tresult commit (ParamType const &iValue)
 
 Editor (std::unique_ptr< GUIRawVstParameter::Editor > iRawEditor, std::shared_ptr< VstParamDef< T >> iVstParamDef)
 
 Editor (Editor const &)=delete
 
Editoroperator= (Editor const &)=delete
 
tresult rollback ()
 
tresult setValue (ParamType const &iValue)
 

Private Attributes

std::unique_ptr< GUIRawVstParameter::EditorfRawEditor
 
std::shared_ptr< VstParamDef< T > > fVstParamDef
 

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 >
pongasoft::VST::GUI::Params::GUIVstParameter< T >::Editor::Editor ( std::unique_ptr< GUIRawVstParameter::Editor iRawEditor,
std::shared_ptr< VstParamDef< T >>  iVstParamDef 
)
inlineexplicit

◆ Editor() [2/2]

template<typename T >
pongasoft::VST::GUI::Params::GUIVstParameter< T >::Editor::Editor ( Editor const &  )
delete

Member Function Documentation

◆ commit() [1/2]

template<typename T >
tresult pongasoft::VST::GUI::Params::GUIVstParameter< T >::Editor::commit ( )
inline

◆ commit() [2/2]

template<typename T >
tresult pongasoft::VST::GUI::Params::GUIVstParameter< T >::Editor::commit ( ParamType const &  iValue)
inline

◆ operator=()

template<typename T >
Editor& pongasoft::VST::GUI::Params::GUIVstParameter< T >::Editor::operator= ( Editor const &  )
delete

◆ rollback()

template<typename T >
tresult pongasoft::VST::GUI::Params::GUIVstParameter< T >::Editor::rollback ( )
inline

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 pongasoft::VST::GUI::Params::GUIVstParameter< T >::Editor::setValue ( ParamType const &  iValue)
inline

Change the value of the parameter. Note that nothing happens if you have called commit or rollback already

Member Data Documentation

◆ fRawEditor

template<typename T >
std::unique_ptr<GUIRawVstParameter::Editor> pongasoft::VST::GUI::Params::GUIVstParameter< T >::Editor::fRawEditor
private

◆ fVstParamDef

template<typename T >
std::shared_ptr<VstParamDef<T> > pongasoft::VST::GUI::Params::GUIVstParameter< T >::Editor::fVstParamDef
private

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