API  0.9.10
CPColorWell Class Reference

#import <CPColorWell.h>

+ Inheritance diagram for CPColorWell:

Instance Methods

(void) - activate:
 
(CGRect) - bezelRectForBounds:
 
(CPColor- color
 
(void) - colorPanelDidChangeColor:
 
(void) - colorPanelWillClose:
 
(void) - colorWellDidBecomeExclusive:
 
(CGRect) - contentBorderRectForBounds:
 
(CGRect) - contentRectForBounds:
 
(CPView- createEphemeralSubviewNamed:
 
(void) - deactivate
 
(void) - encodeWithCoder:
 
(id) - initWithCoder:
 
(id) - initWithFrame:
 
(BOOL) - isActive
 
(BOOL) - isBordered
 
(void) - layoutSubviews
 
(CGRect) - rectForEphemeralSubviewNamed:
 
(void) - setBordered:
 
(void) - setColor:
 
(void) - stopTracking:at:mouseIsUp:
 
(void) - takeColorFrom:
 
- Instance Methods inherited from CPControl
(BOOL) - acceptsFirstMouse:
 
(SEL) - action
 
(CPTextAlignment) - alignment
 
(CPWritingDirection) - baseWritingDirection
 
(BOOL) - continueTracking:at:
 
(CPControlSize) - controlSize
 
(double) - doubleValue
 
(float) - floatValue
 
(CPFont- font
 
(CPFormatter- formatter
 
(void) - highlight:
 
(CPCellImagePosition) - imagePosition
 
(CPUInteger) - imageScaling
 
(int) - integerValue
 
(int) - intValue
 
(BOOL) - isContinuous
 
(BOOL) - isEnabled
 
(BOOL) - isHighlighted
 
(CPLineBreakMode) - lineBreakMode
 
(void) - mouseDown:
 
(unsigned) - mouseDownFlags
 
(void) - mouseEntered:
 
(void) - mouseExited:
 
(CPInteger) - nextState
 
(id) - objectValue
 
(void) - performClick:
 
(BOOL) - sendAction:to:
 
(int) - sendActionOn:
 
(BOOL) - sendsActionOnEndEditing
 
(void) - setAction:
 
(void) - setAlignment:
 
(void) - setBaseWritingDirection:
 
(void) - setContinuous:
 
(void) - setControlSize:
 
(void) - setDoubleValue:
 
(void) - setEnabled:
 
(void) - setFloatValue:
 
(void) - setFont:
 
(void) - setFormatter:
 
(void) - setHighlighted:
 
(void) - setImagePosition:
 
(void) - setImageScaling:
 
(void) - setIntegerValue:
 
(void) - setIntValue:
 
(void) - setLineBreakMode:
 
(void) - setObjectValue:
 
(void) - setSendsActionOnEndEditing:
 
(void) - setState:
 
(void) - setStringValue:
 
(void) - setTarget:
 
(void) - setTextColor:
 
(void) - setTextShadowColor:
 
(void) - setTextShadowOffset:
 
(void) - setVerticalAlignment:
 
(BOOL) - startTrackingAt:
 
(CPString- stringValue
 
(void) - takeDoubleValueFrom:
 
(void) - takeFloatValueFrom:
 
(void) - takeIntegerValueFrom:
 
(void) - takeIntValueFrom:
 
(void) - takeObjectValueFrom:
 
(void) - takeStringValueFrom:
 
(id) - target
 
(CPColor- textColor
 
(void) - textDidBeginEditing:
 
(void) - textDidChange:
 
(void) - textDidEndEditing:
 
(CPColor- textShadowColor
 
(CGSize) - textShadowOffset
 
(void) - trackMouse:
 
(BOOL) - tracksMouseOutsideOfFrame
 
(void) - unhighlightButtonTimerDidFinish:
 
(void) - updateTrackingAreas
 
(CPTextVerticalAlignment) - verticalAlignment
 
- Instance Methods inherited from CPView
(void) - addSubview:
 
(void) - addSubview:positioned:relativeTo:
 
(void) - addTrackingArea:
 
(CGRect) - adjustScroll:
 
(float) - alphaValue
 
(CAAnimation- animationForKey:
 
(CPDictionary- animations
 
(id) - animator
 
(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:
 
(CPString- debug_description
 
(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:
 
(CPAppearance- effectiveAppearance
 
(CPMenuItem- enclosingMenuItem
 
(CPScrollView- enclosingScrollView
 
(BOOL) - enterFullScreenMode
 
(BOOL) - enterFullScreenMode:withOptions:
 
(CPView- ephemeralSubviewNamed:
 
(void) - exitFullScreenMode
 
(void) - exitFullScreenModeWithOptions:
 
(CGRect) - frame
 
(CGPoint) - frameOrigin
 
(CGRect) - frameRectOfView:inSuperviewSize:
 
(CGSize) - frameSize
 
(CGRect) - frameWithNewSuperviewSize:
 
(BOOL) - hasCustomDrawRect
 
(BOOL) - hasCustomLayoutSubviews
 
(CPView- hitTest:
 
(BOOL) - hitTests
 
(id) - init
 
(BOOL) - inLiveResize
 
(BOOL) - isDescendantOf:
 
(BOOL) - isFlipped
 
(BOOL) - isHidden
 
(BOOL) - isHiddenOrHasHiddenAncestor
 
(BOOL) - isInFullScreenMode
 
(BOOL) - isOpaque
 
(CALayer- layer
 
(void) - layout
 
(CPView- layoutEphemeralSubviewNamed:positioned:relativeToEphemeralSubviewNamed:
 
(void) - layoutIfNeeded
 
(void) - lockFocus
 
(CPMenu- menuForEvent:
 
(BOOL) - mouseDownCanMoveWindow
 
(BOOL) - needsDisplay
 
(BOOL) - needsLayout
 
(BOOL) - needsPanelToBecomeKey
 
(CPView- nextKeyView
 
(CPView- nextValidKeyView
 
(void) - objectDidChangeTheme
 
(BOOL) - performKeyEquivalent:
 
(BOOL) - postsBoundsChangedNotifications
 
(BOOL) - postsFrameChangedNotifications
 
(CPView- previousKeyView
 
(CPView- previousValidKeyView
 
(void) - reflectScrolledClipView:
 
(CPArray) - registeredDraggedTypes
 
(void) - registerForDraggedTypes:
 
(void) - removeAllTrackingAreas
 
(void) - removeFromSuperview
 
(void) - removeTrackingArea:
 
(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) - setAnimations:
 
(void) - setAppearance:
 
(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) - setNeedsLayout:
 
(void) - setNextKeyView:
 
(void) - setPostsBoundsChangedNotifications:
 
(void) - setPostsFrameChangedNotifications:
 
(void) - setScaleSize:
 
(void) - setSubviews:
 
(void) - setTag:
 
(void) - setThemeClass:
 
(BOOL) - setThemeState:
 
(void) - setToolTip:
 
(void) - setValue:forThemeAttribute:
 
(void) - setValue:forThemeAttribute:inState:
 
(void) - setWantsLayer:
 
(CPArray) - subviews
 
(CPView- superview
 
(CPInteger) - tag
 
(void) - unlockFocus
 
(void) - unregisterDraggedTypes
 
(BOOL) - unsetThemeState:
 
(void) - viewDidEndLiveResize
 
(void) - viewDidHide
 
(void) - viewDidLayout
 
(void) - viewDidMoveToSuperview
 
(void) - viewDidMoveToWindow
 
(void) - viewDidUnhide
 
(void) - viewWillDraw
 
(void) - viewWillLayout
 
(void) - viewWillMoveToSuperview:
 
(void) - viewWillMoveToWindow:
 
(void) - viewWillStartLiveResize
 
(CPView- viewWithTag:
 
(CGRect) - visibleRect
 
(BOOL) - wantsLayer
 
(void) - willRemoveSubview:
 
(CPWindow- window
 

Class Methods

(CPString+ defaultThemeClass
 
(CPDictionary+ themeAttributes
 
- Class Methods inherited from CPControl
(void) + initialize
 
- Class Methods inherited from CPView
(Class) + animatorClass
 
(CAAnimation+ defaultAnimationForKey:
 
(CPMenu+ defaultMenu
 
(BOOL) + isHighDPIDrawingEnabled
 
(CPSet) + keyPathsForValuesAffectingBounds
 
(CPSet) + keyPathsForValuesAffectingFrame
 
(void) + setHighDPIDrawingEnabled:
 

Detailed Description

CPColorWell is a CPControl for selecting and displaying a single color value. An example of a CPColorWell object (or simply color well) is found in CPColorPanel, which uses a color well to display the current color selection.

An application can have one or more active CPColorWells. You can activate multiple CPColorWells by invoking the -activate: method with NO as its argument. When a mouse-down event occurs on an CPColorWell's border, it becomes the only active color well. When a color well becomes active, it brings up the color panel also.

Definition at line 2 of file CPColorWell.h.

Method Documentation

◆ activate:()

- (void) activate: (BOOL)  shouldBeExclusive
implementation

Activates the color well, displays the color panel, and makes the panel's current color the same as its own. If exclusive is YES, deactivates any other CPColorWells. NO, keeps them active.

Parameters
shouldBeExclusivewhether other color wells should be deactivated.

Definition at line 179 of file CPColorWell.j.

◆ bezelRectForBounds:()

- (CGRect) bezelRectForBounds: (CGRect)  bounds
implementation

Definition at line 266 of file CPColorWell.j.

◆ color()

- (CPColor) color
implementation

Returns the color well's current color.

Definition at line 146 of file CPColorWell.j.

◆ colorPanelDidChangeColor:()

- (void) colorPanelDidChangeColor: (CPNotification aNotification
implementation

Definition at line 224 of file CPColorWell.j.

◆ colorPanelWillClose:()

- (void) colorPanelWillClose: (CPNotification aNotification
implementation

Definition at line 237 of file CPColorWell.j.

◆ colorWellDidBecomeExclusive:()

- (void) colorWellDidBecomeExclusive: (CPNotification aNotification
implementation

Definition at line 231 of file CPColorWell.j.

◆ contentBorderRectForBounds:()

- (CGRect) contentBorderRectForBounds: (CGRect)  bounds
implementation

Definition at line 273 of file CPColorWell.j.

◆ contentRectForBounds:()

- (CGRect) contentRectForBounds: (CGRect)  bounds
implementation

Definition at line 259 of file CPColorWell.j.

◆ createEphemeralSubviewNamed:()

- (CPView) createEphemeralSubviewNamed: (CPString aName
implementation

Reimplemented from CPView.

Definition at line 295 of file CPColorWell.j.

◆ deactivate()

- (void) deactivate
implementation

Deactivates the color well.

Definition at line 203 of file CPColorWell.j.

◆ defaultThemeClass()

+ (CPString) defaultThemeClass
implementation

Definition at line 51 of file CPColorWell.j.

◆ encodeWithCoder:()

- (void) encodeWithCoder: (CPCoder aCoder
implementation

Archives this button into the provided coder.

Parameters
aCoderthe coder to which the color well's instance data will be written.

Reimplemented from CPControl.

Provided by category CPColorWell(CPCoding).

Definition at line 408 of file CPColorWell.j.

◆ initWithCoder:()

- (id) initWithCoder: (CPCoder aCoder
implementation

Initializes the color well by unarchiving data from aCoder.

Parameters
aCoderthe coder containing the archived CPColorWell.

Reimplemented from CPControl.

Provided by category CPColorWell(CPCoding).

Definition at line 390 of file CPColorWell.j.

◆ initWithFrame:()

- (id) initWithFrame: (CGRect)  aFrame
implementation

Initializes the receiver for usage with the specified bounding rectangle

Returns
the initialized view

Reimplemented from CPControl.

Definition at line 75 of file CPColorWell.j.

◆ isActive()

- (BOOL) isActive
implementation

Returns YES if the color well is active.

Definition at line 219 of file CPColorWell.j.

◆ isBordered()

- (BOOL) isBordered
implementation

Returns whether the color well is bordered

Definition at line 136 of file CPColorWell.j.

◆ layoutSubviews()

- (void) layoutSubviews
implementation

Reimplemented from CPView.

Definition at line 304 of file CPColorWell.j.

◆ rectForEphemeralSubviewNamed:()

- (CGRect) rectForEphemeralSubviewNamed: (CPString aName
implementation

Reimplemented from CPView.

Definition at line 280 of file CPColorWell.j.

◆ setBordered:()

- (void) setBordered: (BOOL)  shouldBeBordered
implementation

Sets whether the color well is bordered.

Definition at line 125 of file CPColorWell.j.

◆ setColor:()

- (void) setColor: (CPColor aColor
implementation

Sets the color well's current color.

Definition at line 154 of file CPColorWell.j.

◆ stopTracking:at:mouseIsUp:()

- (void) stopTracking: (CGPoint)  lastPoint
at: (CGPoint)  aPoint
mouseIsUp: (BOOL)  mouseIsUp 
implementation

Reimplemented from CPControl.

Definition at line 242 of file CPColorWell.j.

◆ takeColorFrom:()

- (void) takeColorFrom: (id)  aSender
implementation

Changes the color of the well to that of aSender.

Parameters
aSenderthe object from which to retrieve the color

Definition at line 168 of file CPColorWell.j.

◆ themeAttributes()

+ (CPDictionary) themeAttributes
implementation

Reimplemented from CPControl.

Definition at line 56 of file CPColorWell.j.


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