#ifndef CTLPANEL1_H_
#define CTLPANEL1_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 "TEdit.h"
#include "TButton.h"

//aPanel with Caption, StaticText, Btn, Edit, 
class TCtlPanel1{
	private:
		int FontSize;
		int FontHeight;
		int EditMode;
		TBvStyle BevelOuter;
		struct{
			u16 Width;
			unsigned int Color;
		}Border;
		struct{
			u32 Color;
			u32 RibbonColor;
		}VScrollBar;
	public:
		TStaticText		Caption;
		TStaticText		SText[24];	
		TButton		Btn[24];
		TEdit			Edit[24];
		TButton		BtnSaveReturn;
		TButton		BtnCancel;
		TButton		BtnPrev;
		TButton		BtnNext;
		
		float ScrollVertical;
	
		u32 FixColColor;
		u32 FixColTextColor;
		u32 Color;
		u32 TextColor;
		u32 SelectedColor;
		u32 SelectedTextColor;
	
		int TabOrder;
	
		TRect Bound;	
		TRect VScrollBarBox;
		TRect Content;
		
		unsigned char ShowWhat;
		
	private:

	public:
		TCtlPanel1(){};
		TCtlPanel1(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 Show(void);
		void ReDrawItems(void);
		void ReDrawEdit(void);
		
		void SetEditMode(unsigned int aMode);
		
		void Clear(void);
		void FullRePaint(void);
		void RePaint(void);
};






#endif


