From 7481c743657bb3d85a31d45ca8c499f8f7a60b7c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 31 Oct 2017 16:47:38 +0100 Subject: [PATCH] Make other wxGenericProgressDialog methods virtual too Solve the same problem as was recently with hiding, instead of overriding, Resume() in the native MSW wxProgressDialog class for all the other methods which were also affected by it. --- include/wx/generic/progdlgg.h | 12 ++++++------ include/wx/msw/progdlg.h | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/wx/generic/progdlgg.h b/include/wx/generic/progdlgg.h index 310481f397..ba8fb0bcc5 100644 --- a/include/wx/generic/progdlgg.h +++ b/include/wx/generic/progdlgg.h @@ -46,16 +46,16 @@ public: virtual void Resume(); - int GetValue() const; - int GetRange() const; - wxString GetMessage() const; + virtual int GetValue() const; + virtual int GetRange() const; + virtual wxString GetMessage() const; - void SetRange(int maximum); + virtual void SetRange(int maximum); // Return whether "Cancel" or "Skip" button was pressed, always return // false if the corresponding button is not shown. - bool WasCancelled() const; - bool WasSkipped() const; + virtual bool WasCancelled() const; + virtual bool WasSkipped() const; // Must provide overload to avoid hiding it (and warnings about it) virtual void Update() wxOVERRIDE { wxDialog::Update(); } diff --git a/include/wx/msw/progdlg.h b/include/wx/msw/progdlg.h index 6db08be01d..c22a79db91 100644 --- a/include/wx/msw/progdlg.h +++ b/include/wx/msw/progdlg.h @@ -28,15 +28,15 @@ public: virtual void Resume() wxOVERRIDE; - int GetValue() const; - wxString GetMessage() const; + virtual int GetValue() const wxOVERRIDE; + virtual wxString GetMessage() const wxOVERRIDE; - void SetRange(int maximum); + virtual void SetRange(int maximum) wxOVERRIDE; // Return whether "Cancel" or "Skip" button was pressed, always return // false if the corresponding button is not shown. - bool WasSkipped() const; - bool WasCancelled() const; + virtual bool WasSkipped() const wxOVERRIDE; + virtual bool WasCancelled() const wxOVERRIDE; virtual void SetTitle(const wxString& title) wxOVERRIDE; virtual wxString GetTitle() const wxOVERRIDE;