Class CPScrollView

CPObject
    extended byCPResponder
        extended byCPView
            extended byCPScrollView

@implementation CPScrollView : CPView

Used to display views that are too large for the viewing area. the CPScrollView places scroll bars on the side of the view to allow the user to scroll and see the entire contents of the view.


Method Summary
-(id)initWithFrame:(CGRect)aFrame
          Initializes the receiver for usage with the specified bounding rectangle.
-(BOOL)autohidesScrollers
          Returns YES if the scroll view hides its scroll bars when not necessary.
-(CGRect)contentSize
          Returns the size of the scroll view's content view.
-(CPClipView)contentView
          Returns the content view that clips the document.
-(id)documentView
          Returns the view that is scrolled for the user.
-(BOOL)hasHorizontalScroller
          Returns YES if the scroll view can have a horizontal scroller.
-(BOOL)hasHorizontalScroller
          Returns YES if the scroll view can have a vertical scroller.
-(float)horizontalLineScroll
          Returns how much the document moves horizontally when scrolled.
-(float)horizontalPageScroll
          Returns the horizontal page scroll amount.
-(CPScroller)horizontalScroller
          Returns the scroll view's horizontal scroller.
-(float)lineScroll
          Returns how much the document moves when scrolled.
-(float)pageScroll
          Returns the vertical and horizontal page scroll amount.
-(void)reflectScrolledClipView:(CPClipView)aClipView
          Resizes the scroll view to contain the specified clip view.
-(void)scrollWheel:(CPEvent)anEvent
          Handles a scroll wheel event from the user.
-(void)setAutohidesScrollers:(BOOL)autohidesScrollers
          Sets whether the scroll view hides its scoll bars when not needed.
-(void)setContentView:(CPClipView)aContentView
          Sets the content view that clips the document.
-(void)setDocumentView:(CPView)aView
          Sets the view that is scrolled for the user.
-(void)setHasHorizontalScroller:(BOOL)hasHorizontalScroller
          Specifies whether the scroll view can have a horizontal scroller.
-(void)setHasVerticalScroller:(BOOL)hasVerticalScroller
          Specifies whether the scroll view has can have a vertical scroller.
-(void)setHorizontalLineScroll:(float)aLineScroll
          Sets how much the document moves when scrolled horizontally.
-(void)setHorizontalPageScroll:(float)aPageScroll
          Sets the horizontal page scroll amount.
-(void)setHorizontalScroller:(CPScroller)aScroller
          Sets the scroll view's horizontal scroller.
-(void)setLineScroll:(float)aLineScroll
          Sets how much the document moves when scrolled.
-(void)setPageScroll:(float)aPageScroll
          Sets the horizontal and vertical page scroll amount.
-(void)setVerticalLineScroll:(float)aLineScroll
          Sets how much the document moves when scrolled vertically.
-(void)setVerticalPageScroll:(float)aPageScroll
          Sets the vertical page scroll amount.
-(void)setVerticalScroller:(CPScroller)aScroller
          Sets the scroll view's vertical scroller.
-(void)tile
          Lays out the scroll view's components.
-(float)verticalLineScroll
          Returns how much the document moves vertically when scrolled.
-(float)verticalPageScroll
          Returns the vertical page scroll amount.
-(CPScroller)verticalScroller
          Return's the scroll view's vertical scroller.

Methods inherited from class CPObject
initialize, alloc, class, instanceMethodForSelector, instancesRespondToSelector, isSubclassOfClass, load, new, setVersion, superclass, version, init, autorelease, awakeAfterUsingCoder, class, classForCoder, classForKeyedArchiver, className, copy, dealloc, description, doesNotRecognizeSelector, forwardInvocation, hash, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableCopy, performSelector, performSelector, performSelector, release, replacementObjectForArchiver, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, retain, self, superclass

Methods inherited from class CPResponder
acceptsFirstResponder, becomeFirstResponder, deleteBackward, doCommandBySelector, insertLineBreak, insertText, interpretKeyEvents, keyDown, keyUp, menu, mouseDown, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseUp, nextResponder, noResponderFor, performKeyEquivalent, resignFirstResponder, scrollWheel, setMenu, setNextResponder, tryToPerform, undoManager

Methods inherited from class CPView
initWithFrame, acceptsFirstMouse, addSubview, addSubview, adjustScroll, alphaValue, autoresizesSubviews, autoresizingMask, autoscroll, backgroundColor, bounds, convertPoint, convertPoint, convertRect, convertRect, convertSize, convertSize, didAddSubview, display, displayIfNeeded, displayIfNeededInRect, displayRect, displayRectIgnoringOpacity, dragImage, dragView, drawRect, enclosingMenuItem, enclosingScrollView, enterFullScreenMode, exitFullScreenModeWithOptions, frame, hitTest, hitTests, isDescendantOf, isFlipped, isHidden, isHiddenOrHasHiddenAncestor, isInFullScreenMode, isOpaque, lockFocus, mouseDown, mouseDownCanMoveWindow, needsDisplay, postsBoundsChangedNotifications, postsFrameChangedNotifications, reflectScrolledClipView, registerForDraggedTypes, registeredDraggedTypes, removeFromSuperview, replaceSubview, resizeSubviewsWithOldSize, resizeWithOldSuperviewSize, scrollClipView, scrollPoint, scrollRectToVisible, scrollRect, setAlphaValue, setAutoresizesSubviews, setAutoresizingMask, setBackgroundColor, setBounds, setBoundsOrigin, setBoundsSize, setFrame, setFrameOrigin, setFrameSize, setHidden, setHitTests, setNeedsDisplay, setNeedsDisplayInRect, setPostsBoundsChangedNotifications, setPostsFrameChangedNotifications, subviews, superview, unlockFocus, unregisterDraggedTypes, viewDidMoveToSuperview, viewDidMoveToWindow, viewWillMoveToSuperview, viewWillMoveToWindow, visibleRect, willRemoveSubview, window


