fill in flags parameter of HitTest() for all book controls; added new wxNB_HITTEST_ONPAGE bit
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -795,7 +795,22 @@ int wxNotebook::HitTest(const wxPoint& pt, long *flags) const
|
||||
}
|
||||
|
||||
if ( flags )
|
||||
{
|
||||
*flags = wxNB_HITTEST_NOWHERE;
|
||||
wxWindowBase * page = GetCurrentPage();
|
||||
if ( page )
|
||||
{
|
||||
// rect origin is in notebook's parent coordinates
|
||||
wxRect rect = page->GetRect();
|
||||
|
||||
// adjust it to the notebook's coordinates
|
||||
wxPoint pos = GetPosition();
|
||||
rect.x -= pos.x;
|
||||
rect.y -= pos.y;
|
||||
if ( rect.Inside( pt ) )
|
||||
*flags |= wxNB_HITTEST_ONPAGE;
|
||||
}
|
||||
}
|
||||
|
||||
return wxNOT_FOUND;
|
||||
}
|
||||
|
Reference in New Issue
Block a user