Hand style movement inside a NSScrollView

2008-04-18 Thread Steve Sheets
Does someone have any suggestions or hints about how to do this? I am using NSScrollView to display some graphical data. The Scroll View displays a section of my custom view which displays the graphics. The user can drag the horizontal and vertical scrollers to change the visible position

Re: Hand style movement inside a NSScrollView

2008-04-18 Thread Jamie Phelps
Not sure if it's suitable for your purposes, but IKImageView and its currentToolMode property (IKToolModeMove). This would get you the behavior you want for free. JP On Apr 18, 2008, at 2:49 PM, Steve Sheets wrote: Does someone have any suggestions or hints about how to do this? I am

Re: Hand style movement inside a NSScrollView

2008-04-18 Thread Ben Lachman
On Apr 18, 2008, at 9:14 PM, Jens Alfke wrote: On 18 Apr '08, at 12:49 PM, Steve Sheets wrote: However, I also want to implement a Hand style tool. One that allows the user to simple click inside the Scroll View and draw the graphics around. I think you just need to have your view's

Re: Hand style movement inside a NSScrollView

2008-04-18 Thread Jens Alfke
On 18 Apr '08, at 8:59 PM, Ben Lachman wrote: I tend to like scrollRect:by: for this sort of thing since it takes a offset to a rect. But that method just blits pixels around on the screen; it doesn't actually change the coordinate system of the view. The scroll view will do the

Re: Hand style movement inside a NSScrollView

2008-04-18 Thread Ben Lachman
On Apr 19, 2008, at 12:41 AM, Jens Alfke wrote: On 18 Apr '08, at 8:59 PM, Ben Lachman wrote: I tend to like scrollRect:by: for this sort of thing since it takes a offset to a rect. But that method just blits pixels around on the screen; it doesn't actually change the coordinate system