8template <setting_t N,
class Callback = EmptySelectorCallback>
28 case IncrDecrButtons::Nothing:
break;
29 case IncrDecrButtons::IncrementShort:
30 case IncrDecrButtons::IncrementLong:
31 case IncrDecrButtons::IncrementHold: this->
increment(
wrap);
break;
32 case IncrDecrButtons::DecrementShort:
33 case IncrDecrButtons::DecrementLong:
34 case IncrDecrButtons::DecrementHold: this->
decrement(
wrap);
break;
35 case IncrDecrButtons::Reset: this->
reset();
break;
Wrap
An enumeration to set the behavior of selectors that are incremented (decremented) beyond their maxim...
@ Wrap
When the maximum (minimum) setting is reached, wrap around to the minimum (maximum) setting.
#define BEGIN_CS_NAMESPACE
AH::IncrementDecrementButtons::State getButtonsState() const
void update() override
Update this updatable.
void begin() override
Initialize this updatable.
AH::IncrementDecrementButtons buttons
GenericIncrementDecrementSelector(Selectable< N > &selectable, const Callback &callback, const AH::IncrementDecrementButtons &buttons, Wrap wrap=Wrap::Wrap)
void increment(Wrap wrap)
Add one to the setting, wrap around or clamp, depending on the parameter, if the new setting would be...
void decrement(Wrap wrap)
Subtract one from the setting, wrap around or clamp, depending on the parameter, if the new setting w...
void update() override
Update this updatable.
Selectable< N > & selectable
void begin() override
Initialize this updatable.
void reset()
Reset the selection to the initial selection.
Selector with two buttons (one to increment, one to decrement).
IncrementDecrementSelector(Selectable< N > &selectable, const AH::IncrementDecrementButtons &buttons, Wrap wrap=Wrap::Wrap)