X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/294de5ca86f41bc196c0fa8d39391ee21ed8d0ef..7c60222510bc5e197b12f153c4bf05db66cb0f4a:/src/osx/cocoa/notebook.mm?ds=sidebyside diff --git a/src/osx/cocoa/notebook.mm b/src/osx/cocoa/notebook.mm index c314bc6389..86820dc0ea 100644 --- a/src/osx/cocoa/notebook.mm +++ b/src/osx/cocoa/notebook.mm @@ -260,6 +260,28 @@ public: } } } + + int TabHitTest(const wxPoint & pt, long* flags) + { + int retval = wxNOT_FOUND; + + NSPoint nspt = wxToNSPoint( m_osxView, pt ); + + wxNSTabView* slf = (wxNSTabView*) m_osxView; + + NSTabViewItem* hitItem = [slf tabViewItemAtPoint:nspt]; + + if (!hitItem) { + if ( flags ) + *flags = wxBK_HITTEST_NOWHERE; + } else { + retval = [slf indexOfTabViewItem:hitItem]; + if ( flags ) + *flags = wxBK_HITTEST_ONLABEL; + } + + return retval; + } };