]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/toolbar.mm
Add wxActivateEvent::GetActivationReason().
[wxWidgets.git] / src / cocoa / toolbar.mm
index f6211e3c7901186c8e18870a4400ba596ce4d504..79f5c02473e97d73c2fb03cea9a6906e8cf5f833 100644 (file)
@@ -4,9 +4,8 @@
 // Author:      David Elliott
 // Modified by:
 // Created:     2003/08/17
-// RCS-ID:      $Id$
 // Copyright:   (c) 2003 David Elliott
-// Licence:     wxWidgets licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // ============================================================================
@@ -60,8 +59,8 @@ public:
         CreateButtonCell();
     }
 
-    wxToolBarTool(wxToolBar *tbar, wxControl *control)
-        : wxToolBarToolBase(tbar, control)
+    wxToolBarTool(wxToolBar *tbar, wxControl *control, const wxString& label)
+        : wxToolBarToolBase(tbar, control, label)
     {
         Init();
     }
@@ -100,7 +99,7 @@ void wxToolBarTool::Init()
 void wxToolBar::CocoaToolClickEnded()
 {
     wxASSERT(m_mouseDownTool);
-    wxCommandEvent event(wxEVT_COMMAND_MENU_SELECTED, m_mouseDownTool->GetId());
+    wxCommandEvent event(wxEVT_MENU, m_mouseDownTool->GetId());
     InitCommandEvent(event);
     Command(event);
 }
@@ -208,9 +207,10 @@ wxToolBarToolBase *wxToolBar::CreateTool(int toolid,
                              clientData, shortHelpString, longHelpString);
 }
 
-wxToolBarToolBase *wxToolBar::CreateTool(wxControl *control)
+wxToolBarToolBase *
+wxToolBar::CreateTool(wxControl *control, const wxString& label)
 {
-    return new wxToolBarTool(this, control);
+    return new wxToolBarTool(this, control, label);
 }
 
 void wxToolBar::SetWindowStyleFlag( long style )