	namespace Scope#{ThisName}Event_#{DelegateName}
	{
		typedef void (MYGUICALLBACK *ExportHandle)(
			#{OriginalTypeName1},
			Convert<#{OriginalTypeName2}>::Type,
			Convert<#{OriginalTypeName3}>::Type);
		ExportHandle mExportHandle = nullptr;
		
		void OnEvent(
			#{OriginalTypeName1} #{ValueName1},
			#{OriginalTypeName2} #{ValueName2},
			#{OriginalTypeName3} #{ValueName3})
		{
			mExportHandle(
				#{ValueName1},
				Convert<#{OriginalTypeName2}>::To(#{ValueName2}),
				Convert<#{OriginalTypeName3}>::To(#{ValueName3}));
		}
		
		MYGUIEXPORT void MYGUICALL Export#{ThisName}Event_Delegate#{DelegateName}(ExportHandle _delegate)
		{
			mExportHandle = _delegate;
		}
		MYGUIEXPORT void MYGUICALL Export#{ThisName}Event_Advise#{DelegateName}(MyGUI::Widget* _widget, bool _advise)
		{
			static_cast<MyGUI::#{ThisType}*>(_widget)->request#{DelegateName} = _advise ? MyGUI::newDelegate(OnEvent) : nullptr;
		}
	}
