virtuals removed

virtuals removed and replaced with override where necessary, clang-tidy to the rescue.
This commit is contained in:
marauder2k7 2024-03-18 18:13:00 +00:00
parent 88a43f3137
commit efbe5e90f5
255 changed files with 2164 additions and 2164 deletions

View file

@ -42,7 +42,7 @@ public:
GuiBackgroundCtrl();
void onRender(Point2I offset, const RectI &updateRect);
void onRender(Point2I offset, const RectI &updateRect) override;
};
#endif

View file

@ -63,13 +63,13 @@ class GuiBitmapCtrl : public GuiControl
void setBitmapHandle(GFXTexHandle handle, bool resize = false);
// GuiControl.
bool onWake();
void onSleep();
void inspectPostApply();
bool onWake() override;
void onSleep() override;
void inspectPostApply() override;
void updateSizing();
void onRender(Point2I offset, const RectI &updateRect);
void onRender(Point2I offset, const RectI &updateRect) override;
void setValue(S32 x, S32 y);
DECLARE_CONOBJECT( GuiBitmapCtrl );

View file

@ -50,7 +50,7 @@ protected:
GuiPopupTextListCtrl *mTextList;
public:
GuiPopUpBackgroundCtrl(GuiPopUpMenuCtrl *ctrl, GuiPopupTextListCtrl* textList);
void onMouseDown(const GuiEvent &event);
void onMouseDown(const GuiEvent &event) override;
};
class GuiPopupTextListCtrl : public GuiTextListCtrl
@ -66,12 +66,12 @@ public:
GuiPopupTextListCtrl(GuiPopUpMenuCtrl *ctrl);
// GuiArrayCtrl overload:
void onCellSelected(Point2I cell);
void onCellSelected(Point2I cell) override;
// GuiControl overloads:
bool onKeyDown(const GuiEvent &event);
void onMouseUp(const GuiEvent &event);
void onRenderCell(Point2I offset, Point2I cell, bool selected, bool mouseOver);
bool onKeyDown(const GuiEvent &event) override;
void onMouseUp(const GuiEvent &event) override;
void onRenderCell(Point2I offset, Point2I cell, bool selected, bool mouseOver) override;
};
class GuiPopUpMenuCtrl : public GuiTextCtrl
@ -141,26 +141,26 @@ public:
GuiPopUpMenuCtrl(void);
~GuiPopUpMenuCtrl();
GuiScrollCtrl::Region mScrollDir;
bool onWake(); // Added
bool onAdd();
void onSleep();
bool onWake() override; // Added
bool onAdd() override;
void onSleep() override;
void setBitmap(const char *name); // Added
void sort();
void sortID(); // Added
void addEntry(const char *buf, S32 id = -1, U32 scheme = 0);
void addScheme(U32 id, ColorI fontColor, ColorI fontColorHL, ColorI fontColorSEL);
void onRender(Point2I offset, const RectI &updateRect);
void onAction();
void onRender(Point2I offset, const RectI &updateRect) override;
void onAction() override;
virtual void closePopUp();
void clear();
void clear() override;
void clearEntry( S32 entry ); // Added
void onMouseDown(const GuiEvent &event);
void onMouseUp(const GuiEvent &event);
void onMouseEnter(const GuiEvent &event); // Added
void onMouseLeave(const GuiEvent &); // Added
void onMouseDown(const GuiEvent &event) override;
void onMouseUp(const GuiEvent &event) override;
void onMouseEnter(const GuiEvent &event) override; // Added
void onMouseLeave(const GuiEvent &) override; // Added
void setupAutoScroll(const GuiEvent &event);
void autoScroll();
bool onKeyDown(const GuiEvent &event);
bool onKeyDown(const GuiEvent &event) override;
void reverseTextList();
bool getFontColor(ColorI &fontColor, S32 id, bool selected, bool mouseOver);
bool getColoredBox(ColorI &boxColor, S32 id); // Added
@ -170,7 +170,7 @@ public:
void setSelected(S32 id, bool bNotifyScript = true);
void setFirstSelected(bool bNotifyScript = true); // Added
void setNoneSelected(); // Added
const char *getScriptValue();
const char *getScriptValue() override;
const char *getTextById(S32 id);
S32 findText( const char* text );
S32 getNumEntries() { return( mEntries.size() ); }

View file

@ -48,7 +48,7 @@ protected:
GuiPopupTextListCtrlEx *mTextList;
public:
GuiPopUpBackgroundCtrlEx(GuiPopUpMenuCtrlEx *ctrl, GuiPopupTextListCtrlEx* textList);
void onMouseDown(const GuiEvent &event);
void onMouseDown(const GuiEvent &event) override;
};
class GuiPopupTextListCtrlEx : public GuiTextListCtrl
@ -66,13 +66,13 @@ class GuiPopupTextListCtrlEx : public GuiTextListCtrl
GuiPopupTextListCtrlEx(GuiPopUpMenuCtrlEx *ctrl);
// GuiArrayCtrl overload:
void onCellSelected(Point2I cell);
void onCellSelected(Point2I cell) override;
// GuiControl overloads:
bool onKeyDown(const GuiEvent &event);
void onMouseUp(const GuiEvent &event);
void onMouseMove(const GuiEvent &event);
void onRenderCell(Point2I offset, Point2I cell, bool selected, bool mouseOver);
bool onKeyDown(const GuiEvent &event) override;
void onMouseUp(const GuiEvent &event) override;
void onMouseMove(const GuiEvent &event) override;
void onRenderCell(Point2I offset, Point2I cell, bool selected, bool mouseOver) override;
};
class GuiPopUpMenuCtrlEx : public GuiTextCtrl
@ -150,10 +150,10 @@ class GuiPopUpMenuCtrlEx : public GuiTextCtrl
GuiPopUpMenuCtrlEx(void);
~GuiPopUpMenuCtrlEx();
GuiScrollCtrl::Region mScrollDir;
virtual bool onWake(); // Added
virtual void onRemove();
virtual bool onAdd();
virtual void onSleep();
bool onWake() override; // Added
void onRemove() override;
bool onAdd() override;
void onSleep() override;
void setBitmap(const char *name); // Added
void sort();
void sortID(); // Added
@ -163,18 +163,18 @@ class GuiPopUpMenuCtrlEx : public GuiTextCtrl
addEntry(buf, -2, 0);
}
void addScheme(U32 id, ColorI fontColor, ColorI fontColorHL, ColorI fontColorSEL);
void onRender(Point2I offset, const RectI &updateRect);
void onAction();
void onRender(Point2I offset, const RectI &updateRect) override;
void onAction() override;
virtual void closePopUp();
void clear();
void clear() override;
void clearEntry( S32 entry ); // Added
void onMouseDown(const GuiEvent &event);
void onMouseUp(const GuiEvent &event);
void onMouseEnter(const GuiEvent &event); // Added
void onMouseLeave(const GuiEvent &); // Added
void onMouseDown(const GuiEvent &event) override;
void onMouseUp(const GuiEvent &event) override;
void onMouseEnter(const GuiEvent &event) override; // Added
void onMouseLeave(const GuiEvent &) override; // Added
void setupAutoScroll(const GuiEvent &event);
void autoScroll();
bool onKeyDown(const GuiEvent &event);
bool onKeyDown(const GuiEvent &event) override;
void reverseTextList();
bool getFontColor(ColorI &fontColor, S32 id, bool selected, bool mouseOver);
bool getColoredBox(ColorI &boxColor, S32 id); // Added
@ -183,7 +183,7 @@ class GuiPopUpMenuCtrlEx : public GuiTextCtrl
void setSelected(S32 id, bool bNotifyScript = true);
void setFirstSelected(bool bNotifyScript = true); // Added
void setNoneSelected(); // Added
const char *getScriptValue();
const char *getScriptValue() override;
const char *getTextById(S32 id);
S32 findText( const char* text );
S32 getNumEntries() { return( mEntries.size() ); }

View file

