ftp.nice.ch/peanuts/GeneralData/Documents/openstep/OpenStepSpec_rtf.tar.gz#/OpenStepSpec_rtf/ApplicationKit/Classes/NSColorWell.rtf

This is NSColorWell.rtf in view mode; [Download] [Up]

Copyright ©1994 by NeXT Computer, Inc.  All Rights Reserved.


NSColorWell 

Inherits From:	NSControl : NSView : NSResponder : NSObject

Conforms To:	NSCoding (NSResponder)
NSObject (NSObject)

Declared In:	AppKit/NSColorWell.h 


Class Description


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)


Drawing


- (void)drawWellInside:(NSRect)insideRect	Draws the colored area inside the color well at the location specified by insideRect without drawing borders.

Activating 


- (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.

Managing Color 


- (NSColor *)color	Returns the color of the color well.

- (void)setColor:(NSColor *)color	Sets the color of the well to color.

- (void)takeColorFrom:(id)sender	Changes the color of the well to that of sender.

Managing Borders 


- (BOOL)isBordered	Indicates whether the color well is bordered.

- (void)setBordered:(BOOL)bordered	Places or removes a border, depending on bordered.


These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.