X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3a9fa0d6b59c5c299766b3ed71ccadeeebf3dbb8..682214d5c6ec3e56dbdfd0c97d70d87e614b38c2:/include/wx/msw/textctrl.h?ds=sidebyside diff --git a/include/wx/msw/textctrl.h b/include/wx/msw/textctrl.h index dfc07966c5..3f09055cdf 100644 --- a/include/wx/msw/textctrl.h +++ b/include/wx/msw/textctrl.h @@ -103,6 +103,13 @@ public: virtual bool PositionToXY(long pos, long *x, long *y) const; virtual void ShowPosition(long pos); + virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, long *pos) const; + virtual wxTextCtrlHitTestResult HitTest(const wxPoint& pt, + wxTextCoord *col, + wxTextCoord *row) const + { + return wxTextCtrlBase::HitTest(pt, col, row); + } // Clipboard operations virtual void Copy(); @@ -124,7 +131,7 @@ public: virtual void SetInsertionPoint(long pos); virtual void SetInsertionPointEnd(); virtual long GetInsertionPoint() const; - virtual long GetLastPosition() const; + virtual wxTextPos GetLastPosition() const; virtual void SetSelection(long from, long to); virtual void SetEditable(bool editable); @@ -141,14 +148,7 @@ 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 + virtual WXHBRUSH MSWControlColor(WXHDC hDC); #if wxUSE_RICHEDIT virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); @@ -188,7 +188,7 @@ public: // Show a context menu for Rich Edit controls (the standard // EDIT control has one already) - void OnRightClick(wxMouseEvent& event); + void OnContextMenu(wxContextMenuEvent& event); // be sure the caret remains invisible if the user // called HideNativeCaret() before @@ -199,7 +199,7 @@ protected: void Init(); // intercept WM_GETDLGCODE - virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); + virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); // call this to increase the size limit (will do nothing if the current // limit is big enough) @@ -219,10 +219,10 @@ protected: // replace the contents of the selection or of the entire control with the // given text - void DoWriteText(const wxString& text, bool selectionOnly = TRUE); + 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); + void DoSetSelection(long from, long to, bool scrollCaret = true); // return true if there is a non empty selection in the control bool HasSelection() const; @@ -231,7 +231,7 @@ protected: // position long GetLengthOfLineContainingPos(long pos) const; - // send TEXT_UPDATED event, return TRUE if it was handled, FALSE otherwise + // send TEXT_UPDATED event, return true if it was handled, false otherwise bool SendUpdateEvent(); // override some base class virtuals @@ -247,9 +247,11 @@ protected: int m_verRichEdit; #endif // wxUSE_RICHEDIT - // if TRUE, SendUpdateEvent() will eat the next event (see comments in the - // code as to why this is needed) - bool m_suppressNextUpdate; + // number of EN_UPDATE events sent by Windows when we change the controls + // text ourselves: we want this to be exactly 1 + int m_updatesCount; + + virtual wxVisualAttributes GetDefaultAttributes() const; private: DECLARE_EVENT_TABLE()