+ if (!win->m_hasVMT) return;
+ if (g_blockEventsOnDrag) return;
+
+ const double dvalue = adjust->value;
+ const double diff = dvalue - win->m_oldPos;
+ if ( AreSameAdjustValues(diff, 0) )
+ return;
+
+ wxEventType evtType;
+ if ( win->m_isScrolling )
+ evtType = wxEVT_SCROLL_THUMBTRACK;
+ // it could seem that UP/DOWN are inversed but this is what wxMSW does
+ else if ( AreSameAdjustValues(diff, adjust->step_increment) )
+ evtType = wxEVT_SCROLL_LINEDOWN;
+ else if ( AreSameAdjustValues(diff, -adjust->step_increment) )
+ evtType = wxEVT_SCROLL_LINEUP;
+ else if ( AreSameAdjustValues(diff, adjust->page_increment) )
+ evtType = wxEVT_SCROLL_PAGEDOWN;
+ else if ( AreSameAdjustValues(diff, -adjust->page_increment) )
+ evtType = wxEVT_SCROLL_PAGEUP;
+ else if ( AreSameAdjustValues(adjust->value, adjust->lower) )
+ evtType = wxEVT_SCROLL_TOP;
+ else if ( AreSameAdjustValues(adjust->value, adjust->upper) )
+ evtType = wxEVT_SCROLL_BOTTOM;
+
+ ProcessScrollEvent(win, evtType, dvalue);
+
+ win->m_oldPos = dvalue;
+}
+
+static gint gtk_slider_button_press_callback( GtkWidget * /* widget */,
+ GdkEventButton * /* gdk_event */,
+ wxWindowGTK *win)