#ifndef INCLUDED_luxe_Text
#define INCLUDED_luxe_Text

#ifndef HXCPP_H
#include <hxcpp.h>
#endif

#include <luxe/Visual.h>
HX_DECLARE_CLASS1(luxe,Emitter)
HX_DECLARE_CLASS1(luxe,Entity)
HX_DECLARE_CLASS1(luxe,Objects)
HX_DECLARE_CLASS1(luxe,Text)
HX_DECLARE_CLASS1(luxe,Visual)
HX_DECLARE_CLASS2(luxe,resource,Resource)
HX_DECLARE_CLASS1(phoenix,Batcher)
HX_DECLARE_CLASS1(phoenix,BitmapFont)
HX_DECLARE_CLASS1(phoenix,Color)
HX_DECLARE_CLASS1(phoenix,Rectangle)
HX_DECLARE_CLASS1(phoenix,Vector)
HX_DECLARE_CLASS2(phoenix,geometry,CompositeGeometry)
HX_DECLARE_CLASS2(phoenix,geometry,Geometry)
namespace luxe{


class HXCPP_CLASS_ATTRIBUTES  Text_obj : public ::luxe::Visual_obj{
	public:
		typedef ::luxe::Visual_obj super;
		typedef Text_obj OBJ_;
		Text_obj();
		Void __construct(Dynamic _options);

	public:
		inline void *operator new( size_t inSize, bool inContainer=true)
			{ return hx::Object::operator new(inSize,inContainer); }
		static hx::ObjectPtr< Text_obj > __new(Dynamic _options);
		static Dynamic __CreateEmpty();
		static Dynamic __Create(hx::DynamicArray inArgs);
		//~Text_obj();

		HX_DO_RTTI;
		static void __boot();
		static void __register();
		void __Mark(HX_MARK_PARAMS);
		void __Visit(HX_VISIT_PARAMS);
		::String __ToString() const { return HX_CSTRING("Text"); }

		::phoenix::BitmapFont font;
		::phoenix::Batcher _batcher;
		::phoenix::geometry::CompositeGeometry composite_geometry;
		::String text;
		Float textsize;
		bool ready;
		Dynamic text_options;
		::phoenix::Rectangle size_rect_cache;
		::phoenix::Vector scale_cache;
		virtual bool point_inside( ::phoenix::Vector p);
		Dynamic point_inside_dyn();

		virtual Void onloaded( ::phoenix::BitmapFont font);
		Dynamic onloaded_dyn();

		virtual Void set_pos_from_transform( ::phoenix::Vector _p);

		virtual Float set_textsize( Float v);
		Dynamic set_textsize_dyn();

		virtual ::phoenix::Color set_color( ::phoenix::Color c);

		virtual bool set_visible( bool b);

		virtual bool set_locked( bool l);

		virtual ::String set_text( ::String t);
		Dynamic set_text_dyn();

		virtual Void init( );

		virtual Void ondestroy( );

};

} // end namespace luxe

#endif /* INCLUDED_luxe_Text */ 
