![]() |
Cinder
0.9.1
|
#include <Params.h>
Inherits cinder::params::InterfaceGl::OptionsBase.
Public Types | |
typedef std::function< void(T)> | SetterFn |
typedef std::function< T()> | GetterFn |
typedef std::function< void()> | UpdateFn |
Public Member Functions | |
Options (const std::string &name, T *target, int type, InterfaceGl *parent) | |
Options & | min (float minVal) |
Options & | max (float maxVal) |
Options & | step (float stepVal) |
Options & | precision (int precVal) |
Options & | keyIncr (const std::string &keyIncr) |
Options & | keyDecr (const std::string &keyDecr) |
Options & | key (const std::string &key) |
Options & | group (const std::string &group) |
Options & | optionsStr (const std::string &optionsStr) |
Options & | accessors (const SetterFn &setterFn, const GetterFn &getterFn) |
Options & | updateFn (const UpdateFn &updateFn) |
Options & | visible (bool visible=true) |
const std::string & | getName () const |
void * | getVoidPtr () const |
const std::string & | getKeyIncr () const |
const std::string & | getKeyDecr () const |
void | setVisible (bool visible=true) |
Protected Member Functions | |
void | setMin (float minVal) |
void | setMax (float maxVal) |
void | setStep (float maxVal) |
void | setPrecision (int precVal) |
void | setKeyIncr (const std::string &keyIncr) |
void | setKeyDecr (const std::string &keyDecr) |
void | setKey (const std::string &key) |
void | setGroup (const std::string &group) |
void | setOptionsStr (const std::string &optionsStr) |
void | reAddOptions () |
Protected Attributes | |
std::string | mName |
std::string | mKeyIncr |
std::string | mKeyDecr |
std::string | mKey |
std::string | mGroup |
std::string | mOptionsStr |
void * | mVoidPtr |
float | mMin |
float | mMax |
float | mStep |
int | mPrecision |
bool | mMinSet |
bool | mMaxSet |
bool | mStepSet |
bool | mPrecisionSet |
InterfaceGl * | mParent |
Friends | |
class | InterfaceGl |
Provides chainable options, returned from addParam().
typedef std::function<void ( T )> cinder::params::InterfaceGl::Options< T >::SetterFn |
typedef std::function<T ()> cinder::params::InterfaceGl::Options< T >::GetterFn |
typedef std::function<void ()> cinder::params::InterfaceGl::Options< T >::UpdateFn |
cinder::params::InterfaceGl::Options< T >::Options | ( | const std::string & | name, |
T * | target, | ||
int | type, | ||
InterfaceGl * | parent | ||
) |
Options& cinder::params::InterfaceGl::Options< T >::min | ( | float | minVal | ) |
Sets the maximum value for the associated target param.
Options& cinder::params::InterfaceGl::Options< T >::max | ( | float | maxVal | ) |
Sets the minimum value for the associated target param.
Options& cinder::params::InterfaceGl::Options< T >::step | ( | float | stepVal | ) |
Sets step increment for the associated target param.
Options& cinder::params::InterfaceGl::Options< T >::precision | ( | int | precVal | ) |
Sets the number of significant digits for floating point variables (float or double type only).
Options& cinder::params::InterfaceGl::Options< T >::keyIncr | ( | const std::string & | keyIncr | ) |
Sets an increment shortcut key.
Options& cinder::params::InterfaceGl::Options< T >::keyDecr | ( | const std::string & | keyDecr | ) |
Sets a decrement shortcut key.
Options& cinder::params::InterfaceGl::Options< T >::key | ( | const std::string & | key | ) |
Sets a shortcut key for param types that cannot be incremented / decremented (ex. bool)
Options& cinder::params::InterfaceGl::Options< T >::group | ( | const std::string & | group | ) |
Sets the param group.
Options& cinder::params::InterfaceGl::Options< T >::optionsStr | ( | const std::string & | optionsStr | ) |
Sets other implementation defined options via string.
InterfaceGl::Options< T > & cinder::params::InterfaceGl::Options< T >::accessors | ( | const SetterFn & | setterFn, |
const GetterFn & | getterFn | ||
) |
! Sets setterFn and getterFn as callbacks for this param. the target is ignored in this case.
InterfaceGl::Options< T > & cinder::params::InterfaceGl::Options< T >::updateFn | ( | const UpdateFn & | updateFn | ) |
! Sets an update function that will be called after the target param is updated.
Options& cinder::params::InterfaceGl::Options< T >::visible | ( | bool | visible = true | ) |
Shows or hides this param.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
friend |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |