19#ifndef DISPLAYINTERFACE_H
20#define DISPLAYINTERFACE_H
24#include <DCCEXProtocol.h>
57 bool selectionChanged) = 0;
67 virtual void displayThrottleScreen(
const char *locoName, uint8_t speed, Direction direction, TrackPower trackPower,
68 bool speedChanged,
bool directionChange,
bool trackPowerChanged) = 0;
Interface class to abstract construction of what is displayed on screen from the physical implementat...
Definition DisplayInterface.h:29
virtual void displayErrorScreen(const char *errorText)=0
Display error screen.
void setNeedsRedraw(bool redraw)
Set the redraw flag for this display.
Definition DisplayInterface.h:76
virtual void clear()=0
Implement this to entirely clear a display.
uint8_t getMenuItemsPerPage()
Get the number of menu items to be displayed per page for this display.
Definition DisplayInterface.h:88
bool needsMenuRefresh()
Check if the menu needs refreshing - avoids a complete redraw for menu screens.
Definition DisplayInterface.h:80
void setMenuItemsPerPage(uint8_t menuItemsPerPage)
Set the number of menu items per page this display can handle.
Definition DisplayInterface.h:92
virtual void displayStartupScreen(const char *headerText, const char *version)=0
Display the startup screen.
bool needsRedraw()
Check if the display needs to be redrawn to prevent unnecessary redraws and flicker.
Definition DisplayInterface.h:72
virtual void displayThrottleScreen(const char *locoName, uint8_t speed, Direction direction, TrackPower trackPower, bool speedChanged, bool directionChange, bool trackPowerChanged)=0
Display the throttle screen.
virtual void displayProgressScreen(const char *activity, uint8_t counter)=0
Display progress screen for the specified activity.
void setNeedsMenuRefresh(bool refresh)
Set the refresh menu flag for this display.
Definition DisplayInterface.h:84
virtual void begin()=0
Implement this to perform any initial startup methods or activities.
bool _needsRedraw
Definition DisplayInterface.h:98
bool _needsMenuRefresh
Definition DisplayInterface.h:99
virtual ~DisplayInterface()=default
Destructor for the object.
uint8_t _menuItemsPerPage
Definition DisplayInterface.h:100
virtual void displayMenuScreen(const char *menuName, BaseMenuItem *firstMenuItem, uint8_t selectedItemIndex, bool selectionChanged)=0
Display a menu.