@ -59,8 +59,8 @@ public:
static void initPersistFields();
//Parental methods
bool onAdd();
virtual bool onWake();
bool onAdd() override;
bool onWake() override;
//text methods
virtual void setText(const char *txt = NULL);
@ -75,18 +75,18 @@ public:
{ return static_cast<GuiTextCtrl*>(obj)->getText(); }
void inspectPostApply();
void inspectPostApply() override;
//rendering methods
void onPreRender();
void onRender(Point2I offset, const RectI &updateRect);
void onPreRender() override;
void onRender(Point2I offset, const RectI &updateRect) override;
void displayText( S32 xOffset, S32 yOffset );
// resizing
void autoResize();
//Console methods
const char *getScriptValue();
void setScriptValue(const char *value);
const char *getScriptValue() override;
void setScriptValue(const char *value) override;
};
#endif //_GUI_TEXT_CONTROL_H_

View file

@ -112,7 +112,7 @@ public:
DECLARE_DESCRIPTION( "A control that allows to edit a single line of text. ");
static void initPersistFields();
bool onAdd();
bool onAdd() override;
/// Get the contents of the control.
///
@ -121,7 +121,7 @@ public:
virtual void getRenderText(char *dest);
void setText(S32 tag);
virtual void setText(const UTF8* txt);
void setText(const UTF8* txt) override;
virtual void setText(const UTF16* txt);
S32 getCursorPos() { return( mCursorPos ); }
void setCursorPos( const S32 newPos );
@ -136,30 +136,30 @@ public:
void clearSelectedText();
void forceValidateText();
const char *getScriptValue();
void setScriptValue(const char *value);
const char *getScriptValue() override;
void setScriptValue(const char *value) override;
bool getSinkAllKeys() { return mSinkAllKeyEvents; }
void setSinkAllKeys(bool state) { mSinkAllKeyEvents = state; }
virtual bool onKeyDown(const GuiEvent &event);
virtual void onMouseDown(const GuiEvent &event);
virtual void onMouseDragged(const GuiEvent &event);
virtual void onMouseUp(const GuiEvent &event);
bool onKeyDown(const GuiEvent &event) override;
void onMouseDown(const GuiEvent &event) override;
void onMouseDragged(const GuiEvent &event) override;
void onMouseUp(const GuiEvent &event) override;
void onCopy(bool andCut);
void onPaste();
void onUndo();
virtual void setFirstResponder();
virtual void onLoseFirstResponder();
void setFirstResponder() override;
void onLoseFirstResponder() override;
bool hasText();
void onStaticModified(const char* slotName, const char* newValue = NULL);
void onStaticModified(const char* slotName, const char* newValue = NULL) override;
void onPreRender();
void onRender(Point2I offset, const RectI &updateRect);
void onPreRender() override;
void onRender(Point2I offset, const RectI &updateRect) override;
virtual void drawText( const RectI &drawRect, bool isFocused );
bool dealWithEnter( bool clearResponder );

View file

@ -57,22 +57,22 @@ public:
virtual void getText(char *dest); // dest must be of size
// StructDes::MAX_STRING_LEN + 1
virtual void setText(const char *txt);
void setText(const char *txt) override;
void setValue();
void checkRange();
void checkIncValue();
void timeInc(U32 elapseTime);
virtual bool onKeyDown(const GuiEvent &event);
virtual void onMouseDown(const GuiEvent &event);
virtual void onMouseDragged(const GuiEvent &event);
virtual void onMouseUp(const GuiEvent &event);
virtual bool onMouseWheelUp(const GuiEvent &event);
virtual bool onMouseWheelDown(const GuiEvent &event);
bool onKeyDown(const GuiEvent &event) override;
void onMouseDown(const GuiEvent &event) override;
void onMouseDragged(const GuiEvent &event) override;
void onMouseUp(const GuiEvent &event) override;
bool onMouseWheelUp(const GuiEvent &event) override;
bool onMouseWheelDown(const GuiEvent &event) override;
virtual void onPreRender();
virtual void onRender(Point2I offset, const RectI &updateRect);
void onPreRender() override;
void onRender(Point2I offset, const RectI &updateRect) override;
protected:

View file

