ItemBack

Defines

ITEM_BACK(...)
class ItemBack : public MenuItem
#include <ItemBack.h>

A menu item that navigates back to the previous screen.

The ItemBack class represents a menu item that, when selected, navigates back to the previous screen in the menu system.

This class inherits from the MenuItem class and overrides the process method to handle the ENTER command by changing the screen.

Note

The default text for this item is “..”.

Public Functions

inline ItemBack(const char *text = "..")

Construct a new ItemBack object.

Parameters:

text – The text of the item.

Protected Functions

inline virtual bool process(LcdMenu *menu, const unsigned char command) override

Process a command decoded in 1 byte. It can be a printable character or a control command like ENTER or LEFT. Return value is used to determine operation was successful or ignored. If the parent of item received that handle was ignored it can execute it’s own action on this command. Thus, the item always has priority in processing; if it is ignored, it is delegated to the parent element. Behaviour is very similar to Even Bubbling in JavaScript.

Parameters:
  • menu – the owner menu of the item, can be used to retrieve required object, such as DisplayInterface or MenuScreen

  • command – the character command, can be a printable character or a control command

Returns:

true if command was successfully handled by item.

inline void changeScreen(LcdMenu *menu)