API 0.9.5
CPView Class Reference

#import <CPView.h>

Inheritance diagram for CPView:

List of all members.

Instance Methods

(BOOL) - acceptsFirstMouse:
(void) - addSubview:
(void) - addSubview:positioned:relativeTo:
(CGRect) - adjustScroll:
(float) - alphaValue
(BOOL) - autoresizesSubviews
(unsigned) - autoresizingMask
(BOOL) - autoscroll:
(CPColor- backgroundColor
(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:
(id) - currentValueForThemeAttribute:
(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:
(void) - drawRect:
(CPMenuItem- enclosingMenuItem
(CPScrollView- enclosingScrollView
(void) - encodeWithCoder:
(BOOL) - enterFullScreenMode
(BOOL) - enterFullScreenMode:withOptions:
(CPView- ephemeralSubviewNamed:
(void) - exitFullScreenMode
(void) - exitFullScreenModeWithOptions:
(CGRect) - frame
(CGPoint) - frameOrigin
(CGSize) - frameSize
(BOOL) - hasThemeAttribute:
(BOOL) - hasThemeState:
(CPView- hitTest:
(BOOL) - hitTests
(id) - init
(id) - initWithCoder:
(id) - initWithFrame:
(BOOL) - isDescendantOf:
(BOOL) - isFlipped
(BOOL) - isHidden
(BOOL) - isHiddenOrHasHiddenAncestor
(BOOL) - isInFullScreenMode
(BOOL) - isOpaque
(CALayer- layer
(CPView- layoutEphemeralSubviewNamed:positioned:relativeToEphemeralSubviewNamed:
(void) - layoutIfNeeded
(void) - layoutSubviews
(void) - lockFocus
(CPMenu- menuForEvent:
(void) - mouseDown:
(BOOL) - mouseDownCanMoveWindow
(BOOL) - needsDisplay
(BOOL) - needsPanelToBecomeKey
(CPView- nextKeyView
(CPView- nextValidKeyView
(BOOL) - performKeyEquivalent:
(BOOL) - postsBoundsChangedNotifications
(BOOL) - postsFrameChangedNotifications
(CPView- previousKeyView
(CPView- previousValidKeyView
(CGRect) - rectForEphemeralSubviewNamed:
(void) - reflectScrolledClipView:
(CPArray- registeredDraggedTypes
(void) - registerForDraggedTypes:
(void) - removeFromSuperview
(void) - replaceSubview:with:
(void) - resizeSubviewsWithOldSize:
(void) - resizeWithOldSuperviewSize:
(void) - rightMouseDown:
(void) - scrollClipView:toPoint:
(void) - scrollPoint:
(void) - scrollRect:by:
(BOOL) - scrollRectToVisible:
(void) - setAlphaValue:
(void) - setAutoresizesSubviews:
(void) - setAutoresizingMask:
(void) - setBackgroundColor:
(void) - setBounds:
(void) - setBoundsOrigin:
(void) - setBoundsSize:
(void) - setCenter:
(void) - setClipsToBounds:
(void) - setFrame:
(void) - setFrameOrigin:
(void) - setFrameSize:
(void) - setHidden:
(void) - setHitTests:
(void) - setLayer:
(void) - setNeedsDisplay:
(void) - setNeedsDisplayInRect:
(void) - setNeedsLayout
(void) - setNextKeyView:
(void) - setPostsBoundsChangedNotifications:
(void) - setPostsFrameChangedNotifications:
(void) - setSubviews:
(void) - setTag:
(void) - setTheme:
(void) - setThemeClass:
(BOOL) - setThemeState:
(void) - setupViewFlags
(void) - setValue:forThemeAttribute:
(void) - setValue:forThemeAttribute:inState:
(void) - setWantsLayer:
(CPArray- subviews
(CPView- superview
(CPInteger) - tag
(CPTheme- theme
(CPString- themeClass
(unsigned) - themeState
(void) - unlockFocus
(void) - unregisterDraggedTypes
(BOOL) - unsetThemeState:
(id) - valueForThemeAttribute:
(id) - valueForThemeAttribute:inState:
(void) - viewDidChangeTheme
(void) - viewDidHide
(void) - viewDidMoveToSuperview
(void) - viewDidMoveToWindow
(void) - viewDidUnhide
(void) - viewWillDraw
(void) - viewWillMoveToSuperview:
(void) - viewWillMoveToWindow:
(CPView- viewWithTag:
(CGRect) - visibleRect
(BOOL) - wantsLayer
(void) - willRemoveSubview:
(CPWindow- window

Class Methods

(CPMenu+ defaultMenu
(CPString+ defaultThemeClass
(void) + initialize
(CPSet+ keyPathsForValuesAffectingBounds
(CPSet+ keyPathsForValuesAffectingFrame
(CPDictionary+ themeAttributes

Detailed Description

CPView is a class which provides facilities for drawing in a window and receiving events. It is the superclass of many of the visual elements of the GUI.

In order to display itself, a view must be placed in a window (represented by an CPWindow object). Within the window is a hierarchy of CPViews, headed by the window's content view. Every other view in a window is a descendant of this view.

Subclasses can override -drawRect: in order to implement their appearance. Other methods of CPView and CPResponder can also be overridden to handle user generated events.

Definition at line 2 of file CPView.h.


Method Documentation

- (BOOL) acceptsFirstMouse: (CPEvent anEvent

Returns whether the receiver should be sent a -mouseDown: message for anEvent.
Returns YES by default.

Returns:
YES, if the view object accepts first mouse-down event. NO, otherwise.

Definition at line 1321 of file CPView.j.

- (void) addSubview: (CPView aSubview

Makes the argument a subview of the receiver.

Parameters:
aSubviewthe CPView to make a subview

Definition at line 328 of file CPView.j.

- (void) addSubview: (CPView aSubview
positioned: (CPWindowOrderingMode)  anOrderingMode
relativeTo: (CPView anotherView 

Makes aSubview a subview of the receiver. It is positioned relative to anotherView

Parameters:
aSubviewthe view to add as a subview
anOrderingModespecifies aSubview's ordering relative to anotherView
anotherViewaSubview will be positioned relative to this argument

Definition at line 339 of file CPView.j.

- (CGRect) adjustScroll: (CGRect)  proposedVisibleRect

Subclasses can override this to modify the visible rectangle after a scrolling operation. The default implementation simply returns the provided rectangle.

Parameters:
proposedVisibleRectthe rectangle to alter
Returns:
the same adjusted rectangle

Definition at line 2073 of file CPView.j.

- (float) alphaValue

Returns the alpha value of the receiver. Ranges from 0.0 to 1.0, where 0.0 is completely transparent and 1.0 is completely opaque.

Definition at line 1260 of file CPView.j.

- (BOOL) autoresizesSubviews

Reports whether the receiver automatically resizes its subviews when its frame size changes.

Returns:
YES means it resizes its subviews on a frame size change.

Definition at line 1046 of file CPView.j.

- (unsigned) autoresizingMask

Returns the bit mask options for resizing behavior

Definition at line 1063 of file CPView.j.

- (BOOL) autoscroll: (CPEvent anEvent

Reimplemented in CPClipView.

Definition at line 2062 of file CPView.j.

- (CPColor) backgroundColor

Returns the background color of the receiver

Reimplemented in CPTabView.

Definition at line 1552 of file CPView.j.

- (CGRect) bounds

Returns the receiver's bounds. The bounds define the size and location of the receiver inside its frame.

Definition at line 890 of file CPView.j.

- (CGPoint) boundsOrigin

Definition at line 895 of file CPView.j.

- (CGSize) boundsSize

Definition at line 900 of file CPView.j.

- (BOOL) canBecomeKeyView

Definition at line 2150 of file CPView.j.

- (CGPoint) center

Returns the center of the receiver's frame to the provided point. The point is defined in the superview's coordinate system.

Returns:
CGPoint the center point of the receiver's frame

Definition at line 754 of file CPView.j.

- (BOOL) clipsToBounds

Definition at line 1224 of file CPView.j.

- (CGPoint) convertPoint: (CGPoint)  aPoint
fromView: (CPView aView 

Converts aPoint from the coordinate space of aView to the coordinate space of the receiver.

Parameters:
aPointthe point to convert
aViewthe view space to convert from
Returns:
the converted point

Definition at line 1564 of file CPView.j.

- (CGPoint) convertPoint: (CGPoint)  aPoint
toView: (CPView aView 

Converts aPoint from the receiver's coordinate space to the coordinate space of aView.

Parameters:
aPointthe point to convert
aViewthe coordinate space to which the point will be converted
Returns:
the converted point

Definition at line 1585 of file CPView.j.

- (CGPoint) convertPointFromBase: (CGPoint)  aPoint

Converts the point from the base coordinate system to the receiver’s coordinate system.

Parameters:
aPointA point specifying a location in the base coordinate system
Returns:
The point converted to the receiver’s base coordinate system

Definition at line 1574 of file CPView.j.

- (CGPoint) convertPointToBase: (CGPoint)  aPoint

Converts the point from the receiver’s coordinate system to the base coordinate system.

Parameters:
aPointA point specifying a location in the coordinate system of the receiver
Returns:
The point converted to the base coordinate system

Definition at line 1595 of file CPView.j.

- (CGRect) convertRect: (CGRect)  aRect
fromView: (CPView aView 

Converts aRect from aView's coordinate space to the receiver's space.

Parameters:
aRectthe rectangle to convert
aViewthe coordinate space from which to convert
Returns:
the converted rectangle

Definition at line 1628 of file CPView.j.

- (CGRect) convertRect: (CGRect)  aRect
toView: (CPView aView 

Converts aRect from the receiver's coordinate space to aView's coordinate space.

Parameters:
aRectthe rectangle to convert
aViewthe coordinate space to which the rectangle will be converted
Returns:
the converted rectangle

Definition at line 1649 of file CPView.j.

- (CGRect) convertRectFromBase: (CGRect)  aRect

Converts the rectangle from the base coordinate system to the receiver’s coordinate system.

Parameters:
aRectA rectangle specifying a location in the base coordinate system
Returns:
The rectangle converted to the receiver’s base coordinate system

Definition at line 1638 of file CPView.j.

- (CGRect) convertRectToBase: (CGRect)  aRect

Converts the rectangle from the receiver’s coordinate system to the base coordinate system.

Parameters:
aRectA rectangle specifying a location in the coordinate system of the receiver
Returns:
The rectangle converted to the base coordinate system

Definition at line 1659 of file CPView.j.

- (CGSize) convertSize: (CGSize)  aSize
fromView: (CPView aView 

Convert's aSize from aView's coordinate space to the receiver's coordinate space.

Parameters:
aSizethe size to convert
aViewthe coordinate space to convert from
Returns:
the converted size

Definition at line 1606 of file CPView.j.

- (CGSize) convertSize: (CGSize)  aSize
toView: (CPView aView 

Convert's aSize from the receiver's coordinate space to aView's coordinate space.

Parameters:
aSizethe size to convert
thecoordinate space to which the size will be converted
Returns:
the converted size

Definition at line 1617 of file CPView.j.

- (CPView) createEphemeralSubviewNamed: (CPString aViewName

Reimplemented in CPButton, CPButtonBar, CPLevelIndicator, CPScroller, CPSegmentedControl, CPSlider, and CPTextField.

Definition at line 2535 of file CPView.j.

- (id) currentValueForThemeAttribute: (CPString aName

Reimplemented in CPScroller.

Definition at line 2522 of file CPView.j.

+ (CPMenu) defaultMenu

Definition at line 237 of file CPView.j.

- (void) didAddSubview: (CPView aSubview

Called when the receiver has added aSubview to it's child views.

Parameters:
aSubviewthe view that was added

Reimplemented in CPSplitView.

Definition at line 428 of file CPView.j.

- (void) display

Draws the entire area of the receiver as defined by its -bounds.

Definition at line 1860 of file CPView.j.

- (void) displayIfNeeded

Displays the receiver and any of its subviews that need to be displayed.

Definition at line 1851 of file CPView.j.

- (void) displayIfNeededInRect: (CGRect)  aRect

Definition at line 1865 of file CPView.j.

- (void) displayRect: (CPRect)  aRect

Draws the receiver into the area defined by aRect.

Parameters:
aRectthe area to be drawn

Definition at line 1875 of file CPView.j.

- (void) displayRectIgnoringOpacity: (CGRect)  aRect
inContext: (CPGraphicsContext aGraphicsContext 

Definition at line 1884 of file CPView.j.

- (void) dragImage: (CPImage anImage
at: (CGPoint)  aLocation
offset: (CGSize)  mouseOffset
event: (CPEvent anEvent
pasteboard: (CPPasteboard aPasteboard
source: (id)  aSourceObject
slideBack: (BOOL)  slideBack 

Initiates a drag operation from the receiver to another view that accepts dragged data.

Parameters:
anImagethe image to be dragged
aLocationthe lower-left corner coordinate of anImage
mouseOffsetthe distance from the -mouseDown: location and the current location
anEventthe -mouseDown: that triggered the drag
aPasteboardthe pasteboard that holds the drag data
aSourceObjectthe drag operation controller
slideBackWhether the image should 'slide back' if the drag is rejected

Definition at line 1742 of file CPView.j.

- (void) dragView: (CPView aView
at: (CPPoint)  aLocation
offset: (CPSize)  mouseOffset
event: (CPEvent anEvent
pasteboard: (CPPasteboard aPasteboard
source: (id)  aSourceObject
slideBack: (BOOL)  slideBack 

Initiates a drag operation from the receiver to another view that accepts dragged data.

Parameters:
aViewthe view to be dragged
aLocationthe top-left corner coordinate of aView
mouseOffsetthe distance from the -mouseDown: location and the current location
anEventthe -mouseDown: that triggered the drag
aPasteboardthe pasteboard that holds the drag data
aSourceObjectthe drag operation controller
slideBackWhether the view should 'slide back' if the drag is rejected

Definition at line 1757 of file CPView.j.

- (void) drawRect: (CPRect)  aRect

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

Parameters:
aRectthe area that should be drawn into

Reimplemented in CPBox, and CPScrollView.

Definition at line 1807 of file CPView.j.

- (CPMenuItem) enclosingMenuItem

Returns the menu item containing the receiver or one of its ancestor views.

Returns:
a menu item, or nil if the view or one of its ancestors wasn't found

Definition at line 638 of file CPView.j.

- (CPScrollView) enclosingScrollView

Returns the CPScrollView containing the receiver.

Returns:
the CPScrollView containing the receiver.

Definition at line 2090 of file CPView.j.

- (void) encodeWithCoder: (CPCoder aCoder

Archives the view to a coder.

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

Reimplemented from CPResponder.

Reimplemented in CPBox, CPBrowser, CPButton, CPButtonBar, CPClipView, CPCollectionView, CPColorWell, CPControl, CPImageView, CPLevelIndicator, CPOutlineView, CPProgressIndicator, CPRadio, CPScroller, CPScrollView, CPSearchField, CPSegmentedControl, CPSlider, CPSplitView, CPStepper, CPTableHeaderView, CPTableView, CPTabView, CPTextField, CPTokenField, and CPWebView.

Definition at line 2715 of file CPView.j.

- (BOOL) enterFullScreenMode

Puts the receiver into full screen mode.

Definition at line 1073 of file CPView.j.

- (BOOL) enterFullScreenMode: (CPScreen aScreen
withOptions: (CPDictionary options 

Puts the receiver into full screen mode.

Parameters:
aScreenthe that should be used
optionsconfiguration options

Definition at line 1083 of file CPView.j.

- (CPView) ephemeralSubviewNamed: (CPString aViewName

Definition at line 2583 of file CPView.j.

- (void) exitFullScreenMode

The receiver should exit full screen mode.

Definition at line 1112 of file CPView.j.

- (void) exitFullScreenModeWithOptions: (CPDictionary options

The receiver should exit full screen mode.

Parameters:
optionsconfigurations options

Definition at line 1121 of file CPView.j.

- (CGRect) frame

Returns the receiver's frame.

Returns:
a copy of the receiver's frame

Definition at line 723 of file CPView.j.

- (CGPoint) frameOrigin

Definition at line 728 of file CPView.j.

- (CGSize) frameSize

Definition at line 733 of file CPView.j.

- (BOOL) hasThemeAttribute: (CPString aName

Definition at line 2530 of file CPView.j.

- (BOOL) hasThemeState: (CPThemeState)  aState

Definition at line 2290 of file CPView.j.

- (CPView) hitTest: (CPPoint)  aPoint

Tests whether a point is contained within this view, or one of its subviews.

Parameters:
aPointthe point to test
Returns:
returns the containing view, or nil if the point is not contained

Reimplemented in CPLevelIndicator.

Definition at line 1349 of file CPView.j.

- (BOOL) hitTests

Returns whether or not the view responds to hit tests.

Returns:
YES if this view listens to -hitTest messages, NO otherwise.

Definition at line 1330 of file CPView.j.

- (id) init

Reimplemented in CPAlert.

Definition at line 242 of file CPView.j.

+ (void) initialize
- (id) initWithCoder: (CPCoder aCoder

Initializes the view from an archive.

Parameters:
aCoderthe coder from which to initialize
Returns:
the initialized view

Reimplemented from CPResponder.

Reimplemented in CPBox, CPBrowser, CPButton, CPButtonBar, CPClipView, CPCollectionView, CPColorWell, CPControl, CPImageView, CPLevelIndicator, CPOutlineView, CPPopUpButton, CPProgressIndicator, CPRadio, CPScroller, CPScrollView, CPSearchField, CPSegmentedControl, CPSlider, CPSplitView, CPStepper, CPTableHeaderView, CPTableView, CPTabView, CPTextField, CPTokenField, and CPWebView.

Definition at line 2617 of file CPView.j.

- (id) initWithFrame: (CGRect)  aFrame
- (BOOL) isDescendantOf: (CPView aView

Returns YES if the receiver is, or is a descendant of, aView.

Parameters:
aViewthe view to test for ancestry

Definition at line 581 of file CPView.j.

- (BOOL) isFlipped

Returns whether the view is flipped.

Returns:
YES if the view is flipped. NO, otherwise.

Definition at line 691 of file CPView.j.

- (BOOL) isHidden

Returns YES if the receiver is hidden.

Definition at line 1207 of file CPView.j.

- (BOOL) isHiddenOrHasHiddenAncestor

Returns YES if the receiver is hidden, or one of it's ancestor views is hidden. NO, otherwise.

Definition at line 1269 of file CPView.j.

- (BOOL) isInFullScreenMode

Returns YES if the receiver is currently in full screen mode.

Definition at line 1138 of file CPView.j.

- (BOOL) isOpaque

Returns whether the receiver is completely opaque. By default, returns NO.

Reimplemented in CPSearchField.

Definition at line 1976 of file CPView.j.

+ (CPSet) keyPathsForValuesAffectingBounds

Definition at line 232 of file CPView.j.

+ (CPSet) keyPathsForValuesAffectingFrame

Definition at line 227 of file CPView.j.

- (CALayer) layer

Returns the core animation layer used by the receiver.

Definition at line 2257 of file CPView.j.

- (CPView) layoutEphemeralSubviewNamed: (CPString aViewName
positioned: (CPWindowOrderingMode)  anOrderingMode
relativeToEphemeralSubviewNamed: (CPString relativeToViewName 

Definition at line 2545 of file CPView.j.

- (void) layoutIfNeeded

Definition at line 1959 of file CPView.j.

- (void) lockFocus

Locks focus on the receiver, so drawing commands apply to it.

Definition at line 1906 of file CPView.j.

- (CPMenu) menuForEvent: (CPEvent anEvent

Reimplemented in CPCollectionView, and CPTableView.

Definition at line 1402 of file CPView.j.

- (void) mouseDown: (CPEvent anEvent

Notifies the receiver that the user has clicked the mouse down in its area.

Parameters:
anEventcontains information about the click

Reimplemented from CPResponder.

Reimplemented in CPButton, CPCollectionView, CPColorWell, CPControl, CPFlashView, CPImageView, CPLevelIndicator, CPPopUpButton, CPScroller, CPSearchField, CPSegmentedControl, CPSplitView, CPTableHeaderView, CPTabView, CPTextField, and CPTokenField.

Definition at line 1385 of file CPView.j.

- (BOOL) mouseDownCanMoveWindow

Returns YES if mouse events aren't needed by the receiver and can be sent to the superview. The default implementation returns NO if the view is opaque.

Definition at line 1380 of file CPView.j.

- (BOOL) needsDisplay

Definition at line 1843 of file CPView.j.

- (BOOL) needsPanelToBecomeKey

Returns YES if this view requires a panel to become key. Normally only text fields, so this returns NO.

Reimplemented in CPTextField.

Definition at line 1371 of file CPView.j.

- (CPView) nextKeyView

Definition at line 2155 of file CPView.j.

- (CPView) nextValidKeyView

Definition at line 2160 of file CPView.j.

- (BOOL) performKeyEquivalent: (CPEvent anEvent

Overridden by subclasses to handle a key equivalent.

If the receiver’s key equivalent is the same as the characters of the key-down event theEvent, as returned by [anEvent charactersIgnoringModifiers], the receiver should take the appropriate action and return YES. Otherwise, it should return the result of invoking super’s implementation. The default implementation of this method simply passes the message down the view hierarchy (from superviews to subviews) and returns NO if none of the receiver’s subviews responds YES.

Parameters:
anEventAn event object that represents the key equivalent pressed
Returns:
YES if theEvent is a key equivalent that the receiver handled, NO if it is not a key equivalent that it should handle.

Reimplemented from CPResponder.

Reimplemented in CPButton.

Definition at line 2138 of file CPView.j.

- (BOOL) postsBoundsChangedNotifications

Returns YES if the receiver posts a CPViewBoundsDidChangeNotification when its bounds is changed.

Definition at line 1727 of file CPView.j.

- (BOOL) postsFrameChangedNotifications

Returns YES if the receiver posts a CPViewFrameDidChangeNotification if its frame is changed.

Definition at line 1692 of file CPView.j.

- (CPView) previousKeyView

Definition at line 2177 of file CPView.j.

- (CPView) previousValidKeyView

Definition at line 2182 of file CPView.j.

- (CGRect) rectForEphemeralSubviewNamed: (CPString aViewName

Reimplemented in CPButton, CPButtonBar, CPLevelIndicator, CPScroller, CPSegmentedControl, CPSlider, and CPTextField.

Definition at line 2540 of file CPView.j.

- (void) reflectScrolledClipView: (CPClipView aClipView

Notifies the receiver (superview of a CPClipView) that the clip view bounds or the document view bounds have changed.

Parameters:
aClipViewthe clip view of the superview being notified

Reimplemented in CPScrollView.

Definition at line 2116 of file CPView.j.

- (CPArray) registeredDraggedTypes

Returns an array of all types the receiver accepts for dragging operations.

Returns:
an array of CPPasteBoards

Definition at line 1784 of file CPView.j.

- (void) registerForDraggedTypes: (CPArray pasteboardTypes

Sets the receiver's list of acceptable data types for a dragging operation.

Parameters:
pasteboardTypesan array of CPPasteboards

Reimplemented in CPBrowser.

Definition at line 1766 of file CPView.j.

- (void) removeFromSuperview

Removes the receiver from it's container view and window. Does nothing if there's no container view.

Reimplemented in CPTokenField.

Definition at line 436 of file CPView.j.

- (void) replaceSubview: (CPView aSubview
with: (CPView aView 

Replaces the specified child view with another view

Parameters:
aSubviewthe view to replace
aViewthe replacement view

Definition at line 461 of file CPView.j.

- (void) resizeSubviewsWithOldSize: (CGSize)  aSize

Initiates -superviewSizeChanged: messages to subviews.

Parameters:
aSizethe size for the subviews

Reimplemented in CPClipView, CPCollectionView, and CPScrollView.

Definition at line 1022 of file CPView.j.

- (void) resizeWithOldSuperviewSize: (CGSize)  aSize

Notifies subviews that the superview changed size.

Parameters:
aSizethe size of the old superview

Reimplemented in CPTableView.

Definition at line 991 of file CPView.j.

- (void) rightMouseDown: (CPEvent anEvent

Notifies the receiver that the user has clicked the right mouse down in its area.

Parameters:
anEventcontains information about the right click

Reimplemented from CPResponder.

Reimplemented in CPPopUpButton.

Definition at line 1391 of file CPView.j.

- (void) scrollClipView: (CPClipView aClipView
toPoint: (CGPoint)  aPoint 

Scrolls the clip view to a specified point

Parameters:
theclip view to scroll
thepoint to scroll to

Definition at line 2106 of file CPView.j.

- (void) scrollPoint: (CGPoint)  aPoint

Changes the receiver's frame origin to a 'constrained' aPoint.

Parameters:
aPointthe proposed frame origin

Definition at line 2009 of file CPView.j.

- (void) scrollRect: (CGRect)  aRect
by: (float)  anAmount 

Should be overridden by subclasses.

Definition at line 2081 of file CPView.j.

- (BOOL) scrollRectToVisible: (CGRect)  aRect

Scrolls the nearest ancestor CPClipView a minimum amount so aRect can become visible.

Parameters:
aRectthe area to become visible
Returns:
<codeYES if any scrolling occurred, NO otherwise.

Definition at line 2024 of file CPView.j.

- (void) setAlphaValue: (float)  anAlphaValue

Sets the opacity of the receiver. The value must be in the range of 0.0 to 1.0, where 0.0 is completely transparent and 1.0 is completely opaque.

Parameters:
anAlphaValuean alpha value ranging from 0.0 to 1.0.

Definition at line 1234 of file CPView.j.

- (void) setAutoresizesSubviews: (BOOL)  aFlag

Specifies whether the receiver view should automatically resize its subviews when its -setFrameSize: method receives a change.

Parameters:
aFlagIf YES, then subviews will automatically be resized when this view is resized. NO means the views will not be resized automatically.

Definition at line 1037 of file CPView.j.

- (void) setAutoresizingMask: (unsigned)  aMask

Determines automatic resizing behavior.

Parameters:
aMaska bit mask with options

Definition at line 1055 of file CPView.j.

- (void) setBackgroundColor: (CPColor aColor

Sets the background color of the receiver.

Parameters:
aColorthe new color for the receiver's background

Reimplemented in CPBrowser, CPTabView, and CPWebView.

Definition at line 1411 of file CPView.j.

- (void) setBounds: (CGRect)  bounds

Sets the receiver's bounds. The bounds define the size and location of the receiver inside it's frame. Posts a CPViewBoundsDidChangeNotification to the default notification center if the receiver is configured to do so.

Parameters:
boundsthe new bounds

Definition at line 870 of file CPView.j.

- (void) setBoundsOrigin: (CGPoint)  aPoint

Sets the location of the receiver inside its frame. The method posts a CPViewBoundsDidChangeNotification to the default notification center if the receiver is configured to do so.

Parameters:
aPointthe new location for the receiver

Reimplemented in CPClipView, and CPTableView.

Definition at line 911 of file CPView.j.

- (void) setBoundsSize: (CGSize)  aSize

Sets the receiver's size inside its frame. The method posts a CPViewBoundsDidChangeNotification to the default notification center if the receiver is configured to do so.

Parameters:
aSizethe new size for the receiver

Reimplemented in CPTableView.

Definition at line 954 of file CPView.j.

- (void) setCenter: (CGPoint)  aPoint

Moves the center of the receiver's frame to the provided point. The point is defined in the superview's coordinate system. The method posts a CPViewFrameDidChangeNotification to the default notification center if the receiver is configured to do so. If the specified origin is the same as the frame's current origin, the method will simply return (and no notification will be posted).

Parameters:
aPointthe new origin point

Definition at line 745 of file CPView.j.

- (void) setClipsToBounds: (BOOL)  shouldClip

Definition at line 1212 of file CPView.j.

- (void) setFrame: (CGRect)  aFrame

Sets the frame size of the receiver to the dimensions and origin of the provided rectangle in the coordinate system of the superview. The method also posts an CPViewFrameDidChangeNotification to the notification center if the receiver is configured to do so. If the frame is the same as the current frame, the method simply returns (and no notification is posted).

Parameters:
aFramethe rectangle specifying the new origin and size of the receiver

Reimplemented in CPStepper.

Definition at line 703 of file CPView.j.

- (void) setFrameOrigin: (CGPoint)  aPoint

Sets the receiver's frame origin to the provided point. The point is defined in the superview's coordinate system. The method posts a CPViewFrameDidChangeNotification to the default notification center if the receiver is configured to do so. If the specified origin is the same as the frame's current origin, the method will simply return (and no notification will be posted).

Parameters:
aPointthe new origin point

Reimplemented in CPTableView.

Definition at line 766 of file CPView.j.

- (void) setFrameSize: (CGSize)  aSize

Sets the receiver's frame size. If aSize is the same as the frame's current dimensions, this method simply returns. The method posts a CPViewFrameDidChangeNotification to the default notification center if the receiver is configured to do so.

Parameters:
aSizethe new size for the frame

Reimplemented in CPAccordionView, CPButtonBar, CPProgressIndicator, CPScroller, CPSlider, CPSplitView, and CPTableView.

Definition at line 792 of file CPView.j.

- (void) setHidden: (BOOL)  aFlag

Sets whether the receiver should be hidden.

Parameters:
aFlagYES makes the receiver hidden.

Definition at line 1147 of file CPView.j.

- (void) setHitTests: (BOOL)  shouldHitTest

Set whether or not the view should respond to hit tests.

Parameters:
shouldHitTestshould be YES if this view should respond to hit tests, NO otherwise.

Definition at line 1339 of file CPView.j.

- (void) setLayer: (CALayer aLayer

Sets the core animation layer to be used by this receiver.

Definition at line 2225 of file CPView.j.

- (void) setNeedsDisplay: (BOOL)  aFlag

Marks the entire view as dirty, and needing a redraw.

Reimplemented in CPTableView.

Definition at line 1817 of file CPView.j.

- (void) setNeedsDisplayInRect: (CPRect)  aRect

Marks the area denoted by aRect as dirty, and initiates a redraw on it.

Parameters:
aRectthe area that needs to be redrawn

Definition at line 1827 of file CPView.j.

- (void) setNeedsLayout

Definition at line 1949 of file CPView.j.

- (void) setNextKeyView: (CPView next

Definition at line 2207 of file CPView.j.

- (void) setPostsBoundsChangedNotifications: (BOOL)  shouldPostBoundsChangedNotifications

Sets whether the receiver posts a CPViewBoundsDidChangeNotification notification to the default notification center when its bounds is changed. The default is NO. Methods that could cause a bounds change notification are:

setBounds:
setBoundsSize:
setBoundsOrigin:
Parameters:
shouldPostBoundsChangedNotificationsYES makes the receiver post notifications on bounds changes

Definition at line 1709 of file CPView.j.

- (void) setPostsFrameChangedNotifications: (BOOL)  shouldPostFrameChangedNotifications

Sets whether the receiver posts a CPViewFrameDidChangeNotification notification to the default notification center when its frame is changed. The default is NO. Methods that could cause a frame change notification are:

setFrame:
setFrameSize:
setFrameOrigin:
Parameters:
shouldPostFrameChangedNotificationsYES makes the receiver post notifications on frame changes (size or origin)

Definition at line 1676 of file CPView.j.

- (void) setSubviews: (CPArray newSubviews

Definition at line 473 of file CPView.j.

- (void) setTag: (CPInteger)  aTag

Definition at line 658 of file CPView.j.

- (void) setTheme: (CPTheme aTheme

Reimplemented in CPAlert.

Definition at line 2427 of file CPView.j.

- (void) setThemeClass: (CPString theClass

Definition at line 2344 of file CPView.j.

- (BOOL) setThemeState: (CPThemeState)  aState

Definition at line 2299 of file CPView.j.

- (void) setupViewFlags

Definition at line 206 of file CPView.j.

- (void) setValue: (id)  aValue
forThemeAttribute: (CPString aName 

Definition at line 2490 of file CPView.j.

- (void) setValue: (id)  aValue
forThemeAttribute: (CPString aName
inState: (CPThemeState)  aState 

Definition at line 2474 of file CPView.j.

- (void) setWantsLayer: (BOOL)  aFlag

Sets whether the receiver wants a core animation layer.

Parameters:
\cYES means the receiver wants a layer.

Definition at line 2266 of file CPView.j.

- (CPArray) subviews

Returns an array of all the views contained as direct children of the receiver

Returns:
an array of CPViews

Definition at line 311 of file CPView.j.

- (CPView) superview

Returns the container view of the receiver

Returns:
the receiver's containing view

Definition at line 302 of file CPView.j.

- (CPInteger) tag

Definition at line 663 of file CPView.j.

- (CPTheme) theme

Definition at line 2437 of file CPView.j.

- (CPString) themeClass

Definition at line 2336 of file CPView.j.

- (unsigned) themeState

Definition at line 2285 of file CPView.j.

- (void) unlockFocus

Takes focus away from the receiver, and restores it to the previous view.

Definition at line 1942 of file CPView.j.

- (void) unregisterDraggedTypes

Resets the array of acceptable data types for a dragging operation.

Definition at line 1795 of file CPView.j.

- (BOOL) unsetThemeState: (CPThemeState)  aState

Definition at line 2314 of file CPView.j.

- (id) valueForThemeAttribute: (CPString aName

Definition at line 2514 of file CPView.j.

- (id) valueForThemeAttribute: (CPString aName
inState: (CPThemeState)  aState 

Definition at line 2506 of file CPView.j.

- (void) viewDidChangeTheme

Definition at line 2442 of file CPView.j.

- (void) viewDidHide

Called when the return value of isHiddenOrHasHiddenAncestor becomes YES, e.g. when this view becomes hidden due to a setHidden:YES message to itself or to one of its superviews.

Note: in the current implementation, viewDidHide may be called multiple times if additional superviews are hidden, even if isHiddenOrHasHiddenAncestor was already YES.

Definition at line 1296 of file CPView.j.

- (void) viewDidMoveToSuperview

Called when the receiver's superview has changed.

Definition at line 597 of file CPView.j.

- (void) viewDidMoveToWindow

Called when the receiver has been moved to a new CPWindow.

Reimplemented in CPSplitView, and CPTokenField.

Definition at line 606 of file CPView.j.

- (void) viewDidUnhide

Called when the return value of isHiddenOrHasHiddenAncestor becomes NO, e.g. when this view stops being hidden due to a setHidden:NO message to itself or to one of its superviews.

Note: in the current implementation, viewDidUnhide may be called multiple times if additional superviews are unhidden, even if isHiddenOrHasHiddenAncestor was already NO.

Reimplemented in CPWebView.

Definition at line 1310 of file CPView.j.

- (void) viewWillDraw

Reimplemented in CPSplitView.

Definition at line 1899 of file CPView.j.

- (void) viewWillMoveToSuperview: (CPView aView

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

Parameters:
aViewthe view to which the receiver will be moved

Reimplemented in CPSearchField, and CPTableView.

Definition at line 614 of file CPView.j.

- (void) viewWillMoveToWindow: (CPWindow aWindow

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

Parameters:
aWindowthe window to which the receiver will be moved.

Reimplemented in CPButton.

Definition at line 622 of file CPView.j.

- (CPView) viewWithTag: (CPInteger)  aTag

Definition at line 668 of file CPView.j.

- (CGRect) visibleRect

Returns the rectangle of the receiver not clipped by its superview.

Definition at line 1984 of file CPView.j.

- (BOOL) wantsLayer

Returns YES if the receiver uses a CALayer

Returns:
YES if the receiver uses a CALayer

Definition at line 2275 of file CPView.j.

- (void) willRemoveSubview: (CPView aView

Called when the receiver is about to be remove one of its subviews.

Parameters:
aViewthe view that will be removed

Reimplemented in CPSplitView.

Definition at line 630 of file CPView.j.

- (CPWindow) window

Returns the window containing this receiver

Reimplemented in CPAlert.

Definition at line 319 of file CPView.j.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Defines