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

Show/hide line numbers Menu.h Source File

Menu.h

00001 #ifndef MENU_H
00002 #define MENU_H
00003 
00004 #include "mbed.h"
00005 #include "MenuItem.h"
00006 #include <vector>
00007 
00008 class MenuItem;
00009 
00010 /** Menu: Create Menues with Submenues, MenuItems, actions,...
00011 *
00012 */
00013 class Menu {
00014     private:
00015     public:
00016         /** vector of of Menu-Items
00017         *
00018         */
00019         vector<MenuItem> selections;
00020         
00021         /** name of a menu
00022         */
00023         char *menuID;
00024 
00025         // currently selected Item in Menu (used to return to this point from submenu)
00026         int  CurrentSelection;       
00027         
00028         /** a menu
00029         */
00030         Menu(char *);
00031         
00032         /** add an Item to the menu
00033         */
00034         void add(const MenuItem &toAdd);
00035         /** change the text of an menu-item
00036         */
00037         void changeText(int position, char *newText);
00038         /** get current text of menu-item
00039         */
00040         char *getText(int);
00041 };
00042 #endif