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:
Vadim Zeitlin
2004-07-23 18:07:40 +00:00
parent e38c6b5fc7
commit 692c9b8696
9 changed files with 109 additions and 9 deletions

View File

@@ -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;