@ -59,8 +59,8 @@ class GuiTextListCtrl : public GuiArrayCtrl
S32 mRowHeightPadding;
U32 getRowWidth(Entry *row);
bool cellSelected(Point2I cell);
void onCellSelected(Point2I cell);
bool cellSelected(Point2I cell) override;
void onCellSelected(Point2I cell) override;
public:
GuiTextListCtrl();
@ -77,12 +77,12 @@ class GuiTextListCtrl : public GuiArrayCtrl
virtual void setCellSize( const Point2I &size ){ mCellSize = size; }
virtual void getCellSize( Point2I &size ){ size = mCellSize; }
const char *getScriptValue();
void setScriptValue(const char *value);
const char *getScriptValue() override;
void setScriptValue(const char *value) override;
U32 getNumEntries();
void clear();
void clear() override;
virtual void addEntry(U32 id, const char *text);
virtual void insertEntry(U32 id, const char *text, S32 index);
void setEntry(U32 id, const char *text);
@ -93,7 +93,7 @@ class GuiTextListCtrl : public GuiArrayCtrl
U32 getEntryId(U32 index);
bool onWake();
bool onWake() override;
void removeEntry(U32 id);
virtual void removeEntryByIndex(S32 id);
virtual void sort(U32 column, bool increasing = true);
@ -103,14 +103,14 @@ class GuiTextListCtrl : public GuiArrayCtrl
U32 getSelectedRow();
const char *getSelectedText();
bool onKeyDown(const GuiEvent &event);
bool onGamepadAxisUp(const GuiEvent& event);
bool onGamepadAxisDown(const GuiEvent& event);
bool onKeyDown(const GuiEvent &event) override;
bool onGamepadAxisUp(const GuiEvent& event) override;
bool onGamepadAxisDown(const GuiEvent& event) override;
virtual void onRenderCell(Point2I offset, Point2I cell, bool selected, bool mouseOver);
void onRenderCell(Point2I offset, Point2I cell, bool selected, bool mouseOver) override;
void setSize(Point2I newSize);
void onRemove();
void setSize(Point2I newSize) override;
void onRemove() override;
void addColumnOffset(S32 offset) { mColumnOffsets.push_back(offset); }
void clearColumnOffsets() { mColumnOffsets.clear(); }
};

View file

@ -596,20 +596,20 @@ class GuiTreeViewCtrl : public GuiArrayCtrl
/// @}
// GuiControl
bool onAdd();
bool onWake();
void onSleep();
void onPreRender();
bool onKeyDown( const GuiEvent &event );
void onMouseDown(const GuiEvent &event);
void onMiddleMouseDown(const GuiEvent &event);
void onMouseMove(const GuiEvent &event);
void onMouseEnter(const GuiEvent &event);
void onMouseLeave(const GuiEvent &event);
void onRightMouseDown(const GuiEvent &event);
void onRightMouseUp(const GuiEvent &event);
void onMouseDragged(const GuiEvent &event);
virtual void onMouseUp(const GuiEvent &event);
bool onAdd() override;
bool onWake() override;
void onSleep() override;
void onPreRender() override;
bool onKeyDown( const GuiEvent &event ) override;
void onMouseDown(const GuiEvent &event) override;
void onMiddleMouseDown(const GuiEvent &event) override;
void onMouseMove(const GuiEvent &event) override;
void onMouseEnter(const GuiEvent &event) override;
void onMouseLeave(const GuiEvent &event) override;
void onRightMouseDown(const GuiEvent &event) override;
void onRightMouseUp(const GuiEvent &event) override;
void onMouseDragged(const GuiEvent &event) override;
void onMouseUp(const GuiEvent &event) override;
/// Returns false if the object is a child of one of the inner items.
bool childSearch(Item * item, SimObject *obj, bool yourBaby);
@ -622,8 +622,8 @@ class GuiTreeViewCtrl : public GuiArrayCtrl
bool objectSearch( const SimObject *object, Item **item );
// GuiArrayCtrl
void onRenderCell(Point2I offset, Point2I cell, bool, bool);
void onRender(Point2I offset, const RectI &updateRect);
void onRenderCell(Point2I offset, Point2I cell, bool, bool) override;
void onRender(Point2I offset, const RectI &updateRect) override;
bool renderTooltip( const Point2I &hoverPos, const Point2I& cursorPos, const char* tipText );