Method Detail

initWithFrame

-(id)initWithFrame:(CGRect)aFrame
Initializes the receiver for usage with the specified bounding rectangle
Parameters:
aFrame
Returns:
the initialized view

autohidesScrollers

-(BOOL)autohidesScrollers
Returns YES if the scroll view hides its scroll bars when not necessary.

contentSize

-(CGRect)contentSize
Returns the size of the scroll view's content view.

contentView

-(CPClipView)contentView
Returns the content view that clips the document.

documentView

-(id)documentView
Returns the view that is scrolled for the user.

hasHorizontalScroller

-(BOOL)hasHorizontalScroller
Returns YES if the scroll view can have a horizontal scroller.

hasHorizontalScroller

-(BOOL)hasHorizontalScroller
Returns YES if the scroll view can have a vertical scroller.

horizontalLineScroll

-(float)horizontalLineScroll
Returns how much the document moves horizontally when scrolled.

horizontalPageScroll

-(float)horizontalPageScroll
Returns the horizontal page scroll amount.

horizontalScroller

-(CPScroller)horizontalScroller
Returns the scroll view's horizontal scroller

lineScroll

-(float)lineScroll
Returns how much the document moves when scrolled

pageScroll

-(float)pageScroll
Returns the vertical and horizontal page scroll amount.

reflectScrolledClipView

-(void)reflectScrolledClipView:(CPClipView)aClipView
Resizes the scroll view to contain the specified clip view.
Parameters:
aClipView - the clip view to resize to

scrollWheel

-(void)scrollWheel:(CPEvent)anEvent
Handles a scroll wheel event from the user.
Parameters:
anEvent - the scroll wheel event

setAutohidesScrollers

-(void)setAutohidesScrollers:(BOOL)autohidesScrollers
Sets whether the scroll view hides its scoll bars when not needed.
Parameters:
autohidesScrollers - YES causes the scroll bars to be hidden when not needed.

setContentView

-(void)setContentView:(CPClipView)aContentView
Sets the content view that clips the document
Parameters:
aContentView - the content view

setDocumentView

-(void)setDocumentView:(CPView)aView
Sets the view that is scrolled for the user.
Parameters:
aView - the view that will be scrolled

setHasHorizontalScroller

-(void)setHasHorizontalScroller:(BOOL)hasHorizontalScroller
Specifies whether the scroll view can have a horizontal scroller.
Parameters:
hasHorizontalScroller - YES lets the scroll view allocate a horizontal scroller if necessary.

setHasVerticalScroller

-(void)setHasVerticalScroller:(BOOL)hasVerticalScroller
Specifies whether the scroll view has can have a vertical scroller. It allocates it if necessary.
Parameters:
hasVerticalScroller - YES allows the scroll view to display a vertical scroller

setHorizontalLineScroll

-(void)setHorizontalLineScroll:(float)aLineScroll
Sets how much the document moves when scrolled horizontally.
Parameters:
aLineScroll - the amount to move horizontally when scrolled.

setHorizontalPageScroll

-(void)setHorizontalPageScroll:(float)aPageScroll
Sets the horizontal page scroll amount.
Parameters:
aPageScroll - the new horizontal page scroll amount

setHorizontalScroller

-(void)setHorizontalScroller:(CPScroller)aScroller
Sets the scroll view's horizontal scroller.
Parameters:
aScroller - the horizontal scroller for the scroll view

setLineScroll

-(void)setLineScroll:(float)aLineScroll
Sets how much the document moves when scrolled. Sets the vertical and horizontal scroll.
Parameters:
aLineScroll - the amount to move the document when scrolled

setPageScroll

-(void)setPageScroll:(float)aPageScroll
Sets the horizontal and vertical page scroll amount.
Parameters:
aPageScroll - the new horizontal and vertical page scroll amount

setVerticalLineScroll

-(void)setVerticalLineScroll:(float)aLineScroll
Sets how much the document moves when scrolled vertically.
Parameters:
aLineScroll - the new amount to move vertically when scrolled.

setVerticalPageScroll

-(void)setVerticalPageScroll:(float)aPageScroll
Sets the vertical page scroll amount.
Parameters:
aPageScroll - the new vertcal page scroll amount

setVerticalScroller

-(void)setVerticalScroller:(CPScroller)aScroller
Sets the scroll view's vertical scroller.
Parameters:
aScroller - the vertical scroller

tile

-(void)tile
Lays out the scroll view's components.

verticalLineScroll

-(float)verticalLineScroll
Returns how much the document moves vertically when scrolled.

verticalPageScroll

-(float)verticalPageScroll
Returns the vertical page scroll amount.

verticalScroller

-(CPScroller)verticalScroller
Return's the scroll view's vertical scroller

Created on Sat Sep 13 14:15:43 PDT 2008