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] |
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.
- (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.
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.
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.
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
.
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
.
aSender | the object from which to retrieve the color |
Definition at line 131 of file CPColorWell.j.