mbed menu system
MainMenu.h@2:5c4911aba273, 2013-02-28 (annotated)
- Committer:
- mbedDevLondon
- Date:
- Thu Feb 28 03:33:50 2013 +0000
- Revision:
- 2:5c4911aba273
- Parent:
- 0:a5ece7312edc
formatting in menuIDs.h
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbedDevLondon | 0:a5ece7312edc | 1 | // |
mbedDevLondon | 0:a5ece7312edc | 2 | // MainMenu.h |
mbedDevLondon | 0:a5ece7312edc | 3 | // menuSystem |
mbedDevLondon | 0:a5ece7312edc | 4 | // |
mbedDevLondon | 0:a5ece7312edc | 5 | // Created by BradDSmith on 2013-02-26. |
mbedDevLondon | 0:a5ece7312edc | 6 | // Copyright (c) 2013 BradDSmith. All rights reserved. |
mbedDevLondon | 0:a5ece7312edc | 7 | // |
mbedDevLondon | 0:a5ece7312edc | 8 | |
mbedDevLondon | 0:a5ece7312edc | 9 | #ifndef __menuSystem__MainMenu__ |
mbedDevLondon | 0:a5ece7312edc | 10 | #define __menuSystem__MainMenu__ |
mbedDevLondon | 0:a5ece7312edc | 11 | |
mbedDevLondon | 0:a5ece7312edc | 12 | #include "menuItem.h" |
mbedDevLondon | 0:a5ece7312edc | 13 | |
mbedDevLondon | 0:a5ece7312edc | 14 | class MainMenu { |
mbedDevLondon | 0:a5ece7312edc | 15 | static const int MAXITEMS = 5; |
mbedDevLondon | 0:a5ece7312edc | 16 | menuItem menuItem[MAXITEMS]; |
mbedDevLondon | 0:a5ece7312edc | 17 | int highlightedItem; |
mbedDevLondon | 0:a5ece7312edc | 18 | int maxitems; |
mbedDevLondon | 0:a5ece7312edc | 19 | |
mbedDevLondon | 0:a5ece7312edc | 20 | public: |
mbedDevLondon | 0:a5ece7312edc | 21 | MainMenu(); |
mbedDevLondon | 0:a5ece7312edc | 22 | void setMaxItems(int max); |
mbedDevLondon | 0:a5ece7312edc | 23 | void setMenuItem(int locID, int menuID,const char * menuText, int x, int y); |
mbedDevLondon | 0:a5ece7312edc | 24 | void highlightNextItem(); |
mbedDevLondon | 0:a5ece7312edc | 25 | void highlightPrevItem(); |
mbedDevLondon | 0:a5ece7312edc | 26 | void printMenu(); |
mbedDevLondon | 0:a5ece7312edc | 27 | int getHighlightedItem(); |
mbedDevLondon | 0:a5ece7312edc | 28 | void erase(); |
mbedDevLondon | 0:a5ece7312edc | 29 | }; |
mbedDevLondon | 0:a5ece7312edc | 30 | |
mbedDevLondon | 0:a5ece7312edc | 31 | #endif /* defined(__menuSystem__MainMenu__) */ |