added wxTextEntry::DoGetValue() to allow returning empty string if the control currently contains hint text
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -69,9 +69,6 @@ public:
|
||||
// accessors
|
||||
// ---------
|
||||
|
||||
virtual wxString GetValue() const;
|
||||
virtual void SetValue(const wxString& value);
|
||||
|
||||
virtual wxString GetRange(long from, long to) const;
|
||||
|
||||
virtual int GetLineLength(long lineNo) const;
|
||||
@@ -204,6 +201,9 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void DoSetValue(const wxString& value, int flags);
|
||||
virtual wxString DoGetValue() const;
|
||||
virtual void SetValue(const wxString& value);
|
||||
|
||||
virtual bool DoLoadFile(const wxString& file, int fileType);
|
||||
virtual bool DoSaveFile(const wxString& file, int fileType);
|
||||
|
||||
|
@@ -24,7 +24,6 @@ public:
|
||||
|
||||
// implement wxTextEntryBase pure virtual methods
|
||||
virtual void WriteText(const wxString& text);
|
||||
virtual wxString GetValue() const;
|
||||
virtual void Remove(long from, long to);
|
||||
|
||||
virtual void Copy();
|
||||
@@ -53,6 +52,9 @@ public:
|
||||
// implementation only from now on
|
||||
void SendMaxLenEvent();
|
||||
|
||||
protected:
|
||||
virtual wxString DoGetValue() const;
|
||||
|
||||
private:
|
||||
// implement this to return the associated GtkEntry or another widget
|
||||
// implementing GtkEditable
|
||||
|
@@ -22,7 +22,6 @@ public:
|
||||
|
||||
// implement wxTextEntryBase pure virtual methods
|
||||
virtual void WriteText(const wxString& text);
|
||||
virtual wxString GetValue() const;
|
||||
virtual void Replace(long from, long to, const wxString& value);
|
||||
virtual void Remove(long from, long to);
|
||||
|
||||
@@ -46,6 +45,8 @@ public:
|
||||
virtual void SetEditable(bool editable);
|
||||
|
||||
protected:
|
||||
virtual wxString DoGetValue() const;
|
||||
|
||||
// translate wx text position (which may be -1 meaning "last one") to a
|
||||
// valid Motif text position
|
||||
long GetMotifPos(long pos) const;
|
||||
|
@@ -59,6 +59,8 @@ public:
|
||||
#endif // wxUSE_UXTHEME
|
||||
|
||||
protected:
|
||||
virtual wxString DoGetValue() const;
|
||||
|
||||
// this is really a hook for multiline text controls as the single line
|
||||
// ones don't need to ever scroll to show the selection but having it here
|
||||
// allows us to put Remove() in the base class
|
||||
|
@@ -22,7 +22,6 @@ public:
|
||||
|
||||
// implement wxTextEntryBase pure virtual methods
|
||||
virtual void WriteText(const wxString& text);
|
||||
virtual wxString GetValue() const;
|
||||
virtual void Remove(long from, long to);
|
||||
|
||||
virtual void Copy();
|
||||
@@ -48,6 +47,8 @@ public:
|
||||
virtual void SetMaxLength(unsigned long len);
|
||||
|
||||
protected:
|
||||
virtual wxString DoGetValue() const;
|
||||
|
||||
// this is really a hook for multiline text controls as the single line
|
||||
// ones don't need to ever scroll to show the selection but having it here
|
||||
// allows us to put Remove() in the base class
|
||||
|
@@ -44,7 +44,7 @@ public:
|
||||
virtual void WriteText(const wxString& text) = 0;
|
||||
virtual void AppendText(const wxString& text);
|
||||
|
||||
virtual wxString GetValue() const = 0;
|
||||
virtual wxString GetValue() const;
|
||||
virtual wxString GetRange(long from, long to) const;
|
||||
bool IsEmpty() const { return GetLastPosition() <= 0; }
|
||||
|
||||
@@ -152,6 +152,7 @@ protected:
|
||||
};
|
||||
|
||||
virtual void DoSetValue(const wxString& value, int flags);
|
||||
virtual wxString DoGetValue() const = 0;
|
||||
|
||||
// class which should be used to temporarily disable text change events
|
||||
//
|
||||
|
Reference in New Issue
Block a user