Return to the Alphabetic Index
Return to the Class Browser
Return to the Picture Browser
Copyright (c) 1994 by NeXT Computer, Inc. All Rights
Inherits From: NSControl : NSView : NSResponder : NSObject
Conforms To: NSCoding (NSResponder)
Declared In: AppKit/NSColorWell.h
NSColorWell is an NSControl for selecting and displaying a single color value.
An example of an NSColorWell object (or simply color well) is found in
NSColorPanel, which uses a color well to display the current color selection.
NSColorWell is available from the Palettes panel of Interface Builder.
An application can have one or more active NSColorWells. You can activate
multiple NSColorWells by invoking the activate: method with NO as its
argument. When a mouse-down event occurs on an NSColorWell's border, it becomes
the only active color well. When a color well becomes active, it brings up the
color panel also.
The mouseDown: method enables an instance of NSColorWell to send its
color to another NSColorWell or any other subclass of NSView that implements
the NSDraggingDestination protocol.
See also: NSColorPanel (class)
- - (void)drawWellInside:(NSRect)insideRect Draws the colored area
inside the color well at the location specified by insideRect without
- - (void)activate:(BOOL)exclusive Activates the NSColorWell,
displays the Color panel, and makes the NSColorPanel's current color the same
as its own. If exclusive is YES, deactivates any other NSColorWells; if
NO, keeps them active.
- - (void)deactivate Deactivates the NSColorWell.
- - (BOOL)isActive Returns YES if the NSColorWell is active.
- - (NSColor *)color Returns the color of the color well.
- - (void)setColor:(NSColor *)color Sets the color of the well to
- - (void)takeColorFrom:(id)sender Changes the color of the well to
that of sender.
- - (BOOL)isBordered Indicates whether the color well is bordered.
- - (void)setBordered:(BOOL)bordered Places or removes a border,
depending on bordered.