CPColorWell Class Reference
[AppKit]

List of all members.

Public Member Functions

(void) - activate: [implementation]
(CPColor- color [implementation]
(void) - colorPanelDidChangeColor: [implementation]
(void) - colorPanelWillClose: [implementation]
(void) - colorWellDidBecomeExclusive: [implementation]
(void) - deactivate [implementation]
(void) - drawBezelWithHighlight: [implementation]
(void) - drawWellInside: [implementation]
(void) - encodeWithCoder: [implementation]
(id) - initWithCoder: [implementation]
(id) - initWithFrame: [implementation]
(BOOL) - isActive [implementation]
(BOOL) - isBordered [implementation]
(void) - mouseDown: [implementation]
(void) - mouseDragged: [implementation]
(void) - mouseUp: [implementation]
(void) - setBordered: [implementation]
(void) - setColor: [implementation]
(void) - takeColorFrom: [implementation]

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


Member Function 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:
shouldBeExclusive whether other color wells should be deactivated.

Definition at line 144 of file CPColorWell.j.

- (CPColor) color   [implementation]

Returns the color well's current color.

Definition at line 111 of file CPColorWell.j.

- (void) colorPanelDidChangeColor: (CPNotification aNotification   [implementation]

Definition at line 214 of file CPColorWell.j.

- (void) colorPanelWillClose: (CPNotification aNotification   [implementation]

Definition at line 227 of file CPColorWell.j.

- (void) colorWellDidBecomeExclusive: (CPNotification aNotification   [implementation]

Definition at line 221 of file CPColorWell.j.

- (void) deactivate   [implementation]

Deactivates the color well.

Definition at line 168 of file CPColorWell.j.

- (void) drawBezelWithHighlight: (BOOL)  shouldHighlight   [implementation]

Definition at line 191 of file CPColorWell.j.

- (void) drawWellInside: (CGRect)  aRect   [implementation]

Draws the colored area inside the color well without borders.

Parameters:
aRect the location at which to draw

Definition at line 199 of file CPColorWell.j.

- (void) encodeWithCoder: (CPCoder aCoder   [implementation]

Archives this button into the provided coder.

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

Definition at line 291 of file CPColorWell.j.

- (id) initWithCoder: (CPCoder aCoder   [implementation]

Initializes the color well by unarchiving data from aCoder.

Parameters:
aCoder the coder containing the archived CPColorWell.

Definition at line 268 of file CPColorWell.j.

- (id) initWithFrame: (CGRect)  aFrame   [implementation]

Definition at line 49 of file CPColorWell.j.

- (BOOL) isActive   [implementation]

Returns YES if the color well is active.

Definition at line 184 of file CPColorWell.j.

- (BOOL) isBordered   [implementation]

Returns whether the color well is bordered

Definition at line 88 of file CPColorWell.j.

- (void) mouseDown: (CPEvent anEvent   [implementation]

Definition at line 232 of file CPColorWell.j.

- (void) mouseDragged: (CPEvent anEvent   [implementation]

Definition at line 237 of file CPColorWell.j.

- (void) mouseUp: (CPEvent anEvent   [implementation]

Definition at line 242 of file CPColorWell.j.

- (void) setBordered: (BOOL)  bordered   [implementation]

Sets the color well's current color.

Definition at line 96 of file CPColorWell.j.

- (void) setColor: (CPColor aColor   [implementation]

Sets the color well's current color.

Definition at line 119 of file CPColorWell.j.

- (void) takeColorFrom: (id)  aSender   [implementation]

Changes the color of the well to that of aSender.

Parameters:
aSender the object from which to retrieve the color

Definition at line 133 of file CPColorWell.j.


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

Generated on Fri Apr 9 11:04:21 2010 for Cappuccino API by  doxygen 1.6.1