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

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) ...

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