MacHandleControlClick extended by mouseStillDown state for supporting things like THUMBRELEASE

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2003-06-07 20:58:38 +00:00
parent e71a0aa95f
commit 4b26b60fac
22 changed files with 60 additions and 50 deletions

View File

@@ -390,7 +390,7 @@ wxSize wxToolBar::GetToolSize() const
return wxSize(m_defaultWidth + 4, m_defaultHeight + 4);
}
void wxToolBar::MacHandleControlClick( WXWidget control , wxInt16 controlpart )
void wxToolBar::MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool WXUNUSED( mouseStillDown ) )
{
wxToolBarToolsList::Node *node;
for ( node = m_tools.GetFirst(); node; node = node->GetNext() )
@@ -602,15 +602,11 @@ void wxToolBar::OnMouse( wxMouseEvent &event )
if ( control && ::IsControlActive( control ) )
{
{
if ( controlpart == kControlIndicatorPart && !UMAHasAppearance() )
controlpart = ::HandleControlClick( control , localwhere , modifiers , (ControlActionUPP) NULL ) ;
else
controlpart = ::HandleControlClick( control , localwhere , modifiers , (ControlActionUPP) -1 ) ;
controlpart = ::HandleControlClick( control , localwhere , modifiers , (ControlActionUPP) -1 ) ;
wxTheApp->s_lastMouseDown = 0 ;
if ( controlpart && ! ( ( UMAHasAppearance() || (controlpart != kControlIndicatorPart) )
&& (IsKindOf( CLASSINFO( wxScrollBar ) ) ) ) ) // otherwise we will get the event twice
if ( control && controlpart != kControlNoPart ) // otherwise we will get the event twice
{
MacHandleControlClick( control , controlpart ) ;
MacHandleControlClick( control , controlpart , false /* not down anymore */ ) ;
}
}
}