]> git.saurik.com Git - wxWidgets.git/commitdiff
wxUniv toolbar compilation fixes
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 26 Mar 2002 11:30:45 +0000 (11:30 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 26 Mar 2002 11:30:45 +0000 (11:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/univ/toolbar.h
src/univ/toolbar.cpp

index 823888bda40f264e01a0f8cc0fee93d457421a17..4ed637c3e6d1ba93951fc3b4115665e5a3ce412d 100644 (file)
@@ -80,12 +80,13 @@ protected:
     virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle);
 
     virtual wxToolBarToolBase *CreateTool(int id,
     virtual void DoSetToggle(wxToolBarToolBase *tool, bool toggle);
 
     virtual wxToolBarToolBase *CreateTool(int id,
-                                          const wxBitmap& bitmap1,
-                                          const wxBitmap& bitmap2,
-                                          bool toggle,
+                                          const wxString& label,
+                                          const wxBitmap& bmpNormal,
+                                          const wxBitmap& bmpDisabled,
+                                          wxItemKind kind,
                                           wxObject *clientData,
                                           wxObject *clientData,
-                                          const wxString& shortHelpString,
-                                          const wxString& longHelpString);
+                                          const wxString& shortHelp,
+                                          const wxString& longHelp);
     virtual wxToolBarToolBase *CreateTool(wxControl *control);
 
     // implement wxUniversal methods
     virtual wxToolBarToolBase *CreateTool(wxControl *control);
 
     // implement wxUniversal methods
index 3db050063163c16f36b749af3400d63da8d10bda..2ce2dacdb8834a006893f6a2125e5f089daad7ba 100644 (file)
@@ -55,16 +55,17 @@ static const wxCoord INVALID_WIDTH = -1;
 class WXDLLEXPORT wxToolBarTool : public wxToolBarToolBase
 {
 public:
 class WXDLLEXPORT wxToolBarTool : public wxToolBarToolBase
 {
 public:
-    wxToolBarTool( wxToolBarBase *tbar = (wxToolBarBase *)NULL,
-                   int id = wxID_SEPARATOR,
-                   const wxBitmap& bitmap1 = wxNullBitmap,
-                   const wxBitmap& bitmap2 = wxNullBitmap,
-                   bool toggle = FALSE,
-                   wxObject *clientData = (wxObject *) NULL,
-                   const wxString& shortHelpString = wxEmptyString,
-                   const wxString& longHelpString = wxEmptyString )
-        : wxToolBarToolBase(tbar, id, bitmap1, bitmap2, toggle, clientData,
-                            shortHelpString, longHelpString)
+    wxToolBarTool(wxToolBar *tbar,
+                  int id,
+                  const wxString& label,
+                  const wxBitmap& bmpNormal,
+                  const wxBitmap& bmpDisabled,
+                  wxItemKind kind,
+                  wxObject *clientData,
+                  const wxString& shortHelp,
+                  const wxString& longHelp)
+        : wxToolBarToolBase(tbar, id, label, bmpNormal, bmpDisabled, kind,
+                            clientData, shortHelp, longHelp)
     {
         // no position yet
         m_x =
     {
         // no position yet
         m_x =
@@ -230,7 +231,7 @@ void wxToolBar::DoEnableTool(wxToolBarToolBase *tool, bool enable)
     // created disabled-state bitmap on demand
     if ( !enable && !tool->GetDisabledBitmap().Ok() )
     {
     // created disabled-state bitmap on demand
     if ( !enable && !tool->GetDisabledBitmap().Ok() )
     {
-        wxImage image( tool->GetNormalBitmap() );
+        wxImage image( tool->GetNormalBitmap().ConvertToImage() );
 
         // TODO: don't hardcode 180
         unsigned char bg_red = 180;
 
         // TODO: don't hardcode 180
         unsigned char bg_red = 180;
@@ -278,7 +279,7 @@ void wxToolBar::DoEnableTool(wxToolBarToolBase *tool, bool enable)
             }
         }
 
             }
         }
 
-        tool->SetDisabledBitmap( image.ConvertToBitmap() );
+        tool->SetDisabledBitmap(image);
     }
 
     RefreshTool(tool);
     }
 
     RefreshTool(tool);
@@ -297,15 +298,16 @@ void wxToolBar::DoSetToggle(wxToolBarToolBase *tool, bool WXUNUSED(toggle))
 }
 
 wxToolBarToolBase *wxToolBar::CreateTool(int id,
 }
 
 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,
                                          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)
 }
 
 wxToolBarToolBase *wxToolBar::CreateTool(wxControl *control)