BuGUI
BUtton Grid User Interface
Loading...
Searching...
No Matches
bugui::button_presser Struct Reference

Provides a generic interface to represent a button press event by the user on the device. More...

#include <button_presser.hpp>

Inheritance diagram for bugui::button_presser:
bugui::presser

Public Types

enum  states : uint8_t { single , doubled , dragged , dropped }

Public Member Functions

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.

Protected Types

enum class  available_values : std::uint8_t { none = 0 , boolean = 1 , midi = 2 }

Protected Attributes

states state {single}
available_values available {available_values::none}

Friends

bool operator& (available_values left, available_values right)
available_values operator| (available_values left, available_values right)

Detailed Description

Provides a generic interface to represent a button press event by the user on the device.

Member Enumeration Documentation

◆ states

Enumerator
single 

Single press.

doubled 

Doulbe press.

dragged 

Dragged.

dropped 

Dropped.


The documentation for this struct was generated from the following file: