API  1.0.0
CPScrollView Class Reference

#import <CPScrollView.h>

+ Inheritance diagram for CPScrollView:

Instance Methods

(BOOL) - autohidesScrollers
 
(void) - awakeFromCib
 
(CPBorderType) - borderType
 
(CPView- bottomCornerView
 
(CGSize) - contentSize
 
(CPClipView- contentView
 
(id) - delegate
 
(id) - documentView
 
(CGRect) - documentVisibleRect
 
(void) - drawRect:
 
(void) - encodeWithCoder:
 
(void) - flashScrollers
 
(BOOL) - hasHorizontalScroller
 
(BOOL) - hasVerticalScroller
 
(float) - horizontalLineScroll
 
(float) - horizontalPageScroll
 
(CPScroller- horizontalScroller
 
(id) - initWithCoder:
 
(id) - initWithFrame:
 
(float) - lineScroll
 
(void) - moveByOffset:
 
(void) - moveDown:
 
(void) - moveLeft:
 
(void) - moveRight:
 
(void) - moveUp:
 
(float) - pageScroll
 
(void) - reflectScrolledClipView:
 
(void) - resizeSubviewsWithOldSize:
 
(int) - scrollerKnobStyle
 
(int) - scrollerStyle
 
(void) - scrollPageDown:
 
(void) - scrollPageUp:
 
(void) - scrollToBeginningOfDocument:
 
(void) - scrollToEndOfDocument:
 
(void) - scrollWheel:
 
(void) - setAutohidesScrollers:
 
(void) - setBorderType:
 
(void) - setBottomCornerView:
 
(void) - setContentView:
 
(void) - setDelegate:
 
(void) - setDocumentView:
 
(void) - setHasHorizontalScroller:
 
(void) - setHasVerticalScroller:
 
(void) - setHorizontalLineScroll:
 
(void) - setHorizontalPageScroll:
 
(void) - setHorizontalScroller:
 
(void) - setLineScroll:
 
(void) - setPageScroll:
 
(void) - setScrollerKnobStyle:
 
(void) - setScrollerStyle:
 
(void) - setVerticalLineScroll:
 
(void) - setVerticalPageScroll:
 
(void) - setVerticalScroller:
 
(void) - tile
 
(float) - verticalLineScroll
 
(float) - verticalPageScroll
 
(CPScroller- verticalScroller
 
(void) - viewWillMoveToWindow:
 
- Instance Methods inherited from CPView
(BOOL) - acceptsFirstMouse:
 
(void) - addSubview:
 
(void) - addSubview:positioned:relativeTo:
 
(void) - addTrackingArea:
 
(CGRect) - adjustScroll:
 
(float) - alphaValue
 
(CAAnimation- animationForKey:
 
(CPDictionary- animations
 
(id) - animator
 
(BOOL) - autoresizesSubviews
 
(unsigned) - autoresizingMask
 
(BOOL) - autoscroll:
 
(CPColor- backgroundColor
 
(BOOL) - becomeFirstResponder
 
(CGRect) - bounds
 
(CGPoint) - boundsOrigin
 
(CGSize) - boundsSize
 
(BOOL) - canBecomeKeyView
 
(CGPoint) - center
 
(BOOL) - clipsToBounds
 
(CGPoint) - convertPoint:fromView:
 
(CGPoint) - convertPoint:toView:
 
(CGPoint) - convertPointFromBase:
 
(CGPoint) - convertPointToBase:
 
(CGRect) - convertRect:fromView:
 
(CGRect) - convertRect:toView:
 
(CGRect) - convertRectFromBase:
 
(CGRect) - convertRectToBase:
 
(CGSize) - convertSize:fromView:
 
(CGSize) - convertSize:toView:
 
(CPView- createEphemeralSubviewNamed:
 
(CPString- debug_description
 
(void) - didAddSubview:
 
(void) - display
 
(void) - displayIfNeeded
 
(void) - displayIfNeededInRect:
 
(void) - displayRect:
 
(void) - displayRectIgnoringOpacity:inContext:
 
(void) - dragImage:at:offset:event:pasteboard:source:slideBack:
 
(void) - dragView:at:offset:event:pasteboard:source:slideBack:
 
(CPAppearance- effectiveAppearance
 
(CPMenuItem- enclosingMenuItem
 
(CPScrollView- enclosingScrollView
 
(BOOL) - enterFullScreenMode
 
(BOOL) - enterFullScreenMode:withOptions:
 
(CPView- ephemeralSubviewNamed:
 
(void) - exitFullScreenMode
 
(void) - exitFullScreenModeWithOptions:
 
(CGRect) - frame
 
(CGPoint) - frameOrigin
 
(CGRect) - frameRectOfView:inSuperviewSize:
 
(CGSize) - frameSize
 
(CGRect) - frameWithNewSuperviewSize:
 
(BOOL) - hasCustomDrawRect
 
(BOOL) - hasCustomLayoutSubviews
 
(CPView- hitTest:
 
(BOOL) - hitTests
 
(id) - init
 
(BOOL) - inLiveResize
 
(BOOL) - isDescendantOf:
 
(BOOL) - isFlipped
 
(BOOL) - isHidden
 
(BOOL) - isHiddenOrHasHiddenAncestor
 
(BOOL) - isInFullScreenMode
 
(BOOL) - isOpaque
 
(CALayer- layer
 
(void) - layout
 
(CPView- layoutEphemeralSubviewNamed:positioned:relativeToEphemeralSubviewNamed:
 
(void) - layoutIfNeeded
 
(void) - layoutSubviews
 
(void) - lockFocus
 
(CPMenu- menuForEvent:
 
(void) - mouseDown:
 
(BOOL) - mouseDownCanMoveWindow
 
(BOOL) - needsDisplay
 
(BOOL) - needsLayout
 
(BOOL) - needsPanelToBecomeKey
 
(CPView- nextKeyView
 
(CPView- nextValidKeyView
 
(void) - objectDidChangeTheme
 
(BOOL) - performKeyEquivalent:
 
(BOOL) - postsBoundsChangedNotifications
 
(BOOL) - postsFrameChangedNotifications
 
(CPView- previousKeyView
 
(CPView- previousValidKeyView
 
(CGRect) - rectForEphemeralSubviewNamed:
 
(CPArray) - registeredDraggedTypes
 
(void) - registerForDraggedTypes:
 
(void) - removeFromSuperview
 
(void) - removeTrackingArea:
 
(void) - replaceSubview:with:
 
(BOOL) - resignFirstResponder
 
(void) - resizeWithOldSuperviewSize:
 
(void) - rightMouseDown:
 
(CGSize) - scaleSize
 
(void) - scaleUnitSquareToSize:
 
(void) - scrollClipView:toPoint:
 
(void) - scrollPoint:
 
(void) - scrollRect:by:
 
(BOOL) - scrollRectToVisible:
 
(void) - setAlphaValue:
 
(void) - setAnimations:
 
(void) - setAppearance:
 
(void) - setAutoresizesSubviews:
 
(void) - setAutoresizingMask:
 
(void) - setBackgroundColor:
 
(void) - setBounds:
 
(void) - setBoundsOrigin:
 
(void) - setBoundsSize:
 
(void) - setCenter:
 
(void) - setClipsToBounds:
 
(void) - setDOMClassName:
 
(void) - setFrame:
 
(void) - setFrameOrigin:
 
(void) - setFrameSize:
 
(void) - setHidden:
 
(void) - setHitTests:
 
(void) - setLayer:
 
(void) - setNeedsDisplay:
 
(void) - setNeedsDisplayInRect:
 
(void) - setNeedsLayout
 
(void) - setNeedsLayout:
 
(void) - setNextKeyView:
 
(void) - setPostsBoundsChangedNotifications:
 
(void) - setPostsFrameChangedNotifications:
 
(void) - setScaleSize:
 
(void) - setSubviews:
 
(void) - setTag:
 
(void) - setThemeClass:
 
(BOOL) - setThemeState:
 
(void) - setToolTip:
 
(void) - setValue:forThemeAttribute:
 
(void) - setValue:forThemeAttribute:inState:
 
(void) - setWantsLayer:
 
(CPArray) - subviews
 
(CPView- superview
 
(CPInteger) - tag
 
(void) - unlockFocus
 
(void) - unregisterDraggedTypes
 
(BOOL) - unsetThemeState:
 
(void) - updateTrackingAreas
 
(void) - viewDidEndLiveResize
 
(void) - viewDidHide
 
(void) - viewDidLayout
 
(void) - viewDidMoveToSuperview
 
(void) - viewDidMoveToWindow
 
(void) - viewDidUnhide
 
(void) - viewWillDraw
 
(void) - viewWillLayout
 
(void) - viewWillMoveToSuperview:
 
(void) - viewWillStartLiveResize
 
(CPView- viewWithTag:
 
(CGRect) - visibleRect
 
(BOOL) - wantsLayer
 
(void) - willRemoveSubview:
 
(CPWindow- window
 

Class Methods

(CGSize) + contentSizeForFrameSize:hasHorizontalScroller:hasVerticalScroller:borderType:
 
(CPString+ defaultThemeClass
 
(CGSize) + frameSizeForContentSize:hasHorizontalScroller:hasVerticalScroller:borderType:
 
(int) + globalScrollerStyle
 
(void) + initialize
 
(void) + setGlobalScrollerStyle:
 
(CPDictionary+ themeAttributes
 
- Class Methods inherited from CPView
(Class) + animatorClass
 
(CAAnimation+ defaultAnimationForKey:
 
(CPMenu+ defaultMenu
 
(BOOL) + isHighDPIDrawingEnabled
 
(CPSet) + keyPathsForValuesAffectingBounds
 
(CPSet) + keyPathsForValuesAffectingFrame
 
(void) + setHighDPIDrawingEnabled:
 

Detailed Description

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.

Definition at line 2 of file CPScrollView.h.

Method Documentation

◆ autohidesScrollers()

- (BOOL) autohidesScrollers
implementation

Returns YES if the scroll view hides its scroll bars when not necessary.

Definition at line 599 of file CPScrollView.j.

◆ awakeFromCib()

- (void) awakeFromCib
implementation

Do final init that can only be done when we are sure all subviews have been initialized.

Provided by category CPScrollView(CPCoding).

Definition at line 1620 of file CPScrollView.j.

◆ borderType()

- (CPBorderType) borderType
implementation

Returns the border type drawn around the view.

Definition at line 440 of file CPScrollView.j.

◆ bottomCornerView()

- (CPView) bottomCornerView
implementation

Definition at line 620 of file CPScrollView.j.

◆ contentSize()

- (CGSize) contentSize
implementation

Returns the size of the scroll view's content view.

Definition at line 410 of file CPScrollView.j.

◆ contentSizeForFrameSize:hasHorizontalScroller:hasVerticalScroller:borderType:()

+ (CGSize) contentSizeForFrameSize: (CGSize)  frameSize
hasHorizontalScroller: (BOOL)  hFlag
hasVerticalScroller: (BOOL)  vFlag
borderType: (CPBorderType)  borderType 
implementation

Definition at line 163 of file CPScrollView.j.

◆ contentView()

- (CPClipView) contentView
implementation

Returns the content view that clips the document.

Definition at line 375 of file CPScrollView.j.

◆ defaultThemeClass()

+ (CPString) defaultThemeClass
implementation

Reimplemented from CPView.

Definition at line 150 of file CPScrollView.j.

◆ delegate()

- (id) delegate
implementation

The delegate of the scroll view

Definition at line 278 of file CPScrollView.j.

◆ documentView()

- (id) documentView
implementation

Returns the view that is scrolled for the user.

Definition at line 418 of file CPScrollView.j.

◆ documentVisibleRect()

- (CGRect) documentVisibleRect
implementation

Definition at line 1259 of file CPScrollView.j.

◆ drawRect:()

- (void) drawRect: (CGRect)  aRect
implementation

Draws the receiver into aRect. This method should be overridden by subclasses.

Parameters
aRectthe area that should be drawn into

Reimplemented from CPView.

Definition at line 1298 of file CPScrollView.j.

◆ encodeWithCoder:()

- (void) encodeWithCoder: (CPCoder aCoder
implementation

Archives the view to a coder.

Parameters
aCoderthe object into which the view's data will be archived.

Reimplemented from CPView.

Provided by category CPScrollView(CPCoding).

Definition at line 1628 of file CPScrollView.j.

◆ flashScrollers()

- (void) flashScrollers
implementation

Momentarily display the scrollers if the scroller style is CPScrollerStyleOverlay.

Definition at line 1230 of file CPScrollView.j.

◆ frameSizeForContentSize:hasHorizontalScroller:hasVerticalScroller:borderType:()

+ (CGSize) frameSizeForContentSize: (CGSize)  contentSize
hasHorizontalScroller: (BOOL)  hFlag
hasVerticalScroller: (BOOL)  vFlag
borderType: (CPBorderType)  borderType 
implementation

Definition at line 176 of file CPScrollView.j.

◆ globalScrollerStyle()

+ (int) globalScrollerStyle
implementation

Get the system wide scroller style.

Definition at line 215 of file CPScrollView.j.

◆ hasHorizontalScroller()

- (BOOL) hasHorizontalScroller
implementation

Returns YES if the scroll view can have a horizontal scroller.

Definition at line 502 of file CPScrollView.j.

◆ hasVerticalScroller()

- (BOOL) hasVerticalScroller
implementation

Returns YES if the scroll view can have a vertical scroller.

Definition at line 566 of file CPScrollView.j.

◆ horizontalLineScroll()

- (float) horizontalLineScroll
implementation

Returns how much the document moves horizontally when scrolled.

Definition at line 662 of file CPScrollView.j.

◆ horizontalPageScroll()

- (float) horizontalPageScroll
implementation

Returns the horizontal page scroll amount.

Definition at line 717 of file CPScrollView.j.

◆ horizontalScroller()

- (CPScroller) horizontalScroller
implementation

Returns the scroll view's horizontal scroller.

Definition at line 470 of file CPScrollView.j.

◆ initialize()

+ (void) initialize
implementation

Reimplemented from CPView.

Definition at line 137 of file CPScrollView.j.

◆ initWithCoder:()

- (id) initWithCoder: (CPCoder aCoder
implementation

Initializes the view from an archive.

Parameters
aCoderthe coder from which to initialize
Returns
the initialized view

Reimplemented from CPView.

Provided by category CPScrollView(CPCoding).

Definition at line 1570 of file CPScrollView.j.

◆ initWithFrame:()

- (id) initWithFrame: (CGRect)  aFrame
implementation

Initializes the receiver for usage with the specified bounding rectangle

Returns
the initialized view

Reimplemented from CPView.

Definition at line 235 of file CPScrollView.j.

◆ lineScroll()

- (float) lineScroll
implementation

Returns how much the document moves when scrolled.

Definition at line 643 of file CPScrollView.j.

◆ moveByOffset:()

- (void) moveByOffset: (CGSize)  aSize
implementation

Definition at line 1491 of file CPScrollView.j.

◆ moveDown:()

- (void) moveDown: (id)  sender
implementation

Definition at line 1486 of file CPScrollView.j.

◆ moveLeft:()

- (void) moveLeft: (id)  sender
implementation

Definition at line 1471 of file CPScrollView.j.

◆ moveRight:()

- (void) moveRight: (id)  sender
implementation

Definition at line 1476 of file CPScrollView.j.

◆ moveUp:()

- (void) moveUp: (id)  sender
implementation

Definition at line 1481 of file CPScrollView.j.

◆ pageScroll()

- (float) pageScroll
implementation

Returns the vertical and horizontal page scroll amount.

Definition at line 698 of file CPScrollView.j.

◆ reflectScrolledClipView:()

- (void) reflectScrolledClipView: (CPClipView aClipView
implementation

Resizes the scroll view to contain the specified clip view.

Parameters
aClipViewthe clip view to resize to

Reimplemented from CPView.

Definition at line 1082 of file CPScrollView.j.

◆ resizeSubviewsWithOldSize:()

- (void) resizeSubviewsWithOldSize: (CGSize)  aSize
implementation

Initiates -superviewSizeChanged: messages to subviews.

Parameters
aSizethe size for the subviews

Reimplemented from CPView.

Definition at line 1254 of file CPScrollView.j.

◆ scrollerKnobStyle()

- (int) scrollerKnobStyle
implementation

Returns the style of the scroller knob, the bit which moves when scrolling, of the receiver.

Valid values are:

    CPScrollerKnobStyleLight
    CPScrollerKnobStyleDark
    CPScrollerKnobStyleDefault

Definition at line 347 of file CPScrollView.j.

◆ scrollerStyle()

- (int) scrollerStyle
implementation

Definition at line 316 of file CPScrollView.j.

◆ scrollPageDown:()

- (void) scrollPageDown: (id)  sender
implementation

Definition at line 1449 of file CPScrollView.j.

◆ scrollPageUp:()

- (void) scrollPageUp: (id)  sender
implementation

Definition at line 1443 of file CPScrollView.j.

◆ scrollToBeginningOfDocument:()

- (void) scrollToBeginningOfDocument: (id)  sender
implementation

Definition at line 1455 of file CPScrollView.j.

◆ scrollToEndOfDocument:()

- (void) scrollToEndOfDocument: (id)  sender
implementation

Definition at line 1461 of file CPScrollView.j.

◆ scrollWheel:()

- (void) scrollWheel: (CPEvent anEvent
implementation

Handles a scroll wheel event from the user.

Parameters
anEventthe scroll wheel event

Definition at line 1420 of file CPScrollView.j.

◆ setAutohidesScrollers:()

- (void) setAutohidesScrollers: (BOOL)  autohidesScrollers
implementation

Sets whether the scroll view hides its scroll bars when not needed.

Parameters
autohidesScrollersYES causes the scroll bars to be hidden when not needed.

Definition at line 610 of file CPScrollView.j.

◆ setBorderType:()

- (void) setBorderType: (CPBorderType)  borderType
implementation

Sets the type of border to be drawn around the view.

Valid types are:

CPNoBorder
CPLineBorder
CPBezelBorder
CPGrooveBorder

Definition at line 455 of file CPScrollView.j.

◆ setBottomCornerView:()

- (void) setBottomCornerView: (CPView aBottomCornerView
implementation

Definition at line 625 of file CPScrollView.j.

◆ setContentView:()

- (void) setContentView: (CPClipView aContentView
implementation

Sets the content view that clips the document.

Parameters
aContentViewthe content view

Definition at line 385 of file CPScrollView.j.

◆ setDelegate:()

- (void) setDelegate: (id <CPScrollViewDelegate>)  aDelegate
implementation

Sets the delegate of the scroll view. Possible delegate methods to implement are listed below.

Notifies the delegate when the scroll view is about to scroll.

- (void)scrollViewWillScroll:(CPScrollView)aScrollView

Notifies the delegate when the scroll view has finished scrolling.

- (void)scrollViewDidScroll:(CPScrollView)aScrollView

Definition at line 298 of file CPScrollView.j.

◆ setDocumentView:()

- (void) setDocumentView: (CPView aView
implementation

Sets the view that is scrolled for the user.

Parameters
aViewthe view that will be scrolled

Definition at line 428 of file CPScrollView.j.

◆ setGlobalScrollerStyle:()

+ (void) setGlobalScrollerStyle: (int)  aStyle
implementation

Set the system wide scroller style.

Parameters
aStylethe scroller style to set all scroller views to use (CPScrollerStyleLegacy or CPScrollerStyleOverlay)

Definition at line 225 of file CPScrollView.j.

◆ setHasHorizontalScroller:()

- (void) setHasHorizontalScroller: (BOOL)  shouldHaveHorizontalScroller
implementation

Specifies whether the scroll view can have a horizontal scroller.

Parameters
hasHorizontalScrollerYES lets the scroll view allocate a horizontal scroller if necessary.

Definition at line 513 of file CPScrollView.j.

◆ setHasVerticalScroller:()

- (void) setHasVerticalScroller: (BOOL)  shouldHaveVerticalScroller
implementation

Specifies whether the scroll view can have a vertical scroller. It allocates it if necessary.

Parameters
hasVerticalScrollerYES allows the scroll view to display a vertical scroller

Definition at line 578 of file CPScrollView.j.

◆ setHorizontalLineScroll:()

- (void) setHorizontalLineScroll: (float)  aLineScroll
implementation

Sets how much the document moves when scrolled horizontally.

Parameters
aLineScrollthe amount to move horizontally when scrolled.

Definition at line 672 of file CPScrollView.j.

◆ setHorizontalPageScroll:()

- (void) setHorizontalPageScroll: (float)  aPageScroll
implementation

Sets the horizontal page scroll amount.

Parameters
aPageScrollthe new horizontal page scroll amount

Definition at line 727 of file CPScrollView.j.

◆ setHorizontalScroller:()

- (void) setHorizontalScroller: (CPScroller aScroller
implementation

Sets the scroll view's horizontal scroller.

Parameters
aScrollerthe horizontal scroller for the scroll view

Definition at line 480 of file CPScrollView.j.

◆ setLineScroll:()

- (void) setLineScroll: (float)  aLineScroll
implementation

Sets how much the document moves when scrolled. Sets the vertical and horizontal scroll.

Parameters
aLineScrollthe amount to move the document when scrolled

Definition at line 653 of file CPScrollView.j.

◆ setPageScroll:()

- (void) setPageScroll: (float)  aPageScroll
implementation

Sets the horizontal and vertical page scroll amount.

Parameters
aPageScrollthe new horizontal and vertical page scroll amount

Definition at line 708 of file CPScrollView.j.

◆ setScrollerKnobStyle:()

- (void) setScrollerKnobStyle: (int)  newScrollerKnobStyle
implementation

Sets the style of the scroller knob, the bit which moves when scrolling.

Valid values are:

    CPScrollerKnobStyleLight
    CPScrollerKnobStyleDark
    CPScrollerKnobStyleDefault

Definition at line 362 of file CPScrollView.j.

◆ setScrollerStyle:()

- (void) setScrollerStyle: (int)  aStyle
implementation

Set the scroller style.

  • CPScrollerStyleLegacy: Standard scrollers like Windows or Mac OS X prior to 10.7
  • CPScrollerStyleOverlay: scrollers like those in Mac OS X 10.7+

Definition at line 327 of file CPScrollView.j.

◆ setVerticalLineScroll:()

- (void) setVerticalLineScroll: (float)  aLineScroll
implementation

Sets how much the document moves when scrolled vertically.

Parameters
aLineScrollthe new amount to move vertically when scrolled.

Definition at line 690 of file CPScrollView.j.

◆ setVerticalPageScroll:()

- (void) setVerticalPageScroll: (float)  aPageScroll
implementation

Sets the vertical page scroll amount.

Parameters
aPageScrollthe new vertical page scroll amount

Definition at line 745 of file CPScrollView.j.

◆ setVerticalScroller:()

- (void) setVerticalScroller: (CPScroller aScroller
implementation

Sets the scroll view's vertical scroller.

Parameters
aScrollerthe vertical scroller

Definition at line 544 of file CPScrollView.j.

◆ themeAttributes()

+ (CPDictionary) themeAttributes
implementation

Reimplemented from CPView.

Definition at line 155 of file CPScrollView.j.

◆ tile()

- (void) tile
implementation

Lays out the scroll view's components.

Definition at line 1069 of file CPScrollView.j.

◆ verticalLineScroll()

- (float) verticalLineScroll
implementation

Returns how much the document moves vertically when scrolled.

Definition at line 680 of file CPScrollView.j.

◆ verticalPageScroll()

- (float) verticalPageScroll
implementation

Returns the vertical page scroll amount.

Definition at line 735 of file CPScrollView.j.

◆ verticalScroller()

- (CPScroller) verticalScroller
implementation

Returns the scroll view's vertical scroller.

Definition at line 534 of file CPScrollView.j.

◆ viewWillMoveToWindow:()

- (void) viewWillMoveToWindow: (CPWindow aWindow
implementation

Called when the receiver is about to be moved to a new window.

Parameters
aWindowthe window to which the receiver will be moved.

Reimplemented from CPView.

Provided by category CPScrollView(FirstResponder).

Definition at line 1511 of file CPScrollView.j.


The documentation for this class was generated from the following files: