//
// C++ Interface: textedit
//
// Description:
//
//
// Author: Denis A. Birukov <denis.birukov@gmail.com>, (C) 2008
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef TEXTEDIT_H
#define TEXTEDIT_H

#include <sceneobject.h>
#include <sceneimage.h>

/**
	@author Denis A. Birukov <denis.birukov@gmail.com>
*/
class TextEdit : virtual public SceneObject, virtual public SceneImage
{
	public:
		TextEdit();

		~TextEdit();

		virtual bool load ( std::string storage_name, std::string storage_prefix, std::string scene_name, std::string object_name );
		virtual void draw();
		virtual void _get_active_area_rect ( VideoRect* rect );
                DECLARE_SLOT ( TextEdit, _on_activate );
                DECLARE_SLOT ( TextEdit, _on_deactivate );
                DECLARE_SLOT ( TextEdit, _on_key_press );
                DECLARE_SLOT ( TextEdit, _on_character );
                DECLARE_SLOT ( TextEdit, _on_get_value );

	private:
		std::vector<int> _text_;
		std::string _font_;
		std::string _renderer_type_;
		int _font_size_;
		VideoColor _clr_;
		float _xb_;
		float _yb_;
		int _last_len_;
		unsigned int _max_len_;
		unsigned int _replace_;
};
extern ObjectFabric<TextEdit> TextEditFabric;

#endif
