#ifndef BUSPADPROGRAM_H_
#define BUSPADPROGRAM_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 "EditML.h"
#include "CtlPanel1.h"

class TBusPadProgram{
	public:
		TStaticText Caption;
	
		class TEdit 	vEdit;
		class TEditML 	EditML;

		u32 Color;
	
		TRect Bound;	
		TRect Content;
		TRect RectPanel;
		class TCtlPanel1 *aPanel;
	
		unsigned char Count;
		unsigned char ItemsIndex;
		unsigned char EditIndex;
		unsigned char OnEditing;
		unsigned char CtlIndex;
		unsigned char IsUsing;
		unsigned char CharIndex;
		unsigned char IsInputSymbol;
		unsigned char IsReadWriteReq;
		unsigned char IsProgram;
		
		char cText[4];
	public:
		TBusPadProgram(){};
		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 RenderContent(void);
		void DrawSelf(void);
		void DrawCaption(void);
		void Show();
		void Paint();
			
		void Check4Selected();
		void InitPanel();
			
		void TryDecValue();
		void TryIncValue();
			
		void LoadCfg();
		TGuiMsgReturn KeyIn(unsigned char aKey);
			
		void LoadExpression();
		void SetEditStart(void);
		void RestoreFromEdit(void);
		
		int ExtRequst(unsigned char Prm){return 0;}
			
};



































#endif
