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

This is NSScrollView.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 NSScrollView 
pard s11 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 s6 f0 b fs24 Conforms To:tab b0 fs28 f1 NSCoding (NSResponder)
fi0 NSObject (NSObject)
fs20 
fs28 s7 fi-2771 f0 b fs24 Declared In:tab b0 fs28 f1 AppKit/NSScrollView.h 
fs20 
fs28 pard s16 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 NSScrollView object lets the user interact with a document that'27s too large to be shown in its entirety within an NSView and must therefore be scrolled. The responsibility of an NSScrollView is to coordinate scrolling behavior between NSScroller objects and a NSClipView object. Thus, the user may drag the knob of an NSScroller and the NSScrollView will send a message to its NSClipView to ensure that the viewed portion of the document reflects the position of the knob. Similarly, the application can change the viewed position within a document and the NSScrollView will send a message to the NSScrollers advising them of this change.
fs16 
fs28 The NSScrollView has at least one subview (an NSClipView object), which is called the i content viewi0 . The content view in turn has a subview called the i document viewi0 , which is the view to be scrolled. When an NSScrollView is created, it has neither a vertical nor a horizontal scroller. If NSScrollers are required, the application must send b setHasHorizontalScroller:YESb0  and b setHasVerticalScroller:YESb0  messages to the NSScrollView; the content view is resized to fill the area of the NSScrollView not occupied by the NSScrollers. 
fs16 
fs28 When the application modifies the scroll position within the document, it should send a b reflectScrolledClipView:b0  message to the NSScrollView, which will then query the content view and set the NSScroller(s) accordingly. The b reflectScrolledClipView:b0  message may also cause the NSScrollView to enable or disable the NSScrollers as required.
fs16 
fs28 pard s16 li100 fi0 ri1007 ql f0 b fs24 
fs28 Determining Component Sizes 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (NSSize)b contentSizeb0 tab Gets the content view'27s size. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (NSRect)b documentVisibleRectb0 tab Gets the visible portion of the document view. 
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Laying Out the NSScrollView 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 + (NSSize)b contentSizeForFrameSize:b0 (NSSize)i sizei0 tab  Gets the content view size for the given NSScrollView 
s9 li7030 fi-6553 fi-5796 b hasHorizontalScroller:b0 (BOOL)i horizFlagi0 tab  tab frame size.
b hasVerticalScroller:b0 (BOOL)i vertFlagi0 tab  
b borderType:b0 (NSBorderType)i aTypei0 tab  
s8 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 + (NSSize)b frameSizeForContentSize:b0 (NSSize)i sizei0 tab  Gets the NSScrollView frame size for the given content 
s9 li7030 fi-6553 fi-5796 b hasHorizontalScroller:b0 (BOOL)i horizFlagi0 tab  tab view size.
b hasVerticalScroller:b0 (BOOL)i vertFlagi0 tab  
b borderType:b0 (NSBorderType)i aTypei0 tab  
s8 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setHasHorizontalScroller:b0 (BOOL)i flagi0 tab Instructs the NSScrollView whether to create and use a horizontal scroller. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (BOOL)b hasHorizontalScrollertab b0 Returns YES if the NSScrollView object has a horizontal scroller.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setHasVerticalScroller:b0 (BOOL)i flagi0 tab Instructs the NSScrollView whether to create and use a vertical scroller. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (BOOL)b hasVerticalScrollertab b0 Returns YES if the NSScrollView object has a vertical scroller.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b tileb0 tab Retiles the scrollers and content view. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b toggleRuler:b0 (id)i sendertab i0 Makes the ruler visible or invisible, whichever is the opposite of its current state.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (BOOL)b isRulerVisibleb0 tab Returns whether the ruler is visible in the NSScrollView.
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Managing Component Views 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (void)b setDocumentView:b0 (NSView *)i aViewi0 tab Makes i aViewi0  the NSScrollView'27s document view. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (id)b documentViewb0 tab Returns the current document view. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setHorizontalScroller:b0 (NSScroller *)i anObjecti0 tab 
s9 li7030 fi-6553 fi-5796 tab Sets the horizontal NSScroller object. 
s8 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 {f3 -} (NSScroller *)b horizontalScrollerb0 tab Returns the horizontal NSScroller object.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setVerticalScroller:b0 (NSScroller *)i anObjecti0 tab Sets the vertical NSScroller object.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (NSScroller *)b verticalScrollerb0 tab Returns the vertical NSScroller object.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b reflectScrolledClipView:b0 (NSClipView *)i cViewi0 tab  
s9 li7030 fi-6553 fi-5796 tab Moves the scrollers to reflect change in the coordinates of the clip view.
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Modifying Graphic Attributes 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (void)b setBorderType:b0 (NSBorderType)i aTypei0 tab Sets the border type of the NSScrollView. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (NSBorderType)b borderTypeb0 tab Returns the border type. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setBackgroundColor:b0 (NSColor *)i colori0 tab Sets the NSScrollView'27s background color. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (NSColor *)b backgroundColorb0 tab Returns the NSScrollView'27s background color. 
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Setting Scrolling Behavior 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (float)b lineScrollb0 tab Returns the amount scrolled when scrolling a line. (The return value is expressed in units of the NSScrollView'27s coordinate system.)
fi-6552 fs16 
fs28 fi-6552 {f3 -} (float)b pageScrollb0 tab Returns the amount scrolled when scrolling a page. (The return value is expressed in units of the NSScrollView'27s coordinate system.)
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setScrollsDynamically:b0 (BOOL)i flagi0 tab Sets how the document view is displayed during scrolling.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (BOOL)b scrollsDynamicallyb0 tab Returns whether the NSScrollView scrolls dynamically.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setLineScroll:b0 (float)i valuei0 tab Sets the amount to scroll when scrolling a line. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setPageScroll:b0 (float)i valuei0 tab Sets the amount of overlap for a page scroll. 
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Managing the Cursor 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (void)b setDocumentCursor:b0 (NSCursor *)i anObjecti0 tab Sets the cursor for the document view. 
fi-6552 fs16 
fs28 fi-6552 
}

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