Replace _IRR_OVERRIDE_ macro with override keyword

The commit also establishes a precedent of leaving off the `virtual`
keyword in overrides. Although not strictly necessary, I believe this is
good for readability because it makes it clear it is an override and not
a pure virtual function, and it helps keep line lengths shorter. We
should move towards eliminating the macro altogether, but the definition
has been left in with a note on deprecation so that in-progress work
will not suffer merge conflicts.
This commit is contained in:
JosiahWI
2022-10-09 13:57:28 -05:00
committed by sfan5
parent f3a1f9f656
commit 59fc4401f1
87 changed files with 1471 additions and 1474 deletions

View File

@ -31,143 +31,143 @@ public:
virtual ~CGUIEnvironment();
//! draws all gui elements
virtual void drawAll(bool useScreenSize) _IRR_OVERRIDE_;
void drawAll(bool useScreenSize) override;
//! returns the current video driver
virtual video::IVideoDriver* getVideoDriver() const _IRR_OVERRIDE_;
video::IVideoDriver* getVideoDriver() const override;
//! returns pointer to the filesystem
virtual io::IFileSystem* getFileSystem() const _IRR_OVERRIDE_;
io::IFileSystem* getFileSystem() const override;
//! returns a pointer to the OS operator
virtual IOSOperator* getOSOperator() const _IRR_OVERRIDE_;
IOSOperator* getOSOperator() const override;
//! posts an input event to the environment
virtual bool postEventFromUser(const SEvent& event) _IRR_OVERRIDE_;
bool postEventFromUser(const SEvent& event) override;
//! This sets a new event receiver for gui events. Usually you do not have to
//! use this method, it is used by the internal engine.
virtual void setUserEventReceiver(IEventReceiver* evr) _IRR_OVERRIDE_;
void setUserEventReceiver(IEventReceiver* evr) override;
//! removes all elements from the environment
virtual void clear() _IRR_OVERRIDE_;
void clear() override;
//! called if an event happened.
virtual bool OnEvent(const SEvent& event) _IRR_OVERRIDE_;
bool OnEvent(const SEvent& event) override;
//! returns the current gui skin
virtual IGUISkin* getSkin() const _IRR_OVERRIDE_;
IGUISkin* getSkin() const override;
//! Sets a new GUI Skin
virtual void setSkin(IGUISkin* skin) _IRR_OVERRIDE_;
void setSkin(IGUISkin* skin) override;
//! Creates a new GUI Skin based on a template.
/** \return Returns a pointer to the created skin.
If you no longer need the skin, you should call IGUISkin::drop().
See IReferenceCounted::drop() for more information. */
virtual IGUISkin* createSkin(EGUI_SKIN_TYPE type) _IRR_OVERRIDE_;
IGUISkin* createSkin(EGUI_SKIN_TYPE type) override;
//! Creates the image list from the given texture.
virtual IGUIImageList* createImageList(video::ITexture* texture,
core::dimension2d<s32> imageSize, bool useAlphaChannel) _IRR_OVERRIDE_;
core::dimension2d<s32> imageSize, bool useAlphaChannel) override;
//! returns the font
virtual IGUIFont* getFont(const io::path& filename) _IRR_OVERRIDE_;
IGUIFont* getFont(const io::path& filename) override;
//! add an externally loaded font
virtual IGUIFont* addFont(const io::path& name, IGUIFont* font) _IRR_OVERRIDE_;
IGUIFont* addFont(const io::path& name, IGUIFont* font) override;
//! remove loaded font
virtual void removeFont(IGUIFont* font) _IRR_OVERRIDE_;
void removeFont(IGUIFont* font) override;
//! returns default font
virtual IGUIFont* getBuiltInFont() const _IRR_OVERRIDE_;
IGUIFont* getBuiltInFont() const override;
//! returns the sprite bank
virtual IGUISpriteBank* getSpriteBank(const io::path& filename) _IRR_OVERRIDE_;
IGUISpriteBank* getSpriteBank(const io::path& filename) override;
//! returns the sprite bank
virtual IGUISpriteBank* addEmptySpriteBank(const io::path& name) _IRR_OVERRIDE_;
IGUISpriteBank* addEmptySpriteBank(const io::path& name) override;
//! adds an button. The returned pointer must not be dropped.
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_;
IGUIButton* addButton(const core::rect<s32>& rectangle, IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0,const wchar_t* tooltiptext = 0) override;
//! adds a scrollbar. The returned pointer must not be dropped.
virtual IGUIScrollBar* addScrollBar(bool horizontal, const core::rect<s32>& rectangle,
IGUIElement* parent=0, s32 id=-1) _IRR_OVERRIDE_;
IGUIElement* parent=0, s32 id=-1) override;
//! Adds an image element.
virtual IGUIImage* addImage(video::ITexture* image, core::position2d<s32> pos,
bool useAlphaChannel=true, IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0) _IRR_OVERRIDE_;
bool useAlphaChannel=true, IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0) override;
//! adds an image. The returned pointer must not be dropped.
virtual IGUIImage* addImage(const core::rect<s32>& rectangle,
IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0, bool useAlphaChannel=true) _IRR_OVERRIDE_;
IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0, bool useAlphaChannel=true) override;
//! adds a checkbox
virtual IGUICheckBox* addCheckBox(bool checked, const core::rect<s32>& rectangle,
IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0) _IRR_OVERRIDE_;
IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0) override;
//! adds a list box
virtual IGUIListBox* addListBox(const core::rect<s32>& rectangle,
IGUIElement* parent=0, s32 id=-1, bool drawBackground=false) _IRR_OVERRIDE_;
IGUIElement* parent=0, s32 id=-1, bool drawBackground=false) override;
//! Adds a file open dialog.
virtual IGUIFileOpenDialog* addFileOpenDialog(const wchar_t* title = 0,
bool modal=true, IGUIElement* parent=0, s32 id=-1,
bool restoreCWD=false, io::path::char_type* startDir=0) _IRR_OVERRIDE_;
bool restoreCWD=false, io::path::char_type* startDir=0) override;
//! adds a static text. The returned pointer must not be dropped.
virtual IGUIStaticText* addStaticText(const wchar_t* text, const core::rect<s32>& rectangle,
bool border=false, bool wordWrap=true, IGUIElement* parent=0, s32 id=-1, bool drawBackground = false) _IRR_OVERRIDE_;
bool border=false, bool wordWrap=true, IGUIElement* parent=0, s32 id=-1, bool drawBackground = false) override;
//! Adds an edit box. The returned pointer must not be dropped.
virtual IGUIEditBox* addEditBox(const wchar_t* text, const core::rect<s32>& rectangle,
bool border=false, IGUIElement* parent=0, s32 id=-1) _IRR_OVERRIDE_;
bool border=false, IGUIElement* parent=0, s32 id=-1) override;
//! Adds a tab control to the environment.
virtual IGUITabControl* addTabControl(const core::rect<s32>& rectangle,
IGUIElement* parent=0, bool fillbackground=false, bool border=true, s32 id=-1) _IRR_OVERRIDE_;
IGUIElement* parent=0, bool fillbackground=false, bool border=true, s32 id=-1) override;
//! Adds tab to the environment.
virtual IGUITab* addTab(const core::rect<s32>& rectangle,
IGUIElement* parent=0, s32 id=-1) _IRR_OVERRIDE_;
IGUIElement* parent=0, s32 id=-1) override;
//! Adds a combo box to the environment.
virtual IGUIComboBox* addComboBox(const core::rect<s32>& rectangle,
IGUIElement* parent=0, s32 id=-1) _IRR_OVERRIDE_;
IGUIElement* parent=0, s32 id=-1) override;
//! sets the focus to an element
virtual bool setFocus(IGUIElement* element) _IRR_OVERRIDE_;
bool setFocus(IGUIElement* element) override;
//! removes the focus from an element
virtual bool removeFocus(IGUIElement* element) _IRR_OVERRIDE_;
bool removeFocus(IGUIElement* element) override;
//! Returns if the element has focus
virtual bool hasFocus(const IGUIElement* element, bool checkSubElements=false) const _IRR_OVERRIDE_;
bool hasFocus(const IGUIElement* element, bool checkSubElements=false) const override;
//! Returns the element with the focus
virtual IGUIElement* getFocus() const _IRR_OVERRIDE_;
IGUIElement* getFocus() const override;
//! Returns the element last known to be under the mouse
virtual IGUIElement* getHovered() const _IRR_OVERRIDE_;
IGUIElement* getHovered() const override;
//! Returns the root gui element.
virtual IGUIElement* getRootGUIElement() _IRR_OVERRIDE_;
IGUIElement* getRootGUIElement() override;
virtual void OnPostRender( u32 time ) _IRR_OVERRIDE_;
void OnPostRender( u32 time ) override;
//! Find the next element which would be selected when pressing the tab-key
virtual IGUIElement* getNextElement(bool reverse=false, bool group=false) _IRR_OVERRIDE_;
IGUIElement* getNextElement(bool reverse=false, bool group=false) override;
//! Set the way the gui will handle focus changes
virtual void setFocusBehavior(u32 flags) _IRR_OVERRIDE_;
void setFocusBehavior(u32 flags) override;
//! Get the way the gui does handle focus changes
virtual u32 getFocusBehavior() const _IRR_OVERRIDE_;
u32 getFocusBehavior() const override;
//! Adds a IGUIElement to deletion queue.
virtual void addToDeletionQueue(IGUIElement* element) _IRR_OVERRIDE_;
void addToDeletionQueue(IGUIElement* element) override;
private: