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

@ -28,119 +28,119 @@ namespace gui
virtual ~CGUIEditBox();
//! Sets another skin independent font.
virtual void setOverrideFont(IGUIFont* font=0) _IRR_OVERRIDE_;
void setOverrideFont(IGUIFont* font=0) override;
//! Gets the override font (if any)
/** \return The override font (may be 0) */
virtual IGUIFont* getOverrideFont() const _IRR_OVERRIDE_;
IGUIFont* getOverrideFont() const override;
//! Get the font which is used right now for drawing
/** Currently this is the override font when one is set and the
font of the active skin otherwise */
virtual IGUIFont* getActiveFont() const _IRR_OVERRIDE_;
IGUIFont* getActiveFont() const override;
//! Sets another color for the text.
virtual void setOverrideColor(video::SColor color) _IRR_OVERRIDE_;
void setOverrideColor(video::SColor color) override;
//! Gets the override color
virtual video::SColor getOverrideColor() const _IRR_OVERRIDE_;
video::SColor getOverrideColor() const override;
//! Sets if the text should use the override color or the
//! color in the gui skin.
virtual void enableOverrideColor(bool enable) _IRR_OVERRIDE_;
void enableOverrideColor(bool enable) override;
//! Checks if an override color is enabled
/** \return true if the override color is enabled, false otherwise */
virtual bool isOverrideColorEnabled(void) const _IRR_OVERRIDE_;
bool isOverrideColorEnabled(void) const override;
//! Sets whether to draw the background
virtual void setDrawBackground(bool draw) _IRR_OVERRIDE_;
void setDrawBackground(bool draw) override;
//! Checks if background drawing is enabled
virtual bool isDrawBackgroundEnabled() const _IRR_OVERRIDE_;
bool isDrawBackgroundEnabled() const override;
//! Turns the border on or off
virtual void setDrawBorder(bool border) _IRR_OVERRIDE_;
void setDrawBorder(bool border) override;
//! Checks if border drawing is enabled
virtual bool isDrawBorderEnabled() const _IRR_OVERRIDE_;
bool isDrawBorderEnabled() const override;
//! Enables or disables word wrap for using the edit box as multiline text editor.
virtual void setWordWrap(bool enable) _IRR_OVERRIDE_;
void setWordWrap(bool enable) override;
//! Checks if word wrap is enabled
//! \return true if word wrap is enabled, false otherwise
virtual bool isWordWrapEnabled() const _IRR_OVERRIDE_;
bool isWordWrapEnabled() const override;
//! Enables or disables newlines.
/** \param enable: If set to true, the EGET_EDITBOX_ENTER event will not be fired,
instead a newline character will be inserted. */
virtual void setMultiLine(bool enable) _IRR_OVERRIDE_;
void setMultiLine(bool enable) override;
//! Checks if multi line editing is enabled
//! \return true if mult-line is enabled, false otherwise
virtual bool isMultiLineEnabled() const _IRR_OVERRIDE_;
bool isMultiLineEnabled() const override;
//! Enables or disables automatic scrolling with cursor position
//! \param enable: If set to true, the text will move around with the cursor position
virtual void setAutoScroll(bool enable) _IRR_OVERRIDE_;
void setAutoScroll(bool enable) override;
//! Checks to see if automatic scrolling is enabled
//! \return true if automatic scrolling is enabled, false if not
virtual bool isAutoScrollEnabled() const _IRR_OVERRIDE_;
bool isAutoScrollEnabled() const override;
//! Gets the size area of the text in the edit box
//! \return Returns the size in pixels of the text
virtual core::dimension2du getTextDimension() _IRR_OVERRIDE_;
core::dimension2du getTextDimension() override;
//! Sets text justification
virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical) _IRR_OVERRIDE_;
void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical) override;
//! called if an event happened.
virtual bool OnEvent(const SEvent& event) _IRR_OVERRIDE_;
bool OnEvent(const SEvent& event) override;
//! draws the element and its children
virtual void draw() _IRR_OVERRIDE_;
void draw() override;
//! Sets the new caption of this element.
virtual void setText(const wchar_t* text) _IRR_OVERRIDE_;
void setText(const wchar_t* text) override;
//! Sets the maximum amount of characters which may be entered in the box.
//! \param max: Maximum amount of characters. If 0, the character amount is
//! infinity.
virtual void setMax(u32 max) _IRR_OVERRIDE_;
void setMax(u32 max) override;
//! Returns maximum amount of characters, previously set by setMax();
virtual u32 getMax() const _IRR_OVERRIDE_;
u32 getMax() const override;
//! Set the character used for the cursor.
/** By default it's "_" */
virtual void setCursorChar(const wchar_t cursorChar) _IRR_OVERRIDE_;
void setCursorChar(const wchar_t cursorChar) override;
//! Get the character used for the cursor.
virtual wchar_t getCursorChar() const _IRR_OVERRIDE_;
wchar_t getCursorChar() const override;
//! Set the blinktime for the cursor. 2x blinktime is one full cycle.
//** \param timeMs Blinktime in milliseconds. When set to 0 the cursor is constantly on without blinking */
virtual void setCursorBlinkTime(irr::u32 timeMs) _IRR_OVERRIDE_;
void setCursorBlinkTime(irr::u32 timeMs) override;
//! Get the cursor blinktime
virtual irr::u32 getCursorBlinkTime() const _IRR_OVERRIDE_;
irr::u32 getCursorBlinkTime() const override;
//! Sets whether the edit box is a password box. Setting this to true will
/** disable MultiLine, WordWrap and the ability to copy with ctrl+c or ctrl+x
\param passwordBox: true to enable password, false to disable
\param passwordChar: the character that is displayed instead of letters */
virtual void setPasswordBox(bool passwordBox, wchar_t passwordChar = L'*') _IRR_OVERRIDE_;
void setPasswordBox(bool passwordBox, wchar_t passwordChar = L'*') override;
//! Returns true if the edit box is currently a password box.
virtual bool isPasswordBox() const _IRR_OVERRIDE_;
bool isPasswordBox() const override;
//! Updates the absolute position, splits text if required
virtual void updateAbsolutePosition() _IRR_OVERRIDE_;
void updateAbsolutePosition() override;
//! Returns whether the element takes input from the IME
virtual bool acceptsIME() _IRR_OVERRIDE_;
bool acceptsIME() override;
protected:
//! Breaks the single text line.