#ifndef PMSINTERVENE_H_
#define PMSINTERVENE_H_

#include "gType.h" 
#include "GraphBase.h"
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "my_string.h"
#include "Device.h"
#include "EpDevice.h"
#include "StaticText.h"
#include "TButton.h"
#include "TEdit.h"

//aPanel with Caption, StaticText, Btn, Edit, 
class TPmsIntervene{
	private:
		int FontSize;
		int FontHeight;
		int EditMode;
		TBvStyle BevelOuter;
		struct{
			u16 Width;
			unsigned int Color;
		}Border;
	public:
		TStaticText		Caption;
		TStaticText		STextDown;	
		TEdit			Edit;

		u32 Color;
		u32 TextColor;
		u32 SelectedColor;
		u32 SelectedTextColor;
		int ReqLevel;
	
		TRect Bound;	
		TRect Content;
		
		int GoWhat;
		int IsShow;
	
		unsigned int PxData[800];
		unsigned int CountDownTick;
		
	private:

	public:
		TPmsIntervene(){};
		TPmsIntervene(int aX, int aY, int aW, int aH, int OwnerX, int OwnerY, u32 aColor, TBvStyle aBevelOuter){
			Init(aX, aY, aW, aH, OwnerX, OwnerY, aColor, aBevelOuter);
		}
		void Init(int aX, int aY, int aW, int aH, int OwnerX, int OwnerY, u32 aColor, TBvStyle aBevelOuter);
		void DrawSelf(void);
		void DrawVertScrollBar(void);

		void Show4Reset(void);
		void Show4Alram();
		void Show4SelfCheck(void);
		void Show4Gui(int aX, int aY, int aW, int aH, int aReqLevel);
		void ReDraw4GuiRecall();
			
		
		void ReDrawItems(void);
		void ReDrawEdit(void);
		
		void Show();
		void DrawTip();
		void DelayMs(unsigned int aMs);
		
		void SetEditMode(unsigned int aMode);
		
		void Clear(void);
		void FullRePaint(void);
		void RePaint(void);
			
		void GuiLoginIIShow();
		void GuiLoginIIIShow();
		void CheckEnterLvl();
		void CheckEnterLv2();
		
		TGuiMsgReturn KeyIn(unsigned char aKey);
		
		void BackScreen();
		void RedrawScreen();
		
		void Task1000Ms();
		
		int ExtRequst(unsigned char Prm);
		
};






#endif


