- if (!win->m_hasVMT) return;
- if (g_blockEventsOnDrag) return;
-
- float diff = adjust->value - win->m_oldPos;
- if (fabs(diff) < sensitivity) return;
-
- win->m_oldPos = adjust->value;
-
- wxEventType command = GtkScrollTypeToWx(GTK_SCROLL_JUMP);
-
- double dvalue = adjust->value;
- int value = (int)(dvalue < 0 ? dvalue - 0.5 : dvalue + 0.5);
-
- int orient = win->HasFlag(wxSB_VERTICAL) ? wxVERTICAL : wxHORIZONTAL;
-
- // throw a LINEUP / LINEDOWN event if necessary
- if (g_currentUpDownEvent != wxEVT_NULL)
- {
- wxScrollEvent event( g_currentUpDownEvent, win->GetId(), value, orient );
- event.SetEventObject( win );
- win->GetEventHandler()->ProcessEvent( event );
- }
-
- // throw other event (wxEVT_SCROLL_THUMBTRACK)
- wxScrollEvent event( command, win->GetId(), value, orient );
- event.SetEventObject( win );
- win->GetEventHandler()->ProcessEvent( event );
-
-/*
- wxCommandEvent cevent( wxEVT_COMMAND_SCROLLBAR_UPDATED, win->GetId() );
- cevent.SetEventObject( win );
- win->ProcessEvent( cevent );
-*/