Cinder  0.9.1
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
cinder::params::InterfaceGl::Options< T > Class Template Reference

#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)
 
Optionsmin (float minVal)
 
Optionsmax (float maxVal)
 
Optionsstep (float stepVal)
 
Optionsprecision (int precVal)
 
OptionskeyIncr (const std::string &keyIncr)
 
OptionskeyDecr (const std::string &keyDecr)
 
Optionskey (const std::string &key)
 
Optionsgroup (const std::string &group)
 
OptionsoptionsStr (const std::string &optionsStr)
 
Optionsaccessors (const SetterFn &setterFn, const GetterFn &getterFn)
 
OptionsupdateFn (const UpdateFn &updateFn)
 
Optionsvisible (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
 
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.

template<typename T >
Options& cinder::params::InterfaceGl::Options< T >::visible ( bool  visible = true)

Shows or hides this param.

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::setVisible ( bool  visible = true)
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: