X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bfe9ffbc8f021c6e0e5b4243fdc8e1a0c3a1ee27..ba8a4f660ae54de211a5869d7ea2c86cfd47cfeb:/src/mac/toolbar.cpp diff --git a/src/mac/toolbar.cpp b/src/mac/toolbar.cpp index 62b486d43d..51ba976d42 100644 --- a/src/mac/toolbar.cpp +++ b/src/mac/toolbar.cpp @@ -5,7 +5,8 @@ // Modified by: // Created: 04/01/98 // RCS-ID: $Id$ -// Copyright: (c) Stefan Csomory +// Copyright: (c) Stefan Csomor +// Licence: The wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -22,7 +23,7 @@ #include "wx/bitmap.h" #if !USE_SHARED_LIBRARY -IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxToolBarBase) +IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxControl) BEGIN_EVENT_TABLE(wxToolBar, wxToolBarBase) EVT_MOUSE_EVENTS( wxToolBar::OnMouse ) @@ -324,8 +325,6 @@ bool wxToolBar::Realize() node = node->GetNext(); } - int separatorSize = GetToolSize().x / 4 ; - node = m_tools.GetFirst(); while (node) { @@ -391,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() ) @@ -603,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 */ ) ; } } }