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)
{
}
+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) );
+}
+
+