ftp.nice.ch/peanuts/GeneralData/Documents/openstep/OpenStepSpec_rtf.tar.gz#/OpenStepSpec_rtf/ApplicationKit/Classes/NSClipView.rtf

This is NSClipView.rtf in view mode; [Download] [Up]

paperh18648 margl-907 margr0 margt0 margb0 fi0 ri0 ql sb0 f1 fs24 Copyright f3 'e3f1 1994 by NeXT Computer, Inc.  All Rights Reserved.

s4 li100 fi0 ri1007 ql f0 b fs36 fs100 
fs36 NSClipView
pard s14 li2872 fi-2771 ri1007 ql tx2872 f1 b0 fs28 fs48 
fs28 f0 b fs24 Inherits From:tab b0 fs28 f1 NSView : NSResponder : NSObject
fs20 
fs28 s7 f0 b fs24 Conforms To:tab b0 fs28 f1 NSCoding (NSResponder)
fi0 NSObject (NSObject)
fs20 
fs28 s8 fi-2771 f0 b fs24 Declared In:tab b0 fs28 f1 AppKit/NSClipView.h
fs20 
fs28 pard s19 li100 fi0 ri1007 ql f0 b fs28 fs20 
fs28 Class Description
fs14 
fs28 pard s1 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 b0 fs2 
fs28 An NSClipView object lets you scroll a document that may be larger than the NSClipView'27s frame rectangle, clipping the visible portion of the document to the frame. You don'27t normally use the NSClipView class directly; it'27s provided primarily as the scrolling machinery for the NSScrollView class. However, you might use the NSClipView class to implement a class similar to NSScrollView. 
fs16 
fs28 The document, which must be an NSView, is called the NSClipView'27s i document viewi0 . An NSClipView'27s document view, which is set through the b setDocumentView:b0  method, is the NSClipView'27s only subview. You can set the cursor that'27s displayed when the mouse enters an NSClipView'27s frame (in other words, when it'27s poised over the document view) through the b setDocumentCursor:b0  method. 
fs16 
fs28 When the NSClipView is instructed to scroll its document view, it normally copies that portion of the document view that'27s visible both before and after the scrolling, so that this part won'27t need to be redrawn from scratch. However, you can turn off this behavior and force the entire visible area to be redrawn by sending the NSClipView a b setCopiesOnScroll:NOb0  message. 
fs16 
fs28 After scrolling, the NSClipView sends itself a b setNeedsDisplayInRect:b0  message to indicate that some part of the document view should be displayed again. The argument to this message is the freshly exposed area of the document view, unless the NSClipView received a b setCopiesOnScroll:NOb0  message, in which case the argument is the entire visible area.
fs16 
fs28 The NSClipView sends its superview (usually an NSScrollView) a b reflectScrolledClipView:b0  message whenever the relationship between the NSClipView and the document view has changed. This allows the superview to update itself to reflect the change'd0for example, the NSScrollView class uses this method to change the position of its scrollers when the user causes the document to autoscroll. 
fs16 
fs28 pard s19 li100 fi0 ri1007 ql f0 b fs24 
fs28 Managing the Document View 
fs14 
fs28 pard s9 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (NSRect)b documentRectb0 tab Returns the document rectangle.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (id)b documentViewb0 tab Returns the NSClipView'27s document view. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (NSRect)b documentVisibleRectb0 tab Gets the visible portion of the document view.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setDocumentView:b0 (NSView *)i aViewi0 tab Makes i aViewi0  the NSClipView'27s document view.
pard s19 li100 fi0 ri1007 ql f0 b fs48 
fs28 Setting the Cursor 
fs14 
fs28 pard s9 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -}(NSCursor *)b documentCursorb0 tab Returns the cursor for the document view. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setDocumentCursor:b0 (NSCursor *)i anObjecti0 tab Sets the cursor for the document view.
pard s19 li100 fi0 ri1007 ql f0 b fs48 
fs28 Setting the Background Color
fs14 
fs28 pard s9 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (NSColor *)b backgroundColorb0 tab Returns the NSClipView'27s background color.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setBackgroundColor:b0 (NSColor *)i colori0 tab Sets the NSClipView'27s background color. 
pard s19 li100 fi0 ri1007 ql f0 b fs48 
fs28 Scrolling 
fs14 
fs28 pard s9 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (BOOL)b autoscroll:b0 (NSEvent *)i theEventi0 tab Scrolls in response to mouse-dragged events.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (NSPoint)b constrainScrollPoint:b0 (NSPoint)i newOrigin
s11 li7030 fi-6553 fi-5796 i0 tab Prevents scrolling to an undesirable position.
s9 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 {f3 -} (BOOL)b copiesOnScrollb0 tab Indicates whether the visible portions of the document view are copied when scrolling occurs. If not, the document view is responsible for redrawing the entire visible portion. The default is YES.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b scrollToPoint:b0 (NSPoint)i newOrigini0 tab Lowest-level unconstrained scrolling routine. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setCopiesOnScroll:b0 (BOOL)i flagi0 tab Sets how the visible areas are redrawn.
pard s19 li100 fi0 ri1007 ql f0 b fs48 
fs28 Responding to a Changed Frame
fs14 
fs28 pard s9 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (void)b viewFrameChanged:b0 (NSNotification *)i notification
s11 li7030 fi-6553 fi-5796 i0 tab Notification that the document view'27s frame has changed.
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.