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
Library to display menus on TextLCDs. Interaction with functions Up,Down and Select (Buttons or RPG) Based on menu-library from pyeh9
Navigator.h
- Committer:
- charly
- Date:
- 2015-01-01
- Revision:
- 4:67097127da6c
- Parent:
- 3:cfc36b42ae75
- Child:
- 5:91b1bc68290b
File content as of revision 4:67097127da6c:
#ifndef NAVIGATOR_H #define NAVIGATOR_H #include "mbed.h" #include "Menu.h" #include "TextLCD.h" class Navigator { private: int bottom; // the index of the last item of current menu int cursorPos; // what selection the cursor points to int cursorLine; // what line of the lcd the cursor is on. 1 = first line, 2 = second line public: Navigator(Menu *, TextLCD_Base *); Menu *activeMenu; // the current menu - can change when RPG is pushed on selection with child menu TextLCD_Base *lcd; /** no longer used! * */ void poll(); // no longer needed! /** Move up one line in menu * call this method when user moves up one line * can be triggered by RPG or Button (PinDetect) */ void moveUp(); /** Move down one line in menu * call this method when user moves down one line * can be triggered by RPG or Button (PinDetect) */ void moveDown(); /** User presses Select Button * call this method when user wans to select an item * can be triggered by RPG or Button (PinDetect) */ void select(); /** print the menu on LCD */ void printMenu(); /** print cursor on the beginning of line */ void printCursor(); }; #endif