NSPopUpButtonCell

NSPopUpButtonCell Mac OS X 10.0

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

figs/cocn_1570.gif

@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)insertItemWithTitle:(NSString *)title atIndex:(int)index;
   - (NSArray *)itemArray;
   - (id <NSMenuItem>)itemAtIndex:(int)index;
   - (NSString *)itemTitleAtIndex:(int)index;
   - (NSArray *)itemTitles;
   - (id <NSMenuItem>)itemWithTitle:(NSString *)title;
   - (id <NSMenuItem>)lastItem;
   - (int)numberOfItems;
   - (void)performClickWithFrame:(NSRect)frame inView:(NSView *)controlView;
   - (void)removeAllItems;
   - (void)removeItemAtIndex:(int)index;
   - (void)removeItemWithTitle:(NSString *)title;
   - (void)selectItem:(id <NSMenuItem>)item;
   - (void)selectItemAtIndex:(int)index;
   - (void)selectItemWithTitle:(NSString *)title;
   - (id <NSMenuItem>)selectedItem;
   - (void)synchronizeTitleAndSelectedItem;
   - (NSString *)titleOfSelectedItem;
// Notifications
   NSPopUpButtonCellWillPopUpNotification;



    Part II: API Quick Reference
    Chapter 13. Foundation Classes