#ifndef ALLOW_H_ #define ALLOW_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" #include "ProtoInnerCan.h" class TAllow{ public: static constexpr unsigned short hList[12] = {82,82,82,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 +8), .Grid.Top[1] = (36 + 32 +8) + (2 + hList[0]), .Grid.Top[2] = (36 + 32 +8) + (2 + hList[0]) + (2 + hList[1]), .Grid.Top[3] = (36 + 32 +8) + (2 + hList[0]) + (2 + hList[1]) + (2 + hList[2]), .Grid.Bottom[0] = (36 + 32 +8) + hList[0], .Grid.Bottom[1] = (36 + 32 +8) + (2 + hList[0]) + hList[1], .Grid.Bottom[2] = (36 + 32 +8) + (2 + hList[0]) + (2 + hList[1]) + hList[2], .Grid.Bottom[3] = (36 + 32 +8) + (2 + hList[0]) + (2 + hList[1]) + (2 + hList[2]) + hList[3], .Grid.UsingCount = 2, .Panel.Active = 0, .Panel.ItemType = piMemo, .PanelSmall.Active = 0, }; static constexpr TPoint ResultTipPoint = { .x = Lv.Grid.Left[0] + 560, .y = Lv.Grid.Top[0] + 6, }; enum{ IsSelf =0, IsNull =1, IsMask =2, IsSlave =3, IsUnknown }; public: int IsShow; class TItemList *IList; int Sta; unsigned char CtlIndex; unsigned int aAuto; unsigned int aManual; unsigned char IsPermission; unsigned char PermissionCmd; unsigned char CtlNumSta; unsigned char CtlNum; public: TAllow(){}; TAllow(int x1, int y1, int aW, int aH, int OwnerX, int OwnerY, u32 aColor){ Init(x1, y1, aW, aH, OwnerX, OwnerY, aColor); } void Init(int x1, int y1, int aW, int aH, int OwnerX, int OwnerY, u32 aColor); void RenderBackGround(void); void RenderBackGround(unsigned int aClr); void DrawSelf(void); void DrawCtlNum(); void DrawCtlNumTip(); void ShowAuto(); void DrawFixText(); void Show(void); void ReDraw(void); void FullRedraw(int Prm); TGuiMsgReturn KeyIn(unsigned char aKey); void InitPanel(); void ClearSelected(); void Check4Selected(void); void ExtChange(int ExtAuto); void PermissionCmdGO(); void PermissionCmdReturnDraw(); void LoadData(); void ShowSta(); void ShowSta(int aSta); static void sRecoverSetDefault(); int ExtRequst(unsigned char Prm){return 0;} }; #endif