/*!
	@file
	@author		Generate utility by Albert Semenov
	@date		01/2009
	@module
*/
#pragma once

#include "MyGUI.Managed_Widget.h"

namespace MyGUI
{
	namespace Managed
	{

		public ref class DDContainer : public Widget
		{

		private:
			typedef MyGUI::DDContainer ThisType;

		public:
			DDContainer() : Widget() { }

		internal:
			DDContainer( MyGUI::DDContainer* _native ) : Widget(_native) { }
			DDContainer( BaseWidget^ _parent, MyGUI::WidgetStyle _style, const std::string& _skin, const MyGUI::IntCoord& _coord, MyGUI::Align _align, const std::string& _layer, const std::string& _name )
			{
				CreateWidget(_parent, _style, _skin, _coord, _align, _layer, _name);
			}

			virtual const std::string& getClassTypeName() override { return ThisType::getClassTypeName(); }

			static BaseWidget^ WidgetCreator(BaseWidget^ _parent, MyGUI::WidgetStyle _style, const std::string& _skin, const MyGUI::IntCoord& _coord, MyGUI::Align _align, const std::string& _layer, const std::string& _name)
			{
				return gcnew DDContainer(_parent, _style, _skin, _coord, _align, _layer, _name);
			}


			//InsertPoint





   	public:
		delegate void HandleDragWidgetInfo(
			Convert<MyGUI::DDContainer *>::Type _sender ,
			Convert<MyGUI::Widget * &>::Type _item ,
			Convert<MyGUI::types::TCoord< int > &>::Type _dimension );
		event HandleDragWidgetInfo^ RequestDragWidgetInfo
		{
			void add(HandleDragWidgetInfo^ _value)
			{
				mDelegateDragWidgetInfo += _value;
				MMYGUI_CHECK_NATIVE(mNative);
				static_cast<ThisType*>(mNative)->requestDragWidgetInfo =
					static_cast< MyGUI::delegates::IDelegate3<
						MyGUI::DDContainer * ,
						MyGUI::Widget * & ,
						MyGUI::types::TCoord< int > & > *>(
							new Delegate3_Ref2< HandleDragWidgetInfo^ ,
							MyGUI::DDContainer * ,
							MyGUI::Widget * & ,
							MyGUI::types::TCoord< int > & >(mDelegateDragWidgetInfo) );
			}
			void remove(HandleDragWidgetInfo^ _value)
			{
				mDelegateDragWidgetInfo -= _value;
				MMYGUI_CHECK_NATIVE(mNative);
				if (mDelegateDragWidgetInfo == nullptr)
					static_cast<ThisType*>(mNative)->requestDragWidgetInfo = nullptr;
				else
					static_cast<ThisType*>(mNative)->requestDragWidgetInfo =
						static_cast< MyGUI::delegates::IDelegate3<
							MyGUI::DDContainer * ,
							MyGUI::Widget * & ,
							MyGUI::types::TCoord< int > & > *>(
								new Delegate3_Ref2< HandleDragWidgetInfo^ ,
									MyGUI::DDContainer * ,
									MyGUI::Widget * & ,
									MyGUI::types::TCoord< int > & >(mDelegateDragWidgetInfo) );
			}
		}
	private:
		HandleDragWidgetInfo^ mDelegateDragWidgetInfo;



   	public:
		delegate void HandleChangeDDState(
			Convert<MyGUI::DDContainer *>::Type _sender ,
			Convert<MyGUI::DDItemState>::Type _state );
		event HandleChangeDDState^ EventChangeDDState
		{
			void add(HandleChangeDDState^ _value)
			{
				mDelegateChangeDDState += _value;
				MMYGUI_CHECK_NATIVE(mNative);
				static_cast<ThisType*>(mNative)->eventChangeDDState =
					static_cast< MyGUI::delegates::IDelegate2<
						MyGUI::DDContainer * ,
						MyGUI::DDItemState > *>(
							new Delegate2< HandleChangeDDState^ ,
							MyGUI::DDContainer * ,
							MyGUI::DDItemState >(mDelegateChangeDDState) );
			}
			void remove(HandleChangeDDState^ _value)
			{
				mDelegateChangeDDState -= _value;
				MMYGUI_CHECK_NATIVE(mNative);
				if (mDelegateChangeDDState == nullptr)
					static_cast<ThisType*>(mNative)->eventChangeDDState = nullptr;
				else
					static_cast<ThisType*>(mNative)->eventChangeDDState =
						static_cast< MyGUI::delegates::IDelegate2<
							MyGUI::DDContainer * ,
							MyGUI::DDItemState > *>(
								new Delegate2< HandleChangeDDState^ ,
									MyGUI::DDContainer * ,
									MyGUI::DDItemState >(mDelegateChangeDDState) );
			}
		}
	private:
		HandleChangeDDState^ mDelegateChangeDDState;



   	public:
		delegate void HandleDropResult(
			Convert<MyGUI::DDContainer *>::Type _sender ,
			Convert<const MyGUI::DDItemInfo &>::Type _info ,
			Convert<bool>::Type _result );
		event HandleDropResult^ EventDropResult
		{
			void add(HandleDropResult^ _value)
			{
				mDelegateDropResult += _value;
				MMYGUI_CHECK_NATIVE(mNative);
				static_cast<ThisType*>(mNative)->eventDropResult =
					static_cast< MyGUI::delegates::IDelegate3<
						MyGUI::DDContainer * ,
						const MyGUI::DDItemInfo & ,
						bool > *>(
							new Delegate3< HandleDropResult^ ,
							MyGUI::DDContainer * ,
							const MyGUI::DDItemInfo & ,
							bool >(mDelegateDropResult) );
			}
			void remove(HandleDropResult^ _value)
			{
				mDelegateDropResult -= _value;
				MMYGUI_CHECK_NATIVE(mNative);
				if (mDelegateDropResult == nullptr)
					static_cast<ThisType*>(mNative)->eventDropResult = nullptr;
				else
					static_cast<ThisType*>(mNative)->eventDropResult =
						static_cast< MyGUI::delegates::IDelegate3<
							MyGUI::DDContainer * ,
							const MyGUI::DDItemInfo & ,
							bool > *>(
								new Delegate3< HandleDropResult^ ,
									MyGUI::DDContainer * ,
									const MyGUI::DDItemInfo & ,
									bool >(mDelegateDropResult) );
			}
		}
	private:
		HandleDropResult^ mDelegateDropResult;



   	public:
		delegate void HandleRequestDrop(
			Convert<MyGUI::DDContainer *>::Type _sender ,
			Convert<const MyGUI::DDItemInfo &>::Type _info ,
			Convert<bool &>::Type _result );
		event HandleRequestDrop^ EventRequestDrop
		{
			void add(HandleRequestDrop^ _value)
			{
				mDelegateRequestDrop += _value;
				MMYGUI_CHECK_NATIVE(mNative);
				static_cast<ThisType*>(mNative)->eventRequestDrop =
					static_cast< MyGUI::delegates::IDelegate3<
						MyGUI::DDContainer * ,
						const MyGUI::DDItemInfo & ,
						bool & > *>(
							new Delegate3< HandleRequestDrop^ ,
							MyGUI::DDContainer * ,
							const MyGUI::DDItemInfo & ,
							bool & >(mDelegateRequestDrop) );
			}
			void remove(HandleRequestDrop^ _value)
			{
				mDelegateRequestDrop -= _value;
				MMYGUI_CHECK_NATIVE(mNative);
				if (mDelegateRequestDrop == nullptr)
					static_cast<ThisType*>(mNative)->eventRequestDrop = nullptr;
				else
					static_cast<ThisType*>(mNative)->eventRequestDrop =
						static_cast< MyGUI::delegates::IDelegate3<
							MyGUI::DDContainer * ,
							const MyGUI::DDItemInfo & ,
							bool & > *>(
								new Delegate3< HandleRequestDrop^ ,
									MyGUI::DDContainer * ,
									const MyGUI::DDItemInfo & ,
									bool & >(mDelegateRequestDrop) );
			}
		}
	private:
		HandleRequestDrop^ mDelegateRequestDrop;



   	public:
		delegate void HandleStartDrag(
			Convert<MyGUI::DDContainer *>::Type _sender ,
			Convert<const MyGUI::DDItemInfo &>::Type _info ,
			Convert<bool &>::Type _result );
		event HandleStartDrag^ EventStartDrag
		{
			void add(HandleStartDrag^ _value)
			{
				mDelegateStartDrag += _value;
				MMYGUI_CHECK_NATIVE(mNative);
				static_cast<ThisType*>(mNative)->eventStartDrag =
					static_cast< MyGUI::delegates::IDelegate3<
						MyGUI::DDContainer * ,
						const MyGUI::DDItemInfo & ,
						bool & > *>(
							new Delegate3< HandleStartDrag^ ,
							MyGUI::DDContainer * ,
							const MyGUI::DDItemInfo & ,
							bool & >(mDelegateStartDrag) );
			}
			void remove(HandleStartDrag^ _value)
			{
				mDelegateStartDrag -= _value;
				MMYGUI_CHECK_NATIVE(mNative);
				if (mDelegateStartDrag == nullptr)
					static_cast<ThisType*>(mNative)->eventStartDrag = nullptr;
				else
					static_cast<ThisType*>(mNative)->eventStartDrag =
						static_cast< MyGUI::delegates::IDelegate3<
							MyGUI::DDContainer * ,
							const MyGUI::DDItemInfo & ,
							bool & > *>(
								new Delegate3< HandleStartDrag^ ,
									MyGUI::DDContainer * ,
									const MyGUI::DDItemInfo & ,
									bool & >(mDelegateStartDrag) );
			}
		}
	private:
		HandleStartDrag^ mDelegateStartDrag;



   	public:
		void SetProperty(
			Convert<const std::string &>::Type _key ,
			Convert<const std::string &>::Type _value )
		{
			MMYGUI_CHECK_NATIVE(mNative);
			static_cast<ThisType*>(mNative)->setProperty(
				Convert<const std::string &>::From(_key) ,
				Convert<const std::string &>::From(_value) );
		}



   	public:
		property Convert<bool>::Type NeedDragDrop
		{
			Convert<bool>::Type get( )
			{
				MMYGUI_CHECK_NATIVE(mNative);
				return Convert<bool>::To( static_cast<ThisType*>(mNative)->getNeedDragDrop() );
			}
			void set(Convert<bool>::Type _value)
			{
				MMYGUI_CHECK_NATIVE(mNative);
				static_cast<ThisType*>(mNative)->setNeedDragDrop( Convert<bool>::From(_value) );
			}
		}
	


   


   


   


		};

	} // namespace Managed
} // namespace MyGUI
