implemented HitTest() for GTK2; test it in the sample
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28430 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user