#import <CPCollectionView.h>
Additional Inherited Members | |
![]() | |
(CPMenu) | + defaultMenu |
(void) | + initialize |
(BOOL) | + isHighDPIDrawingEnabled |
(CPSet) | + keyPathsForValuesAffectingBounds |
(CPSet) | + keyPathsForValuesAffectingFrame |
(void) | + setHighDPIDrawingEnabled: |
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)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 314 of file CPCollectionView.j.
|
implementation |
Returns YES
if the user can select no items, NO
otherwise.
Definition at line 406 of file CPCollectionView.j.
|
implementation |
Returns YES
if the user can select multiple items, NO
otherwise.
Definition at line 423 of file CPCollectionView.j.
|
implementation |
Definition at line 802 of file CPCollectionView.j.
|
implementation |
Returns the collection view content array
Definition at line 349 of file CPCollectionView.j.
|
implementation |
Returns the collection view's delegate
Definition at line 903 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 1328 of file CPCollectionView.j.
|
implementation |
Definition at line 611 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(DragAndDrop).
Definition at line 1109 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(DragAndDrop).
Definition at line 1052 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(DragAndDrop).
Definition at line 1104 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(DragAndDrop).
Definition at line 1067 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(DragAndDrop).
Definition at line 1040 of file CPCollectionView.j.
|
implementation |
Archives the view to a coder.
aCoder | the object into which the view's data will be archived. |
Reimplemented from CPView.
Provided by category CPCollectionView(CPCoding).
Definition at line 1555 of file CPCollectionView.j.
|
implementation |
Definition at line 942 of file CPCollectionView.j.
|
implementation |
Definition at line 947 of file CPCollectionView.j.
|
implementation |
Initializes the view from an archive.
aCoder | the coder from which to initialize |
Reimplemented from CPView.
Provided by category CPCollectionView(CPCoding).
Definition at line 1530 of file CPCollectionView.j.
|
implementation |
Initializes the receiver for usage with the specified bounding rectangle
Reimplemented from CPView.
Definition at line 131 of file CPCollectionView.j.
|
implementation |
Returns whether the receiver is currently the first responder.
Definition at line 322 of file CPCollectionView.j.
|
implementation |
Returns YES
if the collection view is selectable, and NO
otherwise.
Definition at line 389 of file CPCollectionView.j.
|
implementation |
Definition at line 937 of file CPCollectionView.j.
|
implementation |
Returns the current item prototype
Definition at line 285 of file CPCollectionView.j.
|
implementation |
Returns the collection view items.
Definition at line 357 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 1343 of file CPCollectionView.j.
|
implementation |
Returns the current maximum item size.
Definition at line 778 of file CPCollectionView.j.
|
implementation |
Returns the maximum number of columns
Definition at line 708 of file CPCollectionView.j.
|
implementation |
Returns the maximum number of rows.
Definition at line 686 of file CPCollectionView.j.
Reimplemented from CPView.
Definition at line 911 of file CPCollectionView.j.
|
implementation |
Returns the current minimum item size
Definition at line 753 of file CPCollectionView.j.
|
implementation |
Reimplemented from CPView.
Definition at line 813 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(DragAndDrop).
Definition at line 991 of file CPCollectionView.j.
|
implementation |
Definition at line 807 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 1300 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 1305 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 1281 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 1290 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 1295 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 1310 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 1319 of file CPCollectionView.j.
|
implementation |
Returns a collection view item for anObject
.
anObject | the object to be represented. |
Definition at line 294 of file CPCollectionView.j.
|
implementation |
Returns the current number of columns
Definition at line 725 of file CPCollectionView.j.
|
implementation |
Returns the current number of rows
Definition at line 716 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 975 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(DragAndDrop).
Definition at line 1125 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(Deprecated).
Definition at line 1358 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(Deprecated).
Definition at line 1367 of file CPCollectionView.j.
|
implementation |
Definition at line 465 of file CPCollectionView.j.
|
implementation |
Initiates -superviewSizeChanged
: messages to subviews.
aSize | the size for the subviews |
Reimplemented from CPView.
Definition at line 509 of file CPCollectionView.j.
|
implementation |
Notifies subviews that the superview changed size.
aSize | the size of the old superview |
Reimplemented from CPView.
Definition at line 514 of file CPCollectionView.j.
|
implementation |
Returns a set of the selected indices.
Definition at line 460 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 398 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 415 of file CPCollectionView.j.
|
implementation |
Determines automatic resizing behavior.
aMask | a bit mask with options |
Reimplemented from CPView.
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 1348 of file CPCollectionView.j.
|
implementation |
Definition at line 783 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 339 of file CPCollectionView.j.
|
implementation |
Set the delegate of the receiver
aDelegate | the delegate object for the collectionView. |
Definition at line 192 of file CPCollectionView.j.
|
implementation |
Sets the item prototype to anItem
anItem | the new item prototype. |
Definition at line 272 of file CPCollectionView.j.
|
implementation |
Sets the maximum item size.
aSize | the new maximum item size |
Definition at line 762 of file CPCollectionView.j.
|
implementation |
Sets the maximum number of columns.
aMaxNumberOfColumns | the new maximum number of columns |
Definition at line 695 of file CPCollectionView.j.
|
implementation |
Sets the maximum number of rows.
aMaxNumberOfRows | the new maximum number of rows |
Definition at line 673 of file CPCollectionView.j.
|
implementation |
Sets the minimum size for an item
aSize | the new minimum item size |
Definition at line 734 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 367 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 432 of file CPCollectionView.j.
|
implementation |
Synthesized accessor method.
Provided by category CPCollectionView(CPSynthesizedAccessors).
Definition at line 884 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 874 of file CPCollectionView.j.
|
implementation |
Definition at line 526 of file CPCollectionView.j.
|
implementation |
Definition at line 531 of file CPCollectionView.j.
|
implementation |
Synthesized accessor method.
Provided by category CPCollectionView(CPSynthesizedAccessors).
Definition at line 1583 of file CPCollectionView.j.
|
implementation |
Gets the collection view's current vertical spacing between elements.
Definition at line 895 of file CPCollectionView.j.