00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00016 #ifndef __INCLUDE_MENU_H
00017 #define __INCLUDE_MENU_H
00018
00019 #include <sys/types.h>
00020 #include "periphery.h"
00021
00022 typedef struct menuPoint_t menuPoint_t;
00023
00030 struct menuPoint_t
00031 {
00035 char* menuTitle;
00036
00041 menuPoint_t* subMenu;
00042
00047 void (*menuHandlerCallback) ();
00048 };
00049
00051 #define MENU_MAX_LEVEL 4
00053 #define MENU_MAX_MENU_ITEMS 255
00054
00055 #define MENU_DEFAULT_NORMAL_TEXT_FG_COLOR LCD_COLOR_BLACK
00056 #define MENU_DEFAULT_NORMAL_TEXT_BG_COLOR LCD_COLOR_WHITE
00057 #define MENU_DEFAULT_FOLDER_TEXT_FG_COLOR LCD_COLOR_BLUE
00058 #define MENU_DEFAULT_FOLDER_TEXT_BG_COLOR LCD_COLOR_WHITE
00059 #define MENU_DEFAULT_HIGHLIGHTED_TEXT_FG_COLOR LCD_COLOR_BLACK
00060 #define MENU_DEFAULT_HIGHLIGHTED_TEXT_BG_COLOR LCD_COLOR_YELLOW
00061 #define MENU_DEFAULT_DISABLED_TEXT_FG_COLOR LCD_COLOR_GRAY
00062 #define MENU_DEFAULT_DISABLED_TEXT_BG_COLOR LCD_COLOR_WHITE
00063 #define MENU_DEFAULT_X 0
00064 #define MENU_DEFAULT_Y 0
00065
00104 void MENU_init (menuPoint_t* rootMenu);
00105
00123 void MENU_handler (KBD_buttonPressed_t buttonPressed);
00124
00125 #endif // __INCLUDE_MENU_H