API  1.0.0
CPToolbar Class Reference

#import <CPToolbar.h>

+ Inheritance diagram for CPToolbar:

Instance Methods

(id) - delegate
 
(CPToolbarDisplayMode) - displayMode
 
(void) - encodeWithCoder:
 
(CPString- identifier
 
(id) - init
 
(id) - initWithCoder:
 
(id) - initWithIdentifier:
 
(BOOL) - isVisible
 
(CPArray) - items
 
(CPArray) - itemsSortedByVisibilityPriority
 
(void) - setDelegate:
 
(void) - setDisplayMode:
 
(void) - setSizeMode:
 
(void) - setVisible:
 
(CPToolbarSizeMode) - sizeMode
 
(void) - toolbarItemDidChange:
 
(void) - validateVisibleItems
 
(CPArray) - visibleItems
 
- Instance Methods inherited from CPObject
(void) - addObserver:forKeyPath:options:context:
 
(void) - applyChange:toKeyPath:
 
(id) - autorelease
 
(id) - awakeAfterUsingCoder:
 
(void) - awakeFromCib
 
(void) - bind:toObject:withKeyPath:options:
 
(Class) - classForCoder
 
(Class) - classForKeyedArchiver
 
(CPString- className
 
(id) - copy
 
(void) - dealloc
 
(CPString- description
 
(CPDictionary- dictionaryWithValuesForKeys:
 
(void) - didChange:valuesAtIndexes:forKey:
 
(void) - didChangeValueForKey:
 
(void) - didChangeValueForKey:withSetMutation:usingObjects:
 
(void) - doesNotRecognizeSelector:
 
(CPArray) - exposedBindings
 
(id) - forwardingTargetForSelector:
 
(void) - forwardInvocation:
 
(unsigned) - hash
 
(BOOL) - implementsSelector:
 
(CPDictionary- infoForBinding:
 
(BOOL) - isEqual:
 
(BOOL) - isKindOfClass:
 
(BOOL) - isMemberOfClass:
 
(BOOL) - isProxy
 
(IMP) - methodForSelector:
 
(CPMethodSignature) - methodSignatureForSelector:
 
(id) - mutableArrayValueForKey:
 
(id) - mutableArrayValueForKeyPath:
 
(id) - mutableCopy
 
(id) - mutableSetValueForKey:
 
(id) - mutableSetValueForKeyPath:
 
(id) - performSelector:
 
(id) - performSelector:withObject:
 
(void) - performSelector:withObject:afterDelay:
 
(void) - performSelector:withObject:afterDelay:inModes:
 
(id) - performSelector:withObject:withObject:
 
(id) - performSelector:withObjects:
 
(void) - release
 
(void) - removeObserver:forKeyPath:
 
(id) - replacementObjectForArchiver:
 
(id) - replacementObjectForCoder:
 
(id) - replacementObjectForKeyedArchiver:
 
(BOOL) - respondsToSelector:
 
(id) - retain
 
(id) - self
 
(void) - setValue:forKey:
 
(void) - setValue:forKeyPath:
 
(void) - setValue:forUndefinedKey:
 
(void) - setValuesForKeysWithDictionary:
 
(CPString- UID
 
(void) - unbind:
 
(Class) - valueClassForBinding:
 
(id) - valueForKey:
 
(id) - valueForKeyPath:
 
(id) - valueForUndefinedKey:
 
(void) - willChange:valuesAtIndexes:forKey:
 
(void) - willChangeValueForKey:
 
(void) - willChangeValueForKey:withSetMutation:usingObjects:
 

Class Methods

(void) + initialize
 
- Class Methods inherited from CPObject
(BOOL) + accessInstanceVariablesDirectly
 
(id) + alloc
 
(id) + allocWithCoder:
 
(BOOL) + automaticallyNotifiesObserversForKey:
 
(void) + cancelPreviousPerformRequestsWithTarget:
 
(void) + cancelPreviousPerformRequestsWithTarget:selector:object:
 
(Class) + class
 
(BOOL) + conformsToProtocol:
 
(void) + exposeBinding:
 
(IMP) + instanceMethodForSelector:
 
(BOOL) + instancesImplementSelector:
 
(BOOL) + instancesRespondToSelector:
 
(BOOL) + isBindingExclusive:
 
(BOOL) + isSubclassOfClass:
 
(CPSet) + keyPathsForValuesAffectingValueForKey:
 
(void) + load
 
(id) + new
 
(void) + object:performSelector:withObject:afterDelay:inModes:
 
(void) + setVersion:
 
(Class) + superclass
 
(int) + version
 

Detailed Description

A CPToolbar is displayed at the top of a window with multiple buttons (tools) that offer the user quick access to features.

Delegate Methods

-(CPArray)toolbarDefaultItemIdentifiers:(CPToolbar)toolbar; Called to obtain the toolbar's default item identifiers. Required.

Parameters
toolbarthe toolbar to obtain identifiers for
Returns
an array of default item identifiers in the order on the toolbar

-(CPArray)toolbarAllowedItemIdentifiers:(CPToolbar)toolbar; Called to obtain the toolbar's default item identifiers. Required.

Parameters
toolbarthe toolbar to obtain identifiers for
Returns
an array of default item identifiers in the order on the toolbar

- (CPToolbarItem)toolbar:(CPToolbar)toolbar itemForItemIdentifier:(CPString)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag; Called to obtain a toolbar item. Required.

Parameters
toolbarthe toolbar the item belongs to
itemIdentifierthe identifier of the toolbar item
flagYES means the item will be placed in the toolbar. NO means the item will be displayed for some other purpose (non-functional)
Returns
the toolbar item or nil if no such item belongs in the toolbar

Definition at line 2 of file CPToolbar.h.

Method Documentation

◆ delegate()

- (id) delegate
implementation

Returns the toolbar's delegate

Definition at line 199 of file CPToolbar.j.

◆ displayMode()

- (CPToolbarDisplayMode) displayMode
implementation

Synthesized accessor method.

Provided by category CPToolbar(CPSynthesizedAccessors).

Definition at line 1374 of file CPToolbar.j.

◆ encodeWithCoder:()

- (void) encodeWithCoder: (CPCoder aCoder
implementation

Provided by category CPToolbar(CPCoding).

Definition at line 580 of file CPToolbar.j.

◆ identifier()

- (CPString) identifier
implementation

Returns the toolbar's identifier

Definition at line 191 of file CPToolbar.j.

◆ init()

- (id) init
implementation

Initializes the receiver

Returns
the initialized receiver

Reimplemented from CPObject.

Definition at line 159 of file CPToolbar.j.

◆ initialize()

+ (void) initialize
implementation

Reimplemented from CPObject.

Definition at line 136 of file CPToolbar.j.

◆ initWithCoder:()

- (id) initWithCoder: (CPCoder aCoder
implementation

Provided by category CPToolbar(CPCoding).

Definition at line 529 of file CPToolbar.j.

◆ initWithIdentifier:()

- (id) initWithIdentifier: (CPString anIdentifier
implementation

Initializes the toolbar with the specified identifier.

Parameters
anIdentifierthe identifier for the toolbar
Returns
the initialized toolbar

Definition at line 169 of file CPToolbar.j.

◆ isVisible()

- (BOOL) isVisible
implementation

Returns YES if the toolbar is currently visible

Definition at line 207 of file CPToolbar.j.

◆ items()

- (CPArray) items
implementation

Returns all the items in this toolbar.

Definition at line 384 of file CPToolbar.j.

◆ itemsSortedByVisibilityPriority()

- (CPArray) itemsSortedByVisibilityPriority
implementation

Returns the toolbar items sorted by their visibilityPriority(ies).

Definition at line 400 of file CPToolbar.j.

◆ setDelegate:()

- (void) setDelegate: (id)  aDelegate
implementation

Sets the delegate for the toolbar.

Parameters
aDelegatethe new toolbar delegate

Definition at line 256 of file CPToolbar.j.

◆ setDisplayMode:()

- (void) setDisplayMode: (CPToolbarDisplayMode)  aDisplayMode
implementation

Synthesized accessor method.

Provided by category CPToolbar(CPSynthesizedAccessors).

Definition at line 285 of file CPToolbar.j.

◆ setSizeMode:()

- (void) setSizeMode: (CPToolbarSizeMode)  aSize
implementation

Synthesized accessor method.

Provided by category CPToolbar(CPSynthesizedAccessors).

Definition at line 226 of file CPToolbar.j.

◆ setVisible:()

- (void) setVisible: (BOOL)  aFlag
implementation

Sets whether the toolbar should be visible.

Parameters
aFlagYES makes the toolbar visible

Definition at line 216 of file CPToolbar.j.

◆ sizeMode()

- (CPToolbarSizeMode) sizeMode
implementation

Synthesized accessor method.

Provided by category CPToolbar(CPSynthesizedAccessors).

Definition at line 1390 of file CPToolbar.j.

◆ toolbarItemDidChange:()

- (void) toolbarItemDidChange: (CPToolbarItem)  anItem
implementation

Notifies the toolbar that an item has been changed. This will cause the toolbar to reload its items.

Parameters
anItemthe item that has been changed

Definition at line 486 of file CPToolbar.j.

◆ validateVisibleItems()

- (void) validateVisibleItems
implementation

Validates the visible toolbar items by sending a validate message to each visible toolbar item.

Definition at line 409 of file CPToolbar.j.

◆ visibleItems()

- (CPArray) visibleItems
implementation

Returns all the visible items in this toolbar

Definition at line 392 of file CPToolbar.j.


The documentation for this class was generated from the following files: