]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/toolbar.cpp
wxUniversal fixes:
[wxWidgets.git] / src / mac / toolbar.cpp
index c7dd11d1956600413792b491c32095c004fed488..152e1aaddfce3fdc39a4c8a49ec8554538c67a2f 100644 (file)
@@ -41,14 +41,15 @@ class wxToolBarTool : public wxToolBarToolBase
 public:
     wxToolBarTool(wxToolBar *tbar,
                   int id,
-                  const wxBitmap& bitmap1,
-                  const wxBitmap& bitmap2,
-                  bool toggle,
+                  const wxString& label,
+                  const wxBitmap& bmpNormal,
+                  const wxBitmap& bmpDisabled,
+                  wxItemKind kind,
                   wxObject *clientData,
-                  const wxString& shortHelpString,
-                  const wxString& longHelpString)
-        : wxToolBarToolBase(tbar, id, bitmap1, bitmap2, toggle,
-                            clientData, shortHelpString, longHelpString)
+                  const wxString& shortHelp,
+                  const wxString& longHelp)
+        : wxToolBarToolBase(tbar, id, label, bmpNormal, bmpDisabled, kind,
+                            clientData, shortHelp, longHelp)
     {
         m_nSepCount = 0;
         m_index = -1 ;
@@ -87,15 +88,16 @@ const short kwxMacToolBarLeftMargin = 2 ;
 
 
 wxToolBarToolBase *wxToolBar::CreateTool(int id,
-                                         const wxBitmap& bitmap1,
-                                         const wxBitmap& bitmap2,
-                                         bool toggle,
+                                         const wxString& label,
+                                         const wxBitmap& bmpNormal,
+                                         const wxBitmap& bmpDisabled,
+                                         wxItemKind kind,
                                          wxObject *clientData,
-                                         const wxString& shortHelpString,
-                                         const wxString& longHelpString)
+                                         const wxString& shortHelp,
+                                         const wxString& longHelp)
 {
-    return new wxToolBarTool(this, id, bitmap1, bitmap2, toggle,
-                             clientData, shortHelpString, longHelpString);
+    return new wxToolBarTool(this, id, label, bmpNormal, bmpDisabled, kind,
+                             clientData, shortHelp, longHelp);
 }
 
 wxToolBarToolBase *wxToolBar::CreateTool(wxControl *control)
@@ -200,7 +202,7 @@ bool wxToolBar::Realize()
     while (node)
     {
         wxToolBarTool *tool = (wxToolBarTool *)node->Data();
-        wxBitmapRefData * bmap = (wxBitmapRefData*) ( tool->GetBitmap1().GetRefData()) ;
+        wxBitmapRefData * bmap = (wxBitmapRefData*) ( tool->GetNormalBitmap().GetRefData()) ;
         
         if(  !tool->IsSeparator()  )
         {
@@ -210,7 +212,7 @@ bool wxToolBar::Realize()
             toolrect.bottom = toolrect.top + toolSize.y ;
             
             ControlButtonContentInfo info ;
-            wxMacCreateBitmapButton( &info , tool->GetBitmap1() ) ;
+            wxMacCreateBitmapButton( &info , tool->GetNormalBitmap() ) ;
             ControlHandle m_macToolHandle ;
             
             SInt16 behaviour = kControlBehaviorOffsetContents ;
@@ -391,7 +393,7 @@ void wxToolBar::MacSuperChangedPosition()
        while (node)
        {
                wxToolBarTool *tool = (wxToolBarTool *)node->Data();
-               wxBitmapRefData * bmap = (wxBitmapRefData*) ( tool->GetBitmap1().GetRefData()) ;
+               wxBitmapRefData * bmap = (wxBitmapRefData*) ( tool->GetNormalBitmap().GetRefData()) ;
                
                if(  !tool->IsSeparator()  )
                {