Stopping the clip
Stopping the clip
- Subject: Stopping the clip
- From: Jeff Argast <email@hidden>
- Date: Thu, 30 Jun 2005 12:06:31 -0600
Hello-
I'd like to prevent the clipping that occurs when using an
NSScrollView/NSClipView pair. Or perhaps someone can point me in a
different way to think about the problem.
I'm trying to emulate the behavior exhibited in Keynote:
When you resize the window in Keynote smaller than your slide, the
scroll bars appear as expected. When you resize the window much
larger than the slide the scroll bars disappear. Again, as
expected. Now if you create an object such as a rectangle and move
it outside the slide bounds you'll notice that it is not clipped nor
do the scroll bars appear when the window is resized such that the
rectangle is no longer visible in the window.
I can imagine achieving this by somehow preventing the NSClipView
from actually clipping. But after checking out the docs for
NSClipView and NSScrollView I'm not sure how that's possible.
If you set a breakpoint in the document view's drawRect selector
you'll see the name of the selector which calls drawRect is [NSView
_drawRect:clip:]. I added that method to subclasses of NSScrollView,
NSClipView, and my document view and simply called drawRect. It did
not prevent the clipping (nor do I support using private,
undocumented methods. I'm in learning mode...).
Perhaps there is a way to decouple the clipping rectangle from the
scrolling rectangle such that one could keep the clip the size of the
window and the scroll rect the size of the content?
Thanks in advance,
Jeff
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden