Public Member Functions | |
| void | addNavigationListener (NavigationListener *newListener) |
| void | clearNavigationListeners () |
| void | triggerNavigationListener (bool completeReset) |
| MenuItem * | getRoot () |
| MenuItem * | getCurrentRoot () |
| MenuItem * | getCurrentSubMenu () |
| void | setRootItem (MenuItem *item) |
| void | navigateTo (MenuItem *activeItem, MenuItem *newRoot, bool custom) |
| MenuItem * | popNavigationGetActive () |
| bool | isShowingRoot () |
| int | getNavigationDepth () const |
| MenuItem * | getActiveAt (uint8_t i) |
| MenuItem * | getRootAt (uint8_t i) |
| void | resetStack () |
|
inline |
|
inline |
|
inline |
Get the submenu for the current item, WARNING null is returned on the root menu as it has no root
| void tcnav::MenuNavigationStore::setRootItem | ( | MenuItem * | item | ) |
Call during initialisation of a complete menu structure, it sets the root, and resets navigation.
| item | the new root |
| void tcnav::MenuNavigationStore::navigateTo | ( | MenuItem * | activeItem, |
| MenuItem * | newRoot, | ||
| bool | custom ) |
Navigates to a new menu, remembering the history of all items that are contained within the current root.
| activeItem | the item that was selected |
| newRoot | the new root that will be displayed |
| MenuItem * tcnav::MenuNavigationStore::popNavigationGetActive | ( | ) |
Pops the last navigation item, or in the worst case goes back to root.
|
inline |
|
inline |
The active item at a given zero based position in the stack or nullptr if out of range
| i | the index |
|
inline |
Get the root menu item for the given zero based position in the stack or nullptr if out of range.
| i | the index |
| void tcnav::MenuNavigationStore::resetStack | ( | ) |
Completely reset the navigation back to the initial state where root is on display