DekGenius.com
[ Team LiB ] Previous Section Next Section

NSButton Mac OS X 10.0

This NSControl subclass represents a button control in the user interface. A button works by sending out an action message whenever a mouse-down and mouse-up event occurs within the button area. The associated NSCell subclass for NSButton is NSButtonCell, described next.

figs/cocn_1511.gif

@interface NSButton : NSControl
 // Accessor Methods
   - (void)setImagePosition:(NSCellImagePosition)aPosition;
   - (NSCellImagePosition)imagePosition;
   - (void)setTitle:(NSString *)aString;
   - (NSString *)title;
   - (void)setAlternateTitle:(NSString *)aString;
   - (NSString *)alternateTitle;
   - (void)setKeyEquivalentModifierMask:(unsigned int)mask;
   - (unsigned int)keyEquivalentModifierMask;
   - (void)setImage:(NSImage *)image;
   - (NSImage *)image;
   - (void)setAlternateImage:(NSImage *)image;
   - (NSImage *)alternateImage;
   - (void)setKeyEquivalent:(NSString *)charCode;
   - (NSString *)keyEquivalent;
   - (void)setAttributedTitle:(NSAttributedString *)aString;
   - (NSAttributedString *)attributedTitle;
   - (void)setAllowsMixedState:(BOOL)flag;
   - (BOOL)allowsMixedState;
   - (void)setAttributedAlternateTitle:(NSAttributedString *)obj;
   - (NSAttributedString *)attributedAlternateTitle;
   - (void)setBordered:(BOOL)flag;
   - (void)setSound:(NSSound *)aSound;
   - (NSSound *)sound;
   - (void)setPeriodicDelay:(float)delay interval:(float)interval;
   - (void)setTransparent:(BOOL)flag;
   - (void)setButtonType:(NSButtonType)aType;
   - (void)setState:(int)value;
   - (int)state;
   - (void)setNextState;
 // Instance Methods
   - (BOOL)showsBorderOnlyWhileMouseInside;
   - (NSBezelStyle)bezelStyle;
   - (void)getPeriodicDelay:(float *)delay interval:(float *)interval;
   - (void)highlight:(BOOL)flag;
   - (BOOL)isBordered;
   - (BOOL)isTransparent;
   - (void)setBezelStyle:(NSBezelStyle)bezelStyle;
   - (void)setShowsBorderOnlyWhileMouseInside:(BOOL)show;
   - (BOOL)performKeyEquivalent:(NSEvent *)key;

Subclasses

NSPopUpButton

    [ Team LiB ] Previous Section Next Section