]> git.lizzy.rs Git - irrlicht.git/blobdiff - source/Irrlicht/CGUIEnvironment.h
Merge branch 'opengl3' of https://github.com/numberZero/irrlicht
[irrlicht.git] / source / Irrlicht / CGUIEnvironment.h
index b49f25e725640dc3e888272da282c459d7488237..f68b0dafb3f326e3c7b42d8eb147302c29c952e7 100644 (file)
@@ -5,9 +5,6 @@
 #ifndef __C_GUI_ENVIRONMENT_H_INCLUDED__\r
 #define __C_GUI_ENVIRONMENT_H_INCLUDED__\r
 \r
-#include "IrrCompileConfig.h"\r
-#ifdef _IRR_COMPILE_WITH_GUI_\r
-\r
 #include "IGUIEnvironment.h"\r
 #include "IGUIElement.h"\r
 #include "irrArray.h"\r
@@ -31,240 +28,143 @@ public:
        virtual ~CGUIEnvironment();\r
 \r
        //! draws all gui elements\r
-       virtual void drawAll(bool useScreenSize) _IRR_OVERRIDE_;\r
+       void drawAll(bool useScreenSize) override;\r
 \r
        //! returns the current video driver\r
-       virtual video::IVideoDriver* getVideoDriver() const _IRR_OVERRIDE_;\r
+       video::IVideoDriver* getVideoDriver() const override;\r
 \r
        //! returns pointer to the filesystem\r
-       virtual io::IFileSystem* getFileSystem() const _IRR_OVERRIDE_;\r
+       io::IFileSystem* getFileSystem() const override;\r
 \r
        //! returns a pointer to the OS operator\r
-       virtual IOSOperator* getOSOperator() const _IRR_OVERRIDE_;\r
+       IOSOperator* getOSOperator() const override;\r
 \r
        //! posts an input event to the environment\r
-       virtual bool postEventFromUser(const SEvent& event) _IRR_OVERRIDE_;\r
+       bool postEventFromUser(const SEvent& event) override;\r
 \r
        //! This sets a new event receiver for gui events. Usually you do not have to\r
        //! use this method, it is used by the internal engine.\r
-       virtual void setUserEventReceiver(IEventReceiver* evr) _IRR_OVERRIDE_;\r
+       void setUserEventReceiver(IEventReceiver* evr) override;\r
 \r
        //! removes all elements from the environment\r
-       virtual void clear() _IRR_OVERRIDE_;\r
+       void clear() override;\r
 \r
        //! called if an event happened.\r
-       virtual bool OnEvent(const SEvent& event) _IRR_OVERRIDE_;\r
+       bool OnEvent(const SEvent& event) override;\r
 \r
        //! returns the current gui skin\r
-       virtual IGUISkin* getSkin() const _IRR_OVERRIDE_;\r
+       IGUISkin* getSkin() const override;\r
 \r
        //! Sets a new GUI Skin\r
-       virtual void setSkin(IGUISkin* skin) _IRR_OVERRIDE_;\r
+       void setSkin(IGUISkin* skin) override;\r
 \r
        //! Creates a new GUI Skin based on a template.\r
        /** \return Returns a pointer to the created skin.\r
        If you no longer need the skin, you should call IGUISkin::drop().\r
        See IReferenceCounted::drop() for more information. */\r
-       virtual IGUISkin* createSkin(EGUI_SKIN_TYPE type) _IRR_OVERRIDE_;\r
+       IGUISkin* createSkin(EGUI_SKIN_TYPE type) override;\r
 \r
        //! Creates the image list from the given texture.\r
        virtual IGUIImageList* createImageList(video::ITexture* texture,\r
-                                       core::dimension2d<s32> imageSize, bool useAlphaChannel) _IRR_OVERRIDE_;\r
+                                       core::dimension2d<s32> imageSize, bool useAlphaChannel) override;\r
 \r
        //! returns the font\r
-       virtual IGUIFont* getFont(const io::path& filename) _IRR_OVERRIDE_;\r
+       IGUIFont* getFont(const io::path& filename) override;\r
 \r
        //! add an externally loaded font\r
-       virtual IGUIFont* addFont(const io::path& name, IGUIFont* font) _IRR_OVERRIDE_;\r
+       IGUIFont* addFont(const io::path& name, IGUIFont* font) override;\r
 \r
        //! remove loaded font\r
-       virtual void removeFont(IGUIFont* font) _IRR_OVERRIDE_;\r
+       void removeFont(IGUIFont* font) override;\r
 \r
        //! returns default font\r
-       virtual IGUIFont* getBuiltInFont() const _IRR_OVERRIDE_;\r
+       IGUIFont* getBuiltInFont() const override;\r
 \r
        //! returns the sprite bank\r
