Class daisy::AbstractMenu::CustomItem¶
ClassList > daisy > AbstractMenu > CustomItem
#include <AbstractMenu.h>
Public Functions¶
Type | Name |
---|---|
virtual bool | CanBeEnteredForEditing () const |
virtual void | Draw (OneBitGraphicsDisplay & display, int currentIndex, int numItemsTotal, Rectangle boundsToDrawIn, bool isEditing) = 0 |
virtual void | ModifyValue (int16_t increments, uint16_t stepsPerRevolution, bool isFunctionButtonPressed) |
virtual void | ModifyValue (float valueSliderPosition0To1, bool isFunctionButtonPressed) |
virtual void | OnOkayButton () |
virtual | ~CustomItem () |
Detailed Description¶
Base class for a custom menu item
Public Functions Documentation¶
function CanBeEnteredForEditing¶
Returns true, if this item can be entered for direct editing of the value.
function Draw¶
virtual void daisy::AbstractMenu::CustomItem::Draw (
OneBitGraphicsDisplay & display,
int currentIndex,
int numItemsTotal,
Rectangle boundsToDrawIn,
bool isEditing
) = 0
Draws the item to a OneBitGraphicsDisplay.
Parameters:
display
The display to draw tocurrentIndex
The index in the menunumItemsTotal
The total number of items in the menuboundsToDrawIn
The Rectangle to draw the item intoisEditing
True if the enter button was pressed and the value is being edited directly.
function ModifyValue [½]¶
inline virtual void daisy::AbstractMenu::CustomItem::ModifyValue (
int16_t increments,
uint16_t stepsPerRevolution,
bool isFunctionButtonPressed
)
Called when the encoder of the buttons are used to modify the value.
function ModifyValue [2/2]¶
inline virtual void daisy::AbstractMenu::CustomItem::ModifyValue (
float valueSliderPosition0To1,
bool isFunctionButtonPressed
)
Called when the value slider is used to modify the value.
function OnOkayButton¶
Called when the okay button is pressed (and CanBeEnteredForEditing() returns false).
function ~CustomItem¶
The documentation for this class was generated from the following file external-docs/libDaisy/src/ui/AbstractMenu.h