From 474461601f396653891b4ba0263e442c6171c84b Mon Sep 17 00:00:00 2001 From: Hartwig Date: Sun, 22 Nov 2015 10:16:01 +0100 Subject: [PATCH] Addition of overrides in diverse headers --- include/wx/generic/animate.h | 22 +++---- include/wx/generic/bmpcbox.h | 24 ++++---- include/wx/osx/dvrenderer.h | 16 ++--- include/wx/osx/mdi.h | 16 ++--- include/wx/osx/webview_webkit.h | 100 ++++++++++++++++---------------- include/wx/preferences.h | 2 +- include/wx/stc/stc.h | 84 +++++++++++++-------------- 7 files changed, 132 insertions(+), 132 deletions(-) diff --git a/include/wx/generic/animate.h b/include/wx/generic/animate.h index e625a43903..c9773f44fb 100644 --- a/include/wx/generic/animate.h +++ b/include/wx/generic/animate.h @@ -95,23 +95,23 @@ public: ~wxAnimationCtrl(); public: - virtual bool LoadFile(const wxString& filename, wxAnimationType type = wxANIMATION_TYPE_ANY); - virtual bool Load(wxInputStream& stream, wxAnimationType type = wxANIMATION_TYPE_ANY); + virtual bool LoadFile(const wxString& filename, wxAnimationType type = wxANIMATION_TYPE_ANY) wxOVERRIDE; + virtual bool Load(wxInputStream& stream, wxAnimationType type = wxANIMATION_TYPE_ANY) wxOVERRIDE; - virtual void Stop(); - virtual bool Play() + virtual void Stop() wxOVERRIDE; + virtual bool Play() wxOVERRIDE { return Play(true /* looped */); } - virtual bool IsPlaying() const + virtual bool IsPlaying() const wxOVERRIDE { return m_isPlaying; } - void SetAnimation(const wxAnimation &animation); - wxAnimation GetAnimation() const + void SetAnimation(const wxAnimation &animation) wxOVERRIDE; + wxAnimation GetAnimation() const wxOVERRIDE { return m_animation; } - virtual void SetInactiveBitmap(const wxBitmap &bmp); + virtual void SetInactiveBitmap(const wxBitmap &bmp) wxOVERRIDE; // override base class method - virtual bool SetBackgroundColour(const wxColour& col); + virtual bool SetBackgroundColour(const wxColour& col) wxOVERRIDE; public: // event handlers @@ -153,8 +153,8 @@ protected: // internal utilities bool RebuildBackingStoreUpToFrame(unsigned int); void DrawFrame(wxDC &dc, unsigned int); - virtual void DisplayStaticImage(); - virtual wxSize DoGetBestSize() const; + virtual void DisplayStaticImage() wxOVERRIDE; + virtual wxSize DoGetBestSize() const wxOVERRIDE; protected: unsigned int m_currentFrame; // Current frame diff --git a/include/wx/generic/bmpcbox.h b/include/wx/generic/bmpcbox.h index 1b246d3220..4630a29a72 100644 --- a/include/wx/generic/bmpcbox.h +++ b/include/wx/generic/bmpcbox.h @@ -98,30 +98,30 @@ public: unsigned int pos, wxClientData *clientData); // Sets the image for the given item. - virtual void SetItemBitmap(unsigned int n, const wxBitmap& bitmap); - virtual bool SetFont(const wxFont& font); + virtual void SetItemBitmap(unsigned int n, const wxBitmap& bitmap) wxOVERRIDE; + virtual bool SetFont(const wxFont& font) wxOVERRIDE; protected: - virtual void OnDrawBackground(wxDC& dc, const wxRect& rect, int item, int flags) const; - virtual void OnDrawItem(wxDC& dc, const wxRect& rect, int item, int flags) const; - virtual wxCoord OnMeasureItem(size_t item) const; - virtual wxCoord OnMeasureItemWidth(size_t item) const; + virtual void OnDrawBackground(wxDC& dc, const wxRect& rect, int item, int flags) const wxOVERRIDE; + virtual void OnDrawItem(wxDC& dc, const wxRect& rect, int item, int flags) const wxOVERRIDE; + virtual wxCoord OnMeasureItem(size_t item) const wxOVERRIDE; + virtual wxCoord OnMeasureItemWidth(size_t item) const wxOVERRIDE; // Event handlers void OnSize(wxSizeEvent& event); - virtual wxSize DoGetBestSize() const; + virtual wxSize DoGetBestSize() const wxOVERRIDE; - virtual wxItemContainer* GetItemContainer() { return this; } - virtual wxWindow* GetControl() { return this; } + virtual wxItemContainer* GetItemContainer() wxOVERRIDE { return this; } + virtual wxWindow* GetControl() wxOVERRIDE { return this; } // wxItemContainer implementation virtual int DoInsertItems(const wxArrayStringsAdapter & items, unsigned int pos, - void **clientData, wxClientDataType type); - virtual void DoClear(); - virtual void DoDeleteOneItem(unsigned int n); + void **clientData, wxClientDataType type) wxOVERRIDE; + virtual void DoClear() wxOVERRIDE; + virtual void DoDeleteOneItem(unsigned int n) wxOVERRIDE; private: bool m_inResize; diff --git a/include/wx/osx/dvrenderer.h b/include/wx/osx/dvrenderer.h index ce7cec14e8..6ef28ed39e 100644 --- a/include/wx/osx/dvrenderer.h +++ b/include/wx/osx/dvrenderer.h @@ -31,31 +31,31 @@ public: // inherited methods from wxDataViewRendererBase // --------------------------------------------- - virtual int GetAlignment() const + virtual int GetAlignment() const wxOVERRIDE { return m_alignment; } - virtual wxDataViewCellMode GetMode() const + virtual wxDataViewCellMode GetMode() const wxOVERRIDE { return m_mode; } - virtual bool GetValue(wxVariant& value) const + virtual bool GetValue(wxVariant& value) const wxOVERRIDE { value = m_value; return true; } // NB: in Carbon this is always identical to the header alignment - virtual void SetAlignment(int align); - virtual void SetMode(wxDataViewCellMode mode); - virtual bool SetValue(const wxVariant& newValue) + virtual void SetAlignment(int align) wxOVERRIDE; + virtual void SetMode(wxDataViewCellMode mode) wxOVERRIDE; + virtual bool SetValue(const wxVariant& newValue) wxOVERRIDE { m_value = newValue; return true; } - virtual void EnableEllipsize(wxEllipsizeMode mode = wxELLIPSIZE_MIDDLE); - virtual wxEllipsizeMode GetEllipsizeMode() const; + virtual void EnableEllipsize(wxEllipsizeMode mode = wxELLIPSIZE_MIDDLE) wxOVERRIDE; + virtual wxEllipsizeMode GetEllipsizeMode() const wxOVERRIDE; // implementation // -------------- diff --git a/include/wx/osx/mdi.h b/include/wx/osx/mdi.h index 8945cea51c..2bca063802 100644 --- a/include/wx/osx/mdi.h +++ b/include/wx/osx/mdi.h @@ -43,29 +43,29 @@ public: static bool IsTDI() { return false; } - virtual void AddChild(wxWindowBase *child); - virtual void RemoveChild(wxWindowBase *child); + virtual void AddChild(wxWindowBase *child) wxOVERRIDE; + virtual void RemoveChild(wxWindowBase *child) wxOVERRIDE; - virtual void ActivateNext() { /* TODO */ } - virtual void ActivatePrevious() { /* TODO */ } + virtual void ActivateNext() wxOVERRIDE { /* TODO */ } + virtual void ActivatePrevious() wxOVERRIDE { /* TODO */ } - virtual bool Show(bool show = true); + virtual bool Show(bool show = true) wxOVERRIDE; // Mac-specific implementation from now on // --------------------------------------- // Mac OS activate event - virtual void MacActivate(long timestamp, bool activating); + virtual void MacActivate(long timestamp, bool activating) wxOVERRIDE; // wxWidgets activate event void OnActivate(wxActivateEvent& event); void OnSysColourChanged(wxSysColourChangedEvent& event); - void SetMenuBar(wxMenuBar *menu_bar); + void SetMenuBar(wxMenuBar *menu_bar) wxOVERRIDE; // Get rect to be used to center top-level children - virtual void GetRectForTopLevelChildren(int *x, int *y, int *w, int *h); + virtual void GetRectForTopLevelChildren(int *x, int *y, int *w, int *h) wxOVERRIDE; protected: // common part of all ctors diff --git a/include/wx/osx/webview_webkit.h b/include/wx/osx/webview_webkit.h index c05f81702e..14b566966f 100644 --- a/include/wx/osx/webview_webkit.h +++ b/include/wx/osx/webview_webkit.h @@ -45,47 +45,47 @@ public: const wxString& strURL = wxWebViewDefaultURLStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxWebViewNameStr); + const wxString& name = wxWebViewNameStr) wxOVERRIDE; virtual ~wxWebViewWebKit(); - virtual bool CanGoBack() const; - virtual bool CanGoForward() const; - virtual void GoBack(); - virtual void GoForward(); - virtual void Reload(wxWebViewReloadFlags flags = wxWEBVIEW_RELOAD_DEFAULT); - virtual void Stop(); - virtual wxString GetPageSource() const; - virtual wxString GetPageText() const; + virtual bool CanGoBack() const wxOVERRIDE; + virtual bool CanGoForward() const wxOVERRIDE; + virtual void GoBack() wxOVERRIDE; + virtual void GoForward() wxOVERRIDE; + virtual void Reload(wxWebViewReloadFlags flags = wxWEBVIEW_RELOAD_DEFAULT) wxOVERRIDE; + virtual void Stop() wxOVERRIDE; + virtual wxString GetPageSource() const wxOVERRIDE; + virtual wxString GetPageText() const wxOVERRIDE; - virtual void Print(); + virtual void Print() wxOVERRIDE; - virtual void LoadURL(const wxString& url); - virtual wxString GetCurrentURL() const; - virtual wxString GetCurrentTitle() const; - virtual wxWebViewZoom GetZoom() const; - virtual void SetZoom(wxWebViewZoom zoom); + virtual void LoadURL(const wxString& url) wxOVERRIDE; + virtual wxString GetCurrentURL() const wxOVERRIDE; + virtual wxString GetCurrentTitle() const wxOVERRIDE; + virtual wxWebViewZoom GetZoom() const wxOVERRIDE; + virtual void SetZoom(wxWebViewZoom zoom) wxOVERRIDE; - virtual void SetZoomType(wxWebViewZoomType zoomType); - virtual wxWebViewZoomType GetZoomType() const; - virtual bool CanSetZoomType(wxWebViewZoomType type) const; + virtual void SetZoomType(wxWebViewZoomType zoomType) wxOVERRIDE; + virtual wxWebViewZoomType GetZoomType() const wxOVERRIDE; + virtual bool CanSetZoomType(wxWebViewZoomType type) const wxOVERRIDE; - virtual bool IsBusy() const { return m_busy; } + virtual bool IsBusy() const wxOVERRIDE { return m_busy; } //History functions - virtual void ClearHistory(); - virtual void EnableHistory(bool enable = true); - virtual wxVector > GetBackwardHistory(); - virtual wxVector > GetForwardHistory(); - virtual void LoadHistoryItem(wxSharedPtr item); + virtual void ClearHistory() wxOVERRIDE; + virtual void EnableHistory(bool enable = true) wxOVERRIDE; + virtual wxVector > GetBackwardHistory() wxOVERRIDE; + virtual wxVector > GetForwardHistory() wxOVERRIDE; + virtual void LoadHistoryItem(wxSharedPtr item) wxOVERRIDE; //Undo / redo functionality - virtual bool CanUndo() const; - virtual bool CanRedo() const; - virtual void Undo(); - virtual void Redo(); + virtual bool CanUndo() const wxOVERRIDE; + virtual bool CanRedo() const wxOVERRIDE; + virtual void Undo() wxOVERRIDE; + virtual void Redo() wxOVERRIDE; //Find function - virtual long Find(const wxString& text, int flags = wxWEBVIEW_FIND_DEFAULT) + virtual long Find(const wxString& text, int flags = wxWEBVIEW_FIND_DEFAULT) wxOVERRIDE { wxUnusedVar(text); wxUnusedVar(flags); @@ -93,31 +93,31 @@ public: } //Clipboard functions - virtual bool CanCut() const { return true; } - virtual bool CanCopy() const { return true; } - virtual bool CanPaste() const { return true; } - virtual void Cut(); - virtual void Copy(); - virtual void Paste(); + virtual bool CanCut() const wxOVERRIDE { return true; } + virtual bool CanCopy() const wxOVERRIDE { return true; } + virtual bool CanPaste() const wxOVERRIDE { return true; } + virtual void Cut() wxOVERRIDE; + virtual void Copy() wxOVERRIDE; + virtual void Paste() wxOVERRIDE; //Editing functions - virtual void SetEditable(bool enable = true); - virtual bool IsEditable() const; + virtual void SetEditable(bool enable = true) wxOVERRIDE; + virtual bool IsEditable() const wxOVERRIDE; //Selection - virtual void DeleteSelection(); - virtual bool HasSelection() const; - virtual void SelectAll(); - virtual wxString GetSelectedText() const; - virtual wxString GetSelectedSource() const; - virtual void ClearSelection(); + virtual void DeleteSelection() wxOVERRIDE; + virtual bool HasSelection() const wxOVERRIDE; + virtual void SelectAll() wxOVERRIDE; + virtual wxString GetSelectedText() const wxOVERRIDE; + virtual wxString GetSelectedSource() const wxOVERRIDE; + virtual void ClearSelection() wxOVERRIDE; - void RunScript(const wxString& javascript); + void RunScript(const wxString& javascript) wxOVERRIDE; //Virtual Filesystem Support - virtual void RegisterHandler(wxSharedPtr handler); + virtual void RegisterHandler(wxSharedPtr handler) wxOVERRIDE; - virtual void* GetNativeBackend() const { return m_webView; } + virtual void* GetNativeBackend() const wxOVERRIDE { return m_webView; } // ---- methods not from the parent (common) interface bool CanGetPageSource() const; @@ -134,9 +134,9 @@ public: void SetWebkitZoom(float zoom); // don't hide base class virtuals - virtual void SetScrollPos( int orient, int pos, bool refresh = true ) + virtual void SetScrollPos( int orient, int pos, bool refresh = true ) wxOVERRIDE { return wxControl::SetScrollPos(orient, pos, refresh); } - virtual int GetScrollPos( int orient ) const + virtual int GetScrollPos( int orient ) const wxOVERRIDE { return wxControl::GetScrollPos(orient); } //we need to resize the webview when the control size changes @@ -148,10 +148,10 @@ public: bool m_nextNavigationIsNewWindow; protected: - virtual void DoSetPage(const wxString& html, const wxString& baseUrl); + virtual void DoSetPage(const wxString& html, const wxString& baseUrl) wxOVERRIDE; wxDECLARE_EVENT_TABLE(); - void MacVisibilityChanged(); + void MacVisibilityChanged() wxOVERRIDE; private: wxWindow *m_parent; diff --git a/include/wx/preferences.h b/include/wx/preferences.h index 5055011b35..40dac7a0bd 100644 --- a/include/wx/preferences.h +++ b/include/wx/preferences.h @@ -81,7 +81,7 @@ public: virtual wxString GetName() const wxOVERRIDE; #ifdef __WXOSX_COCOA__ - virtual wxBitmap GetLargeIcon() const; + virtual wxBitmap GetLargeIcon() const wxOVERRIDE; #endif private: diff --git a/include/wx/stc/stc.h b/include/wx/stc/stc.h index abc8de19bc..0e74afce34 100644 --- a/include/wx/stc/stc.h +++ b/include/wx/stc/stc.h @@ -2794,14 +2794,14 @@ public: int GetStyleAt(int pos) const; // Redoes the next action on the undo history. - void Redo(); + void Redo() wxOVERRIDE; // Choose between collecting actions into the undo // history and discarding them. void SetUndoCollection(bool collectUndo); // Select all the text in the document. - void SelectAll(); + void SelectAll() wxOVERRIDE; // Remember the current position in the undo history as the position // at which the document was saved. @@ -2811,7 +2811,7 @@ public: wxMemoryBuffer GetStyledText(int startPos, int endPos); // Are there any redoable actions in the undo history? - bool CanRedo() const; + bool CanRedo() const wxOVERRIDE; // Retrieve the line number at which a particular marker is located. int MarkerLineFromHandle(int handle); @@ -3462,28 +3462,28 @@ public: void SetReadOnly(bool readOnly); // Will a paste succeed? - bool CanPaste() const; + bool CanPaste() const wxOVERRIDE; // Are there any undoable actions in the undo history? - bool CanUndo() const; + bool CanUndo() const wxOVERRIDE; // Delete the undo history. void EmptyUndoBuffer(); // Undo one action in the undo history. - void Undo(); + void Undo() wxOVERRIDE; // Cut the selection to the clipboard. - void Cut(); + void Cut() wxOVERRIDE; // Copy the selection to the clipboard. - void Copy(); + void Copy() wxOVERRIDE; // Paste the contents of the clipboard into the document replacing the selection. - void Paste(); + void Paste() wxOVERRIDE; // Clear the selection. - void Clear(); + void Clear() wxOVERRIDE; // Replace the contents of the document with the argument text. void SetText(const wxString& text); @@ -3751,7 +3751,7 @@ public: bool GetUseVerticalScrollBar() const; // Append a string to the end of the document without changing the selection. - void AppendText(const wxString& text); + void AppendText(const wxString& text) wxOVERRIDE; // Is drawing done in two phases with backgrounds drawn before foregrounds? bool GetTwoPhaseDraw() const; @@ -4957,16 +4957,16 @@ public: // implement wxTextEntryBase pure virtual methods // ---------------------------------------------- - virtual void WriteText(const wxString& text) + virtual void WriteText(const wxString& text) wxOVERRIDE { ReplaceSelection(text); } - virtual void Remove(long from, long to) + virtual void Remove(long from, long to) wxOVERRIDE { Replace(from, to, ""); } - virtual void Replace(long from, long to, const wxString& text) + virtual void Replace(long from, long to, const wxString& text) wxOVERRIDE { SetTargetStart((int)from); SetTargetEnd((int)to); @@ -4988,14 +4988,14 @@ public: */ - virtual void SetInsertionPoint(long pos) + virtual void SetInsertionPoint(long pos) wxOVERRIDE { SetCurrentPos(int(pos == -1 ? GetLastPosition() : pos)); } - virtual long GetInsertionPoint() const { return GetCurrentPos(); } - virtual long GetLastPosition() const { return GetTextLength(); } + virtual long GetInsertionPoint() const wxOVERRIDE { return GetCurrentPos(); } + virtual long GetLastPosition() const wxOVERRIDE { return GetTextLength(); } - virtual void SetSelection(long from, long to) + virtual void SetSelection(long from, long to) wxOVERRIDE { if ( from == -1 && to == -1 ) { @@ -5008,7 +5008,7 @@ public: } } - virtual void SelectNone() + virtual void SelectNone() wxOVERRIDE { ClearSelections(); } @@ -5016,7 +5016,7 @@ public: #ifdef SWIG void GetSelection(long* OUTPUT, long* OUTPUT) const; #else - virtual void GetSelection(long *from, long *to) const + virtual void GetSelection(long *from, long *to) const wxOVERRIDE { if ( from ) *from = GetSelectionStart(); @@ -5036,14 +5036,14 @@ public: } #endif - virtual bool IsEditable() const { return !GetReadOnly(); } - virtual void SetEditable(bool editable) { SetReadOnly(!editable); } + virtual bool IsEditable() const wxOVERRIDE { return !GetReadOnly(); } + virtual void SetEditable(bool editable) wxOVERRIDE { SetReadOnly(!editable); } // implement wxTextAreaBase pure virtual methods // --------------------------------------------- - virtual int GetLineLength(long lineNo) const { return static_cast(GetLineText(lineNo).length()); } - virtual wxString GetLineText(long lineNo) const + virtual int GetLineLength(long lineNo) const wxOVERRIDE { return static_cast(GetLineText(lineNo).length()); } + virtual wxString GetLineText(long lineNo) const wxOVERRIDE { wxString text = GetLine(static_cast(lineNo)); size_t lastNewLine = text.find_last_not_of(wxS("\r\n")); @@ -5054,42 +5054,42 @@ public: text.clear(); return text; } - virtual int GetNumberOfLines() const { return GetLineCount(); } + virtual int GetNumberOfLines() const wxOVERRIDE { return GetLineCount(); } - virtual bool IsModified() const { return GetModify(); } - virtual void MarkDirty() { wxFAIL_MSG("not implemented"); } - virtual void DiscardEdits() { SetSavePoint(); } + virtual bool IsModified() const wxOVERRIDE { return GetModify(); } + virtual void MarkDirty() wxOVERRIDE { wxFAIL_MSG("not implemented"); } + virtual void DiscardEdits() wxOVERRIDE { SetSavePoint(); } virtual bool SetStyle(long WXUNUSED(start), long WXUNUSED(end), - const wxTextAttr& WXUNUSED(style)) + const wxTextAttr& WXUNUSED(style)) wxOVERRIDE { wxFAIL_MSG("not implemented"); return false; } - virtual bool GetStyle(long WXUNUSED(position), wxTextAttr& WXUNUSED(style)) + virtual bool GetStyle(long WXUNUSED(position), wxTextAttr& WXUNUSED(style)) wxOVERRIDE { wxFAIL_MSG("not implemented"); return false; } - virtual bool SetDefaultStyle(const wxTextAttr& WXUNUSED(style)) + virtual bool SetDefaultStyle(const wxTextAttr& WXUNUSED(style)) wxOVERRIDE { wxFAIL_MSG("not implemented"); return false; } - virtual long XYToPosition(long x, long y) const + virtual long XYToPosition(long x, long y) const wxOVERRIDE { long pos = PositionFromLine((int)y); pos += x; return pos; } - virtual bool PositionToXY(long pos, long *x, long *y) const + virtual bool PositionToXY(long pos, long *x, long *y) const wxOVERRIDE { int l = LineFromPosition((int)pos); if ( l == -1 ) @@ -5104,11 +5104,11 @@ public: return true; } - virtual void ShowPosition(long pos) { GotoPos((int)pos); } + virtual void ShowPosition(long pos) wxOVERRIDE { GotoPos((int)pos); } using wxWindow::HitTest; - virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long *pos) const + virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long *pos) const wxOVERRIDE { const long l = PositionFromPoint(pt); if ( l == -1 ) @@ -5123,7 +5123,7 @@ public: // just unhide it virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, wxTextCoord *col, - wxTextCoord *row) const + wxTextCoord *row) const wxOVERRIDE { return wxTextAreaBase::HitTest(pt, col, row); } @@ -5131,13 +5131,13 @@ public: static wxVersionInfo GetLibraryVersionInfo(); protected: - virtual void DoSetValue(const wxString& value, int flags); - virtual wxString DoGetValue() const { return GetText(); } - virtual wxWindow *GetEditableWindow() { return this; } + virtual void DoSetValue(const wxString& value, int flags) wxOVERRIDE; + virtual wxString DoGetValue() const wxOVERRIDE { return GetText(); } + virtual wxWindow *GetEditableWindow() wxOVERRIDE { return this; } #ifndef SWIG - virtual bool DoLoadFile(const wxString& file, int fileType); - virtual bool DoSaveFile(const wxString& file, int fileType); + virtual bool DoLoadFile(const wxString& file, int fileType) wxOVERRIDE; + virtual bool DoSaveFile(const wxString& file, int fileType) wxOVERRIDE; // Event handlers void OnPaint(wxPaintEvent& evt); @@ -5161,7 +5161,7 @@ protected: void OnListBox(wxCommandEvent& evt); void OnIdle(wxIdleEvent& evt); - virtual wxSize DoGetBestSize() const; + virtual wxSize DoGetBestSize() const wxOVERRIDE; // Turn notifications from Scintilla into events void NotifyChange();