projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Now works when derived from wxTextCtrlBase, using wxScrollHelper.
[wxWidgets.git]
/
src
/
gtk1
/
slider.cpp
diff --git
a/src/gtk1/slider.cpp
b/src/gtk1/slider.cpp
index e7079c5c1018e46500b5fa262d1190f1bb368a49..1a72e1608983e565483b4fdc1fcf827c0248483f 100644
(file)
--- a/
src/gtk1/slider.cpp
+++ b/
src/gtk1/slider.cpp
@@
-7,10
+7,6
@@
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "slider.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
@@
-19,9
+15,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
+37,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
+69,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
+130,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 );
@@
-265,12
+266,6
@@
bool wxSlider::IsOwnGtkWindow( GdkWindow *window )
#endif
}
#endif
}
-void wxSlider::ApplyWidgetStyle()
-{
- SetWidgetStyle();
- gtk_widget_set_style( m_widget, m_widgetStyle );
-}
-
void wxSlider::GtkDisableEvents()
{
gtk_signal_disconnect_by_func( GTK_OBJECT(m_adjust),
void wxSlider::GtkDisableEvents()
{
gtk_signal_disconnect_by_func( GTK_OBJECT(m_adjust),