]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/slider.cpp
Disable final failing wxWebView test. It fails on the buildbot but not locally.
[wxWidgets.git] / src / motif / slider.cpp
index d82e67f19c90439fd928e1bc3170935c3db04d6c..70c5c66a24aa3a94624fab6521cc04c5e45c514a 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// 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
@@ -35,8 +36,6 @@
 
 static void wxSliderCallback (Widget widget, XtPointer clientData, XmScaleCallbackStruct * cbs);
 
-IMPLEMENT_DYNAMIC_CLASS(wxSlider, wxControl)
-
 BEGIN_EVENT_TABLE(wxSlider, wxControl)
 END_EVENT_TABLE()
 
@@ -63,6 +62,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;
@@ -92,11 +92,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;
 }
 
@@ -221,13 +219,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