CPColorWell Class Reference

List of all members.

Public Member Functions

(id) - initWithFrame: [implementation]
(BOOL) - isBordered [implementation]
(void) - setBordered: [implementation]
(CPColor) - color [implementation]
(void) - setColor: [implementation]
(void) - takeColorFrom: [implementation]
(void) - activate: [implementation]
(void) - deactivate [implementation]
(BOOL) - isActive [implementation]
(void) - drawBezelWithHighlight: [implementation]
(void) - drawWellInside: [implementation]
(void) - colorPanelDidChangeColor: [implementation]
(void) - colorWellDidBecomeExclusive: [implementation]
(void) - colorPanelWillClose: [implementation]
(void) - mouseDown: [implementation]
(void) - mouseDragged: [implementation]
(void) - mouseUp: [implementation]
(id) - initWithCoder: [implementation]
(void) - encodeWithCoder: [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 38 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 142 of file CPColorWell.j.

- (CPColor) color   [implementation]

Returns the color well's current color.

Definition at line 109 of file CPColorWell.j.

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

Definition at line 212 of file CPColorWell.j.

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

Definition at line 225 of file CPColorWell.j.

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

Definition at line 219 of file CPColorWell.j.

- (void) deactivate   [implementation]

Deactivates the color well.

Definition at line 166 of file CPColorWell.j.

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

Definition at line 189 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 197 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 290 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 267 of file CPColorWell.j.

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

Definition at line 47 of file CPColorWell.j.

- (BOOL) isActive   [implementation]

Returns YES if the color well is active.

Definition at line 182 of file CPColorWell.j.

- (BOOL) isBordered   [implementation]

Returns whether the color well is bordered

Definition at line 86 of file CPColorWell.j.

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

Definition at line 230 of file CPColorWell.j.

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

Definition at line 235 of file CPColorWell.j.

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

Definition at line 240 of file CPColorWell.j.

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

Sets the color well's current color.

Definition at line 94 of file CPColorWell.j.

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

Sets the color well's current color.

Definition at line 117 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 131 of file CPColorWell.j.


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

Generated on Thu Dec 11 01:55:49 2008 for Cappuccino by  doxygen 1.5.7.1