Base class for a custom menu item
#include <AbstractMenu.h>
Public Member Functions | |
virtual | ~CustomItem () |
virtual void | Draw (OneBitGraphicsDisplay &display, int currentIndex, int numItemsTotal, Rectangle boundsToDrawIn, bool isEditing)=0 |
virtual bool | CanBeEnteredForEditing () const |
virtual void | ModifyValue (int16_t increments, uint16_t stepsPerRevolution, bool isFunctionButtonPressed) |
virtual void | ModifyValue (float valueSliderPosition0To1, bool isFunctionButtonPressed) |
virtual void | OnOkayButton () |
|
inlinevirtual |
Returns true, if this item can be entered for direct editing of the value.
|
pure virtual |
Draws the item to a OneBitGraphicsDisplay.
display | The display to draw to |
currentIndex | The index in the menu |
numItemsTotal | The total number of items in the menu |
boundsToDrawIn | The Rectangle to draw the item into |
isEditing | True if the enter button was pressed and the value is being edited directly. |
|
inlinevirtual |
Called when the value slider is used to modify the value.
|
inlinevirtual |
Called when the encoder of the buttons are used to modify the value.
Called when the okay button is pressed (and CanBeEnteredForEditing() returns false).