|
NAMEPrima::Widget::MouseScroller - auto repeating mouse events DESCRIPTIONImplements routines for emulation of auto repeating mouse events. A code inside "MouseMove" callback can be implemented by the following scheme: if ( mouse_pointer_inside_the_scrollable_area) {
$self-> scroll_timer_stop;
} else {
$self-> scroll_timer_start unless $self-> scroll_timer_active;
return unless $self-> scroll_timer_semaphore;
$self-> scroll_timer_semaphore( 0);
}
The class uses a semaphore "{mouseTransaction}", which should be set to non-zero if a widget is in mouse capture state, and set to zero or "undef" otherwise. The class starts an internal timer, which sets a semaphore and calls "MouseMove" notification when triggered. The timer is assigned the timeouts, returned by "Prima::Application::get_scroll_rate" ( see "get_scroll_rate" in Prima::Application ). Methods
AUTHORDmitry Karasik, <dmitry@karasik.eu.org>. SEE ALSOPrima, Prima::Widget, Prima::ScrollBar.
|