Class CPView

CPObject
    extended byCPResponder
        extended byCPView
Direct Known Subclasses:
CPClipView, CPCollectionView, CPControl, CPFlashView, CPProgressIndicator, CPScrollView, CPShadowView, CPTabView, NSCustomView, NSView, _CPWindowView,

@implementation CPView : CPResponder

CPView is an abstract 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.


Method Summary
-(id)initWithCoder:(CPCoder)aCoder
          Initializes the view from an archive.
-(id)initWithFrame:(CGRect)aFrame
          Initializes the receiver for usage with the specified bounding rectangle.
-(id)NS_initWithCoder:(CPCoder)aCoder
-(BOOL)acceptsFirstMouse:(CPEvent)anEvent
          Returns whether the receiver should be sent a mouseDown: message for anEvent.
-(void)addSubview:(CPView)aSubview
          Makes the argument a subview of the receiver.
-(void)addSubview:(CPView)aSubview positioned:(CPWindowOrderingMode)anOrderingMode relativeTo:(CPView)anotherView
          Makes aSubview a subview of the receiver.
-(CGRect)adjustScroll:(CGRect)proposedVisibleRect
          Subclasses can override this to modify the visible rectangle after a scrolling operation.
-(float)alphaValue
          Returns the alpha value of the receiver.
-(BOOL)autoresizesSubviews
          Reports whether the receiver automatically resizes its subviews when its frame size changes.
-(unsigned)autoresizingMask
          Returns the bit mask options for resizing behavior.
-(BOOL)autoscroll:(CPEvent)anEvent
          FIXME Not yet implemented.
-(CPColor)backgroundColor
          Returns the background color of the receiver.
-(CGRect)bounds
          Returns the receiver's bounds.
-(CGPoint)convertPoint:(CGPoint)aPoint fromView:(CPView)aView
          Converts aPoint from the coordinate space of aView to the coordinate space of the receiver.
-(CGPoint)convertPoint:(CGPoint)aPoint toView:(CPView)aView
          Converts aPoint from the receiver's coordinate space to the coordinate space of aView.
-(CGRect)convertRect:(CGRect)aRect fromView:(CPView)aView
          Converts aRect from aView's coordinate space to the receiver's space.
-(CGRect)convertRect:(CGRect)aRect toView:(CPView)aView
          Converts aRect from the receiver's coordinate space to aView's coordinate space.
-(CGSize)convertSize:(CGSize)aSize fromView:(CPView)aView
          Convert's aSize from aView's coordinate space to the receiver's coordinate space.
-(CGSize)convertSize:(CGSize)aSize toView:(CPView)aView
          Convert's aSize from the receiver's coordinate space to aView's coordinate space.
-(void)didAddSubview:(CPView)aSubview
          Called when the receiver has added aSubview to it's child views.
-(void)display
          Draws the entire area of the receiver as defined by its bounds.
-(void)displayIfNeeded
          Displays the receiver and any of its subviews that need to be displayed.
-(void)displayIfNeededInRect:(CGRect)aRect
-(void)displayRect:(CPRect)aRect
          Draws the receiver into the area defined by aRect.
