// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
-// Licence: wxWindows licence
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "slider.h"
#endif
+// 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"
XtAddCallback (sliderWidget, XmNdragCallback, (XtCallbackProc) wxSliderCallback, (XtPointer) this);
- ChangeFont(FALSE);
- SetCanAddEventHandler(TRUE);
+ ChangeFont(false);
AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
ChangeBackgroundColour();
- return TRUE;
+ return true;
}
wxSlider::~wxSlider()
}
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);
slider->GetEventHandler()->ProcessEvent(event2);
}
+#endif // wxUSE_SLIDER