#ifndef _CBASEGUI_H_
#define _CBASEGUI_H_

#include "../GLDef.h"
#include "../App/engineH.h"
#include "../../Code/FontBlb.h"

class C_BASEGUI_0
{
private :
	TRect					_rect;
	TRGBi					_color;
	std::string				_name;
	bool					_state; // TRUE - enable, FALSE - disable
	bool					_visible;
	
public :
	void					SetRect(TRect rect) {_rect = rect;}
	TRect					GetRect() const {return _rect;}
	void					SetColor(TRGBi c) {_color = c;}
	void					SetColor(byte r, byte g, byte b) {_color.r = r; _color.g = g; _color.b = b;}
	TRGBi					GetColor() const {return _color;}
	void					SetName(std::string name) {_name = name;}
	std::string				GetName() const {return _name;}
	void					SetState(bool st) {_state = st;}
	bool					GetState() const {return _state;}
	void					SetVisible(bool vi) {_visible = vi;}
	bool					GetVisible() const {return _visible;}
	
	//static void SetFocus(bool b) {_focus = b;}
	//static bool GetFocus() {return _focus;}
	inline void doOrtho()
	{
		W_Ortho();
	}
	inline void backOrtho()
	{
		W_Proj();
	}

	virtual void Keyboard(bool keys[255])=0;
	virtual void MouseClick(int button, int x, int y)=0;
	virtual void MouseClickEx(int button, int x, int y){};
	virtual void MouseMove(int x, int y)=0;
	virtual void MouseMoveEx(int x, int y){};
	virtual void Render(bool focus)=0;
};

static C_BASEGUI_0 *g_focus = NULL;

#endif //_CBASEGUI_H_

















