// Copyright (C) 2002-2006 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h #pragma once #using using namespace System; #pragma unmanaged #include "..\\..\\include\\irrlicht.h" #pragma managed #include "Rect.h" #include "Color.h" namespace Irrlicht { namespace GUI { /// /// Base class of all GUI elements. /// public __gc class IGUIElement { public: /// /// You should access the IGUIElement /// through the methods in IGUIEnvironment. Simply don't use /// this constructor. /// ///The real, unmanaged C++ element IGUIElement(irr::gui::IGUIElement* element); ~IGUIElement(); /// /// Returns the parent of this element. /// __property IGUIElement* get_Parent(); /// /// Sets or gets the relative rectangle of this element. /// __property Core::Rect get_RelativePosition(); /// /// Sets or gets the relative rectangle of this element. /// __property void set_RelativePosition(Core::Rect r); /// /// Gets the absolute rectangle of this element. /// __property Core::Rect get_AbsolutePosition(); /// /// Updates the absolute position of this element. /// void UpdateAbsolutePosition(); /// /// Returns the child element, which is at the position of the point. /// IGUIElement* GetElementFromPoint(Core::Position2D point); /// /// Adds a GUI element as new child of this element. /// void AddChild(IGUIElement* child); /// /// Removes a child element. /// void RemoveChild(IGUIElement* child); /// /// Removes this element from its parent. /// void Remove(); /// /// Draws this element /// void Draw(); /// /// Moves this element. /// void Move(Core::Position2D absoluteMovement); /// /// Sets or gets if the element is visible. /// __property bool get_Visible(); /// /// Sets or gets if the element is visible. /// __property void set_Visible(bool visible); /// /// Sets or gets if the element is enabled. /// __property bool get_Enabled(); /// /// Sets or gets if the element is enabled. /// __property void set_Enabled(bool enabled); /// /// Sets or gets the text the element is displaying /// __property void set_Text(System::String* text); /// /// Sets or gets the text the element is displaying /// __property System::String* get_Text(); /// /// Sets or gets the ID of this element /// __property int get_ID(); /// /// Sets or gets the ID of this element /// __property void set_ID(int id); /// /// Returns the internal pointer to the native C++ irrlicht element. /// Do not use this, only needed by the internal .NET wrapper. /// __property irr::gui::IGUIElement* get_NativeElement(); protected: irr::gui::IGUIElement* Element; }; } }