Name

NSMenuView — Mac OS X 10.0

Synopsis

This subclass of NSView is used to draw menus. Like NSMenuItemCell, 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 NSMenuView : NSView
                                  // Initializers
   - (id)initAsTearOff;
   - (id)initWithFrame:(NSRect)frame;
                                  // Accessor Methods
   - (void)setWindowFrameForAttachingToRect:(NSRect)screenRect
                                 onScreen:(NSScreen *)screen 
                                 preferredEdge:(NSRectEdge)edge 
                                 popUpSelectedItem:(int)selectedItemIndex;
   - (void)setHorizontalEdgePadding:(float)pad;
   - (float)horizontalEdgePadding;
   - (void)setNeedsDisplayForItemAtIndex:(int)index;
   - (void)setNeedsSizing:(BOOL)flag;
   - (BOOL)needsSizing;
   - (void)setHighlightedItemIndex:(int)index;
   - (int)highlightedItemIndex;
   - (void)setHorizontal:(BOOL)flag;
   - (void)setMenu:(NSMenu *)menu;
   - (NSMenu *)menu;
   - (void)setFont:(NSFont *)font;
   - (NSFont *)font;
   - (void)setMenuItemCell:(NSMenuItemCell *)cell 
                                 forItemAtIndex:(int)index;
                                  // Class Methods
   + (float)menuBarHeight;
                                  // Instance Methods
   - (void)attachSubmenuForItemAtIndex:(int)index;
   - (NSMenu *)attachedMenu;
   - (NSMenuView *)attachedMenuView;
   - (void)detachSubmenu;
   - (float)imageAndTitleOffset;
   - (float)imageAndTitleWidth;
   - (int)indexOfItemAtPoint:(NSPoint)point;
   - (NSRect)innerRect;
   - (BOOL)isAttached;
 - (BOOL) ...

Get Cocoa in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.