Rose
|
Interpret interaction events to drive button operation semantics. More...
#include <PointerInteractions.h>
Public Member Functions | |
ButtonSemantics (Widget &) | |
ButtonSemantics (const ButtonSemantics &)=delete | |
ButtonSemantics (ButtonSemantics &&)=delete | |
ButtonSemantics & | operator= (const ButtonSemantics &)=delete |
ButtonSemantics & | operator= (ButtonSemantics &&)=delete |
void | setButtonType (ButtonType buttonType) |
void | setButtonDisplayCallback (ButtonDisplayCallback buttonDisplayCallback) |
Set the ButtonDisplayCallback function. More... | |
void | setButtonStateChangeCallback (ButtonStateChangeCallback buttonStateChangeCallback) |
Set the ButtonStateChangeCallback function. More... | |
void | setButtonCommandCallback (uint commandId, ButtonCommandCallback buttonCommandCallback) |
Protected Types | |
enum | InteractionState { Inactive, Active, PressedActive, PressedInactive, SetActive, SetInactive } |
Internal state. More... | |
Protected Member Functions | |
void | setButtonState (bool active) |
Called when the Active/Inactive state is resolved. | |
void | enterLeaveCallback () |
Callback when the pointer enters or leaves the Widget. | |
void | displayState () |
Called when the button display state changes. | |
Protected Attributes | |
InteractionState | mState {Inactive} |
Hold the internal interaction state. | |
ButtonType | mButtonType {ButtonType::PushButton} |
The button type. | |
Widget & | mWidget |
The Widget that implements the button. | |
uint | mButtonCommandId {0} |
The Widget command associated with the button. | |
ButtonDisplayCallback | mButtonDisplayCallback {} |
A callback to the Widget to change the display state. | |
ButtonStateChangeCallback | mButtonStateChangeCallback {} |
A callback to the Widget with the new button state. | |
ButtonCommandCallback | mButtonCommandCallback {} |
A callback to the Widget with the button state and command id. | |
Interpret interaction events to drive button operation semantics.
|
protected |
Internal state.
Enumerator | |
---|---|
Inactive | Button in Inactive state. |
Active | Button in Active state. |
PressedActive | Button was pressed in the Active state. |
PressedInactive | Button was pressed in the Inactive state. |
SetActive | Transitional state moving to Active. |
SetInactive | Transitional state moving to Inactive. |
|
inline |
Set | the ButtonCommandCallback. |
commandId | The identifier of the command to the Widget receiving the callback. |
buttonCommandCallback | The callback. |
|
inline |
Set the ButtonDisplayCallback function.
buttonDisplayCallback | The function. |
|
inline |
Set the ButtonStateChangeCallback function.
buttonStateChangeCallback | The function. |