Replace dynamic cast with a virtual GTKValueChanged() function

No real changes, but using a virtual function is simpler and safer than
using wxIsKindOf().
This commit is contained in:
Vadim Zeitlin
2021-04-20 00:53:50 +02:00
parent 3ac3763705
commit e73a0c23ef
2 changed files with 24 additions and 17 deletions

View File

@@ -71,6 +71,8 @@ public:
virtual GTKInputResult GTKInput(double* value) const = 0;
virtual bool GTKOutput(wxString* text) const = 0;
virtual void GTKValueChanged() = 0;
protected:
double DoGetValue() const;
double DoGetMin() const;
@@ -153,6 +155,7 @@ public:
virtual GTKInputResult GTKInput(double* value) const wxOVERRIDE;
virtual bool GTKOutput(wxString* text) const wxOVERRIDE;
virtual void GTKValueChanged() wxOVERRIDE;
protected:
virtual void GtkSetEntryWidth() wxOVERRIDE;
@@ -224,6 +227,7 @@ public:
virtual GTKInputResult GTKInput(double* value) const wxOVERRIDE;
virtual bool GTKOutput(wxString* text) const wxOVERRIDE;
virtual void GTKValueChanged() wxOVERRIDE;
protected:
virtual void GtkSetEntryWidth() wxOVERRIDE;