📄 menu.h
字号:
#ifndef MENU_H
#define MENU_H
#define TRUE 1
#define FALSE 0
#define U_UP 0x0148
#define U_DN 0x0150
#define U_LT 0x014b
#define U_RT 0x014d
#define S_UP 0x0248
#define S_DN 0x0250
#define S_LT 0x024b
#define S_RT 0x024d
#define N_PLUS 0x014e /* PLUS and MINUS on numeric keypad */
#define N_MINUS 0x014a
#define ENTER 13
/* 激活键 */
enum WAITACTION { NO_WAIT, WAIT, CLEAR_WAIT };
enum TEXTCOLORS
{
_TBLACK, _TBLUE, _TGREEN, _TCYAN,
_TRED, _TMAGENTA, _TBROWN, _TWHITE,
_TGREY, _TLIGHTBLUE, _TLIGHTGREEN, _TLIGHTCYAN,
_TLIGHTRED, _TLIGHTMAGENTA, _TLIGHTYELLOW, _TBRIGHTWHITE,
_TUNDERLINE = 1
};
/* Structure and global variable for menu attributes */
typedef struct _MENU
{
int fgBorder, fgNormal, fgSelect, fgNormHilite, fgSelHilite;
long bgBorder, bgNormal, bgSelect, bgNormHilite, bgSelHilite;
int fCentered;
unsigned char chNW, chNE, chSE, chSW, chNS, chEW;
} MENU;
extern MENU mnuAtrib;
/* 结构长度*/
#define MAXITEM 20
typedef struct _ITEM
{
int iHilite;
char achItem[MAXITEM];
} ITEM;
/* 菜单 */
int Menu( int row, int col, ITEM aItem[], int iCur );
int EventLoop( int row, int col, ITEM aItem[], int iCur, int cItem,
int cchItem, int acchItem[], char achHilite[] );
void Box( int row, int col, int rowLast, int colLast );
unsigned GetKey( int fWait );
void _outchar( char out );
int ClickOrPress( void );
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -