MIDI Control Surface library for Arduino
|
Go to the documentation of this file.
8 template <setting_t N,
class Callback = EmptySelectorCallback>
28 case IncrDecrButtons::Increment: this->
increment(
wrap);
break;
29 case IncrDecrButtons::Decrement: this->
decrement(
wrap);
break;
30 case IncrDecrButtons::Reset: this->
reset();
break;
31 case IncrDecrButtons::Nothing:
break;
36 #ifdef AH_INDIVIDUAL_BUTTON_INVERT
65 template <setting_t N>
void begin() override
Initialize this updatable.
IncrementDecrementSelector(Selectable< N > &selectable, const AH::IncrementDecrementButtons &buttons, Wrap wrap=Wrap::Wrap)
void update() override
Update this updatable.
#define BEGIN_CS_NAMESPACE
void increment(Wrap wrap)
Add one to the setting, wrap around or clamp, depending on the parameter, if the new setting would be...
Selector with two buttons (one to increment, one to decrement).
GenericIncrementDecrementSelector(Selectable< N > &selectable, const Callback &callback, const AH::IncrementDecrementButtons &buttons, Wrap wrap=Wrap::Wrap)
Wrap
An enumeration to set the behavior of selectors that are incremented (decremented) beyond their maxim...
void update() override
Update this updatable.
void reset()
Reset the selection to the initial selection.
void begin() override
Initialize this updatable.
When the maximum (minimum) setting is reached, wrap around to the minimum (maximum) setting.
void decrement(Wrap wrap)
Subtract one from the setting, wrap around or clamp, depending on the parameter, if the new setting w...
Selectable< N > & selectable
AH::IncrementDecrementButtons buttons
AH::IncrementDecrementButtons::State getButtonsState() const