Jamba C++ API  4.0.0
GUIRawVstParameter::Editor Class Reference

Wrapper to edit a single parameter. More...

#include <GUIRawVstParameter.h>

Inherits EditorType.

Public Member Functions

tresult commit () override
 
 Editor (ParamID iParamID, VstParametersSPtr iVstParameters)
 
 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 (ParamValue const &iValue) override
 Change the value of the parameter. More...
 
bool updateValue (ParamValue const &iValue) override
 Change the value of the parameter. More...
 
 ~Editor () override
 

Private Attributes

ParamValue fInitialParamValue
 
bool fIsEditing
 
ParamID fParamID
 
VstParametersSPtr fVstParameters
 

Detailed Description

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 ( ParamID  iParamID,
VstParametersSPtr  iVstParameters 
)

◆ ~Editor()

~Editor ( )
inlineoverride

◆ Editor() [2/2]

Editor ( Editor const &  )
delete

Member Function Documentation

◆ commit()

tresult commit ( )
override

◆ operator=()

Editor& operator= ( Editor const &  )
delete

◆ rollback()

tresult rollback ( )
override

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 ( ParamValue const &  iValue)
override

Change the value of the parameter.

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

◆ updateValue()

bool updateValue ( ParamValue const &  iValue)
override

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

◆ fInitialParamValue

ParamValue fInitialParamValue
private

◆ fIsEditing

bool fIsEditing
private

◆ fParamID

ParamID fParamID
private

◆ fVstParameters

VstParametersSPtr fVstParameters
private

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