+ Widget parentWidget = (Widget) parent->GetClientWidget();
+
+ Widget sliderWidget = XtVaCreateManagedWidget ("sliderWidget",
+ xmScaleWidgetClass, parentWidget,
+ XmNorientation,
+ (((m_windowStyle & wxSL_VERTICAL) == wxSL_VERTICAL) ? XmVERTICAL : XmHORIZONTAL),
+ XmNprocessingDirection,
+ (((m_windowStyle & wxSL_VERTICAL) == wxSL_VERTICAL) ? XmMAX_ON_TOP : XmMAX_ON_RIGHT),
+ XmNmaximum, maxValue,
+ XmNminimum, minValue,
+ XmNvalue, value,
+ XmNshowValue, True,
+ NULL);
+
+ 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);
+
+ m_font = parent->GetFont();
+
+ ChangeFont(FALSE);
+ SetCanAddEventHandler(TRUE);
+ AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);