]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/toolbar.cpp
Add some version checks to help compiling on OSX.
[wxWidgets.git] / src / motif / toolbar.cpp
index cbb8223d823b3bc92b968cee09ec1862d40ebe53..c8ae30e002ce32112854879f8361e774315b2a32 100644 (file)
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
-#ifdef __VMS
-#define XtDisplay XTDISPLAY
-#endif
-
 #include "wx/toolbar.h"
 
 #ifndef WX_PRECOMP
 #include "wx/toolbar.h"
 
 #ifndef WX_PRECOMP
@@ -131,7 +127,7 @@ protected:
 // globals
 // ----------------------------------------------------------------------------
 
 // globals
 // ----------------------------------------------------------------------------
 
-static wxToolBarTimer* wxTheToolBarTimer = (wxToolBarTimer*) NULL;
+static wxToolBarTimer* wxTheToolBarTimer = NULL;
 
 Widget wxToolBarTimer::help_popup = (Widget) 0;
 Widget wxToolBarTimer::buttonWidget = (Widget) 0;
 
 Widget wxToolBarTimer::help_popup = (Widget) 0;
 Widget wxToolBarTimer::buttonWidget = (Widget) 0;
@@ -248,8 +244,7 @@ bool wxToolBar::Create(wxWindow *parent,
 
 wxToolBar::~wxToolBar()
 {
 
 wxToolBar::~wxToolBar()
 {
-    delete wxTheToolBarTimer;
-    wxTheToolBarTimer = NULL;
+    wxDELETE(wxTheToolBarTimer);
 }
 
 bool wxToolBar::Realize()
 }
 
 bool wxToolBar::Realize()
@@ -385,13 +380,13 @@ bool wxToolBar::Realize()
                     wxColour col;
                     col.SetPixel(backgroundPixel);
 
                     wxColour col;
                     col.SetPixel(backgroundPixel);
 
-                    if( bmp.Ok() && bmp.GetMask() )
+                    if( bmp.IsOk() && bmp.GetMask() )
                     {
                         bmp = wxCreateMaskedBitmap(bmp, col);
                         tool->SetNormalBitmap(bmp);
                     }
 
                     {
                         bmp = wxCreateMaskedBitmap(bmp, col);
                         tool->SetNormalBitmap(bmp);
                     }
 
-                    if( insensBmp.Ok() && insensBmp.GetMask() )
+                    if( insensBmp.IsOk() && insensBmp.GetMask() )
                     {
                         insensBmp = wxCreateMaskedBitmap(insensBmp, col);
                         tool->SetDisabledBitmap(insensBmp);
                     {
                         insensBmp = wxCreateMaskedBitmap(insensBmp, col);
                         tool->SetDisabledBitmap(insensBmp);
@@ -415,7 +410,7 @@ bool wxToolBar::Realize()
                 {
                     wxBitmap tmp = tool->GetDisabledBitmap();
 
                 {
                     wxBitmap tmp = tool->GetDisabledBitmap();
 
-                    insensPixmap = tmp.Ok() ?
+                    insensPixmap = tmp.IsOk() ?
                             (Pixmap)tmp.GetDrawable() :
                             tool->GetInsensPixmap();
                 }
                             (Pixmap)tmp.GetDrawable() :
                             tool->GetInsensPixmap();
                 }
@@ -482,9 +477,9 @@ bool wxToolBar::Realize()
 wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord WXUNUSED(x),
                                                   wxCoord WXUNUSED(y)) const
 {
 wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord WXUNUSED(x),
                                                   wxCoord WXUNUSED(y)) const
 {
-    wxFAIL_MSG( _T("TODO") );
+    wxFAIL_MSG( wxT("TODO") );
 
 
-    return (wxToolBarToolBase *)NULL;
+    return NULL;
 }
 
 bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *tool)
 }
 
 bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *tool)
@@ -656,7 +651,7 @@ wxToolBarToolBase *wxToolBar::FindToolByWidget(WXWidget w) const
         node = node->GetNext();
     }
 
         node = node->GetNext();
     }
 
-    return (wxToolBarToolBase *)NULL;
+    return NULL;
 }
 
 static void wxToolButtonCallback(Widget w,
 }
 
 static void wxToolButtonCallback(Widget w,