![]() |
API
0.9.7
|
#import <CPCollectionView.h>
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.
- (void)collectionViewDidChangeSelection:(CPCollectionView)collectionView; DEPRECATED: Please do not use.
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.
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.
collectionView | the collection view to obtain data for |
indices | the indices to return data for |
aType | the data type |
- (CPArray)collectionView:(CPCollectionView)collectionView dragTypesForItemsAtIndexes:(CPIndexSet)indices; Invoked to obtain the data types supported by the specified indices for placement on the pasteboard.
collectionView | the collection view the items reside in |
indices | the indices to obtain drag types |
Definition at line 2 of file CPCollectionView.h.
|
implementation |
Returns YES
by default.
Definition at line 247 of file CPCollectionView.j.
|
implementation |
Returns YES
if the user can select no items, NO
otherwise.
Definition at line 339 of file CPCollectionView.j.
|
implementation |
Returns YES
if the user can select multiple items, NO
otherwise.
Definition at line 356 of file CPCollectionView.j.
|
implementation |
Definition at line 741 of file CPCollectionView.j.
|
implementation |
Returns the collection view content array
Definition at line 282 of file CPCollectionView.j.
|
implementation |
Returns the collection view's delegate
Definition at line 851 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 1295 of file CPCollectionView.j.
|
implementation |
Definition at line 550 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(DragAndDrop).
Definition at line 1076 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(DragAndDrop).
Definition at line 1017 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(DragAndDrop).
Definition at line 1071 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(DragAndDrop).
Definition at line 1032 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(DragAndDrop).
Definition at line 997 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(CPCoding).
Definition at line 1379 of file CPCollectionView.j.
|
implementation |
Definition at line 890 of file CPCollectionView.j.
|
implementation |
Definition at line 895 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(CPCoding).
Definition at line 1354 of file CPCollectionView.j.
|
implementation |
Definition at line 109 of file CPCollectionView.j.
|
implementation |
Returns whether the receiver is currently the first responder.
Definition at line 255 of file CPCollectionView.j.
|
implementation |
Returns YES
if the collection view is selectable, and NO
otherwise.
Definition at line 322 of file CPCollectionView.j.
|
implementation |
Definition at line 885 of file CPCollectionView.j.
|
implementation |
Returns the current item prototype
Definition at line 218 of file CPCollectionView.j.
|
implementation |
Returns the collection view items.
Definition at line 290 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 1310 of file CPCollectionView.j.
|
implementation |
Returns the current maximum item size.
Definition at line 717 of file CPCollectionView.j.
|
implementation |
Returns the maximum number of columns
Definition at line 647 of file CPCollectionView.j.
|
implementation |
Returns the maximum number of rows.
Definition at line 625 of file CPCollectionView.j.
Definition at line 859 of file CPCollectionView.j.
|
implementation |
Returns the current minimum item size
Definition at line 692 of file CPCollectionView.j.
|
implementation |
Definition at line 752 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(DragAndDrop).
Definition at line 939 of file CPCollectionView.j.
|
implementation |
Definition at line 746 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 1267 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 1272 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 1239 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 1248 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 1257 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 1262 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 1277 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 1286 of file CPCollectionView.j.
|
implementation |
Returns a collection view item for anObject
.
anObject | the object to be represented. |
Definition at line 227 of file CPCollectionView.j.
|
implementation |
Returns the current number of columns
Definition at line 664 of file CPCollectionView.j.
|
implementation |
Returns the current number of rows
Definition at line 655 of file CPCollectionView.j.
|
implementation |
Places the selected items on the specified pasteboard. The items are requested from the collection's delegate.
aPasteboard | the pasteboard to put the items on |
aType | the format the pasteboard data |
Provided by category CPCollectionView(DragAndDrop).
Definition at line 923 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(DragAndDrop).
Definition at line 1092 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(Deprecated).
Definition at line 1324 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(Deprecated).
Definition at line 1333 of file CPCollectionView.j.
|
implementation |
Definition at line 404 of file CPCollectionView.j.
|
implementation |
Definition at line 448 of file CPCollectionView.j.
|
implementation |
Definition at line 453 of file CPCollectionView.j.
|
implementation |
Returns a set of the selected indices.
Definition at line 399 of file CPCollectionView.j.
|
implementation |
Sets whether the user may have no items selected. If YES, mouse clicks not on any item will empty the current selection. The first item will also start off as selected.
shouldAllowMultipleSelection | YES allows the user to select multiple items |
Definition at line 331 of file CPCollectionView.j.
|
implementation |
Sets whether the user can select multiple items.
shouldAllowMultipleSelection | YES allows the user to select multiple items |
Definition at line 348 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 1315 of file CPCollectionView.j.
|
implementation |
Definition at line 722 of file CPCollectionView.j.
|
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.
If the new content array is smaller than the previous one, note that [receiver selectionIndexes] may refer to out of range indices. selectionIndexes
is not changed as a result of calling the setContent:
method.
anArray | a content array |
Definition at line 272 of file CPCollectionView.j.
|
implementation |
Sets the collection view's delegate
aDelegate | the new delegate |
Definition at line 843 of file CPCollectionView.j.
|
implementation |
Sets the item prototype to \c anItem
anItem | the new item prototype. |
Definition at line 205 of file CPCollectionView.j.
|
implementation |
Sets the maximum item size.
aSize | the new maximum item size |
Definition at line 701 of file CPCollectionView.j.
|
implementation |
Sets the maximum number of columns.
aMaxNumberOfColumns | the new maximum number of columns |
Definition at line 634 of file CPCollectionView.j.
|
implementation |
Sets the maximum number of rows.
aMaxNumberOfRows | the new maximum number of rows |
Definition at line 612 of file CPCollectionView.j.
|
implementation |
Sets the minimum size for an item
aSize | the new minimum item size |
Definition at line 673 of file CPCollectionView.j.
|
implementation |
Sets whether the user is allowed to select items
isSelectable | YES allows the user to select items. |
Definition at line 300 of file CPCollectionView.j.
|
implementation |
Sets the selected items based on the provided indices.
anIndexSet | the set of items to be selected |
Definition at line 365 of file CPCollectionView.j.
|
implementation |
Synthesized accessor method.
Provided by category CPCollectionView(CPSynthesizedAccessors).
Definition at line 823 of file CPCollectionView.j.
|
implementation |
Sets the collection view's vertical spacing between elements.
aVerticalMargin | the number of pixels to place between elements |
Definition at line 813 of file CPCollectionView.j.
|
implementation |
Definition at line 465 of file CPCollectionView.j.
|
implementation |
Definition at line 470 of file CPCollectionView.j.
|
implementation |
Synthesized accessor method.
Provided by category CPCollectionView(CPSynthesizedAccessors).
Definition at line 1407 of file CPCollectionView.j.
|
implementation |
Gets the collection view's current vertical spacing between elements.
Definition at line 834 of file CPCollectionView.j.