projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
set click coordinates to (-1, -1) if right mouse button event was generated from...
[wxWidgets.git]
/
src
/
gtk1
/
slider.cpp
diff --git
a/src/gtk1/slider.cpp
b/src/gtk1/slider.cpp
index 07bc86620dd562f439e6bc4d3f4600af7b462028..bcd260ad6eeeb5c596cdec3f70099a5311205d04 100644
(file)
--- a/
src/gtk1/slider.cpp
+++ b/
src/gtk1/slider.cpp
@@
-7,10
+7,13
@@
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#if
def __GNUG__
+#if
defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "slider.h"
#endif
#pragma implementation "slider.h"
#endif
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
#include "wx/slider.h"
#if wxUSE_SLIDER
#include "wx/slider.h"
#if wxUSE_SLIDER
@@
-131,18
+134,14
@@
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) );
+ GtkEnableEvents();
+
SetRange( minValue, maxValue );
SetValue( value );
SetRange( minValue, maxValue );
SetValue( value );
- GtkEnableEvents();
-
m_parent->DoAddChild( this );
m_parent->DoAddChild( this );
- PostCreation();
-
- SetBackgroundColour( parent->GetBackgroundColour() );
-
- Show( TRUE );
+ PostCreation(size);
return TRUE;
}
return TRUE;
}
@@
-255,20
+254,15
@@
int wxSlider::GetLineSize() const
bool wxSlider::IsOwnGtkWindow( GdkWindow *window )
{
GtkRange *range = GTK_RANGE(m_widget);
bool wxSlider::IsOwnGtkWindow( GdkWindow *window )
{
GtkRange *range = GTK_RANGE(m_widget);
+#ifdef __WXGTK20__
+ return (range->event_window == window);
+#else
return ( (window == GTK_WIDGET(range)->window)
return ( (window == GTK_WIDGET(range)->window)
-#ifndef __WXGTK20__
|| (window == range->trough)
|| (window == range->slider)
|| (window == range->step_forw)
|| (window == range->trough)
|| (window == range->slider)
|| (window == range->step_forw)
- || (window == range->step_back)
-#endif // GTK+ 1.x
- );
-}
-
-void wxSlider::ApplyWidgetStyle()
-{
- SetWidgetStyle();
- gtk_widget_set_style( m_widget, m_widgetStyle );
+ || (window == range->step_back) );
+#endif
}
void wxSlider::GtkDisableEvents()
}
void wxSlider::GtkDisableEvents()
@@
-286,4
+280,11
@@
void wxSlider::GtkEnableEvents()
(gpointer) this );
}
(gpointer) this );
}
+// static
+wxVisualAttributes
+wxSlider::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
+{
+ return GetDefaultAttributesFromGTKWidget(gtk_vscale_new);
+}
+
#endif
#endif