| 
   
    MIDI Control Surface library for Arduino 
   | 
 
 
 
 
Go to the documentation of this file.
   31         (void)oldSetting, (
void)newSetting;
 
   56 template <setting_t N, 
class Callback = EmptySelectorCallback>
 
   84         callback.update(initialSelection, initialSelection);
 
   85         this->
setting = initialSelection;
 
   95         newSetting = 
selectable.validateSetting(newSetting);
 
   97         if (
get() != newSetting) {
 
  154 template <setting_t N>
 
  
setting_t setting
The selection of the selector.
 
A Selector with an empty callback.
 
Selector(Selectable< N > &selectable)
Constructor.
 
void begin() override
Initialize this updatable.
 
A super class for object that have to be updated regularly.
 
void update(setting_t oldSetting, setting_t newSetting)
Called when the setting changes.
 
SelectorBase()=default
Constructor.
 
setting_t get() const
Get the current selection/setting.
 
Base class for all Selectors exposing the get method, so it can be used by display elements etc,...
 
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...
 
A callback for the GenericSelector class that does nothing.
 
GenericSelector(Selectable< N > &selectable, const Callback &callback)
Constructor.
 
Wrap
An enumeration to set the behavior of selectors that are incremented (decremented) beyond their maxim...
 
void reset()
Reset the selection to the initial selection.
 
void set(setting_t newSetting)
Select the given selection.
 
void update()
Refresh, called periodically.
 
uint8_t setting_t
The type used for Selectors.
 
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
 
@ Clamp
When the maximum (minimum) setting is reached, clamp to the maximum (minimum) setting.