(Preliminary Documentation) Copyright ã1994 by NeXT Computer, Inc.  All Rights Reserved.

NSControl 

Inherits From:	NSView : NSResponder : NSObject 

Declared In:	appkit/NSControl.h 

Setting the Control's Cell 

+ (Class)cellClass	Returns nil.
+ (void)setCellClass:(Class)factoryId	Implemented by subclasses to set the Cell class used.
- (id)cell	Returns the Control's Cell.
- (void)setCell:(NSCell *)aCell	Sets the Control's Cell to aCell.

Enabling and Disabling the Control 

- (BOOL)isEnabled	Returns whether the Control reacts to mouse events.
- (void)setEnabled:(BOOL)flag	Sets whether the Control reacts to mouse events.

Identifying the Selected Cell 

- (id)selectedCell	Returns the Control's selected Cell.
- (int)selectedTag	Returns the tag of the Control's selected Cell.

Setting the Control's Value 

- (double)doubleValue	Returns the value of the Control's selected Cell as a double.
- (float)floatValue	Returns the value of the Control's selected Cell as a float.
- (int)intValue	Returns the value of the Control's selected Cell as a int.
- (void)setDoubleValue:(double)aDouble	Sets the value of the Control's selected Cell to aDouble.
- (void)setFloatValue:(float)aFloat	Sets the value of the Control's selected Cell to aFloat.
- (void)setIntValue:(int)anInt	Sets the value of the Control's selected Cell to anInt.
- (void)setNeedsDisplay	Set the NeedsDisplay flag.
- (void)setStringValue:(NSString *)aString	Sets the value of the Control's selected Cell to aString.
- (NSString *)stringValue	Returns the value of the Control's selected Cell as an NSString.

Interacting with Other Controls 

- (void)takeDoubleValueFrom:(id)sender	Sets the receiving Control's selected Cell to the value obtained by sending a doubleValue message to sender.
- (void)takeFloatValueFrom:(id)sender	Sets the receiving Control's selected Cell to the value obtained by sending a floatValue message to sender. 
- (void)takeIntValueFrom:(id)sender	Sets the receiving Control's selected Cell to the value obtained by sending a intValue message to sender. 
- (void)takeStringValueFrom:(id)sender	Sets the receiving Control's selected Cell to the value obtained by sending a stringValue message to sender. 

Formatting Text 

- (NSTextAlignment)alignment	Returns the alignment of text in the Control's Cell.
- (NSFont *)font	Returns the Font used to draw text in the Control's Cell.
- (void)setAlignment:(NSTextAlignment)mode	Sets the alignment mode of the text in the Control's Cell to mode. 
- (void)setFont:(NSFont *)fontObject	Sets the Font used to draw text in the Control's Cell to fontObject.
- (void)setFloatingPointFormat:(BOOL)autoRange	
left:(unsigned)leftDigits	Sets the display format for floating point values in the
right:(unsigned)rightDigits	 	Control's Cell

Managing the Field Editor 

- (BOOL)abortEditing	Aborts editing of text displayed by the Control.
- (NSText *)currentEditor	Returns the object used to edit text in the Control.
- (void)validateEditing	Validates the user's changes to editable text.

Resizing the Control 

- (void)calcSize	Recalculates internal size information.
- (void)sizeToFit	Resizes the Control to fit its Cell.

Displaying the Control and Cell 

- (void)drawCell:(NSCell *)aCell	Redraws aCell if it's the Control's Cell.
- (void)drawCellInside:(NSCell *)aCell	Redraws aCell's inside if it's the Control's Cell.
- (void)selectCell:(NSCell *)aCell	Selects aCell if it's the Control's cell.
- (void)updateCell:(NSCell *)aCell	Redisplays aCell or marks it for redisplay.
- (void)updateCellInside:(NSCell *)aCell	Redisplays the inside of aCell or marks it for redisplay.

Target and Action 

- (SEL)action	Returns the Control's action method.
- (BOOL)isContinuous	Returns whether the Control's Cell continuously sends its action.
- (BOOL)sendAction:(SEL)theAction	Has the NSApplication object send theAction to theTarget. 
to:(id)theTarget	
- (int)sendActionOn:(int)mask	Determines when the action is sent while tracking.
- (void)setAction:(SEL)aSelector	Sets the Control's action method to aSelector.
- (void)setContinuous:(BOOL)flag	Sets whether the Control's Cell continuously sends its action
- (void)setTarget:(id)anObject	Sets the Control's target object to anObject.
- (id)target	Returns the Control's target object.

Assigning a Tag 

- (void)setTag:(int)anInt	Sets the Control's Cell's tag to anInt.
- (int)tag	Returns the Control's Cell's tag.

Tracking the Mouse 

- (BOOL)ignoresMultiClick	Indicates whether multiple clicks are ignored.
- (void)setIgnoresMultiClick:(BOOL)flag	Sets whether multiple clicks are ignored according to flag.