Files
FireAlarmCtrlCn/MyCode/Gui/PrinterSet.h
2026-04-06 19:02:09 +08:00

155 lines
2.8 KiB
C++

#ifndef PRINTERSET_H_
#define PRINTERSET_H_
#include "gType.h"
#include "GraphLow.h"
#include "GraphBase.h"
#include "my_string.h"
#include "Device.h"
#include "EpDevice.h"
#include "StaticText.h"
#include "TEdit.h"
class TPrinterSet{
public:
static constexpr unsigned short hList[12] = {80,80,32,32, 32,32,32,32, 32,32,32,32};
static constexpr unsigned short wList[12] = {800,800,800,800, 800,800,800,800, 800,800,800,800};
static constexpr TLv Lv = {
.Caption.Left = 0,
.Caption.Top = 36,
.Caption.Width = 800,
.Caption.Heigh = 32,
.Caption.Right = 800 -0 -1,
.Caption.Bottom = 36 + 32,
.Grid.Left = {0,0,0,0, 0,0,0,0, 0,0,0,0},
.Grid.Right = {wList[0]-1,wList[1]-1,wList[2]-1,wList[3]-1, wList[4]-1,wList[5]-1,wList[6]-1,wList[7]-1, wList[8]-1,wList[9]-1,wList[10]-1,wList[11]-1},
.Grid.Top[0] = (36 + 32 +2),
.Grid.Top[1] = (36 + 32 +2) + (2 + hList[0]),
.Grid.Top[2] = (36 + 32 +2) + (2 + hList[0]) + (2 + hList[1]),
.Grid.Bottom[0] = (36 + 32 +2) + hList[0],
.Grid.Bottom[1] = (36 + 32 +2) + (2 + hList[0]) + hList[1],
.Grid.Bottom[2] = (36 + 32 +2) + (2 + hList[0]) + (2 + hList[1]) + hList[2],
.Grid.UsingCount = 2,
.Panel.Active = 0,
.Panel.ItemType = piMemo,
.PanelSmall.Active = 0,
};
static constexpr TPoint TipPoint = {
.x = Lv.Grid.Left[Lv.Grid.UsingCount -1] + 20,
.y = Lv.Grid.Bottom[Lv.Grid.UsingCount -1] + 80,
};
static constexpr TPoint ResultTipPoint = {
.x = Lv.Grid.Left[Lv.Grid.UsingCount -1] + 20,
.y = Lv.Grid.Bottom[Lv.Grid.UsingCount -1] + 10,
};
struct{
unsigned char OnOff;
unsigned char All;
unsigned char Fire;
unsigned char Lnk;
unsigned char Sv;
unsigned char Fault;
unsigned char Mask;
unsigned char Opa;
unsigned char Others;
unsigned char Dump0;
unsigned char Dump1;
unsigned char WriteByte;
}Sta;
struct{
unsigned char Group;
unsigned char Inx0;
unsigned char Inx1;
unsigned char Dump0;
}Tag;
int SaveResult;
unsigned char IsPermission;
public:
TPrinterSet(){};
void Init();
void RenderBackGround(void);
void RenderBackGround(unsigned int aClr);
void RenderContent(void);
void DrawSelf(void);
void Show();
void DrawTip();
void FullRedraw(int Prm);
void DrawSelected(int IsSelected);
void DrawOnOff();
void DrawEvent();
void ChangeValue();
void ShowSaveResult();
void ShowSaveResult(int aSaveResult);
void LoadSysCfg();
void SetDefault();
TGuiMsgReturn KeyIn(unsigned char aKey);
void SetProperty();
void SetEventType();
static void sRecoverSetDefault();
void ShowSta(int aGroup, int aInx);
void ShowStaAll();
int GoResult();
void PermissionCmdReturnDraw();
void PermissionCmdGO();
int ExtRequst(unsigned char Prm){return 0;}
};
#endif