EX-Display
EX-Display
Loading...
Searching...
No Matches
/home/runner/work/EX-Display/EX-Display/ScreenManager.h
Go to the documentation of this file.
1/*
2 * © 2024 Peter Cole
3 *
4 * This is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * It is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this code. If not, see <https://www.gnu.org/licenses/>.
16 */
17
18#ifndef SCREENMANAGER_H
19#define SCREENMANAGER_H
20
21#include "Screen.h"
22
25public:
28
32 Screen *updateScreen(uint8_t screenId);
33
37
41 Screen *getScreenById(uint8_t screenId);
42
47
51 Screen *getNextScreen(Screen *screen);
52
55 uint8_t getMinScreenId();
56
59 uint8_t getMaxScreenId();
60
63 void setLogger(Logger *logger);
64
67
68private:
71};
72
73#endif // SCREENMANAGER_H
Class to enable simple logging to a Stream object with different log levels This enables embedding pe...
Definition Logger.h:35
Class to manage all EX-Display screens.
Definition ScreenManager.h:24
Screen * getScreenById(uint8_t screenId)
Get the Screen with the specified ID.
Definition ScreenManager.cpp:48
Screen * getFirstScreen()
Get the first Screen instance in the list.
Definition ScreenManager.cpp:46
Screen * _firstScreen
Definition ScreenManager.h:69
void setLogger(Logger *logger)
Set the Logger instance.
Definition ScreenManager.cpp:140
Logger * _logger
Definition ScreenManager.h:70
Screen * getNextScreen(Screen *screen)
Get the next screen in the list (sorted by ID)
Definition ScreenManager.cpp:87
~ScreenManager()
Destructor for the ScreenManager.
Definition ScreenManager.cpp:142
Screen * getPreviousScreen(Screen *screen)
Get the previous screen in the list (sorted by ID)
Definition ScreenManager.cpp:60
uint8_t getMaxScreenId()
Get the highest Screen ID in the list.
Definition ScreenManager.cpp:127
Screen * updateScreen(uint8_t screenId)
Update a Screen, adds a new one if it doesn't exist.
Definition ScreenManager.cpp:22
ScreenManager()
Constructor for the ScreenManager.
Definition ScreenManager.cpp:20
uint8_t getMinScreenId()
Get the lowest Screen ID in the list.
Definition ScreenManager.cpp:114
Class for each screen as received from the EXRAIL SCREEN() command Each Screen instance contains a li...
Definition Screen.h:27