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
24#include "EventManager.h"
25#include "SelectActionMenu.h"
27#include "SelectLocoMenu.h"
28#include <DCCEXProtocol.h>
29
31public:
34 MenuManager(EventManager *eventManager);
35
39
43
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
60private:
65};
66
67#endif // MENUMANAGER_H
Class to centrally manage all events for the application Exposes methods to register subscribers that...
Definition EventManager.h:28
Definition MenuManager.h:30
EventManager * _eventManager
Definition MenuManager.h:61
SelectCommandStationMenu * getSelectCommandStationMenu()
Get the Select CommandStation menu.
Definition MenuManager.cpp:34
SelectActionMenu * getSelectActionMenu()
Get the Select Action menu.
Definition MenuManager.cpp:30
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
SelectLocoMenu * getSelectLocoMenu()
Get the Select Loco menu.
Definition MenuManager.cpp:32
SelectCommandStationMenu * _selectCommandStationMenu
Definition MenuManager.h:64
SelectLocoMenu * _selectLocoMenu
Definition MenuManager.h:63
SelectActionMenu * _selectActionMenu
Definition MenuManager.h:62
void setupActionMenu()
Set up the action menu.
Definition MenuManager.cpp:70
Menu to allow for extra actions to be performed For future use, not actually enabled yet.
Definition SelectActionMenu.h:26
Definition SelectCommandStationMenu.h:25
Definition SelectLocoMenu.h:24