rest of virtuals removed

virtuals removed and replaced with override where necessary on the rest of the code base, clang-tidy to the rescue.
This commit is contained in:
marauder2k7 2024-03-18 18:40:22 +00:00
parent efbe5e90f5
commit 2b295fb7f0
454 changed files with 4162 additions and 4156 deletions

View file

@ -57,12 +57,12 @@ public:
Point2I mUseEyePoint; /// optionally use the eye point. x != 0 -> horiz. y != 0 -> vert.
virtual void onRender (Point2I offset, const RectI &updateRect);
void onRender (Point2I offset, const RectI &updateRect) override;
virtual void resizeDuringRender ();
virtual bool onWake ();
virtual void onSleep ();
virtual void onDeleteNotify (SimObject *object);
bool onWake () override;
void onSleep () override;
void onDeleteNotify (SimObject *object) override;
void doPositioning ();
void doProjection ();

View file

@ -54,10 +54,10 @@ protected:
public:
guiAnimBitmapCtrl();
~guiAnimBitmapCtrl();
bool onAdd();
bool onAdd() override;
static void initPersistFields();
void onRender(Point2I offset, const RectI &updateRect);
void onRender(Point2I offset, const RectI &updateRect) override;
DECLARE_CONOBJECT(guiAnimBitmapCtrl);
DECLARE_CATEGORY("Gui Images");
DECLARE_DESCRIPTION("A control that clips a bitmap based on %.");

View file

@ -39,7 +39,7 @@ protected:
public:
GuiBitmapBarCtrl();
static void initPersistFields();
void onRender(Point2I offset, const RectI &updateRect);
void onRender(Point2I offset, const RectI &updateRect) override;
DECLARE_CONOBJECT(GuiBitmapBarCtrl);
DECLARE_CATEGORY("Gui Images");

View file

@ -55,9 +55,9 @@ public:
static void initPersistFields();
bool onWake();
void onSleep();
void onRender(Point2I offset, const RectI &updateRect);
bool onWake() override;
void onSleep() override;
void onRender(Point2I offset, const RectI &updateRect) override;
DECLARE_CONOBJECT(GuiBitmapBorderCtrl);
DECLARE_CATEGORY( "Gui Images" );
DECLARE_DESCRIPTION( "A control that renders a skinned border." );

View file

@ -119,7 +119,7 @@ class GuiColorPickerCtrl : public GuiControl
~GuiColorPickerCtrl();
static void initPersistFields();
void onRender(Point2I offset, const RectI &updateRect);
void onRender(Point2I offset, const RectI &updateRect) override;
bool mShowReticle; ///< Show reticle on render
/// @name Color Value Functions
/// @{
@ -127,8 +127,8 @@ class GuiColorPickerCtrl : public GuiControl
void setValue(LinearColorF &value) {mBaseColor = value;}
/// NOTE: getValue() returns baseColor if pallet (since pallet controls can't "pick" colours themselves)
LinearColorF getValue() { return mDisplayMode == pPallet ? mBaseColor : mPickColor; }
const char *getScriptValue();
void setScriptValue(const char *value);
const char *getScriptValue() override;
void setScriptValue(const char *value) override;
void updateColor() {mPositionChanged = true;}
/// @}
@ -141,13 +141,13 @@ class GuiColorPickerCtrl : public GuiControl
/// @name Input Events
/// @{
void onMouseDown(const GuiEvent &);
void onMouseUp(const GuiEvent &);
void onMouseMove(const GuiEvent &event);
void onMouseDragged(const GuiEvent &event);
void onMouseDown(const GuiEvent &) override;
void onMouseUp(const GuiEvent &) override;
void onMouseMove(const GuiEvent &event) override;
void onMouseDragged(const GuiEvent &event) override;
void onMouseEnter(const GuiEvent &);
void onMouseLeave(const GuiEvent &);
void onMouseEnter(const GuiEvent &) override;
void onMouseLeave(const GuiEvent &) override;
/// @}
};