-(void)displayRectIgnoringOpacity:(CGRect)aRect inContext:(CPGraphicsContext)aGraphicsContext
-(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.
-(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.
-(void)drawRect:(CPRect)aRect
          Draws the receiver into aRect.
-(CPMenuItem)enclosingMenuItem
          Returns the menu item containing the receiver or one of its ancestor views.
-(CPScrollView)enclosingScrollView
          Returns the CPScrollView containing the receiver.
-(void)encodeWithCoder:(CPCoder)aCoder
          Archives the view to a coder.
-(BOOL)enterFullScreenMode:(CPScreen)aScreen withOptions:(CPDictionary)options
          Puts the receiver into full screen mode.
-(void)exitFullScreenModeWithOptions:(CPDictionary)options
          The receiver should exit full screen mode.
-(CGRect)frame
          Returns the receiver's frame.
-(CPView)hitTest:(CPPoint)aPoint
          Tests whether a point is contained within this view, or one of its subviews.
-(BOOL)hitTests
          Returns whether or not the view responds to hit tests.
-(BOOL)isDescendantOf:(CPView)aView
          Returns YES if the receiver is, or is a descendant of, aView.
-(BOOL)isFlipped
          Returns whether the view is flipped.
-(BOOL)isHidden
          Returns YES if the receiver is hidden.
-(BOOL)isHiddenOrHasHiddenAncestor
          Returns YES if the receiver is hidden, or one of it's ancestor views is hidden.
-(BOOL)isInFullScreenMode
          Returns YES if the receiver is currently in full screen mode.
-(BOOL)isOpaque
          Returns whether the receiver is completely opaque.
-(CALayer)layer
          Returns the core animation layer used by the receiver.
-(void)lockFocus
          Locks focus on the receiver, so drawing commands apply to it.
-(void)mouseDown:(CPEvent)anEvent
          Notifies the receiver that the user has clicked the mouse down in its area.
-(BOOL)mouseDownCanMoveWindow
          Returns YES if mouse events aren't needed by the receiver and can be sent to the superview.
-(BOOL)needsDisplay
-(BOOL)postsBoundsChangedNotifications
          Returns YES if the receiver posts a CPViewBoundsDidChangeNotification when its bounds is changed.
-(BOOL)postsFrameChangedNotifications
          Returns YES if the receiver posts a CPViewFrameDidChangeNotification if its frame is changed.
-(void)reflectScrolledClipView:(CPClipView)aClipView
          Notifies the receiver (superview of a CPClipView) that the clip view bounds or the document view bounds have changed.
-(void)registerForDraggedTypes:(CPArray)pasteboardTypes
          Sets the receiver's list of acceptable data types for a dragging operation.
-(CPArray)registeredDraggedTypes
          Returns an array of all types the receiver accepts for dragging operations.
-(void)removeFromSuperview
          Removes the receiver from it's container view and window.
-(void)replaceSubview:(CPView)aSubview with:(CPView)aView
          Replaces the specified child view with another view.
-(void)resizeSubviewsWithOldSize:(CGSize)aSize
          Initiates superviewSizeChanged: messages to subviews.
-(void)resizeWithOldSuperviewSize:(CGSize)aSize
          Notifies subviews that the superview changed size.
-(void)scrollClipView:(CPClipView)aClipView toPoint:(CGPoint)aPoint
          Scrolls the clip view to a specified point.
-(void)scrollPoint:(CGPoint)aPoint
          Changes the receiver's frame origin to a 'constrained' aPoint.
-(BOOL)scrollRectToVisible:(CGRect)aRect
          Scrolls the nearest ancestor CPClipView a minimum amount so aRect can become visible.
-(void)scrollRect:(CGRect)aRect by:(float)anAmount
          Should be overridden by subclasses.
-(void)setAlphaValue:(float)anAlphaValue
          Sets the opacity of the receiver.
-(void)setAutoresizesSubviews:(BOOL)aFlag
          Specifies whether the receiver view should automatically resize its subviews when its setFrameSize: method receives a change.
-(void)setAutoresizingMask:(unsigned)aMask
          Determines automatic resizing behavior.
-(void)setBackgroundColor:(CPColor)aColor
          Sets the background color of the receiver.
-(void)setBounds:(CGRect)bounds
          Sets the receiver's bounds.
-(void)setBoundsOrigin:(CGPoint)aPoint
          Sets the location of the receiver inside its frame.
-(void)setBoundsSize:(CGSize)aSize
          Sets the receiver's size inside its frame.
-(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.
-(void)setFrameOrigin:(CGPoint)aPoint
          Sets the receiver's frame origin to the provided point.
-(void)setFrameSize:(CGSize)aSize
          Sets the receiver's frame size.
-(void)setHidden:(BOOL)aFlag
          Sets whether the receiver should be hidden.
-(void)setHitTests:(BOOL)shouldHitTest
          Set whether or not the view should respond to hit tests.
-(void)setLayer:(CALayer)aLayer
          Sets the core animation layer to be used by this receiver.
-(void)setNeedsDisplay:(BOOL)aFlag
          Marks the entire view as dirty, and needing a redraw.
-(void)setNeedsDisplayInRect:(CPRect)aRect
          Marks the area denoted by aRect as dirty, and initiates a redraw on it.
-(void)setPostsBoundsChangedNotifications:(BOOL)shouldPostBoundsChangedNotifications
          Sets whether the receiver posts a CPViewBoundsDidChangeNotification notification to the default notification center when its bounds is changed.
-(void)setPostsFrameChangedNotifications:(BOOL)shouldPostFrameChangedNotifications
          Sets whether the receiver posts a CPViewFrameDidChangeNotification notification to the default notification center when its frame is changed.
-(void)setWantsLayer:(BOOL)aFlag
          Sets whether the receiver wants a core animation layer.
-(CPArray)subviews
          Returns an array of all the views contained as direct children of the receiver.
-(CPView)superview
          Returns the container view of the receiver.
-(void)unlockFocus
          Takes focus away from the receiver, and restores it to the previous view.
-(void)unregisterDraggedTypes
          Resets the array of acceptable data types for a dragging operation.
-(void)viewDidMoveToSuperview
          Called when the receiver's superview has changed.
-(void)viewDidMoveToWindow
          Called when the receiver has been moved to a new CPWindow.
-(void)viewWillMoveToSuperview:(CPView)aView
          Called when the receiver is about to be moved to a new view.
-(void)viewWillMoveToWindow:(CPWindow)aWindow
          Called when the receiver is about to be moved to a new window.
-(CGRect)visibleRect
          Returns the rectangle of the receiver not clipped by its superview.
-(BOOL)wantsLayer
          Returns YES if the receiver uses a CALayer.
-(void)willRemoveSubview:(CPView)aView
          Called when the receiver is about to be remove one of its subviews.
-(CPWindow)window
          Returns the window containing this receiver.

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


Method Detail

initWithCoder

-(id)initWithCoder:(CPCoder)aCoder
Initializes the view from an archive.
Parameters:
aCoder - the coder from which to initialize
Returns:
the initialized view

initWithFrame

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

NS_initWithCoder

-(id)NS_initWithCoder:(CPCoder)aCoder
Parameters:
aCoder

acceptsFirstMouse

-(BOOL)acceptsFirstMouse:(CPEvent)anEvent
Returns whether the receiver should be sent a mouseDown: message for anEvent.
Returns YES by default.
Parameters:
anEvent
Returns:
YES, if the view object accepts first mouse-down event. NO, otherwise.

addSubview

-(void)addSubview:(CPView)aSubview
Makes the argument a subview of the receiver.
Parameters:
aSubview - the CPView to make a subview

addSubview

-(void)addSubview:(CPView)aSubview positioned:(CPWindowOrderingMode)anOrderingMode relativeTo:(CPView)anotherView
Makes aSubview a subview of the receiver. It is positioned relative to anotherView
Parameters:
aSubview - the view to add as a subview
anOrderingMode - specifies aSubview's ordering relative to anotherView
anotherView - aSubview will be positioned relative to this argument

adjustScroll

-(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:
proposedVisibleRect - the rectangle to alter
Returns:
the same adjusted rectangle

alphaValue

-(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.

autoresizesSubviews

-(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.

autoresizingMask

-(unsigned)autoresizingMask
Returns the bit mask options for resizing behavior

autoscroll

-(BOOL)autoscroll:(CPEvent)anEvent
FIXME Not yet implemented
Parameters:
anEvent

backgroundColor

-(CPColor)backgroundColor
Returns the background color of the receiver

bounds

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

convertPoint

-(CGPoint)convertPoint:(CGPoint)aPoint fromView:(CPView)aView
Converts aPoint from the coordinate space of aView to the coordinate space of the receiver.
Parameters:
aPoint - the point to convert
aView - the view space to convert from
Returns:
the converted point

convertPoint

-(CGPoint)convertPoint:(CGPoint)aPoint toView:(CPView)aView
Converts aPoint from the receiver's coordinate space to the coordinate space of aView.
Parameters:
aPoint - the point to convert
aView - the coordinate space to which the point will be converted
Returns:
the converted point

convertRect

-(CGRect)convertRect:(CGRect)aRect fromView:(CPView)aView
Converts aRect from aView's coordinate space to the receiver's space.
Parameters:
aRect - the rectangle to convert
aView - the coordinate space from which to convert
Returns:
the converted rectangle

convertRect

-(CGRect)convertRect:(CGRect)aRect toView:(CPView)aView
Converts aRect from the receiver's coordinate space to aView's coordinate space.
Parameters:
aRect - the rectangle to convert
aView - the coordinate space to which the rectangle will be converted
Returns:
the converted rectangle

convertSize

-(CGSize)convertSize:(CGSize)aSize fromView:(CPView)aView
Convert's aSize from aView's coordinate space to the receiver's coordinate space.
Parameters:
aSize - the size to convert
aView - the coordinate space to convert from
Returns:
the converted size

convertSize

-(CGSize)convertSize:(CGSize)aSize toView:(CPView)aView
Convert's aSize from the receiver's coordinate space to aView's coordinate space.
Parameters:
aSize - the size to convert
aView
Returns:
the converted size

didAddSubview

-(void)didAddSubview:(CPView)aSubview
Called when the receiver has added aSubview to it's child views.
Parameters:
aSubview - the view that was added

display

-(void)display
Draws the entire area of the receiver as defined by its bounds.

displayIfNeeded

-(void)displayIfNeeded
Displays the receiver and any of its subviews that need to be displayed.

displayIfNeededInRect

-(void)displayIfNeededInRect:(CGRect)aRect
Parameters:
aRect

displayRect

-(void)displayRect:(CPRect)aRect
Draws the receiver into the area defined by aRect.
Parameters:
aRect - the area to be drawn

displayRectIgnoringOpacity

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

dragImage

-(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:
anImage - the image to be dragged
aLocation - the lower-left corner coordinate of anImage
mouseOffset - the distance from the mouseDown: location and the current location
anEvent - the mouseDown: that triggered the drag
aPasteboard
aSourceObject - the drag operation controller
slideBack - Whether the image should 'slide back' if the drag is rejected

dragView

-(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:
aView - the view to be dragged
aLocation - the lower-left corner coordinate of aView
mouseOffset - the distance from the mouseDown: location and the current location
anEvent - the mouseDown: that triggered the drag
aPasteboard
aSourceObject - the drag operation controller
slideBack - Whether the view should 'slide back' if the drag is rejected

drawRect

-(void)drawRect:(CPRect)aRect
Draws the receiver into aRect. This method should be overridden by subclasses.
Parameters:
aRect - the area that should be drawn into

enclosingMenuItem

-(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

enclosingScrollView

-(CPScrollView)enclosingScrollView
Returns the CPScrollView containing the receiver.
Returns:
the CPScrollView containing the receiver.

encodeWithCoder

-(void)encodeWithCoder:(CPCoder)aCoder
Archives the view to a coder.
Parameters:
aCoder - the object into which the view's data will be archived.

enterFullScreenMode

-(BOOL)enterFullScreenMode:(CPScreen)aScreen withOptions:(CPDictionary)options
Puts the receiver into full screen mode.
Parameters:
aScreen - the that should be used
options - configuration options

exitFullScreenModeWithOptions

-(void)exitFullScreenModeWithOptions:(CPDictionary)options
The receiver should exit full screen mode.
Parameters:
options - configurations options

frame

-(CGRect)frame
Returns the receiver's frame.
Returns:
a copy of the receiver's frame

hitTest

-(CPView)hitTest:(CPPoint)aPoint
Tests whether a point is contained within this view, or one of its subviews.
Parameters:
aPoint - the point to test
Returns:
returns the containing view, or nil if the point is not contained

hitTests

-(BOOL)hitTests
Returns whether or not the view responds to hit tests.
Returns:
YES if this view listens to hitTest messages, NO otherwise.

isDescendantOf

-(BOOL)isDescendantOf:(CPView)aView
Returns YES if the receiver is, or is a descendant of, aView.
Parameters:
aView - the view to test for ancestry

isFlipped

-(BOOL)isFlipped
Returns whether the view is flipped.
Returns:
YES if the view is flipped. NO, otherwise.

isHidden

-(BOOL)isHidden
Returns YES if the receiver is hidden.

isHiddenOrHasHiddenAncestor

-(BOOL)isHiddenOrHasHiddenAncestor
Returns YES if the receiver is hidden, or one of it's ancestor views is hidden. NO, otherwise.

isInFullScreenMode

-(BOOL)isInFullScreenMode
Returns YES if the receiver is currently in full screen mode.

isOpaque

-(BOOL)isOpaque
Returns whether the receiver is completely opaque. By default, returns NO.

layer

-(CALayer)layer
Returns the core animation layer used by the receiver.

lockFocus

-(void)lockFocus
Locks focus on the receiver, so drawing commands apply to it.

mouseDown

-(void)mouseDown:(CPEvent)anEvent
Notifies the receiver that the user has clicked the mouse down in its area.
Parameters:
anEvent - contains information about the click

mouseDownCanMoveWindow

-(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.

needsDisplay

-(BOOL)needsDisplay

postsBoundsChangedNotifications

-(BOOL)postsBoundsChangedNotifications
Returns YES if the receiver posts a CPViewBoundsDidChangeNotification when its bounds is changed.

postsFrameChangedNotifications

-(BOOL)postsFrameChangedNotifications
Returns YES if the receiver posts a CPViewFrameDidChangeNotification if its frame is changed.

reflectScrolledClipView

-(void)reflectScrolledClipView:(CPClipView)aClipView
Notifies the receiver (superview of a CPClipView) that the clip view bounds or the document view bounds have changed.
Parameters:
aClipView - the clip view of the superview being notified

registerForDraggedTypes

-(void)registerForDraggedTypes:(CPArray)pasteboardTypes
Sets the receiver's list of acceptable data types for a dragging operation.
Parameters:
pasteboardTypes - an array of CPPasteboards

registeredDraggedTypes

-(CPArray)registeredDraggedTypes
Returns an array of all types the receiver accepts for dragging operations.
Returns:
an array of CPPasteBoards

removeFromSuperview

-(void)removeFromSuperview
Removes the receiver from it's container view and window. Does nothing if there's no container view.

replaceSubview

-(void)replaceSubview:(CPView)aSubview with:(CPView)aView
Replaces the specified child view with another view
Parameters:
aSubview - the view to replace
aView - the replacement view

resizeSubviewsWithOldSize

-(void)resizeSubviewsWithOldSize:(CGSize)aSize
Initiates superviewSizeChanged: messages to subviews.
Parameters:
aSize - the size for the subviews

resizeWithOldSuperviewSize

-(void)resizeWithOldSuperviewSize:(CGSize)aSize
Notifies subviews that the superview changed size.
Parameters:
aSize - the size of the old superview

scrollClipView

-(void)scrollClipView:(CPClipView)aClipView toPoint:(CGPoint)aPoint
Scrolls the clip view to a specified point
Parameters:
aClipView
aPoint

scrollPoint

-(void)scrollPoint:(CGPoint)aPoint
Changes the receiver's frame origin to a 'constrained' aPoint.
Parameters:
aPoint - the proposed frame origin

scrollRectToVisible

-(BOOL)scrollRectToVisible:(CGRect)aRect
Scrolls the nearest ancestor CPClipView a minimum amount so aRect can become visible.
Parameters:
aRect - the area to become visible
Returns:
if any scrolling occurred, NO otherwise.

scrollRect

-(void)scrollRect:(CGRect)aRect by:(float)anAmount
Should be overridden by subclasses.
Parameters:
aRect
anAmount

setAlphaValue

-(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:
anAlphaValue - an alpha value ranging from 0.0 to 1.0.

setAutoresizesSubviews

-(void)setAutoresizesSubviews:(BOOL)aFlag
Specifies whether the receiver view should automatically resize its subviews when its setFrameSize: method receives a change.
Parameters:
aFlag - If YES, then subviews will automatically be resized when this view is resized. NO means the views will not be resized automatically.

setAutoresizingMask

-(void)setAutoresizingMask:(unsigned)aMask
Determines automatic resizing behavior.
Parameters:
aMask - a bit mask with options

setBackgroundColor

-(void)setBackgroundColor:(CPColor)aColor
Sets the background color of the receiver.
Parameters:
aColor - the new color for the receiver's background

setBounds

-(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:
bounds - the new bounds

setBoundsOrigin

-(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:
aPoint - the new location for the receiver

setBoundsSize

-(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:
aSize - the new size for the receiver

setFrame

-(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 notificaion is posted).
Parameters:
aFrame - the rectangle specifying the new origin and size of the receiver

setFrameOrigin

-(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:
aPoint - the new origin point

setFrameSize

-(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:
aSize - the new size for the frame

setHidden

-(void)setHidden:(BOOL)aFlag
Sets whether the receiver should be hidden.
Parameters:
aFlag - YES makes the receiver hidden.

setHitTests

-(void)setHitTests:(BOOL)shouldHitTest
Set whether or not the view should respond to hit tests.
Parameters:
shouldHitTest - should be YES if this view should respond to hit tests, NO otherwise.

setLayer

-(void)setLayer:(CALayer)aLayer
Sets the core animation layer to be used by this receiver.
Parameters:
aLayer

setNeedsDisplay

-(void)setNeedsDisplay:(BOOL)aFlag
Marks the entire view as dirty, and needing a redraw.
Parameters:
aFlag

setNeedsDisplayInRect

-(void)setNeedsDisplayInRect:(CPRect)aRect
Marks the area denoted by aRect as dirty, and initiates a redraw on it.
Parameters:
aRect - the area that needs to be redrawn

setPostsBoundsChangedNotifications

-(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:
shouldPostBoundsChangedNotifications - YES makes the receiver post notifications on bounds changes

setPostsFrameChangedNotifications

-(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:
shouldPostFrameChangedNotifications - YES makes the receiver post notifications on frame changes (size or origin)

setWantsLayer

-(void)setWantsLayer:(BOOL)aFlag
Sets whether the receiver wants a core animation layer.
Parameters:
aFlag

subviews

-(CPArray)subviews
Returns an array of all the views contained as direct children of the receiver
Returns:
an array of CPViews

superview

-(CPView)superview
Returns the container view of the receiver
Returns:
the receiver's containing view

unlockFocus

-(void)unlockFocus
Takes focus away from the receiver, and restores it to the previous view.

unregisterDraggedTypes

-(void)unregisterDraggedTypes
Resets the array of acceptable data types for a dragging operation.

viewDidMoveToSuperview

-(void)viewDidMoveToSuperview
Called when the receiver's superview has changed.

viewDidMoveToWindow

-(void)viewDidMoveToWindow
Called when the receiver has been moved to a new CPWindow.

viewWillMoveToSuperview

-(void)viewWillMoveToSuperview:(CPView)aView
Called when the receiver is about to be moved to a new view.
Parameters:
aView - the view to which the receiver will be moved

viewWillMoveToWindow

-(void)viewWillMoveToWindow:(CPWindow)aWindow
Called when the receiver is about to be moved to a new window.
Parameters:
aWindow - the window to which the receiver will be moved.

visibleRect

-(CGRect)visibleRect
Returns the rectangle of the receiver not clipped by its superview.

wantsLayer

-(BOOL)wantsLayer
Returns YES if the receiver uses a CALayer
Returns:
s YES if the receiver uses a CALayer

willRemoveSubview

-(void)willRemoveSubview:(CPView)aView
Called when the receiver is about to be remove one of its subviews.
Parameters:
aView - the view that will be removed

window

-(CPWindow)window
Returns the window containing this receiver

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