|
DCC-EX Simple Throttle
Simple throttle for a DCC-EX CommandStation
|
Class for maintaining a linked list of menu items to form a menu. More...
#include <BaseMenu.h>


Public Member Functions | |
| virtual void | handleUserConfirmationAction (UserConfirmationAction action)=0 |
| 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 Attributes | |
| const char * | _name = nullptr |
| BaseMenuItem * | _firstMenuItem = nullptr |
| uint8_t | _menuItemCount = 0 |
| uint8_t | _currentItemIndex = 0 |
| uint8_t | _selectedItemIndex = 0 |
| bool | _selectionChanged = false |
| EventManager * | _eventManager = nullptr |
Class for maintaining a linked list of menu items to form a menu.
| void BaseMenu::addItem | ( | BaseMenuItem * | menuItem | ) |
Add a menu item to this menu.
| item | Pointer to an existing menu item |


| void BaseMenu::displayMenu | ( | DisplayInterface * | displayInterface | ) |
Method to display the menu on screen.
| displayInterface | Pointer to the physical display |


| EventManager * BaseMenu::getEventManager | ( | ) |
Get the application's event manager instance.

| BaseMenuItem * BaseMenu::getFirstMenuItem | ( | ) |
Get the first menu item associated with this menu.
| BaseMenuItem * BaseMenu::getMenuItemAtIndex | ( | uint8_t | index | ) |
Get the menu item at the specified index.
| index | Index of the menu item to retrieve |


| uint8_t BaseMenu::getMenuItemCount | ( | ) |
Get the number of menu items associated with this menu.
| const char * BaseMenu::getMenuName | ( | ) |
Get the name of this menu.
| uint8_t BaseMenu::getSelectedItemIndex | ( | ) |
Get the index of the currently selected menu item.

| bool BaseMenu::getSelectionChanged | ( | ) |
Check if the user selection has changed.
|
pure virtual |
Implement this method to respond to user confirmation actions.
| action | UserConfirmationAction::[None|SingleClick|DoubleClick|LongPress] |
Implemented in SelectActionMenu, SelectCommandStationMenu, and SelectLocoMenu.

| void BaseMenu::handleUserSelectionAction | ( | UserSelectionAction | action | ) |
Method to respond to user selection actions.
| action | UserSelectionAction::[None|Up|UpFaster|UpFastest|Down|DownFaster|DownFastest] |

| void BaseMenu::setEventManager | ( | EventManager * | eventManager | ) |
Set the application's event manager instance.
| eventManager | Pointer to the event manager instance |

| void BaseMenu::setMenuName | ( | const char * | name | ) |
Set the name of this menu.
| name | Pointer to the char array containing the name |

|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |