DCC-EX Simple Throttle
Simple throttle for a DCC-EX CommandStation
|
#include <SelectLocoMenu.h>
Public Member Functions | |
SelectLocoMenu (const char *name, EventManager *eventManager) | |
Constructor for each menu. | |
void | handleUserConfirmationAction (UserConfirmationAction action) override |
Implement this method to respond to user confirmation actions. | |
![]() | |
void | handleUserSelectionAction (UserSelectionAction action) |
Method to respond to user selection actions. | |
void | displayMenu (DisplayInterface *displayInterface) |
Method to display the menu on screen. | |
void | setMenuName (const char *name) |
Set the name of this menu. | |
const char * | getMenuName () |
Get the name of this menu. | |
void | addItem (BaseMenuItem *menuItem) |
Add a menu item to this menu. | |
BaseMenuItem * | getFirstMenuItem () |
Get the first menu item associated with this menu. | |
BaseMenuItem * | getMenuItemAtIndex (uint8_t index) |
Get the menu item at the specified index. | |
uint8_t | getMenuItemCount () |
Get the number of menu items associated with this menu. | |
uint8_t | getSelectedItemIndex () |
Get the index of the currently selected menu item. | |
bool | getSelectionChanged () |
Check if the user selection has changed. | |
void | setEventManager (EventManager *eventManager) |
Set the application's event manager instance. | |
EventManager * | getEventManager () |
Get the application's event manager instance. | |
Private Member Functions | |
void | _selectLoco (uint8_t locoIndex) |
Trigger an event that sets the currently selected Loco and switches to the Throttle screen. | |
SelectLocoMenu::SelectLocoMenu | ( | const char * | name, |
EventManager * | eventManager | ||
) |
Constructor for each menu.
name | Pointer to the char array containing the name of the menu |
eventManager | Pointer to the event manager used by the application |
|
private |
Trigger an event that sets the currently selected Loco and switches to the Throttle screen.
locoIndex | Index of the currently selected Loco entry |
|
overridevirtual |
Implement this method to respond to user confirmation actions.
action | UserConfirmationAction::[None|SingleClick|DoubleClick|LongPress] |
Implements BaseMenu.