Cinder  0.8.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
cinder::params::InterfaceGl::Options< T > Class Template Reference

Provides chainable options, returned from addParam(). More...

#include <Params.h>

Inheritance diagram for cinder::params::InterfaceGl::Options< T >:
[legend]

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)
 
Optionsmin (float minVal)
 Sets the maximum value for the associated target param. More...
 
Optionsmax (float maxVal)
 Sets the minimum value for the associated target param. More...
 
Optionsstep (float stepVal)
 Sets step increment for the associated target param. More...
 
Optionsprecision (int precVal)
 Sets the number of significant digits for floating point variables (float or double type only). More...
 
OptionskeyIncr (const std::string &keyIncr)
 Sets an increment shortcut key. More...
 
OptionskeyDecr (const std::string &keyDecr)
 Sets a decrement shortcut key. More...
 
Optionskey (const std::string &key)
 Sets a shortcut key for param types that cannot be incremented / decremented (ex. bool) More...
 
Optionsgroup (const std::string &group)
 Sets the param group. More...
 
OptionsoptionsStr (const std::string &optionsStr)
 Sets other implementation defined options via string. More...
 
Optionsaccessors (const SetterFn &setterFn, const GetterFn &getterFn)
 ! Sets setterFn and getterFn as callbacks for this param. the target is ignored in this case. More...
 
OptionsupdateFn (const UpdateFn &updateFn)
 ! Sets an update function that will be called after the target param is updated. More...
 
const std::stringgetName () const
 
voidgetVoidPtr () const
 
const std::stringgetKeyIncr () const
 
const std::stringgetKeyDecr () const
 

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
 
voidmVoidPtr
 
float mMin
 
float mMax
 
float mStep
 
int mPrecision
 
bool mMinSet
 
bool mMaxSet
 
bool mStepSet
 
bool mPrecisionSet
 
InterfaceGlmParent
 

Friends

class InterfaceGl
 

Detailed Description

template<typename T>
class cinder::params::InterfaceGl::Options< T >

Provides chainable options, returned from addParam().

Member Typedef Documentation

template<typename T>
typedef std::function<void ( T )> cinder::params::InterfaceGl::Options< T >::SetterFn
template<typename T>
typedef std::function<T ()> cinder::params::InterfaceGl::Options< T >::GetterFn
template<typename T>
typedef std::function<void ()> cinder::params::InterfaceGl::Options< T >::UpdateFn

Constructor & Destructor Documentation

template<typename T >
cinder::params::InterfaceGl::Options< T >::Options ( const std::string name,
T *  target,
int  type,
InterfaceGl parent 
)

Member Function Documentation

template<typename T>
Options& cinder::params::InterfaceGl::Options< T >::min ( float  minVal)

Sets the maximum value for the associated target param.

template<typename T>
Options& cinder::params::InterfaceGl::Options< T >::max ( float  maxVal)

Sets the minimum value for the associated target param.

template<typename T>
Options& cinder::params::InterfaceGl::Options< T >::step ( float  stepVal)

Sets step increment for the associated target param.

template<typename T>
Options& cinder::params::InterfaceGl::Options< T >::precision ( int  precVal)

Sets the number of significant digits for floating point variables (float or double type only).

template<typename T>
Options& cinder::params::InterfaceGl::Options< T >::keyIncr ( const std::string keyIncr)

Sets an increment shortcut key.

template<typename T>
Options& cinder::params::InterfaceGl::Options< T >::keyDecr ( const std::string keyDecr)

Sets a decrement shortcut key.

template<typename T>
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)

template<typename T>
Options& cinder::params::InterfaceGl::Options< T >::group ( const std::string group)

Sets the param group.

template<typename T>
Options& cinder::params::InterfaceGl::Options< T >::optionsStr ( const std::string optionsStr)

Sets other implementation defined options via string.

template<typename T >
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.

template<typename T >
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.

const std::string& cinder::params::InterfaceGl::OptionsBase::getName ( ) const
inherited
void* cinder::params::InterfaceGl::OptionsBase::getVoidPtr ( ) const
inherited
const std::string& cinder::params::InterfaceGl::OptionsBase::getKeyIncr ( ) const
inherited
const std::string& cinder::params::InterfaceGl::OptionsBase::getKeyDecr ( ) const
inherited
void cinder::params::InterfaceGl::OptionsBase::setMin ( float  minVal)
protectedinherited
void cinder::params::InterfaceGl::OptionsBase::setMax ( float  maxVal)
protectedinherited
void cinder::params::InterfaceGl::OptionsBase::setStep ( float  maxVal)
protectedinherited
void cinder::params::InterfaceGl::OptionsBase::setPrecision ( int  precVal)
protectedinherited
void cinder::params::InterfaceGl::OptionsBase::setKeyIncr ( const std::string keyIncr)
protectedinherited
void cinder::params::InterfaceGl::OptionsBase::setKeyDecr ( const std::string keyDecr)
protectedinherited
void cinder::params::InterfaceGl::OptionsBase::setKey ( const std::string key)
protectedinherited
void cinder::params::InterfaceGl::OptionsBase::setGroup ( const std::string group)
protectedinherited
void cinder::params::InterfaceGl::OptionsBase::setOptionsStr ( const std::string optionsStr)
protectedinherited
void cinder::params::InterfaceGl::OptionsBase::reAddOptions ( )
protectedinherited

Friends And Related Function Documentation

template<typename T>
friend class InterfaceGl
friend

Member Data Documentation

std::string cinder::params::InterfaceGl::OptionsBase::mName
protectedinherited
std::string cinder::params::InterfaceGl::OptionsBase::mKeyIncr
protectedinherited
std::string cinder::params::InterfaceGl::OptionsBase::mKeyDecr
protectedinherited
std::string cinder::params::InterfaceGl::OptionsBase::mKey
protectedinherited
std::string cinder::params::InterfaceGl::OptionsBase::mGroup
protectedinherited
std::string cinder::params::InterfaceGl::OptionsBase::mOptionsStr
protectedinherited
void* cinder::params::InterfaceGl::OptionsBase::mVoidPtr
protectedinherited
float cinder::params::InterfaceGl::OptionsBase::mMin
protectedinherited
float cinder::params::InterfaceGl::OptionsBase::mMax
protectedinherited
float cinder::params::InterfaceGl::OptionsBase::mStep
protectedinherited
int cinder::params::InterfaceGl::OptionsBase::mPrecision
protectedinherited
bool cinder::params::InterfaceGl::OptionsBase::mMinSet
protectedinherited
bool cinder::params::InterfaceGl::OptionsBase::mMaxSet
protectedinherited
bool cinder::params::InterfaceGl::OptionsBase::mStepSet
protectedinherited
bool cinder::params::InterfaceGl::OptionsBase::mPrecisionSet
protectedinherited
InterfaceGl* cinder::params::InterfaceGl::OptionsBase::mParent
protectedinherited

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