X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/31528cd3cac75558beef4bce0ba21fd182a808ab..70914290a18a1c95c16ff5148d53f3dea52d2940:/src/motif/slider.cpp diff --git a/src/motif/slider.cpp b/src/motif/slider.cpp index 5d3d92125e..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 @@ -51,7 +55,10 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id, const wxSize& size, long style, const wxValidator& validator, const wxString& name) -{ +{ + if ( !((style & wxSL_HORIZONTAL) || (style & wxSL_VERTICAL)) ) + style |= wxSL_HORIZONTAL; + SetName(name); SetValidator(validator); m_backgroundColour = parent->GetBackgroundColour(); @@ -90,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); @@ -171,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; @@ -285,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; }