CPObjectCPToolbar
@implementation CPToolbar : CPObject
A CPToolbar
is displayed at the top of a window with multiple
buttons (tools) that offer the user quick access to features.
Method Summary | |
---|---|
-(id) | initWithIdentifier:(CPString)anIdentifier Initializes the toolbar with the specified identifier. |
-(id) | delegate Returns the toolbar's delegate. |
-(CPString) | identifier Returns the toolbar's identifier. |
-(int) | indexOfItem:(CPToolbarItem)anItem Returns the index of the specified toolbar item. |
-(BOOL) | isVisible Returns YES if the toolbar is currently visible. |
-(CPArray) | items Returns all the items in this toolbar. |
-(CPArray) | itemsSortedByVisibilityPriority Returns the toolbar items sorted by their visibilityPriority (ies). |
-(void) | setDelegate:(id)aDelegate Sets the delegate for the toolbar. |
-(void) | setDisplayMode:(CPToolbarDisplayMode)aDisplayMode Sets the toolbar's display mode. |
-(void) | setVisible:(BOOL)aFlag Sets whether the toolbar should be visible. |
-(CPArray) | visibleItems Returns all the visible items in this toolbar. |
Delegate Method Summary | |
---|---|
-(CPArray) | toolbarDefaultItemIdentifiers:(CPToolbar)toolbar Called to obtain the toolbar's default item identifiers. |
-(CPArray) | toolbarAllowedItemIdentifiers:(CPToolbar)toolbar Called to obtain the toolbar's default item identifiers. |
-(CPToolbarItem) | toolbar:(CPToolbar)toolbar itemForItemIdentifier:(CPString)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag Called to obtain a toolbar item. |
Method Detail |
---|
-(id)initWithIdentifier:(CPString)anIdentifier
anIdentifier
- the identifier for the toolbar-(id)delegate
-(CPString)identifier
-(int)indexOfItem:(CPToolbarItem)anItem
anItem
- the item to obtain the index for-(BOOL)isVisible
YES
if the toolbar is currently visible-(CPArray)items
-(CPArray)itemsSortedByVisibilityPriority
visibilityPriority
(ies).-(void)setDelegate:(id)aDelegate
aDelegate
- the new toolbar delegate-(void)setDisplayMode:(CPToolbarDisplayMode)aDisplayMode
aDisplayMode
-(void)setVisible:(BOOL)aFlag
aFlag
- YES
makes the toolbar visible-(CPArray)visibleItems
Delegate Method Detail |
---|
-(CPArray)toolbarDefaultItemIdentifiers:(CPToolbar)toolbar
toolbar
- the toolbar to obtain identifiers for-(CPArray)toolbarAllowedItemIdentifiers:(CPToolbar)toolbar
toolbar
- the toolbar to obtain identifiers for-(CPToolbarItem)toolbar:(CPToolbar)toolbar itemForItemIdentifier:(CPString)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag
toolbar
- the toolbar the item belongs toitemIdentifier
- the identifier of the toolbar itemflag
- YES
means the item will be placed in the toolbar. NO
means the item will be displayed for
some other purpose (non-functional)nil
if no such item belongs in the toolbar
Created on Sat Sep 13 14:15:43 PDT 2008