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

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

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