From 8ee3394e5e1d29d4beff8da430b8580b3ca548c6 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 27 Jan 2018 13:38:47 +0100 Subject: [PATCH] Declare wxSearchCtrl::{Set,Get}DescriptiveText() in the base class Fix a trivial "TODO" remaining from 2.8 days and declare the functions that are part of the public control API as pure virtuals in the base class. No real changes. --- include/wx/generic/srchctlg.h | 5 ++--- include/wx/osx/srchctrl.h | 5 ++--- include/wx/srchctrl.h | 3 +++ 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/wx/generic/srchctlg.h b/include/wx/generic/srchctlg.h index a3d0ce86fe..ebcae90e78 100644 --- a/include/wx/generic/srchctlg.h +++ b/include/wx/generic/srchctlg.h @@ -61,9 +61,8 @@ public: 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); - wxString GetDescriptiveText() const; + virtual void SetDescriptiveText(const wxString& text) wxOVERRIDE; + virtual wxString GetDescriptiveText() const wxOVERRIDE; // accessors // --------- diff --git a/include/wx/osx/srchctrl.h b/include/wx/osx/srchctrl.h index 4a4d88af47..2bef62b75e 100644 --- a/include/wx/osx/srchctrl.h +++ b/include/wx/osx/srchctrl.h @@ -54,9 +54,8 @@ public: 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); - wxString GetDescriptiveText() const; + virtual void SetDescriptiveText(const wxString& text) wxOVERRIDE; + virtual wxString GetDescriptiveText() const wxOVERRIDE; virtual bool HandleSearchFieldSearchHit() ; virtual bool HandleSearchFieldCancelHit() ; diff --git a/include/wx/srchctrl.h b/include/wx/srchctrl.h index b28d3912d1..791fcb8092 100644 --- a/include/wx/srchctrl.h +++ b/include/wx/srchctrl.h @@ -68,6 +68,9 @@ public: virtual void ShowCancelButton( bool show ) = 0; virtual bool IsCancelButtonVisible() const = 0; + virtual void SetDescriptiveText(const wxString& text) = 0; + virtual wxString GetDescriptiveText() const = 0; + private: // implement wxTextEntry pure virtual method virtual wxWindow *GetEditableWindow() wxOVERRIDE { return this; }