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

NSMenuItemCell — Mac OS X 10.0

Synopsis

This class is used to represent and draw menu items in a menu view. This class has been deprecated and should not be used in new code. You should use the APIs provided by NSMenu and NSMenuItem instead.

image with no caption

@interface NSMenuItemCell : NSButtonCell
                                  // Accessor Methods
   - (void)setNeedsSizing:(BOOL)flag;
   - (BOOL)needsSizing;
   - (void)setNeedsDisplay:(BOOL)flag;
   - (BOOL)needsDisplay;
   - (void)setHighlighted:(BOOL)flag;
   - (void)setMenuView:(NSMenuView *)menuView;
   - (NSMenuView *)menuView;
   - (void)setMenuItem:(NSMenuItem *)item;
   - (NSMenuItem *)menuItem;
                                  // Instance Methods
   - (void)calcSize;
   - (void)drawBorderAndBackgroundWithFrame:(NSRect)cellFrame 
                                 inView:(NSView *)controlView;
   - (void)drawImageWithFrame:(NSRect)cellFrame 
                                 inView:(NSView *)controlView;
   - (void)drawKeyEquivalentWithFrame:(NSRect)cellFrame 
                                 inView:(NSView *)controlView;
   - (void)drawSeparatorItemWithFrame:(NSRect)cellFrame 
                                 inView:(NSView *)controlView;
   - (void)drawStateImageWithFrame:(NSRect)cellFrame  
                                 inView:(NSView *)controlView;
   - (void)drawTitleWithFrame:(NSRect)cellFrame 
                                 inView:(NSView *)controlView;
   - (NSRect)imageRectForBounds:(NSRect)cellFrame;
   - (float)imageWidth;
   - (BOOL)isHighlighted;
   - (NSRect)keyEquivalentRectForBounds:(NSRect)cellFrame;
   - (float)keyEquivalentWidth;
   - (NSRect)stateImageRectForBounds:(NSRect)cellFrame;
 - (float) ...

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