-       virtual IGUISpriteBank* getSpriteBank(const io::path& filename) _IRR_OVERRIDE_;\r
+       IGUISpriteBank* getSpriteBank(const io::path& filename) override;\r
 \r
        //! returns the sprite bank\r
-       virtual IGUISpriteBank* addEmptySpriteBank(const io::path& name) _IRR_OVERRIDE_;\r
+       IGUISpriteBank* addEmptySpriteBank(const io::path& name) override;\r
 \r
        //! adds an button. The returned pointer must not be dropped.\r
-       virtual IGUIButton* addButton(const core::rect<s32>& rectangle, IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0,const wchar_t* tooltiptext = 0) _IRR_OVERRIDE_;\r
-\r
-       //! adds a window. The returned pointer must not be dropped.\r
-       virtual IGUIWindow* addWindow(const core::rect<s32>& rectangle, bool modal = false,\r
-               const wchar_t* text=0, IGUIElement* parent=0, s32 id=-1) _IRR_OVERRIDE_;\r
-\r
-       //! adds a modal screen. The returned pointer must not be dropped.\r
-       virtual IGUIElement* addModalScreen(IGUIElement* parent, int blinkMode) _IRR_OVERRIDE_;\r
-\r
-       //! Adds a message box.\r
-       virtual IGUIWindow* addMessageBox(const wchar_t* caption, const wchar_t* text=0,\r
-               bool modal = true, s32 flag = EMBF_OK, IGUIElement* parent=0, s32 id=-1, video::ITexture* image=0) _IRR_OVERRIDE_;\r
+       IGUIButton* addButton(const core::rect<s32>& rectangle, IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0,const wchar_t* tooltiptext = 0) override;\r
 \r
        //! adds a scrollbar. The returned pointer must not be dropped.\r
        virtual IGUIScrollBar* addScrollBar(bool horizontal, const core::rect<s32>& rectangle,\r
-               IGUIElement* parent=0, s32 id=-1) _IRR_OVERRIDE_;\r
+               IGUIElement* parent=0, s32 id=-1) override;\r
 \r
        //! Adds an image element.\r
        virtual IGUIImage* addImage(video::ITexture* image, core::position2d<s32> pos,\r
-               bool useAlphaChannel=true, IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0) _IRR_OVERRIDE_;\r
+               bool useAlphaChannel=true, IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0) override;\r
 \r
        //! adds an image. The returned pointer must not be dropped.\r
        virtual IGUIImage* addImage(const core::rect<s32>& rectangle,\r
-               IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0, bool useAlphaChannel=true) _IRR_OVERRIDE_;\r
+               IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0, bool useAlphaChannel=true) override;\r
 \r
        //! adds a checkbox\r
        virtual IGUICheckBox* addCheckBox(bool checked, const core::rect<s32>& rectangle,\r
-               IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0) _IRR_OVERRIDE_;\r
+               IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0) override;\r
 \r
        //! adds a list box\r
        virtual IGUIListBox* addListBox(const core::rect<s32>& rectangle,\r
-               IGUIElement* parent=0, s32 id=-1, bool drawBackground=false) _IRR_OVERRIDE_;\r
-\r
-       //! adds a tree view\r
-       virtual IGUITreeView* addTreeView(const core::rect<s32>& rectangle,\r
-               IGUIElement* parent=0, s32 id=-1, bool drawBackground=false,\r
-               bool scrollBarVertical = true, bool scrollBarHorizontal = false) _IRR_OVERRIDE_;\r
-\r
-       //! adds an mesh viewer. The returned pointer must not be dropped.\r
-       virtual IGUIMeshViewer* addMeshViewer(const core::rect<s32>& rectangle,\r
-               IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0) _IRR_OVERRIDE_;\r
+               IGUIElement* parent=0, s32 id=-1, bool drawBackground=false) override;\r
 \r
        //! Adds a file open dialog.\r
        virtual IGUIFileOpenDialog* addFileOpenDialog(const wchar_t* title = 0,\r
                        bool modal=true, IGUIElement* parent=0, s32 id=-1,\r
-                       bool restoreCWD=false, io::path::char_type* startDir=0) _IRR_OVERRIDE_;\r
-\r
-       //! Adds a color select dialog.\r
-       virtual IGUIColorSelectDialog* addColorSelectDialog(const wchar_t* title = 0,\r
-               bool modal=true, IGUIElement* parent=0, s32 id=-1) _IRR_OVERRIDE_;\r
+                       bool restoreCWD=false, io::path::char_type* startDir=0) override;\r
 \r
        //! adds a static text. The returned pointer must not be dropped.\r
        virtual IGUIStaticText* addStaticText(const wchar_t* text, const core::rect<s32>& rectangle,\r
-               bool border=false, bool wordWrap=true, IGUIElement* parent=0, s32 id=-1, bool drawBackground = false) _IRR_OVERRIDE_;\r
+               bool border=false, bool wordWrap=true, IGUIElement* parent=0, s32 id=-1, bool drawBackground = false) override;\r
 \r
        //! Adds an edit box. The returned pointer must not be dropped.\r
        virtual IGUIEditBox* addEditBox(const wchar_t* text, const core::rect<s32>& rectangle,\r
-               bool border=false, IGUIElement* parent=0, s32 id=-1) _IRR_OVERRIDE_;\r
-\r
-       //! Adds a spin box to the environment\r
-       virtual IGUISpinBox* addSpinBox(const wchar_t* text, const core::rect<s32>& rectangle,\r
-               bool border=false,IGUIElement* parent=0, s32 id=-1) _IRR_OVERRIDE_;\r
+               bool border=false, IGUIElement* parent=0, s32 id=-1) override;\r
 \r
        //! Adds a tab control to the environment.\r
        virtual IGUITabControl* addTabControl(const core::rect<s32>& rectangle,\r
-               IGUIElement* parent=0, bool fillbackground=false, bool border=true, s32 id=-1) _IRR_OVERRIDE_;\r
+               IGUIElement* parent=0, bool fillbackground=false, bool border=true, s32 id=-1) override;\r
 \r
        //! Adds tab to the environment.\r
        virtual IGUITab* addTab(const core::rect<s32>& rectangle,\r
-               IGUIElement* parent=0, s32 id=-1) _IRR_OVERRIDE_;\r
-\r
-       //! Adds a context menu to the environment.\r
-       virtual IGUIContextMenu* addContextMenu(const core::rect<s32>& rectangle,\r
-               IGUIElement* parent=0, s32 id=-1) _IRR_OVERRIDE_;\r
-\r
-       //! Adds a menu to the environment.\r
-       virtual IGUIContextMenu* addMenu(IGUIElement* parent=0, s32 id=-1) _IRR_OVERRIDE_;\r
-\r
-       //! Adds a toolbar to the environment. It is like a menu is always placed on top\r
-       //! in its parent, and contains buttons.\r
-       virtual IGUIToolBar* addToolBar(IGUIElement* parent=0, s32 id=-1) _IRR_OVERRIDE_;\r
+               IGUIElement* parent=0, s32 id=-1) override;\r
 \r
        //! Adds a combo box to the environment.\r
        virtual IGUIComboBox* addComboBox(const core::rect<s32>& rectangle,\r
-               IGUIElement* parent=0, s32 id=-1) _IRR_OVERRIDE_;\r
-\r
-       //! Adds a table element.\r
-       virtual IGUITable* addTable(const core::rect<s32>& rectangle,\r
-               IGUIElement* parent=0, s32 id=-1, bool drawBackground=false) _IRR_OVERRIDE_;\r
-\r
-       //! Adds an element to display the information from the Irrlicht profiler\r
-       virtual IGUIProfiler* addProfilerDisplay(const core::rect<s32>& rectangle,\r
-               IGUIElement* parent=0, s32 id=-1) _IRR_OVERRIDE_;\r
+               IGUIElement* parent=0, s32 id=-1) override;\r
 \r
        //! sets the focus to an element\r
