Name

NSPopUpButtonCell — Mac OS X 10.0

Synopsis

This class is the associated NSCell for an NSPopUpButton object that handles the drawing and mouse-handling for the control.

image with no caption

@interface NSPopUpButtonCell : NSMenuItemCell
                                  // Initializers
   - (id)initTextCell:(NSString *)stringValue 
                                 pullsDown:(BOOL)pullDown;
                                  // Accessor Methods
   - (void)setAltersStateOfSelectedItem:(BOOL)flag;
   - (BOOL)altersStateOfSelectedItem;
   - (void)setTitle:(NSString *)aString;
   - (void)setArrowPosition:(NSPopUpArrowPosition)position;
   - (NSPopUpArrowPosition)arrowPosition;
   - (void)setPullsDown:(BOOL)flag;
   - (BOOL)pullsDown;
   - (void)setUsesItemFromMenu:(BOOL)flag;
   - (BOOL)usesItemFromMenu;
   - (void)setAutoenablesItems:(BOOL)flag;
   - (BOOL)autoenablesItems;
   - (void)setPreferredEdge:(NSRectEdge)edge;
   - (NSRectEdge)preferredEdge;
   - (void)setMenu:(NSMenu *)menu;
   - (NSMenu *)menu;
                                  // Instance Methods
   - (void)addItemWithTitle:(NSString *)title;
   - (void)addItemsWithTitles:(NSArray *)itemTitles;
   - (void)attachPopUpWithFrame:(NSRect)cellFrame 
                                 inView:(NSView *)controlView;
   - (void)dismissPopUp;
   - (int)indexOfItem:(id <NSMenuItem>)item;
   - (int)indexOfItemWithRepresentedObject:(id)obj;
   - (int)indexOfItemWithTag:(int)tag;
   - (int)indexOfItemWithTarget:(id)target 
                                 andAction:(SEL)actionSelector;
   - (int)indexOfItemWithTitle:(NSString *)title;
   - (int)indexOfSelectedItem;
 - (void) ...

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.