#ifndef EPMONITOR_H_
#define EPMONITOR_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 "Record.h"

class TEpMonitor{
	public:
		TCtlPanel1 *aPanel;
	public:
		TStaticText Caption;

		u32 Color;
	
		int TabOrder;
	
		TRect Bound;	
		TRect Content;
		
		unsigned char CtlIndex;
		unsigned char Path0;
		unsigned char Path1;
	
		int IsShowing;
	private:
		void SetListColWidth(int w0, int w1, int w2, int w3, int w4,int w5,int w6, int w7, int w8, int w9);
	public:
		TEpMonitor(){};
		TEpMonitor(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 SetAndShowCaption(unsigned char aType);
		
		void RenderBackGround(void);
		void RenderBackGround(unsigned int aClr);
		void DrawSelf(void);
		
		void Show(void);
		void ReDraw(void);
		void FullRedraw(int Prm);
		void PanelCanvasOut();
		void DrawCaption2(void);
		void DrawList();
		
		TGuiMsgReturn KeyIn(unsigned char aKey);
		
		void InitPanel();
		
		void CheckPath();
		void RedrawState();
		
		void Check4Selected(void);
		
		void SendCmd(int StartStop);
		void ResetData();
		
		void Task1000Ms();
		
		void TryDec();
		void TryInc();
		
		int ExtRequst(unsigned char Prm);
};



#endif

