|
Jamba C++ API
5.1.1
|
Simple extension class to treat a Val parameter as a discrete one. More...
#include <GUIValParameter.h>
Inherits GUIValParameter< int32 >.
Public Member Functions | |
| int32 | getStepCount () const override |
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). More... | |
| GUIDiscreteValParameter (ParamID iParamID, int32 iDefaultValue, int32 iStepCount) | |
Public Member Functions inherited from GUIValParameter< int32 > | |
| tresult | accessValue (typename ITGUIParameter< int32 >::ValueAccessor const &iGetter) const override |
| std::shared_ptr< GUIDiscreteParameter > | asDiscreteParameter (int32 iStepCount) override |
| Converts this parameter into a discrete parameter. More... | |
| std::unique_ptr< FObjectCx > | connect (Parameters::IChangeListener *iChangeListener) const override |
| std::unique_ptr< FObjectCx > | connect (Parameters::ChangeCallback iChangeCallback) const override |
| std::unique_ptr< EditorType > | edit () override |
| ParamID | getParamID () const override |
| Each parameter has a unique ID returned by this method. More... | |
| int32 | getStepCount () const override |
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). More... | |
| ParamType const & | getValue () const |
| ParamType & | getValue () |
| GUIValParameter (ParamID iParamID, ParamType const &iDefaultValue) | |
| tresult | resetToDefault () override |
| Resets the param to its default value. More... | |
| void | setParamID (ParamID iParamID) |
| tresult | setValue (ParamType const &iValue) override |
| Sets the value. More... | |
| std::string | toUTF8String (int32 iPrecision) const override |
| Returns the current value of the parameter as a string (which is properly UTF-8 encoded). More... | |
| bool | update (ParamType const &iValue) override |
| Update the parameter with a value. More... | |
| bool | updateIf (ValueModifier const &iValueModifier) |
| Use this flavor of update if you want to modify the value itself. More... | |
| ~GUIValParameter () override | |
Public Member Functions inherited from ITGUIParameter< int32 > | |
| virtual tresult | accessValue (ValueAccessor const &iGetter) const=0 |
| API to access the underlying value. More... | |
| virtual std::unique_ptr< ITEditor > | edit (ParamType const &iValue) |
Shortcut api which creates an editor followed by ITEditor::setValue(ParamType const &) to set the parameter value to iValue. More... | |
Public Member Functions inherited from IGUIParameter | |
| template<typename T > | |
| std::shared_ptr< ITGUIParameter< T > > | cast () |
| Downcasts this parameter into a typed version. More... | |
Protected Attributes | |
| int32 | fStepCount |
Protected Attributes inherited from GUIValParameter< int32 > | |
| int32 | fDefaultValue |
| ParamID | fParamID |
| int32 | fValue |
Additional Inherited Members | |
Public Types inherited from GUIValParameter< int32 > | |
| using | EditorType = typename ITGUIParameter< int32 >::ITEditor |
| using | ParamType = int32 |
Public Types inherited from ITGUIParameter< int32 > | |
| using | ParamType = int32 |
| The type of the param (alias) More... | |
| using | ValueAccessor = std::function< void(int32 const &)> |
| API to access the value of the param. More... | |
Simple extension class to treat a Val parameter as a discrete one.
GUIValParameter is internal and not shared across views. As a result this implementation does not wrap another GUIValParameter (like GUIJmbParameter implementation does) which suffices for the current need. If GUIValParameter gets promoted to api level at a later date, then this implementation will need to be changed.
|
inline |
|
inlineoverridevirtual |
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).
asDiscreteParameter(int32) may be able to convert/adapt it to one.> 0 if and only if this parameter is a discrete parameter. Implements IGUIParameter.
|
protected |