📄 footer.h
字号:
#ifndef H_GUI_FOOTER#define H_GUI_FOOTER#ifdef __cplusplusextern "C" {#endif/********************** Definitions for Status Area **************************/#define MAX_NUM_ROWS 6#define MAX_NUM_COLS 10#define MAX_LEN_CELL_TEXT 140 // can modify#define DEF_NUM_COLS_PER_ROW 5#define DEF_WIDTH_COL 160#define HEIGHT_ROW 20 // can modify#define NUM_ROWS 4 // can modify, provided < MAX_...typedef struct CellInfo{ int l, t, r, b; int fc, bc; DWORD style; char text [MAX_LEN_CELL_TEXT + 1];}CELLINFO;/********************** Definitions for Button Menu **************************/#define NUM_BUTTONS 12#define NUM_BUTTONS_PER_PAGE (NUM_BUTTONS - 2)#define HEIGHT_BUTTON 70#define WIDTH_BUTTON 66#define WIDTH_F1_BUTTON 33#define WIDTH_F12_BUTTON 99#define HEIGHT_F12_BUTTON 44#define ID_FIRST_BUTTON 100#define ID_HELP_BUTTON (ID_FIRST_BUTTON)#define ID_GROUP_FIRST (ID_FIRST_BUTTON + 1)#define ID_ENTER_BUTTON (ID_FIRST_BUTTON + NUM_BUTTONS - 1)#define ID_LEFT_BUTTON (ID_FIRST_BUTTON + NUM_BUTTONS)#define ID_UP_BUTTON (ID_FIRST_BUTTON + NUM_BUTTONS + 1)#define ID_RIGHT_BUTTON (ID_FIRST_BUTTON + NUM_BUTTONS + 2)#define BTMIT_NORMAL 0x0000#define BTMIT_POPUP 0x0001#define BTMIS_NORMAL 0x0000#define BTMIS_DISABELD 0x0001#define BTMIS_CHECKED 0x0002#define MAX_LEN_ITEM_TEXT 16#define DEF_LEN_BTM_BUFFER 50#define DEF_BTM_CFG_FILE "res/buttonmenu.cfg"#define MAX_NEST_LEVEL 10#define MAX_LEN_TOKEN 50#define TTYPE_OPEN_LEV 0x0001#define TTYPE_CLOSE_LEV 0x0002#define TTYPE_ID 0x0004#define TTYPE_COMMA 0x0008#define TTYPE_TEXT 0x0010#define TTYPE_SEMICOLON 0x0020#define TTYPE_EOF 0x0040#define BTM_ERROR_OK 0#define BTM_ERROR_TOO_LONG 1#define BTM_ERROR_EOF 2#define BTM_ERROR_UNEXPECT 3#define BTM_ERROR_SYNTAX 4#define BTM_ERROR_TOKEN 5#define BTM_ERROR_ID_INV 6#define BTM_ERROR_NIL 7#define BTM_ERROR_MEM 8typedef struct BtnMenuItem{ UINT type; // type of item UINT state; // state of item struct BtnMenuItem* child; // child button menu struct BtnMenuItem* parent; // parent button menu struct BtnMenuItem* next; // the next item in the menu UINT id; // identifier char text [MAX_LEN_ITEM_TEXT + 1]; // text}BTNMENUITEM;/************************* Definitions for Footer ****************************/#define ID_FOOTER_TIMER 100#define MSG_HOTKEYPRESSED (MSG_USER + 1)#define MSG_BUTTONCOMMAND (MSG_USER + 2)typedef struct FooterInfo{ int num_rows; int num_cols_per_row [MAX_NUM_ROWS]; CELLINFO cell [MAX_NUM_ROWS][MAX_NUM_COLS]; BTNMENUITEM* first; // the first button menu item BTNMENUITEM* curr_leader; // the leader item of current level BTNMENUITEM* page_first; // the first item of current page int page_num; // page number int buffLen; // buffer length BTNMENUITEM* buffStart; // buffer start BTNMENUITEM* buffEnd; // buffer end BTNMENUITEM* freeList; // free list in buffer}FOOTERINFO;/*************************** Interfaces of Footer ****************************/int InitFooter (HWND hSplash);void CleanUpFooter (void);HWND CreateFooter (HWND hHeaderWin);#ifdef __cplusplus}#endif#endif /* H_GUI_FOOTER */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -