NSButtonCell

NSButtonCell Mac OS X 10.0

This subclass of NSActionCell contains the majority of the functionality of a button control. NSButtonCell, like most NSCell subclasses, is responsible for the appearance of the NSButton control; NSButton serves more as a view for NSButtonCell to draw in, and most of NSButton's API is forwarded to NSButtonCell.

figs/cocn_1512.gif

@interface NSButtonCell : NSActionCell
 // Accessor Methods
   - (void)setPeriodicDelay:(float)delay interval:(float)interval;
   - (void)setTitle:(NSString *)aString;
   - (NSString *)title;
   - (void)setAlternateTitle:(NSString *)aString;
   - (NSString *)alternateTitle;
   - (void)setImagePosition:(NSCellImagePosition)aPosition;
   - (NSCellImagePosition)imagePosition;
   - (void)setHighlightsBy:(int)aType;
   - (int)highlightsBy;
   - (void)setAttributedAlternateTitle:(NSAttributedString *)obj;
   - (NSAttributedString *)attributedAlternateTitle;
   - (void)setAttributedTitle:(NSAttributedString *)obj;
   - (NSAttributedString *)attributedTitle;
   - (void)setTransparent:(BOOL)flag;
   - (void)setSound:(NSSound *)aSound;
   - (NSSound *)sound;
   - (void)setKeyEquivalent:(NSString *)aKeyEquivalent;
   - (NSString *)keyEquivalent;
   - (void)setKeyEquivalentModifierMask:(unsigned int)mask;
   - (unsigned int)keyEquivalentModifierMask;
   - (void)setKeyEquivalentFont:(NSFont *)fontObj;
   - (NSFont *)keyEquivalentFont;
   - (void)setKeyEquivalentFont:(NSString *)fontName size:(float)fontSize;
   - (void)setGradientType:(NSGradientType)type;
   - (NSGradientType)gradientType;
   - (void)setImageDimsWhenDisabled:(BOOL)flag;
   - (BOOL)imageDimsWhenDisabled;
   - (void)setAlternateImage:(NSImage *)image;
   - (NSImage *)alternateImage;
   - (void)setShowsStateBy:(int)aType;
   - (int)showsStateBy;
   - (void)setButtonType:(NSButtonType)aType;
   - (void)setFont:(NSFont *)fontObj;
 // Instance Methods
   - (BOOL)showsBorderOnlyWhileMouseInside;
   - (BOOL)isOpaque;
   - (BOOL)isTransparent;
   - (void)getPeriodicDelay:(float *)delay interval:(float *)interval;
   - (void)performClick:(id)sender;
   - (NSBezelStyle)bezelStyle;
   - (void)mouseEntered:(NSEvent*)event;
   - (void)mouseExited:(NSEvent*)event;
   - (void)setBezelStyle:(NSBezelStyle)bezelStyle;
   - (void)setShowsBorderOnlyWhileMouseInside:(BOOL)show;

Subclasses

NSMenuItemCell



    Part II: API Quick Reference
    Chapter 13. Foundation Classes