API  0.9.7
 All Classes Files Functions Variables Macros Groups Pages
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
 
(BOOL) - continueTracking:at:
 
(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) - setContinuous:
 
(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:
 
(CPTextVerticalAlignment) - verticalAlignment
 

Class Methods

(CPString+ defaultThemeClass
 
(CPDictionary+ themeAttributes
 
- Class Methods inherited from CPControl
(void) + initialize
 

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

- (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 166 of file CPColorWell.j.

- (CGRect) bezelRectForBounds: (CGRect)  bounds
implementation

Definition at line 251 of file CPColorWell.j.

- (CPColor) color
implementation

Returns the color well's current color.

Definition at line 133 of file CPColorWell.j.

- (void) colorPanelDidChangeColor: (CPNotification aNotification
implementation

Definition at line 211 of file CPColorWell.j.

- (void) colorPanelWillClose: (CPNotification aNotification
implementation

Definition at line 224 of file CPColorWell.j.

- (void) colorWellDidBecomeExclusive: (CPNotification aNotification
implementation

Definition at line 218 of file CPColorWell.j.

- (CGRect) contentBorderRectForBounds: (CGRect)  bounds
implementation

Definition at line 258 of file CPColorWell.j.

- (CGRect) contentRectForBounds: (CGRect)  bounds
implementation

Definition at line 244 of file CPColorWell.j.

- (CPView) createEphemeralSubviewNamed: (CPString aName
implementation

Definition at line 280 of file CPColorWell.j.

- (void) deactivate
implementation

Deactivates the color well.

Definition at line 190 of file CPColorWell.j.

+ (CPString) defaultThemeClass
implementation

Definition at line 52 of file CPColorWell.j.

- (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 373 of file CPColorWell.j.

- (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 353 of file CPColorWell.j.

- (id) initWithFrame: (CGRect)  aFrame
implementation

Reimplemented from CPControl.

Definition at line 76 of file CPColorWell.j.

- (BOOL) isActive
implementation

Returns YES if the color well is active.

Definition at line 206 of file CPColorWell.j.

- (BOOL) isBordered
implementation

Returns whether the color well is bordered

Definition at line 123 of file CPColorWell.j.

- (void) layoutSubviews
implementation

Definition at line 289 of file CPColorWell.j.

- (CGRect) rectForEphemeralSubviewNamed: (CPString aName
implementation

Definition at line 265 of file CPColorWell.j.

- (void) setBordered: (BOOL)  shouldBeBordered
implementation

Sets whether the color well is bordered.

Definition at line 112 of file CPColorWell.j.

- (void) setColor: (CPColor aColor
implementation

Sets the color well's current color.

Definition at line 141 of file CPColorWell.j.

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

Reimplemented from CPControl.

Definition at line 229 of file CPColorWell.j.

- (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 155 of file CPColorWell.j.

+ (CPDictionary) themeAttributes
implementation

Reimplemented from CPControl.

Definition at line 57 of file CPColorWell.j.


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