Name

NSToolbar — Mac OS X 10.0

Synopsis

This class manages a toolbar in an application window. Every toolbar has an identifier, and multiple toolbars in an application with the same identifier (say, in multiple open document windows) will keep the same state. Toolbar objects take a delegate that provides the toolbar with NSToolbarItems to populate the toolbar and the toolbar customization sheet.

image with no caption

@interface NSToolbar : NSObject
                                  // Initializers
   - (id)initWithIdentifier:(NSString *)identifier;
                                  // Accessor Methods
   - (void)setConfigurationFromDictionary:(NSDictionary *)configDict;
   - (void)setDelegate:(id)delegate;
   - (id)delegate;
   - (void)setVisible:(BOOL)shown;
   - (void)setAllowsUserCustomization:(BOOL)allowCustomization;
   - (BOOL)allowsUserCustomization;
   - (void)setDisplayMode:(NSToolbarDisplayMode)displayMode;
   - (NSToolbarDisplayMode)displayMode;
   - (void)setSizeMode:(NSToolbarSizeMode)sizeMode;
   - (NSToolbarSizeMode)sizeMode;
   - (void)setAutosavesConfiguration:(BOOL)flag;
   - (BOOL)autosavesConfiguration;
                                  // Instance Methods
   - (NSDictionary *)configurationDictionary;
   - (NSString *)identifier;
   - (BOOL)customizationPaletteIsRunning;
   - (void)insertItemWithItemIdentifier:(NSString *)itemIdentifier 
                                 atIndex:(int)index;
   - (BOOL)isVisible;
   - (NSArray *)items;
   - (void)removeItemAtIndex:(int)index;
   - (void)runCustomizationPalette:(id)sender;
 - (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.