I think the problem with all this is that we probably shouldn't be using
the mouse move events to handle scrolling at all, because of course we
want autoscroll to happen whether the mouse is moving or not -- we
should probably just make it depend on the mouse position.
How about something like the following? (All the numbers would
obviously be fungible, they're just there for local colour.)
- When the mouse button is pressed, make a note of where the pointer is
and then start a timer which fires every 20ms.
- When the mouse button is released, stop the timer.
- Each time the timer fires, see where the pointer's got to. Then, for
each of the four sides of the canvas viewport:
- if the pointer is nearer to that side of the viewport than 1/10th
of the distance it was when the button was pressed, scroll in the
direction of that side of the viewport by a number of pixels N,
where N starts at 1 and multiplies by 1.1 each time the scroll
happens on a timer callback.
- if the pointer is not nearer to that edge than 1/10 of the
distance it was when the button was pressed, reset N to 1 and stop
scrolling.
Note this would mean separate N for each of the four sides of the canvas
viewport.
What do you think, Guillaume -- implementable? Ideally we would still
be using page-type scrolling for the normal scrolling during playback,
as we were until your last set of changes this weekend.
Chris
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Rosegarden-devel mailing list
[EMAIL PROTECTED] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel