/////////////////////////////////////////////////////////////////////////////
-// Name: slider.cpp
+// Name: src/motif/slider.cpp
// Purpose: wxSlider
// Author: Julian Smart
// Modified by:
// 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"
+
+#ifndef WX_PRECOMP
+ #include "wx/utils.h"
+#endif
#ifdef __VMS__
#pragma message disable nosimpint
#include "wx/motif/private.h"
-void wxSliderCallback (Widget widget, XtPointer clientData, XmScaleCallbackStruct * cbs);
+static void wxSliderCallback (Widget widget, XtPointer clientData, XmScaleCallbackStruct * cbs);
IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl)
if( !CreateControl( parent, id, pos, size, style, validator, name ) )
return false;
+ PreCreation();
m_lineSize = 1;
m_windowStyle = style;
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, XmNvalueChangedCallback, (XtCallbackProc) wxSliderCallback, (XtPointer) this);
XtAddCallback (sliderWidget, XmNdragCallback, (XtCallbackProc) wxSliderCallback, (XtPointer) this);
- ChangeFont(false);
+ PostCreation();
AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
- ChangeBackgroundColour();
-
return true;
}