API  0.9.8
 All Classes Files Functions Variables Typedefs Macros Groups 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
 
(BOOL) - becomeFirstResponder
 
(CGRect) - bounds
 
(CGPoint) - boundsOrigin
 
(CGSize) - boundsSize
 
(BOOL) - canBecomeKeyView
 
(CGPoint) - center
 
(BOOL) - clipsToBounds
 
(CGPoint) - convertPoint:fromView:
 
(CGPoint) - convertPoint:toView:
 
(CGPoint) - convertPointFromBase:
 
(CGPoint) - convertPointToBase:
 
(CGRect) - convertRect:fromView:
 
(CGRect) - convertRect:toView:
 
(CGRect) - convertRectFromBase:
 
(CGRect) - convertRectToBase:
 
(CGSize) - convertSize:fromView:
 
(CGSize) - convertSize:toView:
 
(CPView- createEphemeralSubviewNamed:
 
(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
 
(CPString- identifier
 
(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) - needsLayout
 
(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:
 
(BOOL) - resignFirstResponder
 
(void) - resizeSubviewsWithOldSize:
 
(void) - resizeWithOldSuperviewSize:
 
(void) - rightMouseDown:
 
(CGSize) - scaleSize
 
(void) - scaleUnitSquareToSize:
 
(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) - setIdentifier:
 
(void) - setLayer:
 
(void) - setNeedsDisplay:
 
(void) - setNeedsDisplayInRect:
 
(void) - setNeedsLayout
 
(void) - setNeedsLayout:
 
(void) - setNextKeyView:
 
(void) - setPostsBoundsChangedNotifications:
 
(void) - setPostsFrameChangedNotifications:
 
(void) - setScaleSize:
 
(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
 
(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:
 
(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:
 
(void) - performSelector:withObject:afterDelay:
 
(void) - performSelector:withObject:afterDelay:inModes:
 
(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
 
(BOOL) + isHighDPIDrawingEnabled
 
(CPSet) + keyPathsForValuesAffectingBounds
 
(CPSet) + keyPathsForValuesAffectingFrame
 
(void) + setHighDPIDrawingEnabled:
 
(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
implementation

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

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

Reimplemented in CPTextField, and CPControl.

Definition at line 1697 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 490 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 501 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 2746 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 1637 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 1419 of file CPView.j.

- (unsigned) autoresizingMask
implementation

Returns the bit mask options for resizing behavior

Definition at line 1436 of file CPView.j.

- (BOOL) autoscroll: (CPEvent anEvent
implementation

Reimplemented in CPClipView.

Definition at line 2735 of file CPView.j.

- (CPColor) backgroundColor
implementation

Returns the background color of the receiver

Reimplemented in CPTabView.

Definition at line 2086 of file CPView.j.

- (BOOL) becomeFirstResponder
implementation

Notifies the receiver that it will become the first responder. The receiver can reject first responder if it returns NO. The default implementation always returns YES.

Returns
YES if the receiver accepts first responder status.

Reimplemented from CPResponder.

Reimplemented in CPTextField, CPTokenField, and CPDatePicker.

Provided by category CPView(Theming).

Definition at line 3093 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 1249 of file CPView.j.

- (CGPoint) boundsOrigin
implementation

Definition at line 1254 of file CPView.j.

- (CGSize) boundsSize
implementation

Definition at line 1259 of file CPView.j.

- (BOOL) canBecomeKeyView
implementation

Provided by category CPView(KeyView).

Definition at line 2860 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 1013 of file CPView.j.

- (BOOL) clipsToBounds
implementation

Definition at line 1601 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 2098 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 2122 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 2111 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 2136 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 2175 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 2199 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 2188 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 2212 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 2147 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 2161 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 3350 of file CPView.j.

+ (CPMenu) defaultMenu
implementation

Definition at line 305 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 628 of file CPView.j.

- (void) display
implementation

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

Definition at line 2492 of file CPView.j.

- (void) displayIfNeeded
implementation

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

Definition at line 2483 of file CPView.j.

- (void) displayIfNeededInRect: (CGRect)  aRect
implementation

Definition at line 2497 of file CPView.j.

- (void) displayRect: (CGRect)  aRect
implementation

Draws the receiver into the area defined by aRect.

Parameters
aRectthe area to be drawn

Definition at line 2507 of file CPView.j.

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

Definition at line 2516 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 2289 of file CPView.j.

- (void) dragView: (CPView aView
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
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 2304 of file CPView.j.

- (void) drawRect: (CGRect)  aRect
implementation

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

Parameters
aRectthe area that should be drawn into

Reimplemented in CPDisclosureButton, CPScrollView, CPSplitView, and CPBox.

Definition at line 2354 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 894 of file CPView.j.

- (CPScrollView) enclosingScrollView
implementation

Returns the CPScrollView containing the receiver.

Returns
the CPScrollView containing the receiver.

Definition at line 2763 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, CPTableHeaderView, CPClipView, CPOutlineView, CPTextField, CPScrollView, CPCollectionView, CPWebView, CPControl, CPSplitView, CPButton, CPBrowser, CPScroller, CPComboBox, CPTabView, CPDatePicker, CPProgressIndicator, CPBox, CPImageView, CPLevelIndicator, CPSearchField, CPSegmentedControl, CPSlider, CPColorWell, CPStepper, and CPButtonBar.

Provided by category CPView(CPCoding).

Definition at line 3611 of file CPView.j.

- (BOOL) enterFullScreenMode
implementation

Puts the receiver into full screen mode.

Definition at line 1446 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 1456 of file CPView.j.

- (CPView) ephemeralSubviewNamed: (CPString aViewName
implementation

Provided by category CPView(Theming).

Definition at line 3455 of file CPView.j.

- (void) exitFullScreenMode
implementation

The receiver should exit full screen mode.

Definition at line 1485 of file CPView.j.

- (void) exitFullScreenModeWithOptions: (CPDictionary options
implementation

The receiver should exit full screen mode.

Parameters
optionsconfigurations options

Definition at line 1494 of file CPView.j.

- (CGRect) frame
implementation

Returns the receiver's frame.

Returns
a copy of the receiver's frame

Definition at line 982 of file CPView.j.

- (CGPoint) frameOrigin
implementation

Definition at line 987 of file CPView.j.

- (CGSize) frameSize
implementation

Definition at line 992 of file CPView.j.

- (BOOL) hasThemeAttribute: (CPString aName
implementation

Provided by category CPView(Theming).

Definition at line 3358 of file CPView.j.

- (BOOL) hasThemeState: (ThemeState aState
implementation

Provided by category CPView(Theming).

Definition at line 3052 of file CPView.j.

- (CPView) hitTest: (CGPoint)  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 CPTableView, CPSplitView, CPLevelIndicator, and CPSearchField.

Definition at line 1725 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 1706 of file CPView.j.

- (CPString) identifier
implementation

Synthesized accessor method.

Provided by category CPView(CPSynthesizedAccessors).

Definition at line 3829 of file CPView.j.

- (id) init
implementation

Initializes the receiver

Returns
the initialized receiver

Reimplemented from CPObject.

Definition at line 310 of file CPView.j.

+ (void) initialize
implementation

Reimplemented from CPObject.

Reimplemented in CPScrollView, CPControl, and CPImageView.

Definition at line 229 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, CPTableHeaderView, CPClipView, CPOutlineView, CPTextField, CPScrollView, CPCollectionView, CPWebView, CPControl, CPSplitView, CPButton, CPBrowser, CPScroller, CPComboBox, CPTabView, CPDatePicker, CPProgressIndicator, CPBox, CPImageView, CPLevelIndicator, CPSearchField, CPSegmentedControl, CPSlider, CPColorWell, CPStepper, CPButtonBar, and CPPopUpButton.

Provided by category CPView(CPCoding).

Definition at line 3494 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 2796 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 804 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 947 of file CPView.j.

- (BOOL) isHidden
implementation

Returns YES if the receiver is hidden.

Definition at line 1584 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 1646 of file CPView.j.

+ (BOOL) isHighDPIDrawingEnabled
implementation

Returns whether high DPI drawing is enabled.

Returns
BOOL - YES if high DPI drawing is activated, otherwise NO.

Definition at line 269 of file CPView.j.

- (BOOL) isInFullScreenMode
implementation

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

Definition at line 1511 of file CPView.j.

- (BOOL) isOpaque
implementation

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

Reimplemented in CPSearchField.

Definition at line 2637 of file CPView.j.

+ (CPSet) keyPathsForValuesAffectingBounds
implementation

Definition at line 300 of file CPView.j.

+ (CPSet) keyPathsForValuesAffectingFrame
implementation

Definition at line 295 of file CPView.j.

- (CALayer) layer
implementation

Returns the core animation layer used by the receiver.

Provided by category CPView(CoreAnimationAdditions).

Definition at line 2985 of file CPView.j.

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

Provided by category CPView(Theming).

Definition at line 3417 of file CPView.j.

- (void) layoutIfNeeded
implementation

Definition at line 2620 of file CPView.j.

- (void) lockFocus
implementation

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

Definition at line 2538 of file CPView.j.

- (CPMenu) menuForEvent: (CPEvent anEvent
implementation

Reimplemented in CPTableView, and CPCollectionView.

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

Definition at line 1788 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 1783 of file CPView.j.

- (BOOL) needsDisplay
implementation

Definition at line 2475 of file CPView.j.

- (BOOL) needsLayout
implementation

Definition at line 2615 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 CPTableView, and CPTextField.

Definition at line 1774 of file CPView.j.

- (CPView) nextKeyView
implementation

Provided by category CPView(KeyView).

Definition at line 2865 of file CPView.j.

- (CPView) nextValidKeyView
implementation

Provided by category CPView(KeyView).

Definition at line 2870 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, CPTokenField, and CPComboBox.

Provided by category CPView(KeyView).

Definition at line 2848 of file CPView.j.

- (BOOL) postsBoundsChangedNotifications
implementation

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

Definition at line 2274 of file CPView.j.

- (BOOL) postsFrameChangedNotifications
implementation

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

Definition at line 2242 of file CPView.j.

- (CPView) previousKeyView
implementation

Provided by category CPView(KeyView).

Definition at line 2891 of file CPView.j.

- (CPView) previousValidKeyView
implementation

Provided by category CPView(KeyView).

Definition at line 2896 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 2789 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 2331 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 2313 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 3371 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 3397 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 636 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 680 of file CPView.j.

- (BOOL) resignFirstResponder
implementation

Notifies the receiver that it has been asked to give up first responder status.

Returns
YES if the receiver is willing to give up first responder status.

Reimplemented from CPResponder.

Reimplemented in CPTextField, CPTokenField, CPComboBox, CPDatePicker, and CPSearchField.

Provided by category CPView(Theming).

Definition at line 3110 of file CPView.j.

- (void) resizeSubviewsWithOldSize: (CGSize)  aSize
implementation

Initiates -superviewSizeChanged: messages to subviews.

Parameters
aSizethe size for the subviews

Reimplemented in CPClipView, CPScrollView, CPCollectionView, and CPSplitView.

Definition at line 1395 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, and CPCollectionView.

Definition at line 1356 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 1794 of file CPView.j.

- (CGSize) scaleSize
implementation

Return the scaleSize of the view, this scaleSize is used to scale in css

Provided by category CPView(Scaling).

Definition at line 3037 of file CPView.j.

- (void) scaleUnitSquareToSize: (CGSize)  aSize
implementation

Scales the receiver’s coordinate system so that the unit square scales to the specified dimensions. The bounds of the receiver will change, for instance if the given size is (0.5, 0.5) the width and height of the bounds will be multiply by 2. You must call setNeedsDisplay: to redraw the view.

Parameters
aSize,thesize corresponding the new unit scales

Definition at line 2367 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 2779 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 2670 of file CPView.j.

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

Should be overridden by subclasses.

Definition at line 2754 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
YES if any scrolling occurred, NO otherwise.

Definition at line 2685 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 1611 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 1410 of file CPView.j.

- (void) setAutoresizingMask: (unsigned)  aMask
implementation

Determines automatic resizing behavior.

Parameters
aMaska bit mask with options

Reimplemented in CPCollectionView.

Definition at line 1428 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, CPTabView, and CPDatePicker.

Definition at line 1815 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 1226 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 1270 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 1316 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 1004 of file CPView.j.

- (void) setClipsToBounds: (BOOL)  shouldClip
implementation

Definition at line 1589 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 959 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 1025 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, CPWebView, CPSplitView, CPScroller, CPAccordionView, CPProgressIndicator, CPSlider, and CPButtonBar.

Definition at line 1054 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 1520 of file CPView.j.

+ (void) setHighDPIDrawingEnabled: (BOOL)  isEnabled
implementation

Controls whether high DPI drawing is activated or not. Defaults to YES.

Parameters
isEnabledYES to enable high DPI drawing

Definition at line 260 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 1715 of file CPView.j.

- (void) setIdentifier: (CPString aValue
implementation

Synthesized accessor method.

Provided by category CPView(CPSynthesizedAccessors).

Definition at line 3837 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 2953 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 2446 of file CPView.j.

- (void) setNeedsDisplayInRect: (CGRect)  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 2459 of file CPView.j.

- (void) setNeedsLayout
implementation

Reimplemented in CPTableView.

Definition at line 2597 of file CPView.j.

- (void) setNeedsLayout: (BOOL)  needLayout
implementation

Definition at line 2602 of file CPView.j.

- (void) setNextKeyView: (CPView next
implementation

Provided by category CPView(KeyView).

Definition at line 2929 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 \c 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 2259 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 \c 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 2229 of file CPView.j.

- (void) setScaleSize: (CGSize)  aSize
implementation

Set the zoom of the view. This will call scaleUnitSquareToSize: and setNeedsDisplay: This method doesn't care about the last zoom you set in the view

Parameters
aSize,thesize corresponding the new unit scales

Provided by category CPView(Scaling).

Definition at line 3018 of file CPView.j.

- (void) setSubviews: (CPArray)  newSubviews
implementation

Definition at line 692 of file CPView.j.

- (void) setTag: (CPInteger)  aTag
implementation

Definition at line 914 of file CPView.j.

- (void) setTheme: (CPTheme aTheme
implementation

Provided by category CPView(Theming).

Definition at line 3243 of file CPView.j.

- (void) setThemeClass: (CPString theClass
implementation

Provided by category CPView(Theming).

Definition at line 3160 of file CPView.j.

- (BOOL) setThemeState: (ThemeState aState
implementation

Reimplemented in CPTableCellView.

Provided by category CPView(Theming).

Definition at line 3060 of file CPView.j.

- (void) setToolTip: (CPString aToolTip
implementation

Sets the tooltip for the receiver.

Parameters
aToolTipthe tooltip

Definition at line 377 of file CPView.j.

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

Provided by category CPView(Theming).

Definition at line 3315 of file CPView.j.

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

Provided by category CPView(Theming).

Definition at line 3296 of file CPView.j.

- (void) setWantsLayer: (BOOL)  aFlag
implementation

Sets whether the receiver wants a core animation layer.

Parameters
\cYES means the receiver wants a layer.

Provided by category CPView(CoreAnimationAdditions).

Definition at line 2994 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 473 of file CPView.j.

- (CPView) superview
implementation

Returns the container view of the receiver

Returns
the receiver's containing view

Definition at line 464 of file CPView.j.

- (CPInteger) tag
implementation

Definition at line 919 of file CPView.j.

- (CPTheme) theme
implementation

Provided by category CPView(Theming).

Definition at line 3259 of file CPView.j.

- (CPString) themeClass
implementation

Provided by category CPView(Theming).

Definition at line 3152 of file CPView.j.

- (unsigned) themeState
implementation

Provided by category CPView(Theming).

Definition at line 3047 of file CPView.j.

- (CPString) toolTip
implementation

Synthesized accessor method.

Provided by category CPView(CPSynthesizedAccessors).

Definition at line 3845 of file CPView.j.

- (void) unlockFocus
implementation

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

Definition at line 2590 of file CPView.j.

- (void) unregisterDraggedTypes
implementation

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

Definition at line 2342 of file CPView.j.

- (BOOL) unsetThemeState: (ThemeState aState
implementation

Reimplemented in CPTableCellView.

Provided by category CPView(Theming).

Definition at line 3076 of file CPView.j.

- (id) valueForThemeAttribute: (CPString aName
implementation

Provided by category CPView(Theming).

Definition at line 3342 of file CPView.j.

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

Provided by category CPView(Theming).

Definition at line 3331 of file CPView.j.

- (void) viewDidChangeTheme
implementation

Provided by category CPView(Theming).

Definition at line 3264 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 2825 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.

Reimplemented in CPTextField.

Definition at line 1673 of file CPView.j.

- (void) viewDidMoveToSuperview
implementation

Called when the receiver's superview has changed.

Definition at line 820 of file CPView.j.

- (void) viewDidMoveToWindow
implementation

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

Reimplemented in CPTableHeaderView, and CPSplitView.

Definition at line 830 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 CPTextField, and CPWebView.

Definition at line 1687 of file CPView.j.

- (void) viewWillDraw
implementation

Reimplemented in CPSplitView.

Definition at line 2531 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.

Definition at line 838 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 CPTableView, and CPButton.

Definition at line 852 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 2810 of file CPView.j.

- (CPView) viewWithTag: (CPInteger)  aTag
implementation

Definition at line 924 of file CPView.j.

- (CGRect) visibleRect
implementation

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

Definition at line 2645 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 3003 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 860 of file CPView.j.

- (CPWindow) window
implementation

Returns the window containing this receiver

Definition at line 481 of file CPView.j.


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