]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/toolbar.cpp
cleaned up the checkbox creation code (~70 lines of code became 3)
[wxWidgets.git] / src / os2 / toolbar.cpp
index 804f2bc3fd65272aff8133dcc05feaff975c33b7..40f561de27a1cdad1d8e542326175c7ebec7c379 100644 (file)
@@ -84,17 +84,19 @@ class wxToolBarTool : public wxToolBarToolBase
 public:
     inline wxToolBarTool( wxToolBar*      pTbar
                          ,int             vId
 public:
     inline wxToolBarTool( wxToolBar*      pTbar
                          ,int             vId
+                         ,const wxString& rsLabel
                          ,const wxBitmap& rBitmap1
                          ,const wxBitmap& rBitmap2
                          ,const wxBitmap& rBitmap1
                          ,const wxBitmap& rBitmap2
-                         ,bool            bToggle
+                         ,wxItemKind      vKind
                          ,wxObject*       pClientData
                          ,const wxString& rShortHelpString
                          ,const wxString& rLongHelpString
                         ) : wxToolBarToolBase( pTbar
                                               ,vId
                          ,wxObject*       pClientData
                          ,const wxString& rShortHelpString
                          ,const wxString& rLongHelpString
                         ) : wxToolBarToolBase( pTbar
                                               ,vId
+                                              ,rsLabel
                                               ,rBitmap1
                                               ,rBitmap2
                                               ,rBitmap1
                                               ,rBitmap2
-                                              ,bToggle
+                                              ,vKind
                                               ,pClientData
                                               ,rShortHelpString
                                               ,rLongHelpString
                                               ,pClientData
                                               ,rShortHelpString
                                               ,rLongHelpString
@@ -132,9 +134,10 @@ private:
 
 wxToolBarToolBase* wxToolBar::CreateTool(
   int                               nId
 
 wxToolBarToolBase* wxToolBar::CreateTool(
   int                               nId
+, const wxString&                   rsLabel
 , const wxBitmap&                   rBitmap1
 , const wxBitmap&                   rBitmap2
 , const wxBitmap&                   rBitmap1
 , const wxBitmap&                   rBitmap2
-, bool                              bToggle
+, wxItemKind                        vKind
 , wxObject*                         pClientData
 , const wxString&                   rShortHelpString
 , const wxString&                   rLongHelpString
 , wxObject*                         pClientData
 , const wxString&                   rShortHelpString
 , const wxString&                   rLongHelpString
@@ -142,9 +145,10 @@ wxToolBarToolBase* wxToolBar::CreateTool(
 {
     return(new wxToolBarTool( this
                              ,nId
 {
     return(new wxToolBarTool( this
                              ,nId
+                             ,rsLabel
                              ,rBitmap1
                              ,rBitmap2
                              ,rBitmap1
                              ,rBitmap2
-                             ,bToggle
+                             ,vKind
                              ,pClientData
                              ,rShortHelpString
                              ,rLongHelpString
                              ,pClientData
                              ,rShortHelpString
                              ,rLongHelpString
@@ -218,7 +222,7 @@ bool wxToolBar::Create(
     wxRGBToColour(m_backgroundColour, GetSysColor(COLOR_BTNFACE));
     m_foregroundColour = *wxBLACK;
 
     wxRGBToColour(m_backgroundColour, GetSysColor(COLOR_BTNFACE));
     m_foregroundColour = *wxBLACK;
 
-    SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
+    SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
 
     // position it
     int x = pos.x;
 
     // position it
     int x = pos.x;