Dwayne Dilbeck / LCD_Menu

Dependents:   class_project_main

Fork of SerialLCD_Menu by Mark Shuck

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Navigator.h Source File

Navigator.h

00001 #ifndef NAVIGATOR_H
00002 #define NAVIGATOR_H
00003 
00004 #include "mbed.h"
00005 #include "Menu.h"
00006 #include "C12832_lcd.h"
00007 
00008 class Navigator {   
00009     private: 
00010                
00011     public:
00012         Navigator(Menu *, C12832_LCD *);
00013         Menu *activeMenu; // the current menu - can change when RPG is pushed on selection with child menu
00014         
00015         C12832_LCD *lcd; 
00016         bool lastButton[3], button[3];
00017         
00018         
00019         int bottom;     // the index of the last item of current menu
00020         int cursorPos;  // what selection the cursor points to
00021         int cursorLine; // what line of the lcd the cursor is on. 1 = first line, 2 = second line
00022         
00023         void poll(uint8_t *returnValue=NULL);    // repeatedly call this function to determine if RPG is being used
00024         void moveUp();
00025         void moveDown();
00026         void printMenu();
00027         void printCursor();
00028         void setButtons();
00029 };
00030 
00031 #endif