DCC-EX Simple Throttle
Simple throttle for a DCC-EX CommandStation
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | List of all members
SelectLocoMenu Class Reference

#include <SelectLocoMenu.h>

Inheritance diagram for SelectLocoMenu:
Inheritance graph
[legend]
Collaboration diagram for SelectLocoMenu:
Collaboration graph
[legend]

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.
 
- Public Member Functions inherited from BaseMenu
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.
 
BaseMenuItemgetFirstMenuItem ()
 Get the first menu item associated with this menu.
 
BaseMenuItemgetMenuItemAtIndex (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.
 
EventManagergetEventManager ()
 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.
 

Constructor & Destructor Documentation

◆ SelectLocoMenu()

SelectLocoMenu::SelectLocoMenu ( const char *  name,
EventManager eventManager 
)

Constructor for each menu.

Parameters
namePointer to the char array containing the name of the menu
eventManagerPointer to the event manager used by the application
Here is the call graph for this function:

Member Function Documentation

◆ _selectLoco()

void SelectLocoMenu::_selectLoco ( uint8_t  locoIndex)
private

Trigger an event that sets the currently selected Loco and switches to the Throttle screen.

Parameters
locoIndexIndex of the currently selected Loco entry
Here is the call graph for this function:
Here is the caller graph for this function:

◆ handleUserConfirmationAction()

void SelectLocoMenu::handleUserConfirmationAction ( UserConfirmationAction  action)
overridevirtual

Implement this method to respond to user confirmation actions.

Parameters
actionUserConfirmationAction::[None|SingleClick|DoubleClick|LongPress]

Implements BaseMenu.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: