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

NSButton 

Inherits From:	NSControl : NSView : NSResponder : NSObject 

Declared In:	appkit/NSButton.h 

Initializing the NSButton Factory 

+ (Class)cellClass	Returns the subclass of NSButtonCell used by NSButton.
+ (void)setCellClass:(Class)classId	Sets the subclass of NSButtonCell used by NSButton.

Setting the Button Type 

- (void)setType:(int)aType	Sets how the NSButton highlights and shows its state.

Setting the State 

- (void)setState:(int)value	Sets the NSButton's state to value (0 or 1).
- (int)state	Returns the NSButton's current state (0 or 1).

Setting the Repeat Interval 

- (void)getPeriodicDelay:(float *)delay	Gets repeat parameters for continuous buttons.
interval:(float *)interval
- (void)setPeriodicDelay:(float)delay	Sets repeat parameters for continuous buttons.
interval:(float)interval

Setting the Titles 

- (NSString *)alternateTitle	Returns the button's alternate title.
- (void)setAlternateTitle:(NSString *)aString	Makes aString the button's alternate title.
- (void)setTitle:(NSString *)aString	Makes  aString the button's title.
- (NSString *)title	Returns the button's title.

Setting the Images 

- (NSImage *)alternateImage	Returns the button's alternate image.
- (NSImage *)image	Returns the button's image.
- (NSCellImagePosition)imagePosition	Returns the position of the button's image.
- (void)setAlternateImage:(NSImage *)anImage	Makes anImage the alternate image.
- (void)setImage:(NSImage *)anImage	Makes anImage the button's icon.
- (void)setImagePosition:(NSCellImagePosition)aPosition
	Sets the position of the button's image to aPosition.

Modifying Graphic Attributes 

- (BOOL)isBordered	Returns whether the button has a bezeled border.
- (BOOL)isTransparent	Returns whether the button is transparent.
- (void)setBordered:(BOOL)flag	Sets whether the button has a bezeled border.
- (void)setTransparent:(BOOL)flag	Sets whether the button is transparent.

Displaying 

- (void)highlight:(BOOL)flag	Highlights (or unhighlights) the button according to flag.

Setting the Key Equivalent 

- (NSString *)keyEquivalent	Returns the button's key equivalent.
- (unsigned int)keyEquivalentModifierMask	Returns the mask indicating the possible modifier keys for button's key equivalent.  
- (void)setKeyEquivalent:(NSString *)aKeyEquivalent
	Makes aKeyEquivalent the button's key equivalent.
- (void)setKeyEquivalentModifierMask:(unsigned int)mask	
	Sets the mask that determines the possible modifier keys for button's key equivalent. 

Handling Events and Action Messages 

- (void)performClick:(id)sender	Simulates the user's clicking the button.
- (BOOL)performKeyEquivalent:(NSEvent *)anEvent
	Simulates a mouse click, if the key in anEvent is right.