View file

@ -59,7 +59,7 @@ class GuiConsole : public GuiArrayCtrl
/// @}
// GuiArrayCtrl.
virtual void onCellSelected( Point2I cell );
void onCellSelected( Point2I cell ) override;
public:
GuiConsole();
@ -68,9 +68,9 @@ class GuiConsole : public GuiArrayCtrl
DECLARE_DESCRIPTION( "Control that displays the console log text." );
// GuiArrayCtrl.
virtual bool onWake();
virtual void onPreRender();
virtual void onRenderCell(Point2I offset, Point2I cell, bool selected, bool mouseOver);
bool onWake() override;
void onPreRender() override;
void onRenderCell(Point2I offset, Point2I cell, bool selected, bool mouseOver) override;
void setDisplayFilters(bool errors, bool warns, bool normal);
bool getErrorFilter() { return mDisplayErrors; }

View file

@ -50,7 +50,7 @@ public:
static void initPersistFields();
bool onKeyDown(const GuiEvent &event);
bool onKeyDown(const GuiEvent &event) override;
};
#endif //_GUI_TEXTEDIT_CTRL_H

View file

@ -62,8 +62,8 @@ public:
static void initPersistFields();
//Parental methods
bool onWake();
void onSleep();
bool onWake() override;
void onSleep() override;
//text methods
virtual void setText( const char *txt = NULL );
@ -71,12 +71,12 @@ public:
//rendering methods
void calcResize();
void onPreRender(); // do special pre render processing
void onRender( Point2I offset, const RectI &updateRect );
void onPreRender() override; // do special pre render processing
void onRender( Point2I offset, const RectI &updateRect ) override;
//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

@ -48,22 +48,22 @@ public:
Point2I mMouseDownPosition;
virtual void onMouseUp(const GuiEvent &event);
virtual void onMouseDown(const GuiEvent &event);
virtual void onMouseMove(const GuiEvent &event);
virtual void onMouseDragged(const GuiEvent &event);
virtual void onMouseEnter(const GuiEvent &event);
virtual void onMouseLeave(const GuiEvent &event);
void onMouseUp(const GuiEvent &event) override;
void onMouseDown(const GuiEvent &event) override;
void onMouseMove(const GuiEvent &event) override;
void onMouseDragged(const GuiEvent &event) override;
void onMouseEnter(const GuiEvent &event) override;
void onMouseLeave(const GuiEvent &event) override;
virtual bool onMouseWheelUp(const GuiEvent &event);
virtual bool onMouseWheelDown(const GuiEvent &event);
bool onMouseWheelUp(const GuiEvent &event) override;
bool onMouseWheelDown(const GuiEvent &event) override;
virtual void onRightMouseDown(const GuiEvent &event);
virtual void onRightMouseUp(const GuiEvent &event);
virtual void onRightMouseDragged(const GuiEvent &event);
void onRightMouseDown(const GuiEvent &event) override;
void onRightMouseUp(const GuiEvent &event) override;
void onRightMouseDragged(const GuiEvent &event) override;
virtual void onMiddleMouseDown(const GuiEvent &event);
virtual void onMiddleMouseUp(const GuiEvent &event);
virtual void onMiddleMouseDragged(const GuiEvent &event);
void onMiddleMouseDown(const GuiEvent &event) override;
void onMiddleMouseUp(const GuiEvent &event) override;
void onMiddleMouseDragged(const GuiEvent &event) override;
};
#endif

View file

@ -72,8 +72,8 @@ public:
/// Get the currently selected file's name
StringTableEntry getSelectedFileName();
virtual void onMouseDown(const GuiEvent &event);
virtual bool onWake();
void onMouseDown(const GuiEvent &event) override;
bool onWake() override;
};
#endif

View file

@ -57,9 +57,9 @@ public:
GuiFileTreeCtrl();
bool onWake();
bool onVirtualParentExpand(Item *item);
void onItemSelected( Item *item );
bool onWake() override;
bool onVirtualParentExpand(Item *item) override;
void onItemSelected( Item *item ) override;
const String& getSelectedPath() { return mSelPath; }
bool setSelectedPath( const char* path );

View file

@ -266,7 +266,7 @@ public:
GuiGameListMenuCtrl();
~GuiGameListMenuCtrl();
void onRender(Point2I offset, const RectI &updateRect);
void onRender(Point2I offset, const RectI &updateRect) override;
void onRenderListOption(Row* row, Point2I currentOffset);
void onRenderSliderOption(Row* row, Point2I currentOffset);
@ -276,67 +276,67 @@ public:
/// Callback when the object is registered with the sim.
///
/// \return True if the profile was successfully added, false otherwise.
bool onAdd();
bool onAdd() override;
/// Callback when the control wakes up.
bool onWake();
bool onWake() override;
/// Callback when a key is pressed.
///
/// \param event The event that triggered this callback.
bool onKeyDown(const GuiEvent &event);
bool onKeyDown(const GuiEvent &event) override;
/// Callback when a key is repeating.
///
/// \param event The event that triggered this callback.
bool onKeyRepeat(const GuiEvent &event){ return onKeyDown(event); }
bool onKeyRepeat(const GuiEvent &event) override{ return onKeyDown(event); }
/// Callback when the mouse button is clicked on the control.
///
/// \param event A reference to the event that triggered the callback.
void onMouseDown(const GuiEvent &event);
void onMouseDown(const GuiEvent &event) override;
/// Callback when the mouse is dragged on the control.
///
/// \param event A reference to the event that triggered the callback.
void onMouseDragged(const GuiEvent &event){ onMouseDown(event); }
void onMouseDragged(const GuiEvent &event) override{ onMouseDown(event); }
/// Callback when the mouse leaves the control.
///
/// \param event A reference to the event that triggered the callback.
void onMouseLeave(const GuiEvent &event);
void onMouseLeave(const GuiEvent &event) override;
/// Callback when the mouse is moving over this control
///
/// \param event A reference to the event that triggered the callback.
void onMouseMove(const GuiEvent &event);
void onMouseMove(const GuiEvent &event) override;
/// Callback when the mouse button is released.
///
/// \param event A reference to the event that triggered the callback.
void onMouseUp(const GuiEvent &event);
void onMouseUp(const GuiEvent &event) override;
virtual bool onInputEvent(const InputEventInfo& event);
bool onInputEvent(const InputEventInfo& event) override;
/// Callback when the gamepad axis is activated.
///
/// \param event A reference to the event that triggered the callback.
virtual bool onGamepadAxisUp(const GuiEvent & event);
bool onGamepadAxisUp(const GuiEvent & event) override;
/// Callback when the gamepad axis is activated.
///
/// \param event A reference to the event that triggered the callback.
virtual bool onGamepadAxisDown(const GuiEvent & event);
bool onGamepadAxisDown(const GuiEvent & event) override;
/// Callback when the gamepad axis is activated.
///
/// \param event A reference to the event that triggered the callback.
virtual bool onGamepadAxisLeft(const GuiEvent& event);
bool onGamepadAxisLeft(const GuiEvent& event) override;
/// Callback when the gamepad axis is activated.
///
/// \param event A reference to the event that triggered the callback.
virtual bool onGamepadAxisRight(const GuiEvent& event);
bool onGamepadAxisRight(const GuiEvent& event) override;
void clearRows();
@ -458,7 +458,7 @@ private:
private:
/// Recalculates the height of this control based on the stored row height and
/// and padding on the rows.
virtual Point2I getMinExtent() const;
Point2I getMinExtent() const override;
/// Makes sure the height will allow all rows to be displayed without being
/// truncated.
@ -537,7 +537,7 @@ public:
/// Callback when the object is registered with the sim.
///
/// \return True if the profile was successfully added, false otherwise.
bool onAdd();
bool onAdd() override;
Point2I mHitAreaUpperLeft; ///< Offset for the upper left corner of the hit area
Point2I mHitAreaLowerRight; ///< Offset for the lower right corner of the hit area

View file

@ -93,32 +93,32 @@ public:
/// \param enabled [optional] If this row is initially enabled. Default true.
void addRow(const char* label, const char* optionsList, bool wrapOptions, const char* callback, S32 icon = -1, S32 yPad = 0, bool enabled = true);
void onRender(Point2I offset, const RectI &updateRect);
void onRender(Point2I offset, const RectI &updateRect) override;
/// Callback when the mouse button is released.
///
/// \param event A reference to the event that triggered the callback.
void onMouseUp(const GuiEvent &event);
void onMouseUp(const GuiEvent &event) override;
/// Callback when a key is pressed.
///
/// \param event The event that triggered this callback.
bool onKeyDown(const GuiEvent &event);
bool onKeyDown(const GuiEvent &event) override;
/// Callback when a key is repeating.
///
/// \param event The event that triggered this callback.
bool onKeyRepeat(const GuiEvent &event){ return onKeyDown(event); }
bool onKeyRepeat(const GuiEvent &event) override{ return onKeyDown(event); }
/// Callback when the gamepad axis is activated.
///
/// \param event A reference to the event that triggered the callback.
virtual bool onGamepadAxisLeft(const GuiEvent &event);
bool onGamepadAxisLeft(const GuiEvent &event) override;
/// Callback when the gamepad axis is activated.
///
/// \param event A reference to the event that triggered the callback.
virtual bool onGamepadAxisRight(const GuiEvent &event);
bool onGamepadAxisRight(const GuiEvent &event) override;
virtual void clearRows();
@ -128,7 +128,7 @@ public:
DECLARE_CONOBJECT(GuiGameListOptionsCtrl);
DECLARE_DESCRIPTION( "A control for showing pages of options that are gamepad friendly." );
virtual bool onAdd();
bool onAdd() override;
/// Initializes fields accessible through the console.
static void initPersistFields();
@ -140,15 +140,15 @@ protected:
///
/// \return True if the profile is of type GuiGameListOptionsProfile or false
/// if the profile is of any other type.
bool hasValidProfile() const;
bool hasValidProfile() const override;
/// Enforces the validity of the fields on this control and its profile (if the
/// profile is valid, see: hasValidProfile).
void enforceConstraints();
void enforceConstraints() override;
/// Adds lines around the column divisions to the feedback already provided
/// in the Parent.
void onDebugRender(Point2I offset);
void onDebugRender(Point2I offset) override;
private:
/// Performs a click on the current option row. The x position is used to
@ -183,7 +183,7 @@ class GuiGameListOptionsProfile : public GuiGameListMenuProfile
public:
/// Enforces range constraints on all required fields.
void enforceConstraints();
void enforceConstraints() override;
GuiGameListOptionsProfile();

View file

@ -230,7 +230,7 @@ public:
GuiGameSettingsCtrl();
~GuiGameSettingsCtrl();
void onRender(Point2I offset, const RectI &updateRect);
void onRender(Point2I offset, const RectI &updateRect) override;
void onRenderListOption(Point2I currentOffset);
void onRenderSliderOption(Point2I currentOffset);
@ -240,17 +240,17 @@ public:
/// Callback when the object is registered with the sim.
///
/// \return True if the profile was successfully added, false otherwise.
bool onAdd();
bool onAdd() override;
/// Callback when the control wakes up.
bool onWake();
bool onWake() override;
void onSleep();
void onSleep() override;
void clear();
void clear() override;
virtual void onMouseMove(const GuiEvent& event);
virtual void onMouseUp(const GuiEvent& event);
void onMouseMove(const GuiEvent& event) override;
void onMouseUp(const GuiEvent& event) override;
DECLARE_CONOBJECT(GuiGameSettingsCtrl);
DECLARE_CATEGORY( "Gui Game" );

View file

@ -42,11 +42,11 @@ public:
DECLARE_CALLBACK( void, onMouseDown, ());
DECLARE_CALLBACK( void, onDoubleClick, ());
GuiGradientSwatchCtrl();
void onMouseDown(const GuiEvent &);
void onRightMouseDown(const GuiEvent &);
void onMouseDragged(const GuiEvent &event);
void onRender(Point2I offset, const RectI &updateRect);
bool onWake();
void onMouseDown(const GuiEvent &) override;
void onRightMouseDown(const GuiEvent &) override;
void onMouseDragged(const GuiEvent &event) override;
void onRender(Point2I offset, const RectI &updateRect) override;
bool onWake() override;
protected:
StringTableEntry mColorFunction;
};
@ -121,7 +121,7 @@ public:
GuiGradientCtrl();
static void initPersistFields();
void onRender(Point2I offset, const RectI &updateRect);
void onRender(Point2I offset, const RectI &updateRect) override;
bool mShowReticle; ///< Show reticle on render
/// @name Color Value Functions
/// @{
@ -134,19 +134,19 @@ public:
/// @name Input Events
/// @{
void onMouseDown(const GuiEvent &);
void onMouseUp(const GuiEvent &);
void onMouseDown(const GuiEvent &) override;
void onMouseUp(const GuiEvent &) override;
void onMouseEnter(const GuiEvent &);
void onMouseLeave(const GuiEvent &);
void onMouseEnter(const GuiEvent &) override;
void onMouseLeave(const GuiEvent &) override;
/// @}
void addColorRange(ColorI color);
void setupDefaultRange();
bool onAdd();
void inspectPreApply();
void inspectPostApply();
bool onAdd() override;
void inspectPreApply() override;
void inspectPostApply() override;
void reInitSwatches( GuiGradientCtrl::PickMode );
void addColorRange(Point2I pos, const LinearColorF& color);
void removeColorRange( GuiGradientSwatchCtrl* swatch );

View file

@ -123,21 +123,21 @@ public:
// Sizing
void updateSize();
virtual void parentResized(const RectI& oldParentRect, const RectI& newParentRect);
virtual bool onWake();
void parentResized(const RectI& oldParentRect, const RectI& newParentRect) override;
bool onWake() override;
// Rendering
virtual void onRender( Point2I offset, const RectI &updateRect );
void onRender( Point2I offset, const RectI &updateRect ) override;
virtual void onRenderItem(const RectI& itemRect, LBItem *item);
void drawBox( const Point2I &box, S32 size, ColorI &outlineColor, ColorI &boxColor );
bool renderTooltip( const Point2I &hoverPos, const Point2I& cursorPos, const char* tipText );
void addFilteredItem( String item );
void removeFilteredItem( String item );
// Mouse/Key Events
virtual void onMouseDown( const GuiEvent &event );
virtual void onMouseDragged(const GuiEvent &event);
virtual void onMouseUp( const GuiEvent& event );
virtual bool onKeyDown( const GuiEvent &event );
void onMouseDown( const GuiEvent &event ) override;
void onMouseDragged(const GuiEvent &event) override;
void onMouseUp( const GuiEvent& event ) override;
bool onKeyDown( const GuiEvent &event ) override;
// String Utility
static U32 getStringElementCount( const char *string );

View file

@ -167,8 +167,8 @@ class GuiMLTextCtrl : public GuiControl
static void initPersistFields();
void setScriptValue(const char *value);
const char *getScriptValue();
void setScriptValue(const char *value) override;
const char *getScriptValue() override;
static char *stripControlChars(const char *inString);
@ -291,30 +291,30 @@ class GuiMLTextCtrl : public GuiControl
S32 getTextPosition(const Point2I& localPosition);
// Gui control overrides
bool onWake();
void onSleep();
void onPreRender();
void onRender(Point2I offset, const RectI &updateRect);
bool onWake() override;
void onSleep() override;
void onPreRender() override;
void onRender(Point2I offset, const RectI &updateRect) override;
void getCursorPositionAndColor(Point2I &cursorTop, Point2I &cursorBottom, ColorI &color);
void inspectPostApply();
void parentResized(const RectI& oldParentRect, const RectI& newParentRect);
bool onKeyDown(const GuiEvent& event);
void onMouseDown(const GuiEvent&);
void onMouseDragged(const GuiEvent&);
void onMouseUp(const GuiEvent&);
void inspectPostApply() override;
void parentResized(const RectI& oldParentRect, const RectI& newParentRect) override;
bool onKeyDown(const GuiEvent& event) override;
void onMouseDown(const GuiEvent&) override;
void onMouseDragged(const GuiEvent&) override;
void onMouseUp(const GuiEvent&) override;
virtual void getCursor(GuiCursor *&cursor, bool &showCursor, const GuiEvent &lastGuiEvent);
void getCursor(GuiCursor *&cursor, bool &showCursor, const GuiEvent &lastGuiEvent) override;
public:
// Gui control overrides
bool onAdd();
bool onAdd() override;
void setSelectionStart( U32 start ) { clearSelection(); mSelectionStart = start; };
void setSelectionEnd( U32 end ) { mSelectionEnd = end;};
void setSelectionActive(bool active) { mSelectionActive = active; };
S32 getCursorPosition() { return( mCursorPosition ); }
virtual bool resize(const Point2I &newPosition, const Point2I &newExtent);
bool resize(const Point2I &newPosition, const Point2I &newExtent) override;
bool isTypingOut();
};

View file

@ -36,24 +36,24 @@ class GuiMLTextEditCtrl : public GuiMLTextCtrl
StringTableEntry mEscapeCommand;
// Events
bool onKeyDown(const GuiEvent&event);
bool onKeyDown(const GuiEvent&event) override;
// Event forwards
void handleMoveKeys(const GuiEvent&);
void handleDeleteKeys(const GuiEvent&);
// rendering
void onRender(Point2I offset, const RectI &updateRect);
void onRender(Point2I offset, const RectI &updateRect) override;
public:
GuiMLTextEditCtrl();
~GuiMLTextEditCtrl();
virtual void setFirstResponder();
virtual void onLoseFirstResponder();
void setFirstResponder() override;
void onLoseFirstResponder() override;
bool onWake();
bool resize(const Point2I &newPosition, const Point2I &newExtent);
bool onWake() override;
bool resize(const Point2I &newPosition, const Point2I &newExtent) override;
DECLARE_CONOBJECT(GuiMLTextEditCtrl);
DECLARE_DESCRIPTION( "A control that allows to edit multiple lines of text." );

View file

@ -53,18 +53,18 @@ public:
// ConsoleObject
static void initPersistFields();
void inspectPostApply();
void inspectPostApply() override;
DECLARE_CONOBJECT(GuiMaterialCtrl);
DECLARE_CATEGORY( "Gui Editor" );
// GuiControl
bool onWake();
void onSleep();
bool onWake() override;
void onSleep() override;
bool setMaterial( const String &materialName );
void onRender( Point2I offset, const RectI &updateRect );
void onRender( Point2I offset, const RectI &updateRect ) override;
};
#endif // _GUIMATERIALCTRL_H_

View file

@ -87,26 +87,26 @@ class GuiSliderCtrl : public GuiControl
const Point2F& getRange() const { return mRange; }
// GuiControl.
bool onWake();
bool onWake() override;
void onMouseDown(const GuiEvent &event);
void onMouseDragged(const GuiEvent &event);
void onMouseUp(const GuiEvent &);
void onMouseLeave(const GuiEvent &);
void onMouseEnter(const GuiEvent &);
bool onMouseWheelUp(const GuiEvent &event);
bool onMouseWheelDown(const GuiEvent &event);
void onMouseDown(const GuiEvent &event) override;
void onMouseDragged(const GuiEvent &event) override;
void onMouseUp(const GuiEvent &) override;
void onMouseLeave(const GuiEvent &) override;
void onMouseEnter(const GuiEvent &) override;
bool onMouseWheelUp(const GuiEvent &event) override;
bool onMouseWheelDown(const GuiEvent &event) override;
void setActive( bool value );
void setActive( bool value ) override;
F32 getValue() const { return mValue; }
void setScriptValue(const char *val) { setValue(dAtof(val)); }
void setScriptValue(const char *val) override { setValue(dAtof(val)); }
void setValue(F32 val, bool doCallback=false);
void onRender(Point2I offset, const RectI &updateRect);
void onRender(Point2I offset, const RectI &updateRect) override;
virtual bool resize( const Point2I& newSize, const Point2I& newExtent );
virtual void parentResized( const RectI& oldParentRect, const RectI& newParentRect );
bool resize( const Point2I& newSize, const Point2I& newExtent ) override;
void parentResized( const RectI& oldParentRect, const RectI& newParentRect ) override;
static void initPersistFields();

View file

@ -44,29 +44,29 @@ class GuiTabPageCtrl : public GuiTextCtrl
static void initPersistFields();
bool onWake(); ///< The page awakens (becomes active)!
void onSleep(); ///< The page sleeps (zzzzZZ - becomes inactive)
void inspectPostApply();
bool onWake() override; ///< The page awakens (becomes active)!
void onSleep() override; ///< The page sleeps (zzzzZZ - becomes inactive)
void inspectPostApply() override;
bool getFitBook() { return mFitBook; }
void setFitBook(bool state) { mFitBook = state; }
GuiControl* findHitControl(const Point2I &pt, S32 initialLayer = -1); ///< Find which control is hit by the mouse starting at a specified layer
GuiControl* findHitControl(const Point2I &pt, S32 initialLayer = -1) override; ///< Find which control is hit by the mouse starting at a specified layer
void onMouseDown(const GuiEvent &event); ///< Called when a mouseDown event occurs
bool onMouseDownEditor(const GuiEvent &event, Point2I offset ); ///< Called when a mouseDown event occurs and the GUI editor is active
void onMouseDown(const GuiEvent &event) override; ///< Called when a mouseDown event occurs
bool onMouseDownEditor(const GuiEvent &event, Point2I offset ) override; ///< Called when a mouseDown event occurs and the GUI editor is active
S32 getTabIndex(void) { return mTabIndex; } ///< Get the tab index of this control
//only cycle tabs through the current window, so overwrite the method
GuiControl* findNextTabable(GuiControl *curResponder, bool firstCall = true);
GuiControl* findPrevTabable(GuiControl *curResponder, bool firstCall = true);
GuiControl* findNextTabable(GuiControl *curResponder, bool firstCall = true) override;
GuiControl* findPrevTabable(GuiControl *curResponder, bool firstCall = true) override;
void selectWindow(void); ///< Select this window
virtual void setText(const char *txt = NULL); ///< Override setText function to signal parent we need to update.
void setText(const char *txt = NULL) override; ///< Override setText function to signal parent we need to update.
void onRender(Point2I offset, const RectI &updateRect); ///< Called when it's time to render this page to the scene
void onRender(Point2I offset, const RectI &updateRect) override; ///< Called when it's time to render this page to the scene
};
#endif //_GUI_WINDOW_CTRL_H

View file

@ -56,23 +56,23 @@ 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;
bool onWake();
virtual void onPreRender();
virtual void onRender(Point2I offset, const RectI &updateRect);
bool onWake() override;
void onPreRender() override;
void onRender(Point2I offset, const RectI &updateRect) override;
void setBitmap(const char *name);