/*! @file @author Generate utility by Albert Semenov @date 01/2009 @module */ #pragma once #include "MyGUI_Managed_TextBox.h" namespace MyGUI { namespace Managed { public ref class Window : public TextBox { private: typedef MyGUI::Window ThisType; public: Window() : TextBox() { } internal: Window( MyGUI::Window* _native ) : TextBox(_native) { } Window( 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 Window(_parent, _style, _skin, _coord, _align, _layer, _name); } //InsertPoint public: delegate void HandleWindowChangeCoord( Convert::Type _sender ); event HandleWindowChangeCoord^ EventWindowChangeCoord { void add(HandleWindowChangeCoord^ _value) { bool empty = mDelegateWindowChangeCoord == nullptr; mDelegateWindowChangeCoord += _value; MMYGUI_CHECK_NATIVE(mNative); if (empty) static_cast(mNative)->eventWindowChangeCoord += static_cast< MyGUI::delegates::IDelegate1< MyGUI::Window * > *>( new Delegate1< HandleWindowChangeCoord^ , MyGUI::Window * >(mDelegateWindowChangeCoord) ); } void remove(HandleWindowChangeCoord^ _value) { mDelegateWindowChangeCoord -= _value; MMYGUI_CHECK_NATIVE(mNative); bool empty = mDelegateWindowChangeCoord == nullptr; if (empty) static_cast(mNative)->eventWindowChangeCoord -= static_cast< MyGUI::delegates::IDelegate1< MyGUI::Window * > *>( new Delegate1< HandleWindowChangeCoord^ , MyGUI::Window * >(mDelegateWindowChangeCoord) ); } } private: HandleWindowChangeCoord^ mDelegateWindowChangeCoord; public: delegate void HandleWindowButtonPressed( Convert::Type _sender , Convert::Type _name ); event HandleWindowButtonPressed^ EventWindowButtonPressed { void add(HandleWindowButtonPressed^ _value) { bool empty = mDelegateWindowButtonPressed == nullptr; mDelegateWindowButtonPressed += _value; MMYGUI_CHECK_NATIVE(mNative); if (empty) static_cast(mNative)->eventWindowButtonPressed += static_cast< MyGUI::delegates::IDelegate2< MyGUI::Window * , const std::string & > *>( new Delegate2< HandleWindowButtonPressed^ , MyGUI::Window * , const std::string & >(mDelegateWindowButtonPressed) ); } void remove(HandleWindowButtonPressed^ _value) { mDelegateWindowButtonPressed -= _value; MMYGUI_CHECK_NATIVE(mNative); bool empty = mDelegateWindowButtonPressed == nullptr; if (empty) static_cast(mNative)->eventWindowButtonPressed -= static_cast< MyGUI::delegates::IDelegate2< MyGUI::Window * , const std::string & > *>( new Delegate2< HandleWindowButtonPressed^ , MyGUI::Window * , const std::string & >(mDelegateWindowButtonPressed) ); } } private: HandleWindowButtonPressed^ mDelegateWindowButtonPressed; public: void SetCoord( Convert::Type _left , Convert::Type _top , Convert::Type _width , Convert::Type _height ) { MMYGUI_CHECK_NATIVE(mNative); static_cast(mNative)->setCoord( Convert::From(_left) , Convert::From(_top) , Convert::From(_width) , Convert::From(_height) ); } public: void SetSize( Convert::Type _width , Convert::Type _height ) { MMYGUI_CHECK_NATIVE(mNative); static_cast(mNative)->setSize( Convert::From(_width) , Convert::From(_height) ); } public: void SetPosition( Convert::Type _left , Convert::Type _top ) { MMYGUI_CHECK_NATIVE(mNative); static_cast(mNative)->setPosition( Convert::From(_left) , Convert::From(_top) ); } public: void SetMaxSize( Convert::Type _width , Convert::Type _height ) { MMYGUI_CHECK_NATIVE(mNative); static_cast(mNative)->setMaxSize( Convert::From(_width) , Convert::From(_height) ); } public: void SetMinSize( Convert::Type _width , Convert::Type _height ) { MMYGUI_CHECK_NATIVE(mNative); static_cast(mNative)->setMinSize( Convert::From(_width) , Convert::From(_height) ); } public: void DestroySmooth( ) { MMYGUI_CHECK_NATIVE(mNative); static_cast(mNative)->destroySmooth( ); } public: void SetVisibleSmooth( Convert::Type _value ) { MMYGUI_CHECK_NATIVE(mNative); static_cast(mNative)->setVisibleSmooth( Convert::From(_value) ); } public: property Convert::Type Movable { Convert::Type get( ) { MMYGUI_CHECK_NATIVE(mNative); return Convert::To( static_cast(mNative)->getMovable() ); } void set(Convert::Type _value) { MMYGUI_CHECK_NATIVE(mNative); static_cast(mNative)->setMovable( Convert::From(_value) ); } } public: property Convert &>::Type ActionScale { Convert &>::Type get( ) { MMYGUI_CHECK_NATIVE(mNative); return Convert &>::To( static_cast(mNative)->getActionScale() ); } } public: property Convert::Type Snap { Convert::Type get( ) { MMYGUI_CHECK_NATIVE(mNative); return Convert::To( static_cast(mNative)->getSnap() ); } void set(Convert::Type _value) { MMYGUI_CHECK_NATIVE(mNative); static_cast(mNative)->setSnap( Convert::From(_value) ); } } public: property Convert>::Type MaxSize { Convert>::Type get( ) { MMYGUI_CHECK_NATIVE(mNative); return Convert>::To( static_cast(mNative)->getMaxSize() ); } void set(Convert &>::Type _value) { MMYGUI_CHECK_NATIVE(mNative); static_cast(mNative)->setMaxSize( Convert &>::From(_value) ); } } public: property Convert>::Type MinSize { Convert>::Type get( ) { MMYGUI_CHECK_NATIVE(mNative); return Convert>::To( static_cast(mNative)->getMinSize() ); } void set(Convert &>::Type _value) { MMYGUI_CHECK_NATIVE(mNative); static_cast(mNative)->setMinSize( Convert &>::From(_value) ); } } public: property Convert::Type CaptionWidget { Convert::Type get( ) { MMYGUI_CHECK_NATIVE(mNative); return Convert::To( static_cast(mNative)->getCaptionWidget() ); } } public: property Convert::Type AutoAlpha { Convert::Type get( ) { MMYGUI_CHECK_NATIVE(mNative); return Convert::To( static_cast(mNative)->getAutoAlpha() ); } void set(Convert::Type _value) { MMYGUI_CHECK_NATIVE(mNative); static_cast(mNative)->setAutoAlpha( Convert::From(_value) ); } } }; } // namespace Managed } // namespace MyGUI