Library to display menus on TextLCDs. Interaction with functions Up,Down and Select (Buttons or RPG) Based on menu-library from pyeh9

Fork of Menu by Peihsun Yeh

Embed: (wiki syntax)

« Back to documentation index

MenuItem Class Reference

MenuItem is a menu-item of menu. More...

#include <MenuItem.h>

Data Structures

struct  menu_data
 structure to pass data to menu and back More...

Public Types

enum  mode { mode_default = 0, mode_wait_select = 1, mode_yes_no = 2 }

modes of MenuItems


Public Member Functions

 MenuItem (void(*)(), int, Menu *, char *, uint8_t=mode_default, menu_data *=NULL)
 a sub-menu

Data Fields

void(* userAction )()
 pointer to user-action to execute when menu item is selected
char * selText
 Text of Menue-Item to display.
int pos
 position of menuitem in menu
 Pointer to child-menue.
uint8_t itemMode

Detailed Description

MenuItem is a menu-item of menu.

Definition at line 10 of file MenuItem.h.

Member Enumeration Documentation

enum mode

modes of MenuItems


default mode: just display the Menu-Text an perform user_action


wait_select: Call user_action and then only accept a select use for displaying text, values,...

the menu is paused until select is pressed


mode_yes_no: show text and ask user for yes/no

Definition at line 16 of file MenuItem.h.

Constructor & Destructor Documentation

MenuItem ( void(*)()  userAction,
int  position,
Menu child,
char *  text,
uint8_t  itemMode = mode_default,
menu_data menu_parameter = NULL 

a sub-menu

Definition at line 5 of file MenuItem.cpp.

Field Documentation

Pointer to child-menue.

Definition at line 58 of file MenuItem.h.

uint8_t itemMode


Definition at line 61 of file MenuItem.h.

int pos

position of menuitem in menu

Definition at line 55 of file MenuItem.h.

char* selText

Text of Menue-Item to display.

Definition at line 52 of file MenuItem.h.

void(* userAction)()

pointer to user-action to execute when menu item is selected

Definition at line 49 of file MenuItem.h.