📄 menu.h
字号:
#ifndef __MENU_H
#define __MENU_H
#ifndef __STDIO_H
#include <stdio.h>
#endif
#ifndef __TIME_H
#include <time.h>
#endif
#ifndef __DOS_H
#include <dos.h>
#endif
#ifndef __FCNTL_H
#include <fcntl.h>
#endif
#ifndef __VIDEO_H
#include "video.h"
#endif
#define NO_DATA 0
#define PRTWAV_COUNTER 16
#define PRTLST_COUNTER 23
//#define D_DEBUG 1
#define MENU_COLOR WHITE //菜单字体颜色
#define MENU_BCOLOR BLACK //菜单背景色
#define MENU_CCOLOR LIGHTBLUE //选中菜单字体颜色
#define MENU_CBCOLOR WHITE //选中菜单背景色
#define VM_COLOR LIGHTRED //值菜单中值的颜色
#define VM_BCOLOR BLACK //值菜单中值的背景色
#define VM_CCOLOR YELLOW //选种值菜单中值的颜色
#define VM_CBCOLOR BLACK //选中值菜单中值的背景色
#define SYST_COLOR LIGHTMAGENTA
#define MEAN_COLOR LIGHTGREEN
#define DIAS_COLOR LIGHTBLUE
#define ECG_COLOR LIGHTGREEN
#define ST_COLOR WHITE
#define SPO2_COLOR LIGHTMAGENTA
#define NIBP_COLOR LIGHTCYAN
#define RESP_COLOR YELLOW
#define TEMP_COLOR LIGHTBLUE
#define RESPWAV_COLOR YELLOW
#define PLETHWAV_COLOR LIGHTRED
#define L_I_COLOR LIGHTRED
#define L_II_COLOR LIGHTGREEN
#define L_III_COLOR LIGHTCYAN
#define L_aVR_COLOR LIGHTMAGENTA
#define L_aVL_COLOR LIGHTBLUE
#define L_aVF_COLOR YELLOW
#define L_V_COLOR WHITE
#define REALTIMELEN 86400L //24(hour)*60(min)*60(sec)
#define REALDATALEN 1440 //实时数据的长度
#define MONDATAL 1440 //24(hour)*60(min)
#define GRPPAGE_LEN 120 //趋势图形的页长120点
#define GRPPAGE_HIGH 160 //趋势图的高
#define GRPPAGE_ENDY 475 //趋势图底线
#define GRPPAGE_ENDX 416 //趋势图右边界
#define GRPPAGE_WIDTH 360 //趋势图的宽
#define PRTLSTLEN 12 //趋势列表每页的数据
#define FRZWAVELEN 560
#define EcacheL 4480L //FRZWAVELEN*8
#define PcacheL 4480L //FRZWAVELEN*8
#define WAVXSTART 16
#define XSTART 8
#define YSTART 6
#define ECG_HIGH 128
#define ECG_ENDY 162 //30+132=162
#define ECG_IENDY 310 //162+16+132=310
#define PLETH_HIGH 99
#define PLETH_ENDY 460
#define PLETH_SMALL_ENDY 529
#define RESP_HIGH 96
#define RESP_ENDY 588 //
#define WAVE_STARTY 30
#define WAVE_ENDY 598
#define RESP_SMALL_HIGH 64
#define RESP_SMALL_ENDY 596
#define TREDNGRP_ENDY 518
#define TRENDLST_ENDY 540
//波形开始在WAVE_STARTY=30
#define I_ENDY 116 //old 96
#define II_ENDY 173 //old 160
#define III_ENDY 230 //old 224
#define aVR_ENDY 287 //old 288
#define aVL_ENDY 344 //old 352
#define aVF_ENDY 401 //old 416
#define V_ENDY 458 //old 480
#define LEFTMAXX 560
#define SEVENLEAD_HIGH 86 //7导联时最大波形[old 64]
#define ECGW_RATE_BASE 3 //同步时的ECG压缩比
#define ECGW_SYNC_RATE 2
#define HRPRUP_DEF_VAL 160
#define HRPRLOW_DEF_VAL 50
#define STUP_DEF_VAL 20
#define STLOW_DEF_VAL -20
#define SPO2UP_DEF_VAL 99
#define SPO2LOW_DEF_VAL 90
#define SYSTUP_DEF_VAL 160
#define SYSTLOW_DEF_VAL 90
#define DIASUP_DEF_VAL 120
#define DIASLOW_DEF_VAL 50
#define MEANUP_DEF_VAL 140
#define MEANLOW_DEF_VAL 70
#define RESPUP_DEF_VAL 60
#define RESPLOW_DEF_VAL 10
#define TP_CHARE 0 //字符类型,无中英文切换
#define TP_CHAREC 1 //字符类型,有中英文切换
#define TP_INT2 2 //数值为2位的整形类型
#define TP_INT3 3 //数值为3位的整形类型
#define TP_FLT4 4 //数值为4.1型的浮点数
#define TP_FLT5 5 //数值为5.2型的浮点数
#define TP_KPA 6 //压力千帕
#define TP__F 7 //温度`F
#define TP_COLOR 8 //颜色显示类型
#define TP_MOVCUS 9
//#define TP_BKCOLOR 10
#define TEMP_UPLIMIT 250
#define V_HEARTBIG 0
#define V_HEARTSMALL 1
#define V_RESPBIG 2
#define V_RESPSMALL 3
#define V_AUTO 1
#define V_MANUAL 0
#define V_MONITOR 0
#define V_DEMO 1
#define V_OFF 1
#define V_ON 0
#define V_CHINESE 1
#define V_ENGLISH 0
#define V_HR 0
#define V_PR 1
#define V_MMHG 0
#define V_KPA 1
#define V_C_ 0
#define V_F_ 1
#define V_I 0
#define V_II 1
#define V_III 2
#define V_aVR 3
#define V_aVL 4
#define V_aVF 5
#define V_V 6
#define V_X0_5 0
#define V_X1 1
#define V_X2 2
#define V_X4 3
#define V_DIA 0
#define V_MON 1
#define V_OPE 2
#define V_25MM 1
#define V_ADULT_HIGH 0
#define V_ADULT_MID 1
//正向测量
#define V_DIRECT 0
#define V_SINGLE 0
#define V_SEVEN 1
#define ID_NOCMD 0x00
#define ID_INTOFILE 0xf3
#define ID_INTOTNDGRP 0xf4
#define ID_INTOTNDLST 0xf5
#define ID_INTONIBPLST 0xf6
//#define
#define VID_NOCMD 0x00
#define VID_NIBPUNIT 0x01
#define VID_AUTOTIME 0x02
#define VID_AUTOMANUAL 0x03
#define VID_TEMP1UNIT 0x04
#define VID_SYSDEF 0x05
#define VID_MONDEMO 0x06
#define VID_MODDATE 0x07
#define VID_MODTIME 0x08
#define VID_LANGUAGE 0x09
#define VID_PRTTIME 0x0a
#define VID_ARMTIME 0x0b
#define VID_GAPTIME 0x0c
#define VID_ARMDEF 0x0d
#define VID_TURNPAGE 0x0e
#define VID_PRTPAGE 0x0f
#define VID_SAVEWAV 0x10
#define VID_MENUEXIT 0x11
#define VID_SLTFILE 0x12
#define VID_SLTPAGE 0x13
#define VID_PRTFILE 0x14
#define VID_PARAMETER 0x16
#define VID_GTIMESTEP 0x17
#define VID_GTNDPAGE 0x18
#define VID_MOVECUS 0x19
#define VID_LTNDPAGE 0x1a
#define VID_LTIMESTEP 0x1b
#define VID_PRINTLST 0x1c
#define VID_HRPR_UP 0x1d
#define VID_HRPR_LOW 0x1e
#define VID_ST_UP 0x1f
#define VID_ST_LOW 0x20
#define VID_SPO2_UP 0x21
#define VID_SPO2_LOW 0x22
#define VID_SYST_UP 0x23
#define VID_SYST_LOW 0x24
#define VID_MEAN_UP 0x25
#define VID_MEAN_LOW 0x26
#define VID_DIAS_UP 0x27
#define VID_DIAS_LOW 0x28
#define VID_RESP_UP 0x29
#define VID_RESP_LOW 0x2a
#define VID_TEMP1_UP 0x2b
#define VID_TEMP1_LOW 0x2c
#define VID_TEMP2_UP 0x2d
#define VID_TEMP2_LOW 0x2e
#define VID_LEADDIS 0x2f
#define VID_BPDOMAIN 0x30
#define VID_TEMP2UNIT 0x31
#define VID_CLEARTIME 0x32
#define VID_SECLEAD 0x33
#define VID_FRZLEADSLT 0x34
#define VID_FILLEADSLT 0x35
#define VID_EXITFILE 0x36
#define VID_EXITGRP 0x37
#define VID_EXITLIST 0x38
#define VID_SLTLEADCLR 0x39
#define VID_LEADCOLOR 0x3a
#define VID_BKCOLOR 0x3b
#define VID_ARM_ALLOW 0x3c
#define VID_NIBPPAGE 0x3d
#define VID_PRTNIPLST 0x3e
#define VID_CLEARDATA 0x3f
#define VID_EXITNIBPLS 0x40
#define VID_NIBPREV 0x41
#define VID_INTENSITY 0x42
#define VID_LEACHWAVE 0x43
typedef union keycode
{
int w;
char b;
}Keycode;
typedef struct monda{//趋势取样结点结构
unsigned int HR;
unsigned int PR;
char ST;
unsigned char SPO2;
unsigned int TEMP1;
unsigned int TEMP2;
unsigned char RESP;
unsigned int SYST;
unsigned int MEAN;
unsigned int DIAS;
} MonData;
typedef struct rtd{//实时记录血压数据
unsigned long TIME;
MonData DATA;
} REALTIMEDATA;
typedef struct vm{
int ix, iy;//标题坐标
int vx, vy;//值显示坐标
int low,up;//上下限
int value;//值
char **content;//内容
char **item;
unsigned char VID;//命令ID
char type;//字符?数字?中英文?颜色...
char cycle;//是否循环记数 [0不循环/1循环]
} VMENU;
typedef struct it{
int g_x;//图形标志的X坐标位置
int t_x; int t_y;//图形说明的开始位置
char subnum;//子菜单数
char num;//本级菜单数
char grpnum;//图形索引号
char **item;//图形说明
VMENU *vmenu;//值菜单指针
char autoexit;//自动显示,退出
unsigned char ID;
}ITEM;
char GRP_ARMRIGN[]={0xff, 0xff, 0x00};
char *ITEM_ECG[]={"ECG","心 电 "}; //FONT16 (48*16)
char *ITEM_PLETH[]={"PLETH","脉搏氧波形"};//FONT16 (80*16)
char *ITEM_SPO2[]={"SPO2","脉 搏 氧"};//FONT16 (64*16)"血氧饱和度"
char *ITEM_RESP[]={"RESP","呼 吸 "};//FONT16 (64*16)
char *ITEM_TEMP1[]={"TEMP1","体 温 1 "};//FONT16 (80*16)
char *ITEM_TEMP2[]={"TEMP2","体 温 2 "};//FONT16 (80*16)
char *ITEM_HR[]={"HR","心率"};//FONT16 (32*16)
char *ITEM_PR[]={"PR","脉率"};//FONT16 (32*16)
char *ITEM_ST[]={"ST","ST段"};//FONT16 (32*16)
char *ITEM_NIBP[]={"NIBP","无创血压"};//FONT16 (64*16)
char *ITEM_STEP[]={"STEP:","标尺:"};//ASCII FONT12 (40*12)
char *ITEM_PAGE[]={"PAGE:","页码:"};//ASCII FONT12 (40*12)
char *ITEM_CRITERION[]={"CRITERION"," 标 准 "};//ASCII FONT12 (72*12)
char *ITEM_CYCLE[]={"cyl","循环"};//ASCII FONT12 (24*12)
char *ITEM_CLEAR[]={"clr","清除"};//ASCII FONT12 (24*12)
//char *ITEM_ALARM[]={"ALARM","报警"};//ASCII FONT12 (40*12)
//char *ITEM_PULSE[]={"PULSE","脉搏"};//ASCII FONT12 (40*12)
char *ITEM_SYST[]={"SYST ","收缩压"};//ASCII FONT12 (36*12)
char *ITEM_DIAS[]={"DIAS ","舒张压"};//ASCII FONT12 (36*12)
char *ITEM_MEAN[]={"MEAN ","平均压"};//ASCII FONT12 (36*12)
char *ITEM_NIBPCHK[]={"CHK","测量"};//ASCII FONT12 (40*12)
//char *ITEM_NIBPUNIT[]={"BP UNIT","血压单位:"};//ASCII FONT12 (56*12)
char *ITEM_LEADSTAS[]={"ON ","连接","OFF","脱落"};//ASCII FONT12(24*12)
char *VER_STR[]={"Ver","版本"};//ASCII FONT12(24*12)
char *ITEM_EXITMENU[]= {"[ EXIT MENU ]","退 出 菜 单"};
char *ITEM_ECGSET[]= {"[ ECG SET ]","心 电 设 置"};
char *ITEM_NIBPSET[]= {"[ NIBP SET ]","血 压 设 置"};
char *ITEM_RESPTEMP[]= {"[ RESP TEMP ]","呼 吸 体 温"};
char *ITEM_DATETIME[]= {"[ DATE TIME ]","时 间 日 期"};
char *ITEM_SYSSET[]= {"[ SYSTEM SET ]","系 统 设 置"};
char *ITEM_PRTSET[]= {"[ PRINT SET ]","打 印 设 置"};
char *ITEM_WAVCOLOR[]= {"[ WAVE COLOR ]","波 形 颜 色"};
char *ITEM_NUMCOLOR[]= {"[ NUM COLOR ]","数 值 颜 色"};
char *ITEM_ALARMSET[]= {"[ ALARM SET ]","报 警 设 置"};
char *ITEM_ECGALARM[]= {"[ ECG ALARM ]","心 电 报 警"};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -