- if (g_isIdle) wxapp_install_idle_handler();
-
- 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(GET_SCROLL_TYPE(win->m_widget));
-
- double dvalue = adjust->value;
- int value = (int)(dvalue < 0 ? dvalue - 0.5 : dvalue + 0.5);
-
- int orient = win->HasFlag(wxSB_VERTICAL) ? wxVERTICAL : wxHORIZONTAL;
-
- wxScrollEvent event( command, win->GetId(), value, orient );
- event.SetEventObject( win );
- win->GetEventHandler()->ProcessEvent( event );
-
- // 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 );
- }
-
-/*
- wxCommandEvent cevent( wxEVT_COMMAND_SCROLLBAR_UPDATED, win->GetId() );
- cevent.SetEventObject( win );
- win->ProcessEvent( cevent );
-*/