CPCollectionView Class Reference

List of all members.

Public Member Functions

(id) - initWithFrame: [implementation]
(void) - setItemPrototype: [implementation]
(CPCollectionViewItem- itemPrototype [implementation]
(CPCollectionViewItem- newItemForRepresentedObject: [implementation]
(BOOL) - acceptsFirstResponder [implementation]
(BOOL) - isFirstResponder [implementation]
(void) - setContent: [implementation]
(CPArray- content [implementation]
(CPArray- items [implementation]
(void) - setSelectable: [implementation]
(BOOL) - isSelected [implementation]
(void) - setAllowsMultipleSelection: [implementation]
(BOOL) - allowsMultipleSelection [implementation]
(void) - setSelectionIndexes: [implementation]
(CPIndexSet- selectionIndexes [implementation]
(void) - reloadContent [implementation]
(void) - tile [implementation]
(void) - resizeSubviewsWithOldSize: [implementation]
(void) - setMaxNumberOfRows: [implementation]
(unsigned) - maxNumberOfRows [implementation]
(void) - setMaxNumberOfColumns: [implementation]
(unsigned) - maxNumberOfColumns [implementation]
(void) - setMinItemSize: [implementation]
(CGSize) - minItemSize [implementation]
(void) - setMaxItemSize: [implementation]
(CGSize) - maxItemSize [implementation]
(void) - mouseUp: [implementation]
(void) - mouseDown: [implementation]
(void) - mouseDragged: [implementation]
(void) - pasteboard:provideDataForType: [implementation]
(void) - setVerticalMargin: [implementation]
(void) - setDelegate: [implementation]
(id) - delegate [implementation]


Detailed Description

This class displays an array as a grid of objects, where each object is represented by a view. The view is controlled by creating a CPCollectionViewItem and specifying its view, then setting that item as the collection view prototype.

Delegate Methods
-(void)collectionViewDidChangeSelection:(CPCollectionView)collectionView; Called when the selection in the collection view has changed.
Parameters:
collectionView the collection view who's selection changed
-(void)collectionView:(CPCollectionView)collectionView didDoubleClickOnItemAtIndex:(int)index; Called when the user double-clicks on an item in the collection view.
Parameters:
collectionView the collection view that received the double-click
index the index of the item that received the double-click
-(CPData)collectionView:(CPCollectionView)collectionView dataForItemsAtIndexes:(CPIndexSet)indices forType:(CPString)aType; Invoked to obtain data for a set of indices.
Parameters:
collectionView the collection view to obtain data for
indices the indices to return data for
aType the data type
Returns:
a data object containing the index items
-(CPArray)collectionView:(CPCollectionView)collectionView dragTypesForItemsAtIndexes:(CPIndexSet)indices; Invoked to obtain the data types supported by the specified indices for placement on the pasteboard.
Parameters:
collectionView the collection view the items reside in
indices the indices to obtain drag types
Returns:
an array of drag types (CPString)

Definition at line 62 of file CPCollectionView.j.


Member Function Documentation

- (BOOL) acceptsFirstResponder   [implementation]

Returns YES by default.

Definition at line 162 of file CPCollectionView.j.

- (BOOL) allowsMultipleSelection   [implementation]

Returns YES if the user can select multiple items, NO otherwise.

Definition at line 250 of file CPCollectionView.j.

- (CPArray) content   [implementation]

Returns the collection view content array

Definition at line 195 of file CPCollectionView.j.

- (id) delegate   [implementation]

Returns the collection view's delegate

Definition at line 562 of file CPCollectionView.j.

- (id) initWithFrame: (CGRect)  aFrame   [implementation]

Definition at line 95 of file CPCollectionView.j.

- (BOOL) isFirstResponder   [implementation]

Returns whether the receiver is currently the first responder.

Definition at line 170 of file CPCollectionView.j.

- (BOOL) isSelected   [implementation]

Returns YES if the collection view is selected, and NO otherwise.

Definition at line 233 of file CPCollectionView.j.

- (CPCollectionViewItem) itemPrototype   [implementation]

Returns the current item prototype

Definition at line 134 of file CPCollectionView.j.

- (CPArray) items   [implementation]

Returns the collection view items.

Definition at line 203 of file CPCollectionView.j.

- (CGSize) maxItemSize   [implementation]

Returns the current maximum item size.

Definition at line 474 of file CPCollectionView.j.

- (unsigned) maxNumberOfColumns   [implementation]

Returns the maximum number of columns

Definition at line 430 of file CPCollectionView.j.

- (unsigned) maxNumberOfRows   [implementation]

Returns the maximum number of rows.

Definition at line 408 of file CPCollectionView.j.

- (CGSize) minItemSize   [implementation]

Returns the current minimum item size

Definition at line 452 of file CPCollectionView.j.

- (void) mouseDown: (CPEvent anEvent   [implementation]

Definition at line 485 of file CPCollectionView.j.

- (void) mouseDragged: (CPEvent anEvent   [implementation]

Definition at line 496 of file CPCollectionView.j.

- (void) mouseUp: (CPEvent anEvent   [implementation]

Definition at line 479 of file CPCollectionView.j.

- (CPCollectionViewItem) newItemForRepresentedObject: (id)  anObject   [implementation]

Returns a collection view item for anObject.

Parameters:
anObject the object to be represented.

Definition at line 143 of file CPCollectionView.j.

- (void) pasteboard: (CPPasteboard aPasteboard
provideDataForType: (CPString aType 
[implementation]

Places the selected items on the specified pasteboard. The items are requested from the collection's delegate.

Parameters:
aPasteboard the pasteboard to put the items on
aType the format the pasteboard data

Definition at line 533 of file CPCollectionView.j.

- (void) reloadContent   [implementation]

Definition at line 289 of file CPCollectionView.j.

- (void) resizeSubviewsWithOldSize: (CGSize)  aSize   [implementation]

Definition at line 385 of file CPCollectionView.j.

- (CPIndexSet) selectionIndexes   [implementation]

Returns a set of the selected indices.

Definition at line 283 of file CPCollectionView.j.

- (void) setAllowsMultipleSelection: (BOOL)  shouldAllowMultipleSelection   [implementation]

Sets whether the user can select multiple items.

Parameters:
shouldAllowMultipleSelection YES allows the user to select multiple items

Definition at line 242 of file CPCollectionView.j.

- (void) setContent: (CPArray anArray   [implementation]

Sets the content of the collection view to the content in anArray. This array can be of any type, and each element will be passed to the setRepresentedObject: method. It's the responsibility of your custom collection view item to interpret the object.

Parameters:
anArray the content array

Definition at line 182 of file CPCollectionView.j.

- (void) setDelegate: (id)  aDelegate   [implementation]

Sets the collection view's delegate

Parameters:
aDelegate the new delegate

Definition at line 554 of file CPCollectionView.j.

- (void) setItemPrototype: (CPCollectionViewItem anItem   [implementation]

Sets the item prototype to anItem

Parameters:
anItem the new item prototype

Definition at line 123 of file CPCollectionView.j.

- (void) setMaxItemSize: (CGSize)  aSize   [implementation]

Sets the maximum item size.

Parameters:
aSize the new maximum item size

Definition at line 461 of file CPCollectionView.j.

- (void) setMaxNumberOfColumns: (unsigned)  aMaxNumberOfColumns   [implementation]

Sets the maximum number of columns.

Parameters:
aMaxNumberOfColumns the new maximum number of columns

Definition at line 417 of file CPCollectionView.j.

- (void) setMaxNumberOfRows: (unsigned)  aMaxNumberOfRows   [implementation]

Sets the maximum number of rows.

Parameters:
aMaxNumberOfRows the new maximum number of rows

Definition at line 395 of file CPCollectionView.j.

- (void) setMinItemSize: (CGSize)  aSize   [implementation]

Sets the minimum size for an item

Parameters:
aSize the new minimum item size

Definition at line 439 of file CPCollectionView.j.

- (void) setSelectable: (BOOL)  isSelectable   [implementation]

Sets whether the user is allowed to select items

Parameters:
isSelectable YES allows the user to select items.

Definition at line 213 of file CPCollectionView.j.

- (void) setSelectionIndexes: (CPIndexSet anIndexSet   [implementation]

Sets the selected items based on the provided indices.

Parameters:
anIndexSet the set of items to be selected

Definition at line 259 of file CPCollectionView.j.

- (void) setVerticalMargin: (float)  aVerticalMargin   [implementation]

Definition at line 540 of file CPCollectionView.j.

- (void) tile   [implementation]

Definition at line 320 of file CPCollectionView.j.


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

Generated on Thu Dec 11 01:55:49 2008 for Cappuccino by  doxygen 1.5.7.1