DCC-EX Simple Throttle
Simple throttle for a DCC-EX CommandStation
Loading...
Searching...
No Matches
/home/runner/work/DCCEXSimpleThrottle/DCCEXSimpleThrottle/ScreenInterface.h
Go to the documentation of this file.
1/*
2 * © 2024 Peter Cole
3 * © 2023 Peter Cole
4 *
5 * This is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * It is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this code. If not, see <https://www.gnu.org/licenses/>.
17 */
18
19#ifndef SCREENINTERFACE_H
20#define SCREENINTERFACE_H
21
22#include "DisplayInterface.h"
25
28public:
32
38 virtual void handleUserSelectionAction(UserSelectionAction action, bool throttleInverted = false) = 0;
39
42 virtual void drawScreen(DisplayInterface *display) = 0;
43
45 virtual ~ScreenInterface() = default;
46
50
53 void setNext(ScreenInterface *screen) { _next = screen; }
54
55private:
57};
58
59#endif // SCREENINTERFACE_H
UserConfirmationAction
User confirmation action data types available.
Definition UserConfirmationInterface.h:23
UserSelectionAction
User selection action data types available.
Definition UserSelectionInterface.h:23
Interface class to abstract construction of what is displayed on screen from the physical implementat...
Definition DisplayInterface.h:29
Definition ScreenInterface.h:27
ScreenInterface * _next
Definition ScreenInterface.h:56
virtual void handleUserSelectionAction(UserSelectionAction action, bool throttleInverted=false)=0
Implement this method to define what to do when user selection actions are performed throttleInverted...
virtual void handleUserConfirmationAction(UserConfirmationAction action)=0
Implement this method to define what to do when user confirmation actions are performed.
virtual void drawScreen(DisplayInterface *display)=0
Implement this method to draw the associated screen object on the specified display.
ScreenInterface * getNext()
Get the next screen object in the linked list.
Definition ScreenInterface.h:49
void setNext(ScreenInterface *screen)
Set the next screen object in the linked list.
Definition ScreenInterface.h:53
virtual ~ScreenInterface()=default
Destructor for the object.