X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/28fdd8db44bc6070c71a77af783fb4da0b554d8c..469d3e9b7b28900f27130a69f2ecea7bce2078a1:/include/wx/msw/textctrl.h diff --git a/include/wx/msw/textctrl.h b/include/wx/msw/textctrl.h index 8649f1491e..8b3c71f485 100644 --- a/include/wx/msw/textctrl.h +++ b/include/wx/msw/textctrl.h @@ -46,8 +46,6 @@ public: virtual wxString GetValue() const; virtual bool IsEmpty() const; - 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; @@ -158,6 +156,8 @@ public: // the colours for them otherwise virtual bool SetBackgroundColour(const wxColour& colour); virtual bool SetForegroundColour(const wxColour& colour); +#else + bool IsRich() const { return false; } #endif // wxUSE_RICHEDIT #if wxUSE_INKEDIT && wxUSE_RICHEDIT @@ -209,7 +209,16 @@ protected: // common part of all ctors void Init(); - void DoSetValue(const wxString &value, int flags = 0); + // creates the control of appropriate class (plain or rich edit) with the + // styles corresponding to m_windowStyle + // + // this is used by ctor/Create() and when we need to recreate the control + // later + bool MSWCreateText(const wxString& value, + const wxPoint& pos, + const wxSize& size); + + virtual void DoSetValue(const wxString &value, int flags = 0); // return true if this control has a user-set limit on amount of text (i.e. // the limit is due to a previous call to SetMaxLength() and not built in) @@ -233,7 +242,8 @@ protected: // replace the contents of the selection or of the entire control with the // given text - void DoWriteText(const wxString& text, int flags = SetValue_SelectionOnly); + void DoWriteText(const wxString& text, + int flags = SetValue_SendEvent | SetValue_SelectionOnly); // set the selection possibly without scrolling the caret into view void DoSetSelection(long from, long to, bool scrollCaret = true);