Public Member Functions | |
(id) | - init [implementation] |
(id) | - initWithFrame: [implementation] |
(CPView) | - superview [implementation] |
(CPArray) | - subviews [implementation] |
(CPWindow) | - window [implementation] |
(void) | - addSubview: [implementation] |
(void) | - addSubview:positioned:relativeTo: [implementation] |
(void) | - didAddSubview: [implementation] |
(void) | - removeFromSuperview [implementation] |
(void) | - replaceSubview:with: [implementation] |
(BOOL) | - isDescendantOf: [implementation] |
(void) | - viewDidMoveToSuperview [implementation] |
(void) | - viewDidMoveToWindow [implementation] |
(void) | - viewWillMoveToSuperview: [implementation] |
(void) | - viewWillMoveToWindow: [implementation] |
(void) | - willRemoveSubview: [implementation] |
(CPMenuItem) | - enclosingMenuItem [implementation] |
(int) | - tag [implementation] |
(BOOL) | - isFlipped [implementation] |
(void) | - setFrame: [implementation] |
(CGRect) | - frame [implementation] |
(void) | - setFrameOrigin: [implementation] |
(void) | - setFrameSize: [implementation] |
(void) | - setBounds: [implementation] |
(CGRect) | - bounds [implementation] |
(void) | - setBoundsOrigin: [implementation] |
(void) | - setBoundsSize: [implementation] |
(void) | - resizeWithOldSuperviewSize: [implementation] |
(void) | - resizeSubviewsWithOldSize: [implementation] |
(void) | - setAutoresizesSubviews: [implementation] |
(BOOL) | - autoresizesSubviews [implementation] |
(void) | - setAutoresizingMask: [implementation] |
(unsigned) | - autoresizingMask [implementation] |
(BOOL) | - enterFullScreenMode:withOptions: [implementation] |
(void) | - exitFullScreenModeWithOptions: [implementation] |
(BOOL) | - isInFullScreenMode [implementation] |
(void) | - setHidden: [implementation] |
(BOOL) | - isHidden [implementation] |
(void) | - setAlphaValue: [implementation] |
(float) | - alphaValue [implementation] |
(BOOL) | - isHiddenOrHasHiddenAncestor [implementation] |
(BOOL) | - acceptsFirstMouse: [implementation] |
(BOOL) | - hitTests [implementation] |
(void) | - setHitTests: [implementation] |
(CPView) | - hitTest: [implementation] |
(BOOL) | - mouseDownCanMoveWindow [implementation] |
(void) | - mouseDown: [implementation] |
(void) | - setBackgroundColor: [implementation] |
(CPColor) | - backgroundColor [implementation] |
(CGPoint) | - convertPoint:fromView: [implementation] |
(CGPoint) | - convertPoint:toView: [implementation] |
(CGSize) | - convertSize:fromView: [implementation] |
(CGSize) | - convertSize:toView: [implementation] |
(CGRect) | - convertRect:fromView: [implementation] |
(CGRect) | - convertRect:toView: [implementation] |
(void) | - setPostsFrameChangedNotifications: [implementation] |
(BOOL) | - postsFrameChangedNotifications [implementation] |
(void) | - setPostsBoundsChangedNotifications: [implementation] |
(BOOL) | - postsBoundsChangedNotifications [implementation] |
(void) | - dragImage:at:offset:event:pasteboard:source:slideBack: [implementation] |
(void) | - dragView:at:offset:event:pasteboard:source:slideBack: [implementation] |
(void) | - registerForDraggedTypes: [implementation] |
(CPArray) | - registeredDraggedTypes [implementation] |
(void) | - unregisterDraggedTypes [implementation] |
(void) | - drawRect: [implementation] |
(void) | - setNeedsDisplay: [implementation] |
(void) | - setNeedsDisplayInRect: [implementation] |
(BOOL) | - needsDisplay [implementation] |
(void) | - displayIfNeeded [implementation] |
(void) | - display [implementation] |
(void) | - displayIfNeededInRect: [implementation] |
(void) | - displayRect: [implementation] |
(void) | - displayRectIgnoringOpacity:inContext: [implementation] |
(void) | - viewWillDraw [implementation] |
(void) | - lockFocus [implementation] |
(void) | - unlockFocus [implementation] |
(BOOL) | - isOpaque [implementation] |
(CGRect) | - visibleRect [implementation] |
(void) | - scrollPoint: [implementation] |
(BOOL) | - scrollRectToVisible: [implementation] |
(BOOL) | - autoscroll: [implementation] |
(CGRect) | - adjustScroll: [implementation] |
(void) | - scrollRect:by: [implementation] |
(CPScrollView) | - enclosingScrollView [implementation] |
(void) | - scrollClipView:toPoint: [implementation] |
(void) | - reflectScrolledClipView: [implementation] |
(void) | - setLayer: [implementation] |
(CALayer) | - layer [implementation] |
(void) | - setWantsLayer: [implementation] |
(BOOL) | - wantsLayer [implementation] |
(id) | - initWithCoder: [implementation] |
(void) | - encodeWithCoder: [implementation] |
Static Public Member Functions | |
(void) | + initialize [implementation] |
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 118 of file CPView.j.
- (BOOL) acceptsFirstMouse: | (CPEvent) | anEvent | [implementation] |
- (void) addSubview: | (CPView) | aSubview | [implementation] |
- (void) addSubview: | (CPView) | aSubview | ||
positioned: | (CPWindowOrderingMode) | anOrderingMode | ||
relativeTo: | (CPView) | anotherView | ||
[implementation] |
Makes aSubview
a subview of the receiver. It is positioned relative to anotherView
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 |
- (CGRect) adjustScroll: | (CGRect) | proposedVisibleRect | [implementation] |
- (float) alphaValue | [implementation] |
- (BOOL) autoresizesSubviews | [implementation] |
- (unsigned) autoresizingMask | [implementation] |
- (CPColor) backgroundColor | [implementation] |
- (CGRect) bounds | [implementation] |
- (CGPoint) convertPoint: | (CGPoint) | aPoint | ||
fromView: | (CPView) | aView | ||
[implementation] |
- (CGPoint) convertPoint: | (CGPoint) | aPoint | ||
toView: | (CPView) | aView | ||
[implementation] |
- (CGRect) convertRect: | (CGRect) | aRect | ||
fromView: | (CPView) | aView | ||
[implementation] |
- (CGRect) convertRect: | (CGRect) | aRect | ||
toView: | (CPView) | aView | ||
[implementation] |
- (CGSize) convertSize: | (CGSize) | aSize | ||
fromView: | (CPView) | aView | ||
[implementation] |
- (CGSize) convertSize: | (CGSize) | aSize | ||
toView: | (CPView) | aView | ||
[implementation] |
- (void) didAddSubview: | (CPView) | aSubview | [implementation] |
- (void) display | [implementation] |
- (void) displayIfNeeded | [implementation] |
- (void) displayIfNeededInRect: | (CGRect) | aRect | [implementation] |
- (void) displayRect: | (CPRect) | aRect | [implementation] |
- (void) displayRectIgnoringOpacity: | (CGRect) | aRect | ||
inContext: | (CPGraphicsContext) | aGraphicsContext | ||
[implementation] |
- (void) dragImage: | (CPImage) | anImage | ||
at: | (CGPoint) | aLocation | ||
offset: | (CGSize) | mouseOffset | ||
event: | (CPEvent) | anEvent | ||
pasteboard: | (CPPasteboard) | aPasteboard | ||
source: | (id) | aSourceObject | ||
slideBack: | (BOOL) | slideBack | ||
[implementation] |
Initiates a drag operation from the receiver to another view that accepts dragged data.
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 | |
aPastebaord | the pasteboard that holds the drag data | |
aSourceObject | the drag operation controller | |
slideBack | Whether the image should 'slide back' if the drag is rejected |
- (void) dragView: | (CPView) | aView | ||
at: | (CPPoint) | aLocation | ||
offset: | (CPSize) | mouseOffset | ||
event: | (CPEvent) | anEvent | ||
pasteboard: | (CPPasteboard) | aPasteboard | ||
source: | (id) | aSourceObject | ||
slideBack: | (BOOL) | slideBack | ||
[implementation] |
Initiates a drag operation from the receiver to another view that accepts dragged data.
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 | |
aPastebaord | the pasteboard that holds the drag data | |
aSourceObject | the drag operation controller | |
slideBack | Whether the view should 'slide back' if the drag is rejected |
- (void) drawRect: | (CPRect) | aRect | [implementation] |
- (CPMenuItem) enclosingMenuItem | [implementation] |
- (CPScrollView) enclosingScrollView | [implementation] |
Returns the CPScrollView containing the receiver.
- (void) encodeWithCoder: | (CPCoder) | aCoder | [implementation] |
- (BOOL) enterFullScreenMode: | (CPScreen) | aScreen | ||
withOptions: | (CPDictionary) | options | ||
[implementation] |
- (void) exitFullScreenModeWithOptions: | (CPDictionary) | options | [implementation] |
- (CGRect) frame | [implementation] |
- (CPView) hitTest: | (CPPoint) | aPoint | [implementation] |
- (BOOL) hitTests | [implementation] |
- (id) initWithCoder: | (CPCoder) | aCoder | [implementation] |
- (id) initWithFrame: | (CGRect) | aFrame | [implementation] |
- (BOOL) isDescendantOf: | (CPView) | aView | [implementation] |
- (BOOL) isFlipped | [implementation] |
- (BOOL) isHidden | [implementation] |
- (BOOL) isHiddenOrHasHiddenAncestor | [implementation] |
- (BOOL) isInFullScreenMode | [implementation] |
- (BOOL) isOpaque | [implementation] |
- (CALayer) layer | [implementation] |
- (void) lockFocus | [implementation] |
- (BOOL) mouseDownCanMoveWindow | [implementation] |
- (BOOL) postsBoundsChangedNotifications | [implementation] |
- (BOOL) postsFrameChangedNotifications | [implementation] |
- (void) reflectScrolledClipView: | (CPClipView) | aClipView | [implementation] |
Notifies the receiver (superview of a CPClipView) that the clip view bounds or the document view bounds have changed.
aClipView | the clip view of the superview being notified |
- (CPArray) registeredDraggedTypes | [implementation] |
- (void) registerForDraggedTypes: | (CPArray) | pasteboardTypes | [implementation] |
- (void) removeFromSuperview | [implementation] |
- (void) resizeSubviewsWithOldSize: | (CGSize) | aSize | [implementation] |
- (void) resizeWithOldSuperviewSize: | (CGSize) | aSize | [implementation] |
- (void) scrollClipView: | (CPClipView) | aClipView | ||
toPoint: | (CGPoint) | aPoint | ||
[implementation] |
- (void) scrollPoint: | (CGPoint) | aPoint | [implementation] |
- (void) scrollRect: | (CGRect) | aRect | ||
by: | (float) | anAmount | ||
[implementation] |
- (BOOL) scrollRectToVisible: | (CGRect) | aRect | [implementation] |
Scrolls the nearest ancestor CPClipView a minimum amount so aRect
can become visible.
aRect | the area to become visible |
NO
otherwise. - (void) setAlphaValue: | (float) | anAlphaValue | [implementation] |
- (void) setAutoresizesSubviews: | (BOOL) | aFlag | [implementation] |
Specifies whether the receiver view should automatically resize its subviews when its setFrameSize:
method receives a change.
aFlag | If YES , then subviews will automatically be resized when this view is resized. NO means the views will not be resized automatically. |
- (void) setAutoresizingMask: | (unsigned) | aMask | [implementation] |
- (void) setBackgroundColor: | (CPColor) | aColor | [implementation] |
- (void) setBounds: | (CGRect) | bounds | [implementation] |
- (void) setBoundsOrigin: | (CGPoint) | aPoint | [implementation] |
- (void) setBoundsSize: | (CGSize) | aSize | [implementation] |
- (void) setFrame: | (CGRect) | aFrame | [implementation] |
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).
aFrame | the rectangle specifying the new origin and size of the receiver |
- (void) setFrameOrigin: | (CGPoint) | aPoint | [implementation] |
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).
aPoint | the new origin point |
- (void) setFrameSize: | (CGSize) | aSize | [implementation] |
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.
aSize | the new size for the frame |
- (void) setHidden: | (BOOL) | aFlag | [implementation] |
- (void) setHitTests: | (BOOL) | shouldHitTest | [implementation] |
- (void) setLayer: | (CALayer) | aLayer | [implementation] |
- (void) setNeedsDisplay: | (BOOL) | aFlag | [implementation] |
- (void) setNeedsDisplayInRect: | (CPRect) | aRect | [implementation] |
- (void) setPostsBoundsChangedNotifications: | (BOOL) | shouldPostBoundsChangedNotifications | [implementation] |
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:
shouldPostBoundsChangedNotifications | YES makes the receiver post notifications on bounds changes |
- (void) setPostsFrameChangedNotifications: | (BOOL) | shouldPostFrameChangedNotifications | [implementation] |
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:
shouldPostFrameChangedNotifications | YES makes the receiver post notifications on frame changes (size or origin) |
- (void) setWantsLayer: | (BOOL) | aFlag | [implementation] |
- (CPArray) subviews | [implementation] |
- (CPView) superview | [implementation] |
- (void) unlockFocus | [implementation] |
- (void) unregisterDraggedTypes | [implementation] |
- (void) viewDidMoveToSuperview | [implementation] |
- (void) viewDidMoveToWindow | [implementation] |
- (void) viewWillMoveToSuperview: | (CPView) | aView | [implementation] |
- (void) viewWillMoveToWindow: | (CPWindow) | aWindow | [implementation] |
- (CGRect) visibleRect | [implementation] |
- (BOOL) wantsLayer | [implementation] |
- (void) willRemoveSubview: | (CPView) | aView | [implementation] |
- (CPWindow) window | [implementation] |