#include <hxcpp.h>

#ifndef INCLUDED_Bar
#include <Bar.h>
#endif
#ifndef INCLUDED_haxe_Log
#include <haxe/Log.h>
#endif
#ifndef INCLUDED_luxe_Emitter
#include <luxe/Emitter.h>
#endif
#ifndef INCLUDED_luxe_Entity
#include <luxe/Entity.h>
#endif
#ifndef INCLUDED_luxe_Objects
#include <luxe/Objects.h>
#endif
#ifndef INCLUDED_luxe_Sprite
#include <luxe/Sprite.h>
#endif
#ifndef INCLUDED_luxe_Visual
#include <luxe/Visual.h>
#endif
#ifndef INCLUDED_phoenix_Color
#include <phoenix/Color.h>
#endif
#ifndef INCLUDED_phoenix_Vector
#include <phoenix/Vector.h>
#endif

Void Bar_obj::__construct()
{
HX_STACK_FRAME("Bar","new",0x43906025,"Bar.new","Bar.hx",13,0x88e9aaeb)
{
	HX_STACK_LINE(15)
	::phoenix::Vector _g = ::phoenix::Vector_obj::__new((int)100,(int)100,null(),null());		HX_STACK_VAR(_g,"_g");
	HX_STACK_LINE(16)
	::phoenix::Vector _g1 = ::phoenix::Vector_obj::__new((int)50,(int)50,null(),null());		HX_STACK_VAR(_g1,"_g1");
	struct _Function_1_1{
		inline static Dynamic Block( ::phoenix::Vector &_g1,::phoenix::Vector &_g){
			HX_STACK_FRAME("*","closure",0x5bdab937,"*.closure","Bar.hx",14,0x88e9aaeb)
			{
				hx::Anon __result = hx::Anon_obj::Create();
				__result->Add(HX_CSTRING("size") , _g,false);
				__result->Add(HX_CSTRING("pos") , _g1,false);
				__result->Add(HX_CSTRING("color") , ::phoenix::Color_obj::random(null()),false);
				return __result;
			}
			return null();
		}
	};
	HX_STACK_LINE(14)
	super::__construct(_Function_1_1::Block(_g1,_g));
}
;
	return null();
}

//Bar_obj::~Bar_obj() { }

Dynamic Bar_obj::__CreateEmpty() { return  new Bar_obj; }
hx::ObjectPtr< Bar_obj > Bar_obj::__new()
{  hx::ObjectPtr< Bar_obj > result = new Bar_obj();
	result->__construct();
	return result;}

Dynamic Bar_obj::__Create(hx::DynamicArray inArgs)
{  hx::ObjectPtr< Bar_obj > result = new Bar_obj();
	result->__construct();
	return result;}

Void Bar_obj::onmousemove( Dynamic event){
{
		HX_STACK_FRAME("Bar","onmousemove",0x96f5cf7c,"Bar.onmousemove","Bar.hx",21,0x88e9aaeb)
		HX_STACK_THIS(this)
		HX_STACK_ARG(event,"event")
		HX_STACK_LINE(22)
		this->super::onmousemove(event);
		HX_STACK_LINE(23)
		::haxe::Log_obj::trace(HX_CSTRING("test"),hx::SourceInfo(HX_CSTRING("Bar.hx"),23,HX_CSTRING("Bar"),HX_CSTRING("onmousemove")));
	}
return null();
}


Void Bar_obj::init( ){
{
		HX_STACK_FRAME("Bar","init",0xd77c77ab,"Bar.init","Bar.hx",21,0x88e9aaeb)
		HX_STACK_THIS(this)
		HX_STACK_LINE(21)
		this->_listen(HX_CSTRING("mousemove"),this->onmousemove_dyn(),true);
	}
return null();
}


Void Bar_obj::ondestroy( ){
{
		HX_STACK_FRAME("Bar","ondestroy",0x0475ef40,"Bar.ondestroy","luxe/macros/EntityRules.hx",47,0xed942299)
		HX_STACK_THIS(this)
		HX_STACK_LINE(47)
		this->super::ondestroy();
		HX_STACK_LINE(21)
		this->_unlisten(HX_CSTRING("mousemove"),this->onmousemove_dyn(),true);
	}
return null();
}



Bar_obj::Bar_obj()
{
}

Dynamic Bar_obj::__Field(const ::String &inName,bool inCallProp)
{
	switch(inName.length) {
	case 4:
		if (HX_FIELD_EQ(inName,"init") ) { return init_dyn(); }
		break;
	case 9:
		if (HX_FIELD_EQ(inName,"ondestroy") ) { return ondestroy_dyn(); }
		break;
	case 11:
		if (HX_FIELD_EQ(inName,"onmousemove") ) { return onmousemove_dyn(); }
	}
	return super::__Field(inName,inCallProp);
}

Dynamic Bar_obj::__SetField(const ::String &inName,const Dynamic &inValue,bool inCallProp)
{
	return super::__SetField(inName,inValue,inCallProp);
}

void Bar_obj::__GetFields(Array< ::String> &outFields)
{
	super::__GetFields(outFields);
};

static ::String sStaticFields[] = {
	String(null()) };

#if HXCPP_SCRIPTABLE
static hx::StorageInfo *sMemberStorageInfo = 0;
#endif

static ::String sMemberFields[] = {
	HX_CSTRING("onmousemove"),
	HX_CSTRING("init"),
	HX_CSTRING("ondestroy"),
	String(null()) };

static void sMarkStatics(HX_MARK_PARAMS) {
	HX_MARK_MEMBER_NAME(Bar_obj::__mClass,"__mClass");
};

#ifdef HXCPP_VISIT_ALLOCS
static void sVisitStatics(HX_VISIT_PARAMS) {
	HX_VISIT_MEMBER_NAME(Bar_obj::__mClass,"__mClass");
};

#endif

Class Bar_obj::__mClass;

void Bar_obj::__register()
{
	hx::Static(__mClass) = hx::RegisterClass(HX_CSTRING("Bar"), hx::TCanCast< Bar_obj> ,sStaticFields,sMemberFields,
	&__CreateEmpty, &__Create,
	&super::__SGetClass(), 0, sMarkStatics
#ifdef HXCPP_VISIT_ALLOCS
    , sVisitStatics
#endif
#ifdef HXCPP_SCRIPTABLE
    , sMemberStorageInfo
#endif
);
}

void Bar_obj::__boot()
{
}

