| Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
ValueEditControl< T > Class Template Referenceallows real-time modification of a value through a pointer More...
Inheritance diagram for ValueEditControl< T >:
![]() Detailed Descriptiontemplate<class T>
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Public Member Functions | |
| ValueEditControl (const std::string &n, T *t) | |
| constructor | |
| ValueEditControl (const std::string &n, const std::string &p, T *t) | |
| constructor | |
| ValueEditControl (const std::string &n, const std::string &d, const std::string &p, T *t) | |
| constructor | |
| ValueEditControl (const ValueEditControl< T > &vec) | |
| copy constructor | |
| ValueEditControl | operator= (const ValueEditControl< T > &vec) |
| assignment operator | |
| virtual | ~ValueEditControl () |
| destructor | |
| virtual ControlBase * | activate (MC_ID display, Socket *gui) |
| reads in current value from target | |
| virtual void | processEvent (const EventBase &event) |
| will increment/decrement the current and then assign it to the target when head buttons pressed | |
| virtual void | refresh () |
| displays current value | |
| virtual void | pause () |
| request to continue receiving events so we can modify the value while running | |
| virtual ControlBase * | doSelect () |
| if the value of the target!=cur, assigns the current value to the target and all the copies | |
| virtual ControlBase * | doNextItem () |
| adds one to the current value | |
| virtual ControlBase * | doPrevItem () |
| subtracts one from the current value | |
| virtual ControlBase * | takeInput (const std::string &str) |
| called when the user has supplied a text string (may or may not have been prompted by doReadStdIn()! May not even be active yet - the user can direct the same input to a set of hilighted menus) | |
| virtual std::string | getName () const |
| shows current value | |
Target | |
| virtual T * | getTarget () const |
| returns the target pointer | |
| virtual ValueEditControl & | setTarget (T *t) |
sets the target pointer - the object pointed to will be overwritten on activate(); returns *this | |
Copies | |
| virtual std::vector< T * > & | getCopies () |
| returns a reference to the vector copies | |
| virtual ValueEditControl & | addCopy (T *t) |
| copies.push_back(t) | |
Protected Attributes | |
| T * | target |
| the main target | |
| T | cur |
| the value to use when set | |
| std::vector< T * > | copies |
| additional targets | |
| ValueEditControl< T >::ValueEditControl | ( | const std::string & | n, | |
| T * | t | |||
| ) |
constructor
Definition at line 23 of file ValueEditControl.h.
| ValueEditControl< T >::ValueEditControl | ( | const std::string & | n, | |
| const std::string & | p, | |||
| T * | t | |||
| ) |
constructor
Definition at line 25 of file ValueEditControl.h.
| ValueEditControl< T >::ValueEditControl | ( | const std::string & | n, | |
| const std::string & | d, | |||
| const std::string & | p, | |||
| T * | t | |||
| ) |
constructor
Definition at line 27 of file ValueEditControl.h.
| ValueEditControl< T >::ValueEditControl | ( | const ValueEditControl< T > & | vec | ) |
copy constructor
Definition at line 29 of file ValueEditControl.h.
| virtual ValueEditControl< T >::~ValueEditControl | ( | ) | [virtual] |
destructor
Definition at line 33 of file ValueEditControl.h.
| virtual ControlBase* ValueEditControl< T >::activate | ( | MC_ID | display, | |
| Socket * | gui | |||
| ) | [virtual] |
reads in current value from target
Reimplemented from ControlBase.
Definition at line 36 of file ValueEditControl.h.
| virtual ValueEditControl& ValueEditControl< T >::addCopy | ( | T * | t | ) | [virtual] |
copies.push_back(t)
Definition at line 120 of file ValueEditControl.h.
| virtual ControlBase* ValueEditControl< T >::doNextItem | ( | ) | [virtual] |
adds one to the current value
Reimplemented from ControlBase.
Definition at line 93 of file ValueEditControl.h.
Referenced by ValueEditControl< T >::processEvent().
| virtual ControlBase* ValueEditControl< T >::doPrevItem | ( | ) | [virtual] |
subtracts one from the current value
Reimplemented from ControlBase.
Definition at line 99 of file ValueEditControl.h.
Referenced by ValueEditControl< T >::processEvent().
| virtual ControlBase* ValueEditControl< T >::doSelect | ( | ) | [virtual] |
if the value of the target!=cur, assigns the current value to the target and all the copies
Reimplemented from ControlBase.
Reimplemented in MCValueEditControl< T >.
Definition at line 77 of file ValueEditControl.h.
Referenced by ValueEditControl< T >::processEvent(), and ValueEditControl< T >::takeInput().
| virtual std::vector<T*>& ValueEditControl< T >::getCopies | ( | ) | [virtual] |
returns a reference to the vector copies
Definition at line 119 of file ValueEditControl.h.
| virtual std::string ValueEditControl< T >::getName | ( | ) | const [virtual] |
shows current value
Reimplemented from ControlBase.
Definition at line 124 of file ValueEditControl.h.
Referenced by ValueEditControl< T >::doSelect(), and ValueEditControl< T >::refresh().
| virtual T* ValueEditControl< T >::getTarget | ( | ) | const [virtual] |
returns the target pointer
Definition at line 113 of file ValueEditControl.h.
| ValueEditControl ValueEditControl< T >::operator= | ( | const ValueEditControl< T > & | vec | ) |
assignment operator
Definition at line 31 of file ValueEditControl.h.
| virtual void ValueEditControl< T >::pause | ( | ) | [virtual] |
request to continue receiving events so we can modify the value while running
Reimplemented from ControlBase.
Definition at line 69 of file ValueEditControl.h.
| virtual void ValueEditControl< T >::processEvent | ( | const EventBase & | event | ) | [virtual] |
will increment/decrement the current and then assign it to the target when head buttons pressed
Implements EventListener.
Definition at line 42 of file ValueEditControl.h.
| virtual void ValueEditControl< T >::refresh | ( | ) | [virtual] |
displays current value
Reimplemented from StringInputControl.
Definition at line 55 of file ValueEditControl.h.
Referenced by ValueEditControl< T >::doNextItem(), and ValueEditControl< T >::doPrevItem().
| virtual ValueEditControl& ValueEditControl< T >::setTarget | ( | T * | t | ) | [virtual] |
sets the target pointer - the object pointed to will be overwritten on activate(); returns *this
Definition at line 114 of file ValueEditControl.h.
| virtual ControlBase* ValueEditControl< T >::takeInput | ( | const std::string & | msg | ) | [virtual] |
called when the user has supplied a text string (may or may not have been prompted by doReadStdIn()! May not even be active yet - the user can direct the same input to a set of hilighted menus)
The value which is returned is then activate()ed and pushed on the Controller's stack
Reimplemented from StringInputControl.
Definition at line 105 of file ValueEditControl.h.
std::vector<T*> ValueEditControl< T >::copies [protected] |
additional targets
Definition at line 133 of file ValueEditControl.h.
Referenced by ValueEditControl< T >::addCopy(), ValueEditControl< T >::doSelect(), ValueEditControl< T >::getCopies(), and ValueEditControl< T >::operator=().
T ValueEditControl< T >::cur [protected] |
the value to use when set
Definition at line 132 of file ValueEditControl.h.
Referenced by ValueEditControl< T >::activate(), ValueEditControl< T >::doNextItem(), ValueEditControl< T >::doPrevItem(), ValueEditControl< T >::doSelect(), ValueEditControl< T >::operator=(), ValueEditControl< T >::refresh(), and ValueEditControl< T >::takeInput().
T* ValueEditControl< T >::target [protected] |
the main target
Definition at line 131 of file ValueEditControl.h.
Referenced by ValueEditControl< T >::activate(), ValueEditControl< T >::doSelect(), ValueEditControl< T >::getName(), ValueEditControl< T >::getTarget(), ValueEditControl< T >::operator=(), ValueEditControl< T >::refresh(), and ValueEditControl< T >::setTarget().
|
Tekkotsu v5.1CVS |
Generated Mon May 9 04:59:18 2016 by Doxygen 1.6.3 |