#include <DrawableDashboard.h>
Public Types | |
enum | DashboardMode : uint8_t { DASH_ON_RESET_CLICK_EXIT , DASH_ON_RESET_MANUAL_EXIT , DASH_FULLY_MANUAL , DASH_MANUAL_START_CLICK_EXIT } |
Public Member Functions | |
DrawableDashboard (DeviceDrawable *device, BaseGraphicalRenderer *renderer, TitleWidget *widgets, DashboardMode drawingMode) | |
void | setBaseColors (color_t screenBgCol, color_t coreFgCol) |
void | setDelegate (DrawableDashboardDelegate *dashDelegate) |
void | clearItems () |
void | addDrawingItem (MenuItem *theItem, Coord topLeft, DashDrawParameters *params, int numCharsInValue, const char *titleOverrideText=nullptr, int updateTicks=5) |
void | stop () |
void | reset () override |
void | started (BaseMenuRenderer *currentRenderer) override |
void | renderLoop (unsigned int currentValue, RenderPressMode userClick) override |
void | drawWidgets (bool force) |
uint8_t | getDisplayNumber () |
Drawable Dashboard is a configurable dashboard that can be used to draw a series of menu items in a more configurable dashboard style way. It is possible to further customise the class purely by extending it yourself and handling any drawing in renderLoop() before calling the super implementation in this class.
It is capable of presenting items either with or without titles in a large number of formats. Optionally you can add title widgets to it for them to be presented at the same time.
enum DrawableDashboard::DashboardMode : uint8_t |
Allows you to define how the dashboard will be displayed, and dismissed.
|
overridevirtual |
Called when the menu has become inactive, IE after the idle time out has triggered.
Implements CustomDrawing.
|
overridevirtual |
Called when the display is taken over before any calls to renderLoop. You can set up anything you need here.
currentRenderer | the renderer object that sent this event. |
Implements CustomDrawing.
|
overridevirtual |
actually do the drawing, this is essentially the runloop. Work out what's changed and draw it.
currentValue | This is the encoder position if the menu is using an encoder |
userClicked | this represents the status of the select button, see RenderPressMode for more details |
Implements CustomDrawing.