![]() |
API
0.9.6
|
#import <CPCollectionView.h>
Additional Inherited Members | |
![]() | |
(CPMenu) | + defaultMenu |
(CPString) | + defaultThemeClass |
(void) | + initialize |
(CPSet) | + keyPathsForValuesAffectingBounds |
(CPSet) | + keyPathsForValuesAffectingFrame |
(CPDictionary) | + themeAttributes |
![]() | |
(BOOL) | + accessInstanceVariablesDirectly |
(id) | + alloc |
(id) | + allocWithCoder: |
(BOOL) | + automaticallyNotifiesObserversForKey: |
(Class) | + class |
(void) | + exposeBinding: |
(IMP) | + instanceMethodForSelector: |
(BOOL) | + instancesRespondToSelector: |
(BOOL) | + isSubclassOfClass: |
(CPSet) | + keyPathsForValuesAffectingValueForKey: |
(void) | + load |
(id) | + new |
(void) | + setVersion: |
(Class) | + superclass |
(int) | + version |
![]() | |
Class | isa |
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; Called when the selection in the collection view has changed.
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.
Reimplemented from CPResponder.
Definition at line 219 of file CPCollectionView.j.
|
implementation |
Returns YES
if the user can select no items, NO
otherwise.
Definition at line 311 of file CPCollectionView.j.
|
implementation |
Returns YES
if the user can select multiple items, NO
otherwise.
Definition at line 328 of file CPCollectionView.j.
|
implementation |
Reimplemented from CPObject.
Provided by category CPCollectionView(CPCoding).
Definition at line 978 of file CPCollectionView.j.
|
implementation |
Definition at line 622 of file CPCollectionView.j.
|
implementation |
Returns the collection view content array
Definition at line 254 of file CPCollectionView.j.
|
implementation |
Returns the collection view's delegate
Definition at line 780 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 924 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 1030 of file CPCollectionView.j.
|
implementation |
Definition at line 812 of file CPCollectionView.j.
|
implementation |
Definition at line 817 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 994 of file CPCollectionView.j.
|
implementation |
Initializes the receiver for usage with the specified bounding rectangle
Reimplemented from CPView.
Definition at line 96 of file CPCollectionView.j.
|
implementation |
Returns whether the receiver is currently the first responder.
Definition at line 227 of file CPCollectionView.j.
|
implementation |
Returns YES
if the collection view is selectable, and NO
otherwise.
Definition at line 294 of file CPCollectionView.j.
|
implementation |
Definition at line 807 of file CPCollectionView.j.
|
implementation |
Returns the current item prototype
Definition at line 184 of file CPCollectionView.j.
|
implementation |
Returns the collection view items.
Definition at line 262 of file CPCollectionView.j.
|
implementation |
Notifies the receiver that the user has pressed a key.
anEvent | information about the key press |
Reimplemented from CPResponder.
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 939 of file CPCollectionView.j.
|
implementation |
Returns the current maximum item size.
Definition at line 598 of file CPCollectionView.j.
|
implementation |
Returns the maximum number of columns
Definition at line 535 of file CPCollectionView.j.
|
implementation |
Returns the maximum number of rows.
Definition at line 513 of file CPCollectionView.j.
Reimplemented from CPView.
Definition at line 788 of file CPCollectionView.j.
|
implementation |
Returns the current minimum item size
Definition at line 576 of file CPCollectionView.j.
|
implementation |
Notifies the receiver that the user has clicked the mouse down in its area.
anEvent | contains information about the click |
Reimplemented from CPView.
Definition at line 633 of file CPCollectionView.j.
|
implementation |
Notifies the receiver that the user has initiated a drag over it. A drag is a mouse movement while the left button is down.
anEvent | contains information about the drag |
Reimplemented from CPResponder.
Definition at line 683 of file CPCollectionView.j.
|
implementation |
Notifies the receiver that the user has released the left mouse button.
anEvent | contains information about the release |
Reimplemented from CPResponder.
Definition at line 627 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 896 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 901 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 868 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 877 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 886 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 891 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 906 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(KeyboardInteraction).
Definition at line 915 of file CPCollectionView.j.
|
implementation |
Returns a collection view item for anObject
.
anObject | the object to be represented. |
Definition at line 193 of file CPCollectionView.j.
|
implementation |
Returns the current number of columns
Definition at line 552 of file CPCollectionView.j.
|
implementation |
Returns the current number of rows
Definition at line 543 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 |
Definition at line 737 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(Deprecated).
Definition at line 948 of file CPCollectionView.j.
|
implementation |
Provided by category CPCollectionView(Deprecated).
Definition at line 957 of file CPCollectionView.j.
|
implementation |
Definition at line 374 of file CPCollectionView.j.
|
implementation |
Initiates -superviewSizeChanged
: messages to subviews.
aSize | the size for the subviews |
Reimplemented from CPView.
Definition at line 490 of file CPCollectionView.j.
|
implementation |
Returns a set of the selected indices.
Definition at line 368 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 303 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 320 of file CPCollectionView.j.
|
implementation |
Definition at line 603 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 244 of file CPCollectionView.j.
|
implementation |
Sets the collection view's delegate
aDelegate | the new delegate |
Definition at line 772 of file CPCollectionView.j.
|
implementation |
Sets the item prototype to anItem
The item prototype should implement the CPCoding protocol because the item is copied by archiving and unarchiving the prototypal view.
Example:
MyCustomView : CPCollectionViewItem { CPArray items; }
This will allow the collection view to create multiple 'clean' copies of the item prototype which will maintain the original values for item and all of the properties archived by the super class.
anItem | the new item prototype |
Definition at line 171 of file CPCollectionView.j.
|
implementation |
Sets the maximum item size.
aSize | the new maximum item size |
Definition at line 585 of file CPCollectionView.j.
|
implementation |
Sets the maximum number of columns.
aMaxNumberOfColumns | the new maximum number of columns |
Definition at line 522 of file CPCollectionView.j.
|
implementation |
Sets the maximum number of rows.
aMaxNumberOfRows | the new maximum number of rows |
Definition at line 500 of file CPCollectionView.j.
|
implementation |
Sets the minimum size for an item
aSize | the new minimum item size |
Definition at line 561 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 272 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 337 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 749 of file CPCollectionView.j.
|
implementation |
Definition at line 412 of file CPCollectionView.j.
|
implementation |
Gets the collection view's current vertical spacing between elements.
Definition at line 763 of file CPCollectionView.j.