X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..3ca1bf5add01419ba173f0567b060fdd9fd605f9:/src/common/textcmn.cpp diff --git a/src/common/textcmn.cpp b/src/common/textcmn.cpp index d60e807f3c..1b2b1f1532 100644 --- a/src/common/textcmn.cpp +++ b/src/common/textcmn.cpp @@ -6,7 +6,7 @@ // Created: 13.07.99 // RCS-ID: $Id$ // Copyright: (c) wxWidgets team -// Licence: wxWidgets licence +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -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;