Menu.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /********************************************************************************
  2. * File Name: Menu.h
  3. * Function Describe: Menu.c declare module
  4. * Relate Module: GUI.c
  5. * Writer: Shliangwen
  6. * Date: 2016-1-8
  7. *******************************************************************************/
  8. #ifndef __MENU_H
  9. #define __MENU_H
  10. #define MENU_TOPY 24
  11. #define MENU_ROW 5 //5
  12. #define MENU_SPACE 4
  13. #define MENU_BAR_LEN 120
  14. // #define MENU_KEY_BACK 1
  15. // #define MENU_KEY_ENTER 2
  16. typedef struct SUT_MENU
  17. {
  18. const char **item; //menu items
  19. unsigned char itemnum; //item number
  20. unsigned char handle; //current item
  21. unsigned char page; //menu page(first item of page)
  22. unsigned char pgaenum;
  23. }SUT_MENU;
  24. extern SUT_MENU sutMenuSysSetup;
  25. int GetStrXLen(char *str);
  26. void ShowCaption(const char *str,unsigned char y);
  27. /*initialize menu structs and variable*/
  28. void MenuInit(struct SUT_MENU *p,const char **item);
  29. /*show menu */
  30. void MenuShow(struct SUT_MENU *p);
  31. /*response key */
  32. unsigned long MenuResponse(struct SUT_MENU *p);
  33. /*get menu 's handle*/
  34. unsigned char MenuGetHandle(struct SUT_MENU *p);
  35. void ShowCaptionArea(const char *str,unsigned char x1,unsigned char x2,unsigned char y);
  36. extern unsigned char fanhui;
  37. #endif
  38. /********************************************************************************
  39. * End of Module
  40. *******************************************************************************/