]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/slider.cpp
added pragmas to disable icc warning when va_arg is used with a pointer type
[wxWidgets.git] / src / motif / slider.cpp
index 0cf3134f88cea3bce325046c1ddc05b91731cf2a..09cd3e5eb0b26d272c52497afad71b34a1ee02fc 100644 (file)
@@ -6,12 +6,15 @@
 // Created:     17/09/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
-#pragma implementation "slider.h"
-#endif
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#include "wx/defs.h"
+
+#if wxUSE_SLIDER
 
 #include "wx/slider.h"
 #include "wx/utils.h"
@@ -103,13 +106,12 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
 
     XtAddCallback (sliderWidget, XmNdragCallback, (XtCallbackProc) wxSliderCallback, (XtPointer) this);
 
-    ChangeFont(FALSE);
-    SetCanAddEventHandler(TRUE);
+    ChangeFont(false);
     AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
 
     ChangeBackgroundColour();
 
-    return TRUE;
+    return true;
 }
 
 wxSlider::~wxSlider()
@@ -229,7 +231,9 @@ void wxSliderCallback (Widget widget, XtPointer clientData,
     }
 
     wxScrollEvent event(scrollEvent, slider->GetId());
-    XtVaGetValues (widget, XmNvalue, &event.m_commandInt, NULL);
+    int commandInt = event.GetInt();
+    XtVaGetValues (widget, XmNvalue, &commandInt, NULL);
+    event.SetInt(commandInt);
     event.SetEventObject(slider);
     slider->GetEventHandler()->ProcessEvent(event);
 
@@ -240,3 +244,4 @@ void wxSliderCallback (Widget widget, XtPointer clientData,
     slider->GetEventHandler()->ProcessEvent(event2);
 }
 
+#endif // wxUSE_SLIDER