Jamba C++ API 7.5.0
Loading...
Searching...
No Matches
GUIDiscreteValParameter Class Reference

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).
 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.
std::unique_ptr< FObjectCxconnect (Parameters::IChangeListener *iChangeListener) const override
std::unique_ptr< EditorTypeedit () override
ParamID getParamID () const override
 Each parameter has a unique ID returned by this method.
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).
ParamType const & getValue () const
 GUIValParameter (ParamID iParamID, ParamType const &iDefaultValue)
tresult resetToDefault () override
 Resets the param to its default value.
void setParamID (ParamID iParamID)
tresult setValue (ParamType const &iValue) override
 Sets the value.
std::string toUTF8String (int32 iPrecision) const override
 Returns the current value of the parameter as a string (which is properly UTF-8 encoded).
bool update (ParamType const &iValue) override
 Update the parameter with a value.
bool updateIf (ValueModifier const &iValueModifier)
 Use this flavor of update if you want to modify the value itself.
 ~GUIValParameter () override
Public Member Functions inherited from ITGUIParameter< int32 >
virtual tresult accessValue (ValueAccessor const &iGetter) const=0
 API to access the underlying value.
Public Member Functions inherited from IGUIParameter
template<typename T>
std::shared_ptr< ITGUIParameter< T > > cast ()
 Downcasts this parameter into a typed version.
virtual std::unique_ptr< FObjectCxconnect (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()>).

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
using ParamType
Public Types inherited from ITGUIParameter< int32 >
using ParamType
 The type of the param (alias).
using ValueAccessor
 API to access the value of the param.

Detailed Description

Simple extension class to treat a Val parameter as a discrete one.

Note
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.
Private API
This is part of the internal/private API of Jamba and should not be used directly.

Constructor & Destructor Documentation

◆ GUIDiscreteValParameter()

GUIDiscreteValParameter ( ParamID iParamID,
int32 iDefaultValue,
int32 iStepCount )
inline

Member Function Documentation

◆ getStepCount()

int32 getStepCount ( ) const
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).

Note
Although a parameter may not be a discrete parameter itself, the method asDiscreteParameter(int32) may be able to convert/adapt it to one.
Returns
the number of steps which is > 0 if and only if this parameter is a discrete parameter.

Implements IGUIParameter.

Member Data Documentation

◆ fStepCount

int32 fStepCount
protected

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