Re: Dynamic cursor rectangles?
Re: Dynamic cursor rectangles?
- Subject: Re: Dynamic cursor rectangles?
- From: Eric Forget <email@hidden>
- Date: Tue, 02 Mar 2004 19:33:52 -0500
>
I have a view which have many different cursor rectangles, and this
>
view is inside a scroll view.
>
>
The problem is that the rectangles should be confined to the visible
>
part of the view (as the documentation hints), as rectangles are
>
"global", and thus, even when a rectangle is outside the visible
>
bounds, it will still change the cursor.
>
>
What is the solution to this problem? e.g. Safari would face the same
>
problem, e.g. when scrolling so that a link is "behind" the horizontal
>
scroll bar, then one would get the link cursor, if they had not solved
>
the problem.
>
>
Perhaps they invalidate and re-add all (visible) cursor rectangles each
>
time the view is scrolled?
In the overloaded function resetCursorRects add cursor rectangles with
addCursorRect:cursor: only for visible rect. You obtain the visible rect
with: [[self enclosingScrollView] documentVisibleRect];
Eric
___________________________________________________________________
Eric Forget Cafederic
email@hidden <
http://www.cafederic.com/>
Fingerprint <86D5 38F5 E1FD 5D9C 71C3 BAA3 797E 70A4 6210 C684>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.