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 INDIVIDUAL_BUTTON_INVERT
37 void invert() {
buttons.invert(); }
65 template <setting_t N>
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
IncrementDecrementSelector(Selectable< N > &selectable, const AH::IncrementDecrementButtons &buttons, Wrap wrap=Wrap::Wrap)
AH::IncrementDecrementButtons buttons
#define BEGIN_CS_NAMESPACE
GenericIncrementDecrementSelector(Selectable< N > &selectable, const Callback &callback, const AH::IncrementDecrementButtons &buttons, Wrap wrap=Wrap::Wrap)
AH::IncrementDecrementButtons::State getButtonsState() const
Selector with two buttons (one to increment, one to decrement).
Wrap
An enumeration to set the behavior of selectors that are incremented (decremented) beyond their maxim...
void update() override
Update this updatable.
void update() override
Update this updatable.
void increment(Wrap wrap)
Add one to the setting, wrap around or clamp, depending on the parameter, if the new setting would be...
When the maximum (minimum) setting is reached, wrap around to the minimum (maximum) setting.
void begin() override
Initialize this updatable.
void begin() override
Initialize this updatable.
void reset()
Reset the selection to the initial selection.