+static gboolean
+window_scroll_event_hscrollbar(GtkWidget*, GdkEventScroll* gdk_event, wxWindow* win)
+{
+ if (gdk_event->direction != GDK_SCROLL_LEFT &&
+ gdk_event->direction != GDK_SCROLL_RIGHT)
+ {
+ return false;
+ }
+
+ wxMouseEvent event(wxEVT_MOUSEWHEEL);
+ InitMouseEvent(win, event, gdk_event);
+
+ GtkRange *range = win->m_scrollBar[wxWindow::ScrollDir_Horz];
+ if (!range) return FALSE;
+
+ if (range && GTK_WIDGET_VISIBLE (range))
+ {
+ GtkAdjustment *adj = range->adjustment;
+ gdouble delta = adj->step_increment * 3;
+ if (gdk_event->direction == GDK_SCROLL_LEFT)
+ delta = -delta;
+
+ gdouble new_value = CLAMP (adj->value + delta, adj->lower, adj->upper - adj->page_size);
+
+ gtk_adjustment_set_value (adj, new_value);
+
+ return TRUE;
+ }
+
+ return FALSE;
+}
+