Provides a generic interface to represent a button press event by the user on the device.
More...
#include <button_presser.hpp>
|
|
void | set_midi (uint8_t midi) |
| | Stores the given MIDI value.
|
|
void | set_bool (bool boolean) |
| | Stores the given boolean value.
|
|
void | set_double_press () |
| | Flags the input as a double press event.
|
|
states | get_state () const |
| | Retieves the curent state.
|
|
bool | get_bool () |
| | Converts the currently stored value to boolean if necesary, and returns the result.
|
|
bool | get_midi () |
| | Converts the currently stored value to boolean if necesary, and returns the result.
|
|
void | clear_values () |
| | Ignore currently held values and allows for overwriting them.
|
|
| enum class | available_values : std::uint8_t { none = 0
, boolean = 1
, midi = 2
} |
|
|
states | state {single} |
|
available_values | available {available_values::none} |
|
|
bool | operator& (available_values left, available_values right) |
|
available_values | operator| (available_values left, available_values right) |
Provides a generic interface to represent a button press event by the user on the device.
◆ states
| Enumerator |
|---|
| single | Single press.
|
| doubled | Doulbe press.
|
| dragged | Dragged.
|
| dropped | Dropped.
|
The documentation for this struct was generated from the following file: