X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7520f3da332d64a676b6f7d27a56004fabf2db36..b879becf6af686ab38d1c67799d837c64fb4833d:/src/motif/slider.cpp diff --git a/src/motif/slider.cpp b/src/motif/slider.cpp index 31ca0ae3e0..192b4633e8 100644 --- a/src/motif/slider.cpp +++ b/src/motif/slider.cpp @@ -15,7 +15,10 @@ #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 @@ -61,6 +64,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id, if( !CreateControl( parent, id, pos, size, style, validator, name ) ) return false; + PreCreation(); m_lineSize = 1; m_windowStyle = style; @@ -90,11 +94,9 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id, 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; } @@ -219,13 +221,13 @@ void wxSliderCallback (Widget widget, XtPointer clientData, XtVaGetValues (widget, XmNvalue, &commandInt, NULL); event.SetInt(commandInt); event.SetEventObject(slider); - slider->GetEventHandler()->ProcessEvent(event); + slider->HandleWindowEvent(event); // Also send a wxCommandEvent for compatibility. wxCommandEvent event2(wxEVT_COMMAND_SLIDER_UPDATED, slider->GetId()); event2.SetEventObject(slider); event2.SetInt( event.GetInt() ); - slider->GetEventHandler()->ProcessEvent(event2); + slider->HandleWindowEvent(event2); } #endif // wxUSE_SLIDER