NvTweakEnumUI< T > Class Template Reference
A templated subclass of NvTweakVarUI specifically for handling one entry of an NvTweakEnum list/array passed into the tweakbar -- i.e., one button in a radio button group, or one menu item in a popup menu. More...
#include <NvTweakBar.h>
Public Member Functions | |
NvTweakEnumUI (NvTweakEnumVar< T > &tevar, uint32_t index, NvUIElement *el, uint32_t actionCode=0) | |
Normal constructor. | |
virtual NvUIEventResponse | HandleEvent (const NvGestureEvent &ev, NvUST timeUST, NvUIElement *hasInteract) |
We override HandleEvent so that if there is a reaction by the proxied UI widget, we can replace the value inside the NvUIReaction with our cached value, and allow the rest of the reaction process to occur as normal. | |
virtual NvUIEventResponse | HandleReaction (const NvUIReaction &react) |
We override HandleReaction so that when there is an NvUIReaction passing through the system containing a real value, we can set our state to be 0 or 1 (active or pressed) based on whether our cached value matches the value of the NvTweakVar we're bound to. | |
virtual NvUIEventResponse | HandleFocusEvent (NvFocusEvent::Enum evt) |
We override HandleFocusEvent so that if there is a reaction by the proxied UI widget, we can replace the value inside the NvUIReaction with our cached value, and allow the rest of the reaction process to occur as normal. | |
Protected Attributes | |
NvTweakEnumVar< T > & | m_tevar |
uint32_t | m_teindex |
T | m_enumval |
Detailed Description
template<class T>
class NvTweakEnumUI< T >
A templated subclass of NvTweakVarUI specifically for handling one entry of an NvTweakEnum list/array passed into the tweakbar -- i.e., one button in a radio button group, or one menu item in a popup menu.
Each NvTweakVarUI element is responsible for setting its stored enum value on the linked NvTweakVar when the UI element is selected.
Constructor & Destructor Documentation
NvTweakEnumUI< T >::NvTweakEnumUI | ( | NvTweakEnumVar< T > & | tevar, | |
uint32_t | index, | |||
NvUIElement * | el, | |||
uint32_t | actionCode = 0 | |||
) | [inline] |
Normal constructor.
Takes the referenced NvTweakEnumVar, the enumerant index we represent, the individual UI element that acts as our proxy for user interaction in a radio group or popup menu, and an optional override of the action code for the variable and UI.
Member Function Documentation
virtual NvUIEventResponse NvTweakEnumUI< T >::HandleReaction | ( | const NvUIReaction & | react | ) | [virtual] |
We override HandleReaction so that when there is an NvUIReaction passing through the system containing a real value, we can set our state to be 0 or 1 (active or pressed) based on whether our cached value matches the value of the NvTweakVar we're bound to.
This is so radio buttons and menu items update their visual state to match outside changes to the NvTweakVar's value (such as from key input).
Reimplemented from NvTweakVarUI< T >.
The documentation for this class was generated from the following file: