NSRulerView Fast Scrolling Issues
NSRulerView Fast Scrolling Issues
- Subject: NSRulerView Fast Scrolling Issues
- From: David Harper <email@hidden>
- Date: Thu, 3 Jan 2008 11:36:44 -0500 (EST)
Hello,
I am still trying to perfect the performance of the NSRulerView subclass in my application. What I know so far is as follows:
1. the rectangle passed into drawHashMarksAndLabelsInRect: represents the amount scrolled since the last time the rulerview was drawn. For example, if the user scrolled down by 100 pixels the rectangle would be the bottom 100 pixels of the NSRulerView.
2. I am not aware of any variable in NSRulerView that represents the scrolling offset of the ruler. Thus, I am calculating the offset manually based on the size of the rectangle that needs to be redrawn. Unfortunately when the scrolling amount is greater than the size of the ruler, the rectangle passed in is exactly equal to the size of the RulerView. As a result the ruler's "scroll offset" (I defined my own variable for this) becomes invalid when scrolling is done very quickly.
3. I am not aware of any way to communicate directly with the NSScrollView to determine the amount scrolled in a single "frame" of "ruler animation". I would rather not have to do this, and I expect there should be a way to extract the amount scrolled from the NSRulerView superclass.
I'll post an update if I manage to solve this problem.. Does anyone have any suggestions?
Thanks in advance,
Dave H.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden