moved DoSetValue() to wxTextCtrlBase instead of having it in almost, but not quite all, derived classes; linking fixes for wxCocoa/wxX11/wxMotif

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-10-08 22:40:14 +00:00
parent 5dcf8dd06c
commit ee2ec18e88
19 changed files with 80 additions and 142 deletions

View File

@@ -298,11 +298,12 @@ public:
// ---------
virtual wxString GetValue() const = 0;
virtual void SetValue(const wxString& value) = 0;
virtual bool IsEmpty() const { return GetValue().empty(); }
virtual void ChangeValue(const wxString &value) = 0;
virtual void SetValue(const wxString& value)
{ DoSetValue(value, SetValue_SendEvent); }
virtual void ChangeValue(const wxString& value)
{ DoSetValue(value); }
virtual wxString GetRange(long from, long to) const;
@@ -422,6 +423,9 @@ public:
wxTextCtrl& operator<<(double d);
wxTextCtrl& operator<<(const wxChar c);
// generate the wxEVT_COMMAND_TEXT_UPDATED event, like SetValue() does
void SendTextUpdatedEvent();
// do the window-specific processing after processing the update event
virtual void DoUpdateWindowUI(wxUpdateUIEvent& event);
@@ -433,17 +437,16 @@ protected:
int overflow(int i);
#endif // wxHAS_TEXT_WINDOW_STREAM
// typically, wxTextCtrl classes will use a DoSetValue() function to
// implement both SetValue() and ChangeValue() functions and these
// flags are meant to be passed to such DoSetValue()
// flags for DoSetValue(): common part of SetValue() and ChangeValue() and
// also used to implement WriteText() in wxMSW
enum
{
SetValue_SendEvent = 1,
SetValue_SelectionOnly = 2
};
// generate the wxEVT_COMMAND_TEXT_UPDATED event
void SendTextUpdatedEvent();
virtual void DoSetValue(const wxString& value, int flags = 0) = 0;
// the name of the last file loaded with LoadFile() which will be used by
// SaveFile() by default