tcMenu
Public Member Functions | List of all members
tcnav::MenuNavigationStore Class Reference

Public Member Functions

MenuItemgetRoot ()
 
MenuItemgetCurrentRoot ()
 
MenuItemgetCurrentSubMenu ()
 
void setRootItem (MenuItem *item)
 
void navigateTo (MenuItem *activeItem, MenuItem *newRoot, bool custom)
 
MenuItempopNavigationGetActive ()
 
bool isShowingRoot ()
 

Member Function Documentation

◆ getRoot()

MenuItem* tcnav::MenuNavigationStore::getRoot ( )
inline
Returns
the absolute root of all menu items

◆ getCurrentRoot()

MenuItem* tcnav::MenuNavigationStore::getCurrentRoot ( )
inline
Returns
the currently selected root (or sub menu)

◆ getCurrentSubMenu()

MenuItem* tcnav::MenuNavigationStore::getCurrentSubMenu ( )
inline

Get the submenu for the current item, WARNING null is returned on the root menu as it has no root

Returns
the current submenu or null for ROOT

◆ setRootItem()

void tcnav::MenuNavigationStore::setRootItem ( MenuItem item)

Call during initialisation of a complete menu structure, it sets the root, and resets navigation.

Parameters
itemthe new root

◆ navigateTo()

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.

Parameters
activeItemthe item that was selected
newRootthe new root that will be displayed

◆ popNavigationGetActive()

MenuItem * tcnav::MenuNavigationStore::popNavigationGetActive ( )

Pops the last navigation item, or in the worst case goes back to root.

Returns
the item that should be selected after this item is popped

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