X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..222702b112dcc7bebe018d6f4d66fe469fefd02c:/src/motif/slider.cpp diff --git a/src/motif/slider.cpp b/src/motif/slider.cpp index e11f1bb9ce..4d32280ae4 100644 --- a/src/motif/slider.cpp +++ b/src/motif/slider.cpp @@ -6,7 +6,7 @@ // Created: 17/09/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) @@ -16,6 +16,10 @@ // 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" @@ -106,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() @@ -231,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); @@ -242,3 +248,4 @@ void wxSliderCallback (Widget widget, XtPointer clientData, slider->GetEventHandler()->ProcessEvent(event2); } +#endif // wxUSE_SLIDER