]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/slider.cpp
synthesize NM_RCLICK ourselves now that def window proc doesn't do it as we don't...
[wxWidgets.git] / src / motif / slider.cpp
index c0eee32152e46954bed159b14c30af7c38487bb6..4d32280ae4dd804c08833c68b4abf5bc98c39c71 100644 (file)
@@ -6,13 +6,20 @@
 // Created:     17/09/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #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,12 +110,12 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
 
     XtAddCallback (sliderWidget, XmNdragCallback, (XtCallbackProc) wxSliderCallback, (XtPointer) this);
 
-    ChangeFont(FALSE);
+    ChangeFont(false);
     AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
 
     ChangeBackgroundColour();
 
-    return TRUE;
+    return true;
 }
 
 wxSlider::~wxSlider()
@@ -228,7 +235,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);
 
@@ -239,3 +248,4 @@ void wxSliderCallback (Widget widget, XtPointer clientData,
     slider->GetEventHandler()->ProcessEvent(event2);
 }
 
+#endif // wxUSE_SLIDER