X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9fc3ad34c5326856aeebf02335244ae315cef688..e18bf7e7c6477b82203375141aee69656ac2d987:/include/wx/msw/textctrl.h diff --git a/include/wx/msw/textctrl.h b/include/wx/msw/textctrl.h index 732a38ebe8..1f85ae5ca3 100644 --- a/include/wx/msw/textctrl.h +++ b/include/wx/msw/textctrl.h @@ -77,6 +77,12 @@ public: virtual void WriteText(const wxString& text); virtual void AppendText(const wxString& text); +#if wxUSE_RICHEDIT + // apply text attribute to the range of text (only works with richedit + // controls) + virtual bool SetStyle(long start, long end, const wxTextAttr& style); +#endif // wxUSE_RICHEDIT + // translate between the position (which is just an index in the text ctrl // considering all its contents as a single strings) and (x, y) coordinates // which represent column and line. @@ -115,10 +121,23 @@ public: virtual void Command(wxCommandEvent& event); virtual bool MSWCommand(WXUINT param, WXWORD id); + virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, + WXUINT message, WXWPARAM wParam, WXLPARAM lParam); + + // In WIN16, need to override normal erasing because + // Ctl3D doesn't use the wxWindows background colour. +#ifdef __WIN16__ + void OnEraseBackground(wxEraseEvent& event); +#endif #if wxUSE_RICHEDIT bool IsRich() const { return m_isRich; } void SetRichEdit(bool isRich) { m_isRich = isRich; } + + // rich edit controls are not compatible with normal ones and wem ust set + // the colours for them otherwise + virtual bool SetBackgroundColour(const wxColour& colour); + virtual bool SetForegroundColour(const wxColour& colour); #endif // wxUSE_RICHEDIT virtual void AdoptAttributesFromHWND();