X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a5aa80862cb50928bd879f7d42df49622f6e8cae..ccdcde00d9ae27ca20ff6c3c9495918a0ec725aa:/include/wx/msw/textctrl.h diff --git a/include/wx/msw/textctrl.h b/include/wx/msw/textctrl.h index 499163b037..c5e03295f3 100644 --- a/include/wx/msw/textctrl.h +++ b/include/wx/msw/textctrl.h @@ -82,6 +82,10 @@ public: virtual void WriteText(const wxString& text); virtual void AppendText(const wxString& text); +#ifdef __WIN32__ + virtual bool EmulateKeyPress(const wxKeyEvent& event); +#endif // __WIN32__ + #if wxUSE_RICHEDIT // apply text attribute to the range of text (only works with richedit // controls) @@ -124,6 +128,8 @@ public: // Implementation from now on // -------------------------- + virtual void SetWindowStyleFlag(long style); + virtual void Command(wxCommandEvent& event); virtual bool MSWCommand(WXUINT param, WXWORD id); virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor, @@ -171,6 +177,9 @@ protected: // common part of all ctors void Init(); + // intercept WM_GETDLGCODE + virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); + // call this to increase the size limit (will do nothing if the current // limit is big enough) // @@ -179,10 +188,17 @@ protected: bool AdjustSpaceLimit(); #if wxUSE_RICHEDIT - // replace the selection with the given text in the specified encoding - bool StreamIn(const wxString& value, wxFontEncoding encoding); + // replace the selection or the entire control contents with the given text + // in the specified encoding + bool StreamIn(const wxString& value, + wxFontEncoding encoding, + bool selOnly); #endif // wxUSE_RICHEDIT + // replace the contents of the selection or of the entire control with the + // given text + void DoWriteText(const wxString& text, bool selectionOnly = TRUE); + // set the selection possibly without scrolling the caret into view void DoSetSelection(long from, long to, bool scrollCaret = TRUE); @@ -194,6 +210,8 @@ protected: virtual bool MSWShouldPreProcessMessage(WXMSG* pMsg); virtual wxSize DoGetBestSize() const; + virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; + #if wxUSE_RICHEDIT // we're using RICHEDIT (and not simple EDIT) control if this field is not // 0, it also gives the version of the RICHEDIT control being used (1, 2 or