]> git.lizzy.rs Git - irrlicht.git/blobdiff - include/IGUIEnvironment.h
de-deprecate clearZBuffer
[irrlicht.git] / include / IGUIEnvironment.h
index 695b41b842e0d07804e8d2a9a9fd542044c3e9ef..f00a8f6be971153fe89948dbb41a1702237c8208 100644 (file)
@@ -11,8 +11,6 @@
 #include "EMessageBoxFlags.h"\r
 #include "EFocusFlags.h"\r
 #include "IEventReceiver.h"\r
-#include "IXMLReader.h"\r
-#include "IXMLWriter.h"\r
 #include "path.h"\r
 \r
 namespace irr\r
@@ -74,7 +72,9 @@ class IGUIEnvironment : public virtual IReferenceCounted
 public:\r
 \r
        //! Draws all gui elements by traversing the GUI environment starting at the root node.\r
-       virtual void drawAll() = 0;\r
+       /** \param  When true ensure the GuiEnvironment (aka the RootGUIElement) has the same size as the current driver screensize. \r
+                   Can be set to false to control that size yourself, p.E when not the full size should be used for UI. */\r
+       virtual void drawAll(bool useScreenSize=true) = 0;\r
 \r
        //! Sets the focus to an element.\r
        /** Causes a EGET_ELEMENT_FOCUS_LOST event followed by a\r
@@ -258,10 +258,14 @@ public:
        Note that it usually works badly to pass the modal screen already as parent when creating\r
        a new element. It's better to add that new element later to the modal screen with addChild.\r
        \param parent Parent gui element of the modal.\r
+       \param blinkMode Bitset of when to blink (can be combined)\r
+               0 = never\r
+               1 = focus changes\r
+               2 = Left mouse button pressed down\r
        \return Pointer to the created modal. Returns 0 if an error occurred.\r
        This pointer should not be dropped. See IReferenceCounted::drop() for\r
        more information. */\r
-       virtual IGUIElement* addModalScreen(IGUIElement* parent) = 0;\r
+       virtual IGUIElement* addModalScreen(IGUIElement* parent, int blinkMode = 3) = 0;\r
 \r
        //! Adds a message box.\r
        /** \param caption Text to be displayed the title of the message box.\r
@@ -614,18 +618,6 @@ public:
        \return True if loading succeeded, else false. */\r
        virtual bool loadGUI(io::IReadFile* file, IGUIElement* parent=0) = 0;\r
 \r
-       //! Writes attributes of the gui environment\r
-       virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const =0;\r
-\r
-       //! Reads attributes of the gui environment\r
-       virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0)=0;\r
-\r
-       //! writes an element\r
-       virtual void writeGUIElement(io::IXMLWriter* writer, IGUIElement* node) =0;\r
-\r
-       //! reads an element\r
-       virtual void readGUIElement(io::IXMLReader* reader, IGUIElement* node) =0;\r
-\r
        //! Find the next element which would be selected when pressing the tab-key\r
        /** If you set the focus for the result you can manually force focus-changes like they\r
        would happen otherwise by the tab-keys.\r
@@ -644,6 +636,17 @@ public:
        //! Get the way the gui does handle focus changes\r
        /** \returns A bitmask which is a combination of ::EFOCUS_FLAG flags.*/\r
        virtual u32 getFocusBehavior() const = 0;\r
+\r
+       //! Adds a IGUIElement to deletion queue.\r
+       /** Queued elements will be removed at the end of each drawAll call.\r
+       Or latest in the destructor of the GUIEnvironment.\r
+       This can be used to allow an element removing itself safely in a function \r
+       iterating over gui elements, like an overloaded IGUIElement::draw or \r
+       IGUIElement::OnPostRender function.\r
+       Note that in general just calling IGUIElement::remove() is enough. \r
+       Unless you create your own GUI elements removing themselves you won't need it.\r
+       \param element: Element to remove */\r
+       virtual void addToDeletionQueue(IGUIElement* element) = 0;\r
 };\r
 \r
 \r