DCC-EX Simple Throttle
Simple throttle for a DCC-EX CommandStation
Loading...
Searching...
No Matches
/home/runner/work/DCCEXSimpleThrottle/DCCEXSimpleThrottle/MenuManager.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 MENUMANAGER_H
20
#define MENUMANAGER_H
21
22
#include "
CommandStationDetails.h
"
23
#include "
CommandStationMenuItem.h
"
24
#include "
EventManager.h
"
25
#include "
SelectActionMenu.h
"
26
#include "
SelectCommandStationMenu.h
"
27
#include "
SelectLocoMenu.h
"
28
#include <DCCEXProtocol.h>
29
30
class
MenuManager
{
31
public
:
34
MenuManager
(
EventManager
*eventManager);
35
38
SelectActionMenu
*
getSelectActionMenu
();
39
42
SelectLocoMenu
*
getSelectLocoMenu
();
43
46
SelectCommandStationMenu
*
getSelectCommandStationMenu
();
47
48
#ifdef WIFI_ENABLED
50
void
setupCommandStationMenu(CommandStationDetails *commandStationList, uint8_t commandStationCount);
51
#endif
// WIFI_ENABLED
52
55
void
setupLocoMenu
(Loco *firstRosterLoco);
56
58
void
setupActionMenu
();
59
60
private
:
61
EventManager
*
_eventManager
;
62
SelectActionMenu
*
_selectActionMenu
;
63
SelectLocoMenu
*
_selectLocoMenu
;
64
SelectCommandStationMenu
*
_selectCommandStationMenu
;
65
};
66
67
#endif
// MENUMANAGER_H
CommandStationDetails.h
CommandStationMenuItem.h
EventManager.h
SelectActionMenu.h
SelectCommandStationMenu.h
SelectLocoMenu.h
EventManager
Class to centrally manage all events for the application Exposes methods to register subscribers that...
Definition
EventManager.h:28
MenuManager
Definition
MenuManager.h:30
MenuManager::_eventManager
EventManager * _eventManager
Definition
MenuManager.h:61
MenuManager::getSelectCommandStationMenu
SelectCommandStationMenu * getSelectCommandStationMenu()
Get the Select CommandStation menu.
Definition
MenuManager.cpp:34
MenuManager::getSelectActionMenu
SelectActionMenu * getSelectActionMenu()
Get the Select Action menu.
Definition
MenuManager.cpp:30
MenuManager::setupLocoMenu
void setupLocoMenu(Loco *firstRosterLoco)
Set up the loco menu based on the provided roster linked list and (if enabled) the local roster.
Definition
MenuManager.cpp:47
MenuManager::getSelectLocoMenu
SelectLocoMenu * getSelectLocoMenu()
Get the Select Loco menu.
Definition
MenuManager.cpp:32
MenuManager::_selectCommandStationMenu
SelectCommandStationMenu * _selectCommandStationMenu
Definition
MenuManager.h:64
MenuManager::_selectLocoMenu
SelectLocoMenu * _selectLocoMenu
Definition
MenuManager.h:63
MenuManager::_selectActionMenu
SelectActionMenu * _selectActionMenu
Definition
MenuManager.h:62
MenuManager::setupActionMenu
void setupActionMenu()
Set up the action menu.
Definition
MenuManager.cpp:70
SelectActionMenu
Menu to allow for extra actions to be performed For future use, not actually enabled yet.
Definition
SelectActionMenu.h:26
SelectCommandStationMenu
Definition
SelectCommandStationMenu.h:25
SelectLocoMenu
Definition
SelectLocoMenu.h:24
Generated by
1.9.8