-       virtual bool setFocus(IGUIElement* element) _IRR_OVERRIDE_;\r
+       bool setFocus(IGUIElement* element) override;\r
 \r
        //! removes the focus from an element\r
-       virtual bool removeFocus(IGUIElement* element) _IRR_OVERRIDE_;\r
+       bool removeFocus(IGUIElement* element) override;\r
 \r
        //! Returns if the element has focus\r
-       virtual bool hasFocus(const IGUIElement* element, bool checkSubElements=false) const _IRR_OVERRIDE_;\r
+       bool hasFocus(const IGUIElement* element, bool checkSubElements=false) const override;\r
 \r
        //! Returns the element with the focus\r
-       virtual IGUIElement* getFocus() const _IRR_OVERRIDE_;\r
+       IGUIElement* getFocus() const override;\r
 \r
        //! Returns the element last known to be under the mouse\r
-       virtual IGUIElement* getHovered() const _IRR_OVERRIDE_;\r
-\r
-       //! Adds an element for fading in or out.\r
-       virtual IGUIInOutFader* addInOutFader(const core::rect<s32>* rectangle=0, IGUIElement* parent=0, s32 id=-1) _IRR_OVERRIDE_;\r
+       IGUIElement* getHovered() const override;\r
 \r
        //! Returns the root gui element.\r
