Menu.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 29 //24
  11. #define MENU_ROW 5 //5
  12. #define MENU_SPACE 4//4
  13. #define MENU_BAR_LEN 120
  14. /******************/
  15. #define ROLLMENUPIC_WIDTH 80
  16. #define ROLLMENUPIC_HEIGHT 80
  17. #define ROLLMENU 1
  18. typedef struct SUT_MENU
  19. {
  20. const char **item; //menu items
  21. unsigned char itemnum; //item number
  22. unsigned char handle; //current item
  23. unsigned char page; //menu page(first item of page)
  24. unsigned char pgaenum;
  25. }SUT_MENU;
  26. extern SUT_MENU sutMenuSysSetup;
  27. int GetStrXLen(char *str);
  28. void ShowCaption(const char *str,unsigned char y);
  29. /*initialize menu structs and variable*/
  30. void MenuInit(struct SUT_MENU *p,const char **item);
  31. /*show menu */
  32. void MenuShow(struct SUT_MENU *p);
  33. /*response key */
  34. unsigned long MenuResponse(struct SUT_MENU *p);
  35. /*get menu 's handle*/
  36. unsigned char MenuGetHandle(struct SUT_MENU *p);
  37. void RollMenuInit(struct SUT_MENU *p,const char **item);
  38. void RollMenuShow(struct SUT_MENU *p);
  39. unsigned long RollMenuResponse(struct SUT_MENU *p);
  40. #endif
  41. /********************************************************************************
  42. * End of Module
  43. *******************************************************************************/