Initial commit
This commit is contained in:
130
MyCode/Gui/GraphDevCfg.h
Normal file
130
MyCode/Gui/GraphDevCfg.h
Normal file
@@ -0,0 +1,130 @@
|
||||
#ifndef GRAPHDEVCFG_H_
|
||||
#define GRAPHDEVCFG_H_
|
||||
|
||||
#include "gType.h"
|
||||
#include "GraphBase.h"
|
||||
#include "string.h"
|
||||
#include "my_string.h"
|
||||
#include "Device.h"
|
||||
#include "EpDevice.h"
|
||||
#include "StaticText.h"
|
||||
#include "CtlPanel1.h"
|
||||
|
||||
class TGraphDevCfg{
|
||||
public:
|
||||
static constexpr unsigned short hList[12] = {76,116,110,72, 72,72,34,34, 34,34,34,34};
|
||||
static constexpr unsigned short wList[12] = {800,800,800,290, 290,290,290,290, 290,290,290,290};
|
||||
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.Top[3] = (36 + 32 +2) + (2 + hList[0]) + (2 + hList[1]) + (2 + hList[2]),
|
||||
.Grid.Top[4] = (36 + 32 +2) + (2 + hList[0]) + (2 + hList[1]) + (2 + hList[2]) + (2 + hList[3]),
|
||||
.Grid.Top[5] = (36 + 32 +2) + (2 + hList[0]) + (2 + hList[1]) + (2 + hList[2]) + (2 + hList[3]) + (2 + hList[4]),
|
||||
.Grid.Top[6] = (36 + 32 +2) + (2 + hList[0]) + (2 + hList[1]) + (2 + hList[2]) + (2 + hList[3]) + (2 + hList[4]) + (2 + hList[5]),
|
||||
.Grid.Top[7] = (36 + 32 +2) + (2 + hList[0]) + (2 + hList[1]) + (2 + hList[2]) + (2 + hList[3]) + (2 + hList[4]) + (2 + hList[5]) + (2 + hList[6]),
|
||||
.Grid.Top[8] = (36 + 32 +2) + (2 + hList[0]) + (2 + hList[1]) + (2 + hList[2]) + (2 + hList[3]) + (2 + hList[4]) + (2 + hList[5]) + (2 + hList[6]) + (2 + hList[7]),
|
||||
.Grid.Top[9] = (36 + 32 +2) + (2 + hList[0]) + (2 + hList[1]) + (2 + hList[2]) + (2 + hList[3]) + (2 + hList[4]) + (2 + hList[5]) + (2 + hList[6]) + (2 + hList[7]) + (2 + hList[8]),
|
||||
.Grid.Top[10] = (36 + 32 +2) + (2 + hList[0]) + (2 + hList[1]) + (2 + hList[2]) + (2 + hList[3]) + (2 + hList[4]) + (2 + hList[5]) + (2 + hList[6]) + (2 + hList[7]) + (2 + hList[8]) + (2 + hList[9]),
|
||||
.Grid.Top[11] = (36 + 32 +2) + (2 + hList[0]) + (2 + hList[1]) + (2 + hList[2]) + (2 + hList[3]) + (2 + hList[4]) + (2 + hList[5]) + (2 + hList[6]) + (2 + hList[7]) + (2 + hList[8]) + (2 + hList[9]) + (2 + hList[10]),
|
||||
|
||||
.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.Bottom[3] = (36 + 32 +2) + (2 + hList[0]) + (2 + hList[1]) + (2 + hList[2]) + hList[3],
|
||||
.Grid.Bottom[4] = (36 + 32 +2) + (2 + hList[0]) + (2 + hList[1]) + (2 + hList[2]) + (2 + hList[3]) + hList[4],
|
||||
.Grid.Bottom[5] = (36 + 32 +2) + (2 + hList[0]) + (2 + hList[1]) + (2 + hList[2]) + (2 + hList[3]) + (2 + hList[4]) + hList[5],
|
||||
.Grid.Bottom[6] = (36 + 32 +2) + (2 + hList[0]) + (2 + hList[1]) + (2 + hList[2]) + (2 + hList[3]) + (2 + hList[4]) + (2 + hList[5]) + hList[6],
|
||||
.Grid.Bottom[7] = (36 + 32 +2) + (2 + hList[0]) + (2 + hList[1]) + (2 + hList[2]) + (2 + hList[3]) + (2 + hList[4]) + (2 + hList[5]) + (2 + hList[6]) + hList[7],
|
||||
.Grid.Bottom[8] = (36 + 32 +2) + (2 + hList[0]) + (2 + hList[1]) + (2 + hList[2]) + (2 + hList[3]) + (2 + hList[4]) + (2 + hList[5]) + (2 + hList[6]) + (2 + hList[7]) + hList[8],
|
||||
.Grid.Bottom[9] = (36 + 32 +2) + (2 + hList[0]) + (2 + hList[1]) + (2 + hList[2]) + (2 + hList[3]) + (2 + hList[4]) + (2 + hList[5]) + (2 + hList[6]) + (2 + hList[7]) + (2 + hList[8]) + hList[9],
|
||||
.Grid.Bottom[10] = (36 + 32 +2) + (2 + hList[0]) + (2 + hList[1]) + (2 + hList[2]) + (2 + hList[3]) + (2 + hList[4]) + (2 + hList[5]) + (2 + hList[6]) + (2 + hList[7]) + (2 + hList[8]) + (2 + hList[9]) + hList[10],
|
||||
.Grid.Bottom[11] = (36 + 32 +2) + (2 + hList[0]) + (2 + hList[1]) + (2 + hList[2]) + (2 + hList[3]) + (2 + hList[4]) + (2 + hList[5]) + (2 + hList[6]) + (2 + hList[7]) + (2 + hList[8]) + (2 + hList[9]) + (2 + hList[10]) + hList[11],
|
||||
|
||||
.Grid.UsingCount = 2,
|
||||
|
||||
.Panel.Active = 0,
|
||||
.Panel.ItemType = piMemo,
|
||||
.Panel.Left = 0 + 2,
|
||||
.Panel.Top = (36 + 36 +2) + (2 + hList[0]) + (2 + hList[1]) + hList[2] +2,
|
||||
.Panel.Width = 796,
|
||||
.Panel.Heigh = 174,
|
||||
.Panel.Right = 0 + 2 + 796 -1,
|
||||
.Panel.Bottom = (36 + 36 +2) + (2 + hList[0]) + (2 + hList[1]) + hList[2] +2 + 174 -1,
|
||||
|
||||
.PanelSmall.Active = 0,
|
||||
.PanelSmall.Left = 0 + 6,
|
||||
.PanelSmall.Top = (36 + 36 +2) + hList[0] +6 + 220 -1 + 3,
|
||||
.PanelSmall.Width = 788,
|
||||
.PanelSmall.Heigh = 70,
|
||||
.PanelSmall.Right = 0 + 6 + 788 -1,
|
||||
.PanelSmall.Bottom = (36 + 36 +2) + hList[0] +6 + 220 -1 + 1 + 70 -1,
|
||||
};
|
||||
static constexpr TPoint ResultTipPoint = {
|
||||
.x = Lv.Grid.Left[6] + 10,
|
||||
.y = Lv.Grid.Top[6] + 8,
|
||||
};
|
||||
public:
|
||||
int IsShowing;
|
||||
class TItemList *IList;
|
||||
unsigned char CtlIndex;
|
||||
unsigned char OpaState;
|
||||
|
||||
unsigned char IsPermission;
|
||||
unsigned char PermissionCmd;
|
||||
|
||||
unsigned char CrtNum;
|
||||
unsigned char CrtNumValid;
|
||||
|
||||
char Text[68];
|
||||
public:
|
||||
TGraphDevCfg(){};
|
||||
void Init();
|
||||
|
||||
void RenderBackGround(void);
|
||||
void RenderBackGround(unsigned int aClr);
|
||||
void DrawSelf(void);
|
||||
static void sDelayMs(unsigned int aMs);
|
||||
|
||||
void Show(void);
|
||||
void ReDraw(void);
|
||||
void FullRedraw(int Prm);
|
||||
void DrawFixText();
|
||||
|
||||
void ShowSysState();
|
||||
void DrawLineType();
|
||||
|
||||
TGuiMsgReturn KeyIn(unsigned char aKey);
|
||||
|
||||
void ClearSelected();
|
||||
void Check4Selected(void);
|
||||
|
||||
void PermissionCmdReturnDraw();
|
||||
void PermissionCmdGO();
|
||||
|
||||
void WriteCrtCfg(unsigned char aLineType, unsigned char aCrtNum, unsigned char aActive);
|
||||
void ReadCrtCfg();
|
||||
|
||||
void ShowSta();
|
||||
void ShowSta(unsigned char aSta);
|
||||
|
||||
static void sRecoverSetDefault();
|
||||
|
||||
int ExtRequst(unsigned char Prm);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user