DsSelectionBase is a base class that contains a selection value.
More...
#include <ds_selection_base.h>
|
virtual void | getSelectionCount (void) |
|
void | notifySelectionChange (bool in_motion) |
|
virtual int32_t | onSelectionChange (int32_t selection)=0 |
|
|
int32_t | mSelectionCount |
|
int32_t | mSelection |
|
DsSelectionBase is a base class that contains a selection value.
◆ getSelection()
int32_t DsSelectionBase::getSelection |
( |
void |
| ) |
const |
Returns the selection value.
- Returns
- Selection. -1 if no selection was made.
◆ setOnChangeCallback()
void DsSelectionBase::setOnChangeCallback |
( |
const lambda< void(int32_t selection, bool in_motion, bool user_input)> & |
cb | ) |
|
Sets the lambda that will receive selection change events.
- Parameters
-
action | Lambda of type void(int32_t state, bool user_input) that will be called whenever the selection changes.
selection is the new selection.
in_motion is true if the control is still in motion and false when the motion stopped and the user lifted the finger off the control.
user_input is true if the change happened as a result of the user touching the control or false if the state was changed programatically by calling the setSelection() method.
|
◆ setSelection()
void DsSelectionBase::setSelection |
( |
int32_t |
selection | ) |
|
Sets the selection value.
- Parameters
-
state | New selection value. It will be saturated to the number of allowed selections. -1 means no selection is active. |
The documentation for this class was generated from the following file: