From 308de8b69d5cf9f4137b541498a7eb27327d8dde Mon Sep 17 00:00:00 2001 From: Hartwig Date: Sun, 22 Nov 2015 10:15:41 +0100 Subject: [PATCH] Addition of overrides in anybutton.h, collpaneg.h, notebook.h, spinctlg.h, srchctrl.h and radiobox.h --- include/wx/generic/collpaneg.h | 14 ++++++------ include/wx/generic/spinctlg.h | 26 +++++++++++----------- include/wx/osx/anybutton.h | 14 ++++++------ include/wx/osx/notebook.h | 40 +++++++++++++++++----------------- include/wx/osx/radiobox.h | 38 ++++++++++++++++---------------- include/wx/osx/srchctrl.h | 14 ++++++------ 6 files changed, 73 insertions(+), 73 deletions(-) diff --git a/include/wx/generic/collpaneg.h b/include/wx/generic/collpaneg.h index c0e9365eb5..7b14cc1b0e 100644 --- a/include/wx/generic/collpaneg.h +++ b/include/wx/generic/collpaneg.h @@ -53,16 +53,16 @@ public: const wxString& name = wxCollapsiblePaneNameStr); // public wxCollapsiblePane API - virtual void Collapse(bool collapse = true); - virtual void SetLabel(const wxString &label); + virtual void Collapse(bool collapse = true) wxOVERRIDE; + virtual void SetLabel(const wxString &label) wxOVERRIDE; - virtual bool IsCollapsed() const + virtual bool IsCollapsed() const wxOVERRIDE { return m_pPane==NULL || !m_pPane->IsShown(); } - virtual wxWindow *GetPane() const + virtual wxWindow *GetPane() const wxOVERRIDE { return m_pPane; } - virtual wxString GetLabel() const; + virtual wxString GetLabel() const wxOVERRIDE; - virtual bool Layout(); + virtual bool Layout() wxOVERRIDE; // for the generic collapsible pane only: @@ -74,7 +74,7 @@ public: protected: // overridden methods - virtual wxSize DoGetBestSize() const; + virtual wxSize DoGetBestSize() const wxOVERRIDE; int GetBorder() const; diff --git a/include/wx/generic/spinctlg.h b/include/wx/generic/spinctlg.h index 0f09abd5d7..b8c1c73a22 100644 --- a/include/wx/generic/spinctlg.h +++ b/include/wx/generic/spinctlg.h @@ -64,27 +64,27 @@ public: // T GetMin() const // T GetMax() const // T GetIncrement() const - virtual bool GetSnapToTicks() const { return m_snap_to_ticks; } + virtual bool GetSnapToTicks() const wxOVERRIDE { return m_snap_to_ticks; } // unsigned GetDigits() const - wxSpinCtrlDouble only // operations - virtual void SetValue(const wxString& text); + virtual void SetValue(const wxString& text) wxOVERRIDE; // void SetValue(T val) // void SetRange(T minVal, T maxVal) // void SetIncrement(T inc) - virtual void SetSnapToTicks(bool snap_to_ticks); + virtual void SetSnapToTicks(bool snap_to_ticks) wxOVERRIDE; // void SetDigits(unsigned digits) - wxSpinCtrlDouble only // Select text in the textctrl - void SetSelection(long from, long to); + void SetSelection(long from, long to) wxOVERRIDE; // implementation from now on // forward these functions to all subcontrols - virtual bool Enable(bool enable = true); - virtual bool Show(bool show = true); + virtual bool Enable(bool enable = true) wxOVERRIDE; + virtual bool Show(bool show = true) wxOVERRIDE; - virtual bool SetBackgroundColour(const wxColour& colour); + virtual bool SetBackgroundColour(const wxColour& colour) wxOVERRIDE; // get the subcontrols wxTextCtrl *GetText() const { return m_textCtrl; } @@ -98,16 +98,16 @@ public: // this window itself is used only as a container for its sub windows so it // shouldn't accept the focus at all and any attempts to explicitly set // focus to it should give focus to its text constol part - virtual bool AcceptsFocus() const { return false; } - virtual void SetFocus(); + virtual bool AcceptsFocus() const wxOVERRIDE { return false; } + virtual void SetFocus() wxOVERRIDE; friend class wxSpinCtrlTextGeneric; protected: // override the base class virtuals involved into geometry calculations - virtual wxSize DoGetBestSize() const; - virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const; - virtual void DoMoveWindow(int x, int y, int width, int height); + virtual wxSize DoGetBestSize() const wxOVERRIDE; + virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const wxOVERRIDE; + virtual void DoMoveWindow(int x, int y, int width, int height) wxOVERRIDE; #ifdef __WXMSW__ // and, for MSW, enabling this window itself @@ -165,7 +165,7 @@ private: void Init(); // Implement pure virtual function inherited from wxCompositeWindow. - virtual wxWindowList GetCompositeWindowParts() const; + virtual wxWindowList GetCompositeWindowParts() const wxOVERRIDE; wxDECLARE_EVENT_TABLE(); }; diff --git a/include/wx/osx/anybutton.h b/include/wx/osx/anybutton.h index f86b03ef70..31b579a440 100644 --- a/include/wx/osx/anybutton.h +++ b/include/wx/osx/anybutton.h @@ -18,19 +18,19 @@ public: static wxSize GetDefaultSize(); - virtual void SetLabel(const wxString& label); + virtual void SetLabel(const wxString& label) wxOVERRIDE; protected: - virtual wxSize DoGetBestSize() const ; + virtual wxSize DoGetBestSize() const wxOVERRIDE; void OnEnterWindow( wxMouseEvent& event); void OnLeaveWindow( wxMouseEvent& event); - virtual wxBitmap DoGetBitmap(State which) const; - virtual void DoSetBitmap(const wxBitmap& bitmap, State which); - virtual void DoSetBitmapPosition(wxDirection dir); + virtual wxBitmap DoGetBitmap(State which) const wxOVERRIDE; + virtual void DoSetBitmap(const wxBitmap& bitmap, State which) wxOVERRIDE; + virtual void DoSetBitmapPosition(wxDirection dir) wxOVERRIDE; - virtual void DoSetBitmapMargins(int x, int y) + virtual void DoSetBitmapMargins(int x, int y) wxOVERRIDE { m_marginX = x; m_marginY = y; @@ -38,7 +38,7 @@ protected: } #if wxUSE_MARKUP && wxOSX_USE_COCOA - virtual bool DoSetLabelMarkup(const wxString& markup); + virtual bool DoSetLabelMarkup(const wxString& markup) wxOVERRIDE; #endif // wxUSE_MARKUP && wxOSX_USE_COCOA diff --git a/include/wx/osx/notebook.h b/include/wx/osx/notebook.h index e0e91b8e33..c8e706f080 100644 --- a/include/wx/osx/notebook.h +++ b/include/wx/osx/notebook.h @@ -57,44 +57,44 @@ public: // set the currently selected page, return the index of the previously // selected one (or wxNOT_FOUND on error) // NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events - int SetSelection(size_t nPage) { return DoSetSelection(nPage, SetSelection_SendEvent); } + int SetSelection(size_t nPage) wxOVERRIDE { return DoSetSelection(nPage, SetSelection_SendEvent); } // changes selected page without sending events - int ChangeSelection(size_t nPage) { return DoSetSelection(nPage); } + int ChangeSelection(size_t nPage) wxOVERRIDE { return DoSetSelection(nPage); } // set/get the title of a page - bool SetPageText(size_t nPage, const wxString& strText); - wxString GetPageText(size_t nPage) const; + bool SetPageText(size_t nPage, const wxString& strText) wxOVERRIDE; + wxString GetPageText(size_t nPage) const wxOVERRIDE; // sets/returns item's image index in the current image list - int GetPageImage(size_t nPage) const; - bool SetPageImage(size_t nPage, int nImage); + int GetPageImage(size_t nPage) const wxOVERRIDE; + bool SetPageImage(size_t nPage, int nImage) wxOVERRIDE; // control the appearance of the notebook pages // set the size (the same for all pages) - virtual void SetPageSize(const wxSize& size); + virtual void SetPageSize(const wxSize& size) wxOVERRIDE; // set the padding between tabs (in pixels) - virtual void SetPadding(const wxSize& padding); + virtual void SetPadding(const wxSize& padding) wxOVERRIDE; // sets the size of the tabs (assumes all tabs are the same size) - virtual void SetTabSize(const wxSize& sz); + virtual void SetTabSize(const wxSize& sz) wxOVERRIDE; // hit test - virtual int HitTest(const wxPoint& pt, long *flags = NULL) const; + virtual int HitTest(const wxPoint& pt, long *flags = NULL) const wxOVERRIDE; // calculate size for wxNotebookSizer - wxSize CalcSizeFromPage(const wxSize& sizePage) const; - wxRect GetPageRect() const ; + wxSize CalcSizeFromPage(const wxSize& sizePage) const wxOVERRIDE; + wxRect GetPageRect() const wxOVERRIDE; // operations // ---------- // remove all pages - bool DeleteAllPages(); + bool DeleteAllPages() wxOVERRIDE; // the same as AddPage(), but adds it at the specified position bool InsertPage(size_t nPage, wxNotebookPage *pPage, const wxString& strText, bool bSelect = false, - int imageId = NO_IMAGE); + int imageId = NO_IMAGE) wxOVERRIDE; // callbacks // --------- @@ -106,20 +106,20 @@ public: // -------------- #if wxUSE_CONSTRAINTS - virtual void SetConstraintSizes(bool recurse = true); - virtual bool DoPhase(int nPhase); + virtual void SetConstraintSizes(bool recurse = true) wxOVERRIDE; + virtual bool DoPhase(int nPhase) wxOVERRIDE; #endif // base class virtuals // ------------------- - virtual void Command(wxCommandEvent& event); + virtual void Command(wxCommandEvent& event) wxOVERRIDE; // osx specific event handling common for all osx-ports - virtual bool OSXHandleClicked( double timestampsec ); + virtual bool OSXHandleClicked( double timestampsec ) wxOVERRIDE; protected: - virtual wxNotebookPage *DoRemovePage(size_t page) ; + virtual wxNotebookPage *DoRemovePage(size_t page) wxOVERRIDE; // common part of all ctors void Init(); @@ -127,7 +127,7 @@ protected: void ChangePage(int nOldSel, int nSel); // change pages void MacSetupTabs(); - int DoSetSelection(size_t nPage, int flags = 0); + int DoSetSelection(size_t nPage, int flags = 0) wxOVERRIDE; // the icon indices wxArrayInt m_images; diff --git a/include/wx/osx/radiobox.h b/include/wx/osx/radiobox.h index e340745f06..bbf61a7b37 100644 --- a/include/wx/osx/radiobox.h +++ b/include/wx/osx/radiobox.h @@ -54,32 +54,32 @@ public: const wxString& name = wxRadioBoxNameStr); // Enabling - virtual bool Enable(bool enable = true); - virtual bool Enable(unsigned int item, bool enable = true); - virtual bool IsItemEnabled(unsigned int item) const; + virtual bool Enable(bool enable = true) wxOVERRIDE; + virtual bool Enable(unsigned int item, bool enable = true) wxOVERRIDE; + virtual bool IsItemEnabled(unsigned int item) const wxOVERRIDE; // Showing - virtual bool Show(bool show = true); - virtual bool Show(unsigned int item, bool show = true); - virtual bool IsItemShown(unsigned int item) const; + virtual bool Show(bool show = true) wxOVERRIDE; + virtual bool Show(unsigned int item, bool show = true) wxOVERRIDE; + virtual bool IsItemShown(unsigned int item) const wxOVERRIDE; // Specific functions (in wxWidgets2 reference) - virtual void SetSelection(int item); - virtual int GetSelection() const; + virtual void SetSelection(int item) wxOVERRIDE; + virtual int GetSelection() const wxOVERRIDE; - virtual unsigned int GetCount() const { return m_noItems; } + virtual unsigned int GetCount() const wxOVERRIDE { return m_noItems; } - virtual wxString GetString(unsigned int item) const; - virtual void SetString(unsigned int item, const wxString& label); + virtual wxString GetString(unsigned int item) const wxOVERRIDE; + virtual void SetString(unsigned int item, const wxString& label) wxOVERRIDE; - virtual wxString GetLabel() const; - virtual void SetLabel(const wxString& label) ; + virtual wxString GetLabel() const wxOVERRIDE; + virtual void SetLabel(const wxString& label) wxOVERRIDE; // protect native font of box - virtual bool SetFont( const wxFont &font ); + virtual bool SetFont( const wxFont &font ) wxOVERRIDE; // Other external functions - void Command(wxCommandEvent& event); - void SetFocus(); + void Command(wxCommandEvent& event) wxOVERRIDE; + void SetFocus() wxOVERRIDE; // Other variable access functions int GetNumberOfRowsOrCols() const { return m_noRowsOrCols; } @@ -89,7 +89,7 @@ public: protected: // resolve ambiguity in base classes - virtual wxBorder GetDefaultBorder() const { return wxRadioBoxBase::GetDefaultBorder(); } + virtual wxBorder GetDefaultBorder() const wxOVERRIDE { return wxRadioBoxBase::GetDefaultBorder(); } wxRadioButton *m_radioButtonCycle; @@ -97,10 +97,10 @@ protected: int m_noRowsOrCols; // Internal functions - virtual wxSize DoGetBestSize() const ; + virtual wxSize DoGetBestSize() const wxOVERRIDE; virtual void DoSetSize(int x, int y, int width, int height, - int sizeFlags = wxSIZE_AUTO); + int sizeFlags = wxSIZE_AUTO) wxOVERRIDE; wxDECLARE_EVENT_TABLE(); }; diff --git a/include/wx/osx/srchctrl.h b/include/wx/osx/srchctrl.h index abdddcdf5f..4a4d88af47 100644 --- a/include/wx/osx/srchctrl.h +++ b/include/wx/osx/srchctrl.h @@ -42,17 +42,17 @@ public: #if wxUSE_MENUS // get/set search button menu // -------------------------- - virtual void SetMenu( wxMenu* menu ); - virtual wxMenu* GetMenu(); + virtual void SetMenu( wxMenu* menu ) wxOVERRIDE; + virtual wxMenu* GetMenu() wxOVERRIDE; #endif // wxUSE_MENUS // get/set search options // ---------------------- - virtual void ShowSearchButton( bool show ); - virtual bool IsSearchButtonVisible() const; + virtual void ShowSearchButton( bool show ) wxOVERRIDE; + virtual bool IsSearchButtonVisible() const wxOVERRIDE; - virtual void ShowCancelButton( bool show ); - virtual bool IsCancelButtonVisible() const; + virtual void ShowCancelButton( bool show ) wxOVERRIDE; + virtual bool IsCancelButtonVisible() const wxOVERRIDE; // TODO: In 2.9 these should probably be virtual, and declared in the base class... void SetDescriptiveText(const wxString& text); @@ -65,7 +65,7 @@ public: protected: - wxSize DoGetBestSize() const; + wxSize DoGetBestSize() const wxOVERRIDE; void Init();