X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..b6a20a20d010d643e52914f51aa0700df0da925f:/src/common/textcmn.cpp?ds=sidebyside diff --git a/src/common/textcmn.cpp b/src/common/textcmn.cpp index 98bec4e726..1b2b1f1532 100644 --- a/src/common/textcmn.cpp +++ b/src/common/textcmn.cpp @@ -495,10 +495,26 @@ void wxTextCtrlBase::DoUpdateWindowUI(wxUpdateUIEvent& event) // hit testing // ---------------------------------------------------------------------------- +wxTextCtrlHitTestResult +wxTextCtrlBase::HitTest(const wxPoint& pt, wxTextCoord *x, wxTextCoord *y) const +{ + // implement in terms of the other overload as the native ports typically + // can get the position and not (x, y) pair directly (although wxUniv + // directly gets x and y -- and so overrides this method as well) + long pos; + wxTextCtrlHitTestResult rc = HitTest(pt, &pos); + + if ( rc != wxTE_HT_UNKNOWN ) + { + PositionToXY(pos, x, y); + } + + return rc; +} + wxTextCtrlHitTestResult wxTextCtrlBase::HitTest(const wxPoint& WXUNUSED(pt), - wxTextCoord * WXUNUSED(col), - wxTextCoord * WXUNUSED(row)) const + long * WXUNUSED(pos)) const { // not implemented return wxTE_HT_UNKNOWN;