O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSClipView — Mac OS X 10.0

Synopsis

This NSView subclass is used in conjunction with NSScrollView to contain the document view of the scroll view (the document view is the view that contains the content of the document, such as text or graphics). The primary responsibility of NSClipView is to implement the scrolling machinery used by NSScrollView. Ordinarily, you should not need to interact with NSClipView unless you are implementing a class that provides functionality similar to NSScrollView.

image with no caption

@interface NSClipView : NSView
                                  // Accessor Methods
   - (void)setCopiesOnScroll:(BOOL)flag;
   - (BOOL)copiesOnScroll;
   - (void)setBackgroundColor:(NSColor *)color;
   - (NSColor *)backgroundColor;
   - (void)setDrawsBackground:(BOOL)flag;
   - (BOOL)drawsBackground;
   - (void)setDocumentCursor:(NSCursor *)anObj;
   - (NSCursor *)documentCursor;
   - (void)setDocumentView:(NSView *)aView;
   - (id)documentView;
                                  // Instance Methods
   - (BOOL)autoscroll:(NSEvent *)theEvent;
   - (NSPoint)constrainScrollPoint:(NSPoint)newOrigin;
   - (NSRect)documentRect;
   - (NSRect)documentVisibleRect;
   - (void)scrollToPoint:(NSPoint)newOrigin;
   - (void)viewBoundsChanged:(NSNotification *)notification;
   - (void)viewFrameChanged:(NSNotification *)notification;

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required