]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/slider.cpp
Applied patch [ 1196827 ] Fixes Assert with wxTreeCtrl::GetSelections on wxMSW
[wxWidgets.git] / src / gtk / slider.cpp
index bcd260ad6eeeb5c596cdec3f70099a5311205d04..c5d5be31fe8108b74d6b168b119499b11bcb7571 100644 (file)
@@ -19,9 +19,7 @@
 #if wxUSE_SLIDER
 
 #include "wx/utils.h"
 #if wxUSE_SLIDER
 
 #include "wx/utils.h"
-
-#include <math.h>
-
+#include "wx/math.h"
 #include "wx/gtk/private.h"
 
 //-----------------------------------------------------------------------------
 #include "wx/gtk/private.h"
 
 //-----------------------------------------------------------------------------
@@ -43,6 +41,7 @@ static const float sensitivity = 0.02;
 // "value_changed"
 //-----------------------------------------------------------------------------
 
 // "value_changed"
 //-----------------------------------------------------------------------------
 
+extern "C" {
 static void gtk_slider_callback( GtkAdjustment *adjust,
                                  SCROLLBAR_CBACK_ARG
                                  wxSlider *win )
 static void gtk_slider_callback( GtkAdjustment *adjust,
                                  SCROLLBAR_CBACK_ARG
                                  wxSlider *win )
@@ -74,6 +73,7 @@ static void gtk_slider_callback( GtkAdjustment *adjust,
     cevent.SetInt( value );
     win->GetEventHandler()->ProcessEvent( cevent );
 }
     cevent.SetInt( value );
     win->GetEventHandler()->ProcessEvent( cevent );
 }
+}
 
 //-----------------------------------------------------------------------------
 // wxSlider
 
 //-----------------------------------------------------------------------------
 // wxSlider
@@ -134,6 +134,11 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
 
     m_adjust = gtk_range_get_adjustment( GTK_RANGE(m_widget) );
 
 
     m_adjust = gtk_range_get_adjustment( GTK_RANGE(m_widget) );
 
+#ifdef __WXGTK20__
+    if (style & wxSL_INVERSE)
+        gtk_range_set_inverted( GTK_RANGE(m_widget), TRUE );
+#endif
+
     GtkEnableEvents();
 
     SetRange( minValue, maxValue );
     GtkEnableEvents();
 
     SetRange( minValue, maxValue );