extern bool g_blockEventsOnDrag;
//-----------------------------------------------------------------------------
-// wxSlider
+// "value_changed"
//-----------------------------------------------------------------------------
static void gtk_slider_callback( GtkWidget *WXUNUSED(widget), wxSlider *win )
int value = (int)(win->m_adjust->value+0.5);
int orient = wxHORIZONTAL;
- if (win->GetWindowStyleFlag() & wxSB_VERTICAL == wxSB_VERTICAL) orient = wxHORIZONTAL;
+ if (win->GetWindowStyleFlag() & wxSB_VERTICAL == wxSB_VERTICAL) orient = wxVERTICAL;
wxScrollEvent event( command, win->GetId(), value, orient );
event.SetEventObject( win );
win->ProcessEvent( cevent );
}
+//-----------------------------------------------------------------------------
+// wxSlider
+//-----------------------------------------------------------------------------
+
IMPLEMENT_DYNAMIC_CLASS(wxSlider,wxControl)
wxSlider::wxSlider(void)
m_oldPos = 0.0;
if (style & wxSL_VERTICAL == wxSL_VERTICAL)
- m_widget = gtk_hscale_new( NULL );
+ m_widget = gtk_hscale_new( (GtkAdjustment *) NULL );
else
- m_widget = gtk_vscale_new( NULL );
+ m_widget = gtk_vscale_new( (GtkAdjustment *) NULL );
m_adjust = gtk_range_get_adjustment( GTK_RANGE(m_widget) );
{
}
+bool wxSlider::IsOwnGtkWindow( GdkWindow *window )
+{
+ GtkRange *range = GTK_RANGE(m_widget);
+ return ( (window == GTK_WIDGET(range)->window) ||
+ (window == range->trough) ||
+ (window == range->slider) ||
+ (window == range->step_forw) ||
+ (window == range->step_back) );
+}
+
+