slow autoscroll near edge of screen

  • I have a custom nsview inside a nsscrollview. I deal with dragndrop
    inside mouseDragged. When dragging things over long distances then
    I call [self autoscroll: event]; so that the scrollview follows the
    cursor.

    This works well for me, when there is ~60 pixels space around the
    nsscrollview. If there is too little space between my window-edge
    and the screen-edge, then it scrolls too slow to be useful.

    How does one get faster scrolling when there is no room between
    the nsscrollview and the screen-edge ?

    Is it possible to continue reading the delta-movement, when the
    mouse has reached the screen-edge ?

    --
    Simon Strandgaard
  • On 10/11/06, Simon Strandgaard <neoneye...> wrote:
    > I have a custom nsview inside a nsscrollview. I deal with dragndrop
    > inside mouseDragged. When dragging things over long distances then
    > I call [self autoscroll: event]; so that the scrollview follows the
    > cursor.
    >
    > This works well for me, when there is ~60 pixels space around the
    > nsscrollview. If there is too little space between my window-edge
    > and the screen-edge, then it scrolls too slow to be useful.
    >
    >
    > How does one get faster scrolling when there is no room between
    > the nsscrollview and the screen-edge ?
    >
    > Is it possible to continue reading the delta-movement, when the
    > mouse has reached the screen-edge ?

    Take a look at OmniGraffle it does almost gets it right.
    When their scrollview is near the edge then it seems to be
    using delta-movements even though the mouse cannot move more.

    I have been going through most of the applications in my app folder.
    My issue seems also to be the issue for most of the programs I have installed.
    For instance take a look at GarageBand.

    Any ideas on how to read relative-mouse-movements?

    --
    Simon Strandgaard
  • On 10/11/06, Simon Strandgaard <neoneye...> wrote:
    [snip]
    > Any ideas on how to read relative-mouse-movements?

    Ok. I did'nt check the plug.. NSEvent knows this

    -(void)mouseDragged:(NSEvent*)event {
    float dx = [event deltaX];
    float dy = [event deltaY];
    NSLog(@"mouse dragged %.2f %.2f\n", dx, dy);
    }

    I am still attempting to get autoscroll working.
    Should I make my own NSEvent where i insert some fake mouse-location,
    and pass this event to autoscroll ?

    --
    Simon Strandgaard
previous month october 2006 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Go to today