May 2003
Intermediate to advanced
566 pages
27h 29m
English
NSMenuItem — Mac OS X 10.0
This class declares the interface to objects that make up commands in
an NSMenu. NSMenuItems have an
associated target and action, and may optionally have a key
equivalent that the user can use to activate the menu item. Menu
items are also capable of maintaining a state (on,
off, or mixed).
|
|
@interface NSMenuItem : NSObject <NSMenuItem>
|
// Initializers
|
- (id)initWithTitle:(NSString *)aString action:(SEL)aSelector keyEquivalent:(NSString *)charCode; |
// Accessor Methods
|
- (void)setAction:(SEL)aSelector; |
- (SEL)action;
|
- (void)setRepresentedObject:(id)anObject; |
- (id)representedObject;
|
- (void)setSubmenu:(NSMenu *)submenu; |
- (NSMenu *)submenu;
|
- (void)setTag:(int)anInt; |
- (int)tag;
|
- (void)setTitle:(NSString *)aString; |
- (NSString *)title;
|
- (void)setTitleWithMnemonic:(NSString *)stringWithAmpersand; |
- (void)setKeyEquivalent:(NSString *)aKeyEquivalent; |
- (NSString *)keyEquivalent;
|
- (void)setTarget:(id)anObject; |
- (id)target;
|
- (void)setKeyEquivalentModifierMask:(unsigned int)mask; |
- (unsigned int)keyEquivalentModifierMask;
|
- (void)setEnabled:(BOOL)flag; |
- (void)setMixedStateImage:(NSImage *)image; |
- (NSImage *)mixedStateImage;
|
- (void)setMnemonicLocation:(unsigned)location; |
- (unsigned)mnemonicLocation;
|
- (void)setOffStateImage:(NSImage *)image; |
- (NSImage *)offStateImage;
|
- (void) |
Read now
Unlock full access