#ifndef INCLUDED_phoenix_BitmapFont
#define INCLUDED_phoenix_BitmapFont

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

#include <luxe/resource/Resource.h>
HX_DECLARE_CLASS0(IMap)
HX_DECLARE_CLASS2(haxe,ds,IntMap)
HX_DECLARE_CLASS2(haxe,ds,ObjectMap)
HX_DECLARE_CLASS2(haxe,ds,StringMap)
HX_DECLARE_CLASS2(luxe,resource,Resource)
HX_DECLARE_CLASS2(luxe,resource,ResourceManager)
HX_DECLARE_CLASS1(phoenix,BitmapFont)
HX_DECLARE_CLASS1(phoenix,Texture)
HX_DECLARE_CLASS1(phoenix,Vector)
HX_DECLARE_CLASS2(phoenix,geometry,CompositeGeometry)
HX_DECLARE_CLASS2(phoenix,geometry,Geometry)
namespace phoenix{


class HXCPP_CLASS_ATTRIBUTES  BitmapFont_obj : public ::luxe::resource::Resource_obj{
	public:
		typedef ::luxe::resource::Resource_obj super;
		typedef BitmapFont_obj OBJ_;
		BitmapFont_obj();
		Void __construct(::luxe::resource::ResourceManager _resource_manager);

	public:
		inline void *operator new( size_t inSize, bool inContainer=true)
			{ return hx::Object::operator new(inSize,inContainer); }
		static hx::ObjectPtr< BitmapFont_obj > __new(::luxe::resource::ResourceManager _resource_manager);
		static Dynamic __CreateEmpty();
		static Dynamic __Create(hx::DynamicArray inArgs);
		//~BitmapFont_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("BitmapFont"); }

		::phoenix::Vector dimensions;
		Float spacing;
		Float line_height;
		Float font_size;
		int font_character_count;
		::haxe::ds::IntMap pages;
		::haxe::ds::IntMap characters;
		::haxe::ds::ObjectMap kernings;
		::phoenix::Vector scale;
		Dynamic on_pages_loaded;
		Dynamic &on_pages_loaded_dyn() { return on_pages_loaded;}
		int pages_loaded;
		Dynamic onload;
		Dynamic &onload_dyn() { return onload;}
		Array< Float > line_widths;
		virtual ::String toString( );
		Dynamic toString_dyn();

		virtual ::haxe::ds::StringMap _tokenize_font_line( Array< ::String > _line_tokens);
		Dynamic _tokenize_font_line_dyn();

		virtual Void on_all_pages_loaded( );
		Dynamic on_all_pages_loaded_dyn();

		virtual Void one_page_loaded( ::phoenix::Texture t);
		Dynamic one_page_loaded_dyn();

		virtual Void from_string( ::String _bitmap_file,::String _folder,Dynamic onloaded,Array< ::Dynamic > custom_pages);
		Dynamic from_string_dyn();

		virtual Void set_kerning( int _glyph,int _index,Float _amount);
		Dynamic set_kerning_dyn();

		virtual Dynamic get_kerning( int _glyph,int _index);
		Dynamic get_kerning_dyn();

		virtual ::phoenix::Vector get_text_dimensions( ::String _string,::phoenix::Vector _scale);
		Dynamic get_text_dimensions_dyn();

		virtual ::phoenix::geometry::CompositeGeometry draw_text( Dynamic options);
		Dynamic draw_text_dyn();

		virtual Void set_character( int _index,Dynamic _char_info);
		Dynamic set_character_dyn();

		static ::phoenix::BitmapFont load( ::String _fontid,::String _path,Dynamic _onloaded);
		static Dynamic load_dyn();

};

} // end namespace phoenix

#endif /* INCLUDED_phoenix_BitmapFont */ 
