// Modified by:
// Created: 04/01/98
// RCS-ID: $Id$
-// Copyright: (c) Stefan Csomory
+// Copyright: (c) Stefan Csomor
+// Licence: The wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#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 )
: wxToolBarToolBase(tbar, id, label, bmpNormal, bmpDisabled, kind,
clientData, shortHelp, longHelp)
{
- Init() ;
+ Init();
+
+ if (id == wxID_SEPARATOR) return;
WindowRef window = (WindowRef) tbar->MacGetRootWindow() ;
wxSize toolSize = tbar->GetToolSize() ;
node = node->GetNext();
}
- int separatorSize = GetToolSize().x / 4 ;
-
node = m_tools.GetFirst();
while (node)
{
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() )
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 */ ) ;
}
}
}