API  0.9.6
 All Classes Files Functions Variables Macros Modules Pages
CPView Class Reference

#import <CPView.h>

+ Inheritance diagram for CPView:

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) - inLiveResize
 
(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) - registerThemeValues:
 
(void) - registerThemeValues:inherit:
 
(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) - setToolTip:
 
(void) - setValue:forThemeAttribute:
 
(void) - setValue:forThemeAttribute:inState:
 
(void) - setWantsLayer:
 
(CPArray- subviews
 
(CPView- superview
 
(CPInteger) - tag
 
(CPTheme- theme
 
(CPString- themeClass
 
(unsigned) - themeState
 
(CPString- toolTip
 
(void) - unlockFocus
 
(void) - unregisterDraggedTypes
 
(BOOL) - unsetThemeState:
 
(id) - valueForThemeAttribute:
 
(id) - valueForThemeAttribute:inState:
 
(void) - viewDidChangeTheme
 
(void) - viewDidEndLiveResize
 
(void) - viewDidHide
 
(void) - viewDidMoveToSuperview
 
(void) - viewDidMoveToWindow
 
(void) - viewDidUnhide
 
(void) - viewWillDraw
 
(void) - viewWillMoveToSuperview:
 
(void) - viewWillMoveToWindow:
 
(void) - viewWillStartLiveResize
 
(CPView- viewWithTag:
 
(CGRect) - visibleRect
 
(BOOL) - wantsLayer
 
(void) - willRemoveSubview:
 
(CPWindow- window
 
- Instance Methods inherited from CPResponder
(BOOL) - acceptsFirstResponder
 
(BOOL) - becomeFirstResponder
 
(void) - doCommandBySelector:
 
(void) - flagsChanged:
 
(void) - insertBackTab:
 
(void) - insertLineBreak:
 
(void) - insertNewline:
 
(void) - insertTab:
 
(void) - insertText:
 
(void) - interpretKeyEvents:
 
(void) - keyDown:
 
(void) - keyUp:
 
(CPMenu- menu
 
(void) - mouseDragged:
 
(void) - mouseEntered:
 
(void) - mouseExited:
 
(void) - mouseMoved:
 
(void) - mouseUp:
 
(CPResponder- nextResponder
 
(void) - noResponderFor:
 
(BOOL) - resignFirstResponder
 
(void) - rightMouseUp:
 
(void) - scrollWheel:
 
(void) - setMenu:
 
(void) - setNextResponder:
 
(BOOL) - tryToPerform:with:
 
(CPUndoManager- undoManager
 
- Instance Methods inherited from CPObject
(void) - addObserver:forKeyPath:options:context:
 
(void) - applyChange:toKeyPath:
 
(id) - autorelease
 
(id) - awakeAfterUsingCoder:
 
(void) - awakeFromCib
 
(void) - bind:toObject:withKeyPath:options:
 
(Class) - classForCoder
 
(Class) - classForKeyedArchiver
 
(CPString- className
 
(id) - copy
 
(void) - dealloc
 
(CPString- description
 
(CPDictionary- dictionaryWithValuesForKeys:
 
(void) - didChange:valuesAtIndexes:forKey:
 
(void) - didChangeValueForKey:
 
(void) - didChangeValueForKey:withSetMutation:usingObjects:
 
(void) - doesNotRecognizeSelector:
 
(CPArray- exposedBindings
 
(id) - forwardingTargetForSelector:
 
(void) - forwardInvocation:
 
(unsigned) - hash
 
(BOOL) - implementsSelector:
 
(CPDictionary- infoForBinding:
 
(BOOL) - isEqual:
 
(BOOL) - isKindOfClass:
 
(BOOL) - isMemberOfClass:
 
(BOOL) - isProxy
 
(IMP) - methodForSelector:
 
(CPMethodSignature) - methodSignatureForSelector:
 
(id) - mutableArrayValueForKey:
 
(id) - mutableArrayValueForKeyPath:
 
(id) - mutableCopy
 
(id) - mutableSetValueForKey:
 
(id) - mutableSetValueForKeyPath:
 
(id) - performSelector:
 
(id) - performSelector:withObject:
 
(id) - performSelector:withObject:withObject:
 
(id) - performSelector:withObjects:
 
(void) - release
 
(void) - removeObserver:forKeyPath:
 
(id) - replacementObjectForArchiver:
 
(id) - replacementObjectForCoder:
 
(id) - replacementObjectForKeyedArchiver:
 
(BOOL) - respondsToSelector:
 
(id) - retain
 
(id) - self
 
(void) - setValue:forKey:
 
(void) - setValue:forKeyPath:
 
(void) - setValue:forUndefinedKey:
 
(void) - setValuesForKeysWithDictionary:
 
(CPString- UID
 
(void) - unbind:
 
(Class) - valueClassForBinding:
 
(id) - valueForKey:
 
(id) - valueForKeyPath:
 
(id) - valueForUndefinedKey:
 
(void) - willChange:valuesAtIndexes:forKey:
 
(void) - willChangeValueForKey:
 
(void) - willChangeValueForKey:withSetMutation:usingObjects:
 

Class Methods

(CPMenu+ defaultMenu
 
(CPString+ defaultThemeClass
 
(void) + initialize
 
(CPSet+ keyPathsForValuesAffectingBounds
 
(CPSet+ keyPathsForValuesAffectingFrame
 
(CPDictionary+ themeAttributes
 
- Class Methods inherited from CPObject
(BOOL) + accessInstanceVariablesDirectly
 
(id) + alloc
 
(id) + allocWithCoder:
 
(BOOL) + automaticallyNotifiesObserversForKey:
 
(Class) + class
 
(void) + exposeBinding:
 
(IMP) + instanceMethodForSelector:
 
(BOOL) + instancesRespondToSelector:
 
(BOOL) + isSubclassOfClass:
 
(CPSet+ keyPathsForValuesAffectingValueForKey:
 
(void) + load
 
(id) + new
 
(void) + setVersion:
 
(Class) + superclass
 
(int) + version
 

Additional Inherited Members

- Instance Variables inherited from CPObject
Class isa
 

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
implementation

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 1481 of file CPView.j.

- (void) addSubview: (CPView aSubview
implementation

Makes the argument a subview of the receiver.

Parameters
aSubviewthe CPView to make a subview

Definition at line 421 of file CPView.j.

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

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 432 of file CPView.j.

- (CGRect) adjustScroll: (CGRect)  proposedVisibleRect
implementation

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 2351 of file CPView.j.

- (float) alphaValue
implementation

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 1420 of file CPView.j.

- (BOOL) autoresizesSubviews
implementation

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 1206 of file CPView.j.

- (unsigned) autoresizingMask
implementation

Returns the bit mask options for resizing behavior

Definition at line 1223 of file CPView.j.

- (BOOL) autoscroll: (CPEvent anEvent
implementation

Reimplemented in CPClipView.

Definition at line 2340 of file CPView.j.

- (CPColor) backgroundColor
implementation

Returns the background color of the receiver

Reimplemented in CPTabView.

Definition at line 1825 of file CPView.j.

- (CGRect) bounds
implementation

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

Definition at line 1050 of file CPView.j.

- (CGPoint) boundsOrigin
implementation

Definition at line 1055 of file CPView.j.

- (CGSize) boundsSize
implementation

Definition at line 1060 of file CPView.j.

- (BOOL) canBecomeKeyView
implementation

Provided by category CPView(KeyView).

Definition at line 2465 of file CPView.j.

- (CGPoint) center
implementation

Returns the center of the receiver's frame in the superview's coordinate system.

Returns
CGPoint the center point of the receiver's frame

Definition at line 850 of file CPView.j.

- (BOOL) clipsToBounds
implementation

Definition at line 1384 of file CPView.j.

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

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 1837 of file CPView.j.

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

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 1858 of file CPView.j.

- (CGPoint) convertPointFromBase: (CGPoint)  aPoint
implementation

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 1847 of file CPView.j.

- (CGPoint) convertPointToBase: (CGPoint)  aPoint
implementation

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 1868 of file CPView.j.

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

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 1901 of file CPView.j.

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

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 1922 of file CPView.j.

- (CGRect) convertRectFromBase: (CGRect)  aRect
implementation

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 1911 of file CPView.j.

- (CGRect) convertRectToBase: (CGRect)  aRect
implementation

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 1932 of file CPView.j.

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

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 1879 of file CPView.j.

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

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 1890 of file CPView.j.

- (CPView) createEphemeralSubviewNamed: (CPString aViewName
implementation
- (id) currentValueForThemeAttribute: (CPString aName
implementation

Reimplemented in CPScroller.

Provided by category CPView(Theming).

Definition at line 2837 of file CPView.j.

+ (CPMenu) defaultMenu
implementation

Definition at line 250 of file CPView.j.

- (void) didAddSubview: (CPView aSubview
implementation

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

Parameters
aSubviewthe view that was added

Reimplemented in CPSplitView.

Definition at line 524 of file CPView.j.

- (void) display
implementation

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

Definition at line 2133 of file CPView.j.

- (void) displayIfNeeded
implementation

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

Definition at line 2124 of file CPView.j.

- (void) displayIfNeededInRect: (CGRect)  aRect
implementation

Definition at line 2138 of file CPView.j.

- (void) displayRect: (CPRect)  aRect
implementation

Draws the receiver into the area defined by aRect.

Parameters
aRectthe area to be drawn

Definition at line 2148 of file CPView.j.

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

Definition at line 2157 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 
implementation

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 2015 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 
implementation

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 2030 of file CPView.j.

- (void) drawRect: (CPRect)  aRect
implementation

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

Parameters
aRectthe area that should be drawn into

Reimplemented in CPScrollView, and CPBox.

Definition at line 2080 of file CPView.j.

- (CPMenuItem) enclosingMenuItem
implementation

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 734 of file CPView.j.

- (CPScrollView) enclosingScrollView
implementation

Returns the CPScrollView containing the receiver.

Returns
the CPScrollView containing the receiver.

Definition at line 2368 of file CPView.j.

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

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

Provided by category CPView(CPCoding).

Definition at line 3077 of file CPView.j.

- (BOOL) enterFullScreenMode
implementation

Puts the receiver into full screen mode.

Definition at line 1233 of file CPView.j.

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

Puts the receiver into full screen mode.

Parameters
aScreenthe that should be used
optionsconfiguration options

Definition at line 1243 of file CPView.j.

- (CPView) ephemeralSubviewNamed: (CPString aViewName
implementation

Provided by category CPView(Theming).

Definition at line 2942 of file CPView.j.

- (void) exitFullScreenMode
implementation

The receiver should exit full screen mode.

Definition at line 1272 of file CPView.j.

- (void) exitFullScreenModeWithOptions: (CPDictionary options
implementation

The receiver should exit full screen mode.

Parameters
optionsconfigurations options

Definition at line 1281 of file CPView.j.

- (CGRect) frame
implementation

Returns the receiver's frame.

Returns
a copy of the receiver's frame

Definition at line 819 of file CPView.j.

- (CGPoint) frameOrigin
implementation

Definition at line 824 of file CPView.j.

- (CGSize) frameSize
implementation

Definition at line 829 of file CPView.j.

- (BOOL) hasThemeAttribute: (CPString aName
implementation

Provided by category CPView(Theming).

Definition at line 2845 of file CPView.j.

- (BOOL) hasThemeState: (CPThemeState aState
implementation

Provided by category CPView(Theming).

Definition at line 2605 of file CPView.j.

- (CPView) hitTest: (CPPoint)  aPoint
implementation

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 1509 of file CPView.j.

- (BOOL) hitTests
implementation

Returns whether or not the view responds to hit tests.

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

Definition at line 1490 of file CPView.j.

- (id) init
implementation

Initializes the receiver

Returns
the initialized receiver

Reimplemented from CPObject.

Definition at line 255 of file CPView.j.

+ (void) initialize
implementation

Reimplemented from CPObject.

Reimplemented in CPScrollView, CPControl, CPSplitView, CPProgressIndicator, CPSearchField, CPLevelIndicator, CPImageView, and CPShadowView.

Definition at line 193 of file CPView.j.

- (id) initWithCoder: (CPCoder aCoder
implementation

Initializes the view from an archive.

Parameters
aCoderthe coder from which to initialize
Returns
the initialized view

Reimplemented from CPResponder.

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

Provided by category CPView(CPCoding).

Definition at line 2977 of file CPView.j.

- (id) initWithFrame: (CGRect)  aFrame
implementation
- (BOOL) inLiveResize
implementation

Return yes if the receiver is in a live-resize operation.

Definition at line 2401 of file CPView.j.

- (BOOL) isDescendantOf: (CPView aView
implementation

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

Parameters
aViewthe view to test for ancestry

Definition at line 677 of file CPView.j.

- (BOOL) isFlipped
implementation

Returns whether the view is flipped.

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

Definition at line 787 of file CPView.j.

- (BOOL) isHidden
implementation

Returns YES if the receiver is hidden.

Definition at line 1367 of file CPView.j.

- (BOOL) isHiddenOrHasHiddenAncestor
implementation

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

Definition at line 1429 of file CPView.j.

- (BOOL) isInFullScreenMode
implementation

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

Definition at line 1298 of file CPView.j.

- (BOOL) isOpaque
implementation

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

Reimplemented in CPSearchField.

Definition at line 2254 of file CPView.j.

+ (CPSet) keyPathsForValuesAffectingBounds
implementation

Definition at line 245 of file CPView.j.

+ (CPSet) keyPathsForValuesAffectingFrame
implementation

Definition at line 240 of file CPView.j.

- (CALayer) layer
implementation

Returns the core animation layer used by the receiver.

Provided by category CPView(CoreAnimationAdditions).

Definition at line 2572 of file CPView.j.

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

Provided by category CPView(Theming).

Definition at line 2904 of file CPView.j.

- (void) layoutIfNeeded
implementation

Definition at line 2237 of file CPView.j.

- (void) lockFocus
implementation

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

Definition at line 2179 of file CPView.j.

- (CPMenu) menuForEvent: (CPEvent anEvent
implementation

Reimplemented in CPTableView, and CPCollectionView.

Definition at line 1562 of file CPView.j.

- (void) mouseDown: (CPEvent anEvent
implementation

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 CPTableHeaderView, CPTextField, CPButton, CPControl, CPSplitView, CPCollectionView, CPScroller, CPTokenField, CPSearchField, CPLevelIndicator, CPTabView, CPImageView, CPSegmentedControl, CPPopUpButton, and CPFlashView.

Definition at line 1545 of file CPView.j.

- (BOOL) mouseDownCanMoveWindow
implementation

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 1540 of file CPView.j.

- (BOOL) needsDisplay
implementation

Definition at line 2116 of file CPView.j.

- (BOOL) needsPanelToBecomeKey
implementation

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 1531 of file CPView.j.

- (CPView) nextKeyView
implementation

Provided by category CPView(KeyView).

Definition at line 2470 of file CPView.j.

- (CPView) nextValidKeyView
implementation

Provided by category CPView(KeyView).

Definition at line 2475 of file CPView.j.

- (BOOL) performKeyEquivalent: (CPEvent anEvent
implementation

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, and CPComboBox.

Provided by category CPView(KeyView).

Definition at line 2453 of file CPView.j.

- (BOOL) postsBoundsChangedNotifications
implementation

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

Definition at line 2000 of file CPView.j.

- (BOOL) postsFrameChangedNotifications
implementation

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

Definition at line 1965 of file CPView.j.

- (CPView) previousKeyView
implementation

Provided by category CPView(KeyView).

Definition at line 2492 of file CPView.j.

- (CPView) previousValidKeyView
implementation

Provided by category CPView(KeyView).

Definition at line 2497 of file CPView.j.

- (CGRect) rectForEphemeralSubviewNamed: (CPString aViewName
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.

Parameters
aClipViewthe clip view of the superview being notified

Reimplemented in CPScrollView.

Definition at line 2394 of file CPView.j.

- (CPArray) registeredDraggedTypes
implementation

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

Returns
an array of CPPasteBoards

Definition at line 2057 of file CPView.j.

- (void) registerForDraggedTypes: (CPArray pasteboardTypes
implementation

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

Parameters
pasteboardTypesan array of CPPasteboards

Reimplemented in CPBrowser.

Definition at line 2039 of file CPView.j.

- (void) registerThemeValues: (CPArray themeValues
implementation

Registers theme values encoded in an array at runtime. The format of the data in the array is the same as that used by ThemeDescriptors.j, with the exception that you need to use CPColorWithImages() in place of PatternColor(). For more information see the comments at the top of ThemeDescriptors.j.

Parameters
themeValuesarray of theme values

Provided by category CPView(Theming).

Definition at line 2858 of file CPView.j.

- (void) registerThemeValues: (CPArray themeValues
inherit: (CPArray inheritedValues 
implementation

Registers theme values encoded in an array at runtime. The format of the data in the array is the same as that used by ThemeDescriptors.j, with the exception that you need to use CPColorWithImages() in place of PatternColor(). The values in inheritedValues are registered first, then those in themeValues override/augment the inherited values. For more information see the comments at the top of ThemeDescriptors.j.

Parameters
themeValuesarray of base theme values
inheritedValuesarray of overridden/additional theme values

Provided by category CPView(Theming).

Definition at line 2884 of file CPView.j.

- (void) removeFromSuperview
implementation

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

Definition at line 532 of file CPView.j.

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

Replaces the specified child view with another view

Parameters
aSubviewthe view to replace
aViewthe replacement view

Definition at line 557 of file CPView.j.

- (void) resizeSubviewsWithOldSize: (CGSize)  aSize
implementation

Initiates -superviewSizeChanged: messages to subviews.

Parameters
aSizethe size for the subviews

Reimplemented in CPClipView, CPScrollView, and CPCollectionView.

Definition at line 1182 of file CPView.j.

- (void) resizeWithOldSuperviewSize: (CGSize)  aSize
implementation

Notifies subviews that the superview changed size.

Parameters
aSizethe size of the old superview

Reimplemented in CPTableView.

Definition at line 1151 of file CPView.j.

- (void) rightMouseDown: (CPEvent anEvent
implementation

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 1551 of file CPView.j.

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

Scrolls the clip view to a specified point

Parameters
theclip view to scroll
thepoint to scroll to

Definition at line 2384 of file CPView.j.

- (void) scrollPoint: (CGPoint)  aPoint
implementation

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

Parameters
aPointthe proposed frame origin

Definition at line 2287 of file CPView.j.

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

Should be overridden by subclasses.

Definition at line 2359 of file CPView.j.

- (BOOL) scrollRectToVisible: (CGRect)  aRect
implementation

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 2302 of file CPView.j.

- (void) setAlphaValue: (float)  anAlphaValue
implementation

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 1394 of file CPView.j.

- (void) setAutoresizesSubviews: (BOOL)  aFlag
implementation

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 1197 of file CPView.j.

- (void) setAutoresizingMask: (unsigned)  aMask
implementation

Determines automatic resizing behavior.

Parameters
aMaska bit mask with options

Definition at line 1215 of file CPView.j.

- (void) setBackgroundColor: (CPColor aColor
implementation

Sets the background color of the receiver.

Parameters
aColorthe new color for the receiver's background

Reimplemented in CPWebView, CPBrowser, and CPTabView.

Definition at line 1571 of file CPView.j.

- (void) setBounds: (CGRect)  bounds
implementation

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 1030 of file CPView.j.

- (void) setBoundsOrigin: (CGPoint)  aPoint
implementation

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 CPTableView, and CPClipView.

Definition at line 1071 of file CPView.j.

- (void) setBoundsSize: (CGSize)  aSize
implementation

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 1114 of file CPView.j.

- (void) setCenter: (CGPoint)  aPoint
implementation

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 841 of file CPView.j.

- (void) setClipsToBounds: (BOOL)  shouldClip
implementation

Definition at line 1372 of file CPView.j.

- (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 a 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 799 of file CPView.j.

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

Parameters
aPointthe new origin point

Reimplemented in CPTableView.

Definition at line 862 of file CPView.j.

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

Parameters
aSizethe new size for the frame

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

Definition at line 888 of file CPView.j.

- (void) setHidden: (BOOL)  aFlag
implementation

Sets whether the receiver should be hidden.

Parameters
aFlagYES makes the receiver hidden.

Definition at line 1307 of file CPView.j.

- (void) setHitTests: (BOOL)  shouldHitTest
implementation

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 1499 of file CPView.j.

- (void) setLayer: (CALayer aLayer
implementation

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

Provided by category CPView(CoreAnimationAdditions).

Definition at line 2540 of file CPView.j.

- (void) setNeedsDisplay: (BOOL)  aFlag
implementation

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

Reimplemented in CPTableView.

Definition at line 2090 of file CPView.j.

- (void) setNeedsDisplayInRect: (CPRect)  aRect
implementation

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 2100 of file CPView.j.

- (void) setNeedsLayout
implementation

Reimplemented in CPTableView.

Definition at line 2227 of file CPView.j.

- (void) setNextKeyView: (CPView next
implementation

Provided by category CPView(KeyView).

Definition at line 2522 of file CPView.j.

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

Definition at line 1982 of file CPView.j.

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

Definition at line 1949 of file CPView.j.

- (void) setSubviews: (CPArray newSubviews
implementation

Definition at line 569 of file CPView.j.

- (void) setTag: (CPInteger)  aTag
implementation

Definition at line 754 of file CPView.j.

- (void) setTheme: (CPTheme aTheme
implementation

Provided by category CPView(Theming).

Definition at line 2742 of file CPView.j.

- (void) setThemeClass: (CPString theClass
implementation

Provided by category CPView(Theming).

Definition at line 2659 of file CPView.j.

- (BOOL) setThemeState: (CPThemeState aState
implementation

Provided by category CPView(Theming).

Definition at line 2614 of file CPView.j.

- (void) setToolTip: (CPString aToolTip
implementation

Sets the tooltip for the receiver.

Parameters
aToolTipthe tooltip

Definition at line 321 of file CPView.j.

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

Provided by category CPView(Theming).

Definition at line 2805 of file CPView.j.

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

Provided by category CPView(Theming).

Definition at line 2789 of file CPView.j.

- (void) setWantsLayer: (BOOL)  aFlag
implementation

Sets whether the receiver wants a core animation layer.

Parameters
c YES means the receiver wants a layer.

Provided by category CPView(CoreAnimationAdditions).

Definition at line 2581 of file CPView.j.

- (CPArray) subviews
implementation

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

Returns
an array of CPViews

Definition at line 404 of file CPView.j.

- (CPView) superview
implementation

Returns the container view of the receiver

Returns
the receiver's containing view

Definition at line 395 of file CPView.j.

- (CPInteger) tag
implementation

Definition at line 759 of file CPView.j.

- (CPTheme) theme
implementation

Provided by category CPView(Theming).

Definition at line 2752 of file CPView.j.

+ (CPDictionary) themeAttributes
implementation
- (CPString) themeClass
implementation

Provided by category CPView(Theming).

Definition at line 2651 of file CPView.j.

- (unsigned) themeState
implementation

Provided by category CPView(Theming).

Definition at line 2600 of file CPView.j.

- (CPString) toolTip
implementation

Synthesized accessor method.

Provided by category CPView(CPSynthesizedAccessors).

Definition at line 3260 of file CPView.j.

- (void) unlockFocus
implementation

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

Definition at line 2220 of file CPView.j.

- (void) unregisterDraggedTypes
implementation

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

Definition at line 2068 of file CPView.j.

- (BOOL) unsetThemeState: (CPThemeState aState
implementation

Provided by category CPView(Theming).

Definition at line 2629 of file CPView.j.

- (id) valueForThemeAttribute: (CPString aName
implementation

Provided by category CPView(Theming).

Definition at line 2829 of file CPView.j.

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

Provided by category CPView(Theming).

Definition at line 2821 of file CPView.j.

- (void) viewDidChangeTheme
implementation

Provided by category CPView(Theming).

Definition at line 2757 of file CPView.j.

- (void) viewDidEndLiveResize
implementation

Not implemented.

A view will be sent this message after a window finishes a resize operation. The receiver which simplified its drawing operations in viewWillStartLiveResize might stop doing so now. Note the view might no longer be in a window, so use [self setNeedsDisplay:YES] if a final non-simplified redraw is required.

Subclasses should call super.

Definition at line 2430 of file CPView.j.

- (void) viewDidHide
implementation

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 1456 of file CPView.j.

- (void) viewDidMoveToSuperview
implementation

Called when the receiver's superview has changed.

Definition at line 693 of file CPView.j.

- (void) viewDidMoveToWindow
implementation

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

Reimplemented in CPSplitView.

Definition at line 702 of file CPView.j.

- (void) viewDidUnhide
implementation

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 1470 of file CPView.j.

- (void) viewWillDraw
implementation

Reimplemented in CPSplitView.

Definition at line 2172 of file CPView.j.

- (void) viewWillMoveToSuperview: (CPView aView
implementation

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 CPTableView, and CPSearchField.

Definition at line 710 of file CPView.j.

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

Definition at line 718 of file CPView.j.

- (void) viewWillStartLiveResize
implementation

Not implemented.

A view will be sent this message before a window begins a resize operation. The receiver might choose to simplify its drawing operations during a live resize for speed.

Subclasses should call super.

Definition at line 2415 of file CPView.j.

- (CPView) viewWithTag: (CPInteger)  aTag
implementation

Definition at line 764 of file CPView.j.

- (CGRect) visibleRect
implementation

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

Definition at line 2262 of file CPView.j.

- (BOOL) wantsLayer
implementation

Returns YES if the receiver uses a CALayer

Returns
YES if the receiver uses a CALayer

Provided by category CPView(CoreAnimationAdditions).

Definition at line 2590 of file CPView.j.

- (void) willRemoveSubview: (CPView aView
implementation

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

Parameters
aViewthe view that will be removed

Reimplemented in CPSplitView.

Definition at line 726 of file CPView.j.

- (CPWindow) window
implementation

Returns the window containing this receiver

Definition at line 412 of file CPView.j.


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