O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSMenuItem — Mac OS X 10.0

Synopsis

This protocol has been deprecated in favor of the class NSMenuItem, which takes over all of the functionality associated with this protocol. See the NSMenuItem class description for more information.

@protocol NSMenuItem
                                  // Instance Methods
   - (id)initWithTitle:(NSString *)aString 
                                 action:(SEL)aSelector 
                                 keyEquivalent:(NSString *)charCode;
   - (void)setMenu:(NSMenu *)menu;
   - (NSMenu *)menu;
   - (BOOL)hasSubmenu;
   - (void)setSubmenu:(NSMenu *)submenu;
   - (NSMenu *)submenu;
   - (void)setTitle:(NSString *)aString;
   - (NSString *)title;
   - (BOOL)isSeparatorItem;
   - (void)setKeyEquivalent:(NSString *)aKeyEquivalent;
   - (NSString *)keyEquivalent;
   - (void)setKeyEquivalentModifierMask:(unsigned int)mask;
   - (unsigned int)keyEquivalentModifierMask;
   - (NSString *)userKeyEquivalent;
   - (unsigned int)userKeyEquivalentModifierMask;
   - (void)setMnemonicLocation:(unsigned)location;
   - (unsigned)mnemonicLocation;
   - (NSString *)mnemonic;
   - (void)setTitleWithMnemonic:(NSString *)stringWithAmpersand;
   - (void)setImage:(NSImage *)menuImage;
   - (NSImage *)image;
   - (void)setState:(int)state;
   - (int)state;
   - (void)setOnStateImage:(NSImage *)image;
   - (NSImage *)onStateImage;
   - (void)setOffStateImage:(NSImage *)image;
   - (NSImage *)offStateImage;
   - (void)setMixedStateImage:(NSImage *)image;
   - (NSImage *)mixedStateImage;
   - (void)setEnabled:(BOOL)flag;
   - (BOOL)isEnabled;
   - (void)setTarget:(id)anObject;
   - (id)target;
 - ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required