-       virtual IGUIElement* getRootGUIElement() _IRR_OVERRIDE_;\r
-\r
-       virtual void OnPostRender( u32 time ) _IRR_OVERRIDE_;\r
+       IGUIElement* getRootGUIElement() override;\r
 \r
-       //! Returns the default element factory which can create all built in elements\r
-       virtual IGUIElementFactory* getDefaultGUIElementFactory() const _IRR_OVERRIDE_;\r
-\r
-       //! Adds an element factory to the gui environment.\r
-       /** Use this to extend the gui environment with new element types which it should be\r
-       able to create automatically, for example when loading data from xml files. */\r
-       virtual void registerGUIElementFactory(IGUIElementFactory* factoryToAdd) _IRR_OVERRIDE_;\r
-\r
-       //! Returns amount of registered scene node factories.\r
-       virtual u32 getRegisteredGUIElementFactoryCount() const _IRR_OVERRIDE_;\r
-\r
-       //! Returns a scene node factory by index\r
-       virtual IGUIElementFactory* getGUIElementFactory(u32 index) const _IRR_OVERRIDE_;\r
-\r
-       //! Adds a GUI Element by its name\r
-       virtual IGUIElement* addGUIElement(const c8* elementName, IGUIElement* parent=0) _IRR_OVERRIDE_;\r
-\r
-       //! Saves the current gui into a file.\r
-       /** \param filename: Name of the file.\r
-       \param start: The element to start saving from.\r
-       if not specified, the root element will be used */\r
-       virtual bool saveGUI( const io::path& filename, IGUIElement* start=0) _IRR_OVERRIDE_;\r
-\r
-       //! Saves the current gui into a file.\r
-       /** \param file: The file to save the GUI to.\r
-       \param start: The element to start saving from.\r
-       if not specified, the root element will be used */\r
-       virtual bool saveGUI(io::IWriteFile* file, IGUIElement* start=0) _IRR_OVERRIDE_;\r
-\r
-       //! Loads the gui. Note that the current gui is not cleared before.\r
-       /** \param filename: Name of the file.\r
-       \param parent: The parent of all loaded GUI elements,\r
-       if not specified, the root element will be used */\r
-       virtual bool loadGUI(const io::path& filename, IGUIElement* parent=0) _IRR_OVERRIDE_;\r
-\r
-       //! Loads the gui. Note that the current gui is not cleared before.\r
-       /** \param file: IReadFile to load the GUI from\r
-       \param parent: The parent of all loaded GUI elements,\r
-       if not specified, the root element will be used */\r
-       virtual bool loadGUI(io::IReadFile* file, IGUIElement* parent=0) _IRR_OVERRIDE_;\r
-\r
-       //! Writes attributes of the environment\r
-       virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const _IRR_OVERRIDE_;\r
-\r
-       //! Reads attributes of the environment.\r
-       virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0) _IRR_OVERRIDE_;\r
+       void OnPostRender( u32 time ) override;\r
 \r
        //! Find the next element which would be selected when pressing the tab-key\r
-       virtual IGUIElement* getNextElement(bool reverse=false, bool group=false) _IRR_OVERRIDE_;\r
+       IGUIElement* getNextElement(bool reverse=false, bool group=false) override;\r
 \r
        //! Set the way the gui will handle focus changes\r
-       virtual void setFocusBehavior(u32 flags) _IRR_OVERRIDE_;\r
+       void setFocusBehavior(u32 flags) override;\r
 \r
        //! Get the way the gui does handle focus changes\r
-       virtual u32 getFocusBehavior() const _IRR_OVERRIDE_;\r
+       u32 getFocusBehavior() const override;\r
 \r
        //! Adds a IGUIElement to deletion queue.\r
-       virtual void addToDeletionQueue(IGUIElement* element) _IRR_OVERRIDE_;\r
+       void addToDeletionQueue(IGUIElement* element) override;\r
 \r
 private:\r
 \r
@@ -308,8 +208,6 @@ private:
 \r
        SToolTip ToolTip;\r
 \r
-       core::array<IGUIElementFactory*> GUIElementFactoryList;\r
-\r
        core::array<SFont> Fonts;\r
        core::array<SSpriteBank> Banks;\r
        video::IVideoDriver* Driver;\r
@@ -330,8 +228,4 @@ private:
 } // end namespace gui\r
 } // end namespace irr\r
 \r
-#endif // _IRR_COMPILE_WITH_GUI_\r
-\r
 #endif // __C_GUI_ENVIRONMENT_H_INCLUDED__\r
-\r
-\r