Up

# NSColorWell

### Authors

Scott Christley (`scottc@net-community.com`)
Felipe A. Rodriguez (`far@ix.netcom.com`)

> Control for selecting and display a single color value.

Copyright: (C) 1996 Free Software Foundation, Inc.

# Software documentation for the NSColorWell class

## NSColorWell : NSControl

> Declared in:
>   AppKit/NSColorWell.h

> Conforms to:
>   NSCoding

Availability: OpenStep
Description forthcoming.

Instance Variables
Method summary

- -activate:
- -color
- -deactivate
- -drawWellInside:
- -encodeWithCoder:
- -initWithCoder:
- -isActive
- -isBordered
- -setBordered:
- -setColor:
- -takeColorFrom:

### activate:

- (void) activate: (BOOL)exclusive;
Availability: OpenStep

Activates the NSColorWell and displays the NSColorPanel with the current NSColorWell's color. The NSColorWell can take color from the NSColorPanel. If exclusive is `YES` other NSColorWells are desacivated (through notifications).

See Also: -deactivate

### color

- (NSColor*) color;
Availability: OpenStep

Returns the current NSColor of the NSColorWell.

See Also: -setColor:

### deactivate

- (void) deactivate;
Availability: OpenStep

Desactivates the NSColorWell and marks self for display. It is usally call from an observer, when another NSColorWell is activate.

See Also: -activate:

### drawWellInside:

- (void) drawWellInside: (NSRect)insideRect;
Availability: OpenStep

Draws the NSColorWell inside the rectangle insideRect.

See Also: [NSColor -drawSwatchInRect:]

### encodeWithCoder:

- (void) encodeWithCoder: (NSCoder*)aCoder;
Availability: OpenStep
Description forthcoming.

### initWithCoder:

- (id) initWithCoder: (NSCoder*)aDecoder;
Availability: OpenStep
Description forthcoming.

### isActive

- (BOOL) isActive;
Availability: OpenStep

Returns whether the NSColorWell is active. By default a NSColorWell is not active.

See Also: -activate: -deactivate

### isBordered

- (BOOL) isBordered;
Availability: OpenStep

Returns whether the NSColorWell has border. By default a NSColorWell has border.

See Also: -setBordered:

### setBordered:

- (void) setBordered: (BOOL)bordered;
Availability: OpenStep

Sets whether the NSColorWell has border and marks self for display. By default a NSColorWell has border.

See Also: -isBordered

### setColor:

- (void) setColor: (NSColor*)color;
Availability: OpenStep

Sets the NSColorWell to color. Sets the NSColorPanel if active, notify the target that the color changed and marks self for display.

See Also: -color

### takeColorFrom:

- (void) takeColorFrom: (id)sender;
Availability: OpenStep

Sets the NSColorWell's color to the sender color.

See Also: -setColor:

## Instance Variables for NSColorWell Class

### _action

@protected SEL _action;
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

### _is_active

@protected BOOL _is_active;
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

### _is_bordered

@protected BOOL _is_bordered;
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

### _target

@protected id _target;
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

### _the_color

@protected NSColor* _the_color;
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

### _wellRect

@protected NSRect _wellRect;
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

Up