|
Jamba C++ API 7.5.0
|
A discrete parameter is defined by a parameter whose underlying backing type is an int32 and whose number of steps is > 0. More...
#include <IGUIParameter.h>
Inherits enable_shared_from_this< IGUIParameter >.
Inherited by ITGUIParameter< ParamValue >::ITEditor< ParamValue >, ITGUIParameter< int32 >, ITGUIParameter< ParamValue >, and ITGUIParameter< T >.
Classes | |
| class | Editor |
| Defines the basic and common API of all parameter editors (allow to commit/rollback). More... | |
Public Member Functions | |
| virtual std::shared_ptr< GUIDiscreteParameter > | asDiscreteParameter (int32 iStepCount)=0 |
| Converts this parameter into a discrete parameter. | |
| template<typename T> | |
| std::shared_ptr< ITGUIParameter< T > > | cast () |
| Downcasts this parameter into a typed version. | |
| virtual std::unique_ptr< FObjectCx > | connect (Parameters::ChangeCallback iChangeCallback) const =0 |
| Creates a connection between this parameter and the callback: whenever the parameter changes, the callback will be invoked (std::function<void()>). | |
| virtual std::unique_ptr< FObjectCx > | connect (Parameters::IChangeListener *iChangeListener) const =0 |
| Creates a connection between this parameter and the change listener: whenever the parameter changes, the listener will be notified of the changes (Parameters::IChangeListener::onParameterChange(ParamID)). | |
| virtual ParamID | getParamID () const =0 |
| Each parameter has a unique ID returned by this method. | |
| virtual int32 | getStepCount () const =0 |
| When a parameter is a discrete parameter (which means its underlying backing type is an int32 with values in the discrete range [0, getStepCount()]), this method will return the number of steps (> 0). | |
| virtual tresult | resetToDefault ()=0 |
| Resets the parameter to its default value. | |
| virtual std::string | toUTF8String (int32 iPrecision) const =0 |
| Returns the current value of the parameter as a string (which is properly UTF-8 encoded). | |
A discrete parameter is defined by a parameter whose underlying backing type is an int32 and whose number of steps is > 0.
The values that a discrete parameter manages are, by definition, in the range `[0, GUIDiscreteParameter::getStepCount()]. */ using GUIDiscreteParameter = ITGUIParameter<int32>;
/** This is the base class of all GUI parameters. The API defined by this class is fairly limited since the underlying type T is not known or exposed by this generic API.
|
pure virtual |
Converts this parameter into a discrete parameter.
The discrete parameter returned is a parameter with an underlying backing type int32 and values in the discrete range [0, getStepCount()] or [0, iStepCount] if getStepCount() <= 0.
| iStepCount | if this parameter already defines a step count (getStepCount() > 0), then this parameter is ignored, otherwise it is used to convert this parameter into a discrete parameter with iStepCount steps. |
Implemented in GUIJmbParameter< T >, GUIRawVstParameter, GUIValParameter< T >, GUIValParameter< int32 >, and GUIVstParameter< T >.
| std::shared_ptr< ITGUIParameter< T > > cast | ( | ) |
Downcasts this parameter into a typed version.
| T | the underlying backing type of the parameter |
|
pure virtual |
Creates a connection between this parameter and the callback: whenever the parameter changes, the callback will be invoked (std::function<void()>).
| iChangeCallback | the callback that will be invoked on parameter changes. |
Implemented in GUIJmbParameter< T >, GUIRawVstParameter, GUIValParameter< T >, and GUIVstParameter< T >.
|
pure virtual |
Creates a connection between this parameter and the change listener: whenever the parameter changes, the listener will be notified of the changes (Parameters::IChangeListener::onParameterChange(ParamID)).
| iChangeListener | the listener that will be notified on parameter changes. nullptr is allowed and will be a noop. |
Implemented in GUIJmbParameter< T >, GUIRawVstParameter, GUIValParameter< T >, GUIValParameter< int32 >, and GUIVstParameter< T >.
|
pure virtual |
Each parameter has a unique ID returned by this method.
Implemented in GUIJmbParameter< T >, GUIRawVstParameter, GUIValParameter< T >, GUIValParameter< int32 >, and GUIVstParameter< T >.
|
pure virtual |
When a parameter is a discrete parameter (which means its underlying backing type is an int32 with values in the discrete range [0, getStepCount()]), this method will return the number of steps (> 0).
Implemented in GUIDiscreteValParameter, GUIJmbParameter< T >, GUIRawVstParameter, GUIValParameter< T >, GUIValParameter< int32 >, and GUIVstParameter< T >.
|
pure virtual |
Resets the parameter to its default value.
Implemented in GUIJmbParameter< T >, GUIRawVstParameter, GUIValParameter< T >, GUIValParameter< int32 >, and GUIVstParameter< T >.
|
pure virtual |
Returns the current value of the parameter as a string (which is properly UTF-8 encoded).
| iPrecision | if iPrecision < 0 the parameter is free to use whichever precision is tied to the parameter otherwise it should use the one provided |
Implemented in GUIJmbParameter< T >, GUIRawVstParameter, GUIValParameter< T >, GUIValParameter< int32 >, and GUIVstParameter< T >.