+// process a scroll event
+static void
+ProcessScrollEvent(wxSlider *win, wxEventType evtType)
+{
+ const int orient = win->HasFlag(wxSL_VERTICAL) ? wxVERTICAL
+ : wxHORIZONTAL;
+
+ const int value = win->GetValue();
+
+ // if we have any "special" event (i.e. the value changed by a line or a
+ // page), send this specific event first
+ if ( evtType != wxEVT_NULL )
+ {
+ wxScrollEvent event( evtType, win->GetId(), value, orient );
+ event.SetEventObject( win );
+ win->HandleWindowEvent( event );
+ }
+
+ // but, in any case, except if we're dragging the slider (and so the change
+ // is not definitive), send a generic "changed" event
+ if ( evtType != wxEVT_SCROLL_THUMBTRACK )
+ {
+ wxScrollEvent event(wxEVT_SCROLL_CHANGED, win->GetId(), value, orient);
+ event.SetEventObject( win );
+ win->HandleWindowEvent( event );
+ }
+
+ // and also generate a command event for compatibility
+ wxCommandEvent event( wxEVT_COMMAND_SLIDER_UPDATED, win->GetId() );
+ event.SetEventObject( win );
+ event.SetInt( value );
+ win->HandleWindowEvent( event );
+}
+
+static inline wxEventType GtkScrollTypeToWx(int scrollType)