]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/toolbar.cpp
use wxIsEmpty() instead of deprecated IsEmpty()
[wxWidgets.git] / src / motif / toolbar.cpp
index b7a1a782aa16c0f980bbb2cee1b45b4f72570525..98619468b59f3925a6377d1d5692e054a04398b1 100644 (file)
 #define XtDisplay XTDISPLAY
 #endif
 
-#include "wx/settings.h"
-#include "wx/app.h"
-#include "wx/timer.h"
 #include "wx/toolbar.h"
-#include "wx/frame.h"
+
+#ifndef WX_PRECOMP
+    #include "wx/app.h"
+    #include "wx/frame.h"
+    #include "wx/timer.h"
+    #include "wx/settings.h"
+#endif
 
 #ifdef __VMS__
 #pragma message disable nosimpint
@@ -94,8 +97,8 @@ public:
         Init();
     }
 
-    wxToolBarTool(wxToolBar *tbar, wxControl *control)
-        : wxToolBarToolBase(tbar, control)
+    wxToolBarTool(wxToolBar *tbar, wxControl *control, const wxString& label)
+        : wxToolBarToolBase(tbar, control, label)
     {
         Init();
     }
@@ -156,9 +159,10 @@ wxToolBarToolBase *wxToolBar::CreateTool(int id,
 }
 
 
-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 wxToolBarTool::Init()
@@ -201,6 +205,8 @@ bool wxToolBar::Create(wxWindow *parent,
                                    wxDefaultValidator, name ) )
         return false;
 
+    FixupStyle();
+
     m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
 
     Widget parentWidget = (Widget) parent->GetClientWidget();
@@ -376,7 +382,7 @@ bool wxToolBar::Realize()
                 insensBmp = tool->GetDisabledBitmap();
                 if ( bmp.GetMask() || insensBmp.GetMask() )
                 {
-                    int backgroundPixel;
+                    WXPixel backgroundPixel;
                     XtVaGetValues(button, XmNbackground, &backgroundPixel,
                                   NULL);
 
@@ -399,7 +405,7 @@ bool wxToolBar::Realize()
                 // Create a selected/toggled bitmap. If there isn't a 2nd
                 // bitmap, we need to create it (with a darker, selected
                 // background)
-                int backgroundPixel;
+                WXPixel backgroundPixel;
                 if ( tool->CanBeToggled() )
                     XtVaGetValues(button, XmNselectColor, &backgroundPixel,
                                   NULL);
@@ -786,4 +792,3 @@ void wxToolBarTimer::Notify()
         /************************************************************/
         XtPopup (help_popup, XtGrabNone);
 }
-