Name
NSPopUpButton — Mac OS X 10.0
Synopsis
This class implements a pop-up button interface component. A pop-up button is a button that displays a menu when it is activated; the displayed menu can either be a pop-up menu that appears beneath the mouse cursor, or a pull-down menu that is drawn below the button.
|
@interface NSPopUpButton : NSButton
|
// Initializers
|
- (id)initWithFrame:(NSRect)buttonFrame pullsDown:(BOOL)flag; |
// Accessor Methods
|
- (void)setPullsDown:(BOOL)flag; |
- (BOOL)pullsDown;
|
- (void)setTitle:(NSString *)aString; |
- (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; |
- (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 ... |
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.