X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ba7ce6a0b7f74d33ca1a80e2afb90ceeb5b19d49..836915e177aa750ca5c3bc19b4dbdedd36603e8d:/src/motif/slider.cpp?ds=sidebyside diff --git a/src/motif/slider.cpp b/src/motif/slider.cpp index 756d5fa580..369cecc720 100644 --- a/src/motif/slider.cpp +++ b/src/motif/slider.cpp @@ -16,22 +16,26 @@ #include "wx/slider.h" #include "wx/utils.h" +#ifdef __VMS__ +#pragma message disable nosimpint +#endif #include #include #include #include #include +#ifdef __VMS__ +#pragma message enable nosimpint +#endif -#include +#include "wx/motif/private.h" void wxSliderCallback (Widget widget, XtPointer clientData, XmScaleCallbackStruct * cbs); -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl) BEGIN_EVENT_TABLE(wxSlider, wxControl) END_EVENT_TABLE() -#endif @@ -93,12 +97,20 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id, m_mainWidget = (WXWidget) sliderWidget; +#ifdef __VMS__ +#pragma message disable codcauunr + // VMS gives here the compiler warning : + // statement either is unreachable or causes unreachable code +#endif if(style & wxSL_NOTIFY_DRAG) XtAddCallback (sliderWidget, XmNdragCallback, (XtCallbackProc) wxSliderCallback, (XtPointer) this); else XtAddCallback (sliderWidget, XmNvalueChangedCallback, (XtCallbackProc) wxSliderCallback, (XtPointer) this); +#ifdef __VMS__ +#pragma message enable codcauunr +#endif XtAddCallback (sliderWidget, XmNdragCallback, (XtCallbackProc) wxSliderCallback, (XtPointer) this); @@ -174,7 +186,7 @@ void wxSlider::SetRange(int minValue, int maxValue) } // For trackbars only -void wxSlider::SetTickFreq(int n, int pos) +void wxSlider::SetTickFreq(int n, int WXUNUSED(pos)) { // Not implemented in Motif m_tickFreq = n; @@ -288,6 +300,7 @@ void wxSliderCallback (Widget widget, XtPointer clientData, XmScaleCallbackStruc // Also send a wxCommandEvent for compatibility. wxCommandEvent event2(wxEVT_COMMAND_SLIDER_UPDATED, slider->GetId()); event2.SetEventObject(slider); + event2.SetInt( event.GetInt() ); slider->ProcessCommand(event2); break; }