Up
Authors
- Doug Simons (doug.simons@testplant.com)
-
Date: Generated at 2025-12-03
Copyright: (C) 2013, 2021 Free Software Foundation, Inc.
- Declared in:
- AppKit/NSCollectionView.h
Availability: OpenStep
NSCollectionView provides a flexible
container for displaying collections of items
arranged in a customizable layout. This view manages
the display of multiple collection view items, handles
user selection and interaction, supports drag and drop
operations, and provides extensive customization
through layouts and delegate methods. It serves as
the primary interface for displaying grid-based or custom
arranged content with efficient recycling of view
components for optimal performance with large
datasets.
NSCollectionView declares 37 Instance Variables
- (BOOL)
allowsEmptySelection;
Availability: MacOS-X 10.11.0
Description forthcoming.
- (BOOL)
allowsMultipleSelection;
Availability: OpenStep
Returns whether the collection view allows
selection of multiple items simultaneously. When
enabled, users can select multiple collection view
items using standard multi-selection techniques such
as command-click or shift-click. When disabled,
selecting one item automatically deselects all
others, maintaining single-item selection behavior.
- (
NSArray*)
backgroundColors;
Availability: OpenStep
Returns the array of background colors used for
alternating item backgrounds in the collection
view. Background colors provide visual distinction
between items and can create striping effects or
other visual patterns to improve readability and
organization of the displayed content.
- (
NSView*)
backgroundView;
Availability: MacOS-X 10.11.0
Description forthcoming.
- (BOOL)
backgroundViewScrollsWithContent;
Availability: MacOS-X 10.11.0
Description forthcoming.
- (
NSCollectionViewLayout*)
collectionViewLayout;
Availability: MacOS-X 10.11.0
Returns the collection view layout object that
determines how items are positioned and arranged
within the collection view. The layout controls item
placement, sizing, spacing, and other visual
arrangement aspects. Different layout classes
provide various presentation styles such as grids,
flows, or custom arrangements.
- (
NSArray*)
content;
Availability: OpenStep
Returns the array of objects that serves as the
data source for the collection view items. Each object
in the content array corresponds to one item displayed
in the collection view, with the item prototype or
registered classes determining how each object
is presented visually to the user.
- (id<
NSCollectionViewDelegate>)
delegate;
Availability: OpenStep
Returns the object that serves as the delegate for
this collection view. The delegate handles various
aspects of user interaction, selection behavior,
drag and drop operations, and provides feedback about
item display and lifecycle events. The delegate
enables customization of the collection view's
behavior beyond its default functionality.
- (void)
deleteItemsAtIndexPaths: (
NSSet*)indexPaths;
Availability: MacOS-X 10.11.0
Not implemented (as of 2025-12-03).
Please help us by producing an implementation of
this and donating it to the GNUstep project.
- (void)
deleteSections: (
NSIndexSet*)sections;
Availability: MacOS-X 10.11.0
Not implemented (as of 2025-12-03).
Please help us by producing an implementation of
this and donating it to the GNUstep project.
- (IBAction)
deselectAll: (id)sender;
Availability: MacOS-X 10.11.0
Description forthcoming.
- (void)
deselectItemsAtIndexPaths: (
NSSet*)indexPaths;
Availability: MacOS-X 10.11.0
Description forthcoming.
- (
NSImage*)
draggingImageForItemsAtIndexes: (
NSIndexSet*)indexes
withEvent: (
NSEvent*)event
offset: (
NSPointPointer)dragImageOffset;
Availability: OpenStep
Returns a drag image representing the items at the
specified indexes during a drag
operation. The image provides visual feedback to
users about what content is being dragged and can be
customized to show item previews, counts, or
other relevant information. The offset parameter
specifies the image position relative to the
mouse cursor.
- (
NSRect)
frameForItemAtIndex: (
NSUInteger)index;
Availability: OpenStep
Returns the frame rectangle for the item at the
specified index within the collection
view's coordinate system. The frame defines the
item's position and size as determined by the
current layout, useful for hit testing, scrolling
to specific items, or custom drawing and animation
operations.
- (
NSIndexPath*)
indexPathForItem: (
NSCollectionViewItem*)item;
Availability: MacOS-X 10.11.0
Returns the index path for the specified collection
view item object. The index path identifies
the item's position within the collection view's
section and item structure. Returns
nil if the item is not found
or is not currently associated with a valid position in
the collection view.
- (
NSIndexPath*)
indexPathForItemAtPoint: (
NSPoint)point;
Availability: MacOS-X 10.11.0
Returns the index path for the item located at the
specified point within the collection
view's coordinate system. This method performs hit
testing to determine which item, if any, is
positioned at the given location. Returns
nil if no item is found at the
specified point.
- (
NSSet*)
indexPathsForVisibleItems;
Availability: MacOS-X 10.11.0
Returns a set of index paths identifying all
currently visible items within the collection
view's bounds. Index paths specify both section and
item positions for precise identification in
multi-section layouts. This information is
useful for optimizing updates and managing visible
content efficiently.
- (
NSSet*)
indexPathsForVisibleSupplementaryElementsOfKind: (
NSCollectionViewSupplementaryElementKind)elementKind;
Availability: MacOS-X 10.11.0
Returns a set of index paths for visible
supplementary elements of the specified kind.
Supplementary elements include section
headers, footers, and other layout-provided
decorative views. The index paths identify the
location of currently visible supplementary views
within the collection view's section structure.
- (void)
insertItemsAtIndexPaths: (
NSSet*)indexPaths;
Availability: MacOS-X 10.11.0
Not implemented (as of 2025-12-03).
Please help us by producing an implementation of
this and donating it to the GNUstep project.
- (void)
insertSections: (
NSIndexSet*)sections;
Availability: MacOS-X 10.11.0
Not implemented (as of 2025-12-03).
Please help us by producing an implementation of
this and donating it to the GNUstep project.
- (BOOL)
isSelectable;
Availability: OpenStep
Returns whether items in the collection view can be
selected by user interaction. When selectable,
users can click items to select them, and the
collection view manages selection state and
visual feedback. When not selectable, items are
display-only and do not respond to selection
attempts, though they may still handle other
interactions.
- (
NSCollectionViewItem*)
itemAtIndex: (
NSUInteger)index;
Availability: OpenStep
Returns the collection view item object currently
displayed at the specified index. This
provides access to the item's view hierarchy and
properties for direct manipulation or
inspection. Returns nil if no item
exists at the given index or if the item
is not currently visible and instantiated.
- (
NSCollectionViewItem*)
itemAtIndexPath: (
NSIndexPath*)indexPath;
Availability: MacOS-X 10.11.0
Returns the collection view item object at the
specified index path. The item may be created if
it's not currently instantiated but is within the
displayable range. Returns nil if
no item exists at the given index path or if the path is
invalid for the current content configuration.
- (
NSCollectionViewItem*)
itemPrototype;
Availability: OpenStep
Returns the prototype collection view item used as
a template for creating new items when content is
displayed. The prototype defines the basic
structure, appearance, and behavior that will be
copied for each item in the collection view. This
provides a convenient way to configure items
without programmatic setup.
- (
NSSize)
maxItemSize;
Availability: OpenStep
Returns the maximum size allowed for collection
view items. Items will not be displayed larger than
this size regardless of their content or other sizing
constraints. The maximum size provides an
upper bound that prevents items from growing too
large and disrupting the overall layout and visual
balance of the collection.
- (
NSUInteger)
maxNumberOfColumns;
Availability: OpenStep
Returns the maximum number of columns that the
collection view will display in its layout. This
constraint affects how items are arranged and
can force items to wrap to new rows when the column
limit is reached. The column limit provides control
over the aspect ratio and density of the collection
view's content arrangement.
- (
NSUInteger)
maxNumberOfRows;
Availability: OpenStep
Returns the maximum number of rows that the
collection view will display in its layout. This
constraint controls the vertical extent of the
collection and can force items to wrap to new
columns when the row limit is reached, depending on
the layout configuration and item arrangement strategy.
- (
NSSize)
minItemSize;
Availability: OpenStep
Returns the minimum size allowed for collection
view items. Items will not be displayed smaller than
this size, ensuring they remain visible and usable
even when content would naturally size smaller. The
minimum size provides a lower bound that maintains
item accessibility and visual consistency.
- (void)
moveItemAtIndexPath: (
NSIndexPath*)indexPath
toIndexPath: (
NSIndexPath*)newIndexPath;
Availability: MacOS-X 10.11.0
Not implemented (as of 2025-12-03).
Please help us by producing an implementation of
this and donating it to the GNUstep project.
- (void)
moveSection: (
NSInteger)section
toSection: (
NSInteger)newSection;
Availability: MacOS-X 10.11.0
Not implemented (as of 2025-12-03).
Please help us by producing an implementation of
this and donating it to the GNUstep project.
- (
NSCollectionViewItem*)
newItemForRepresentedObject: (id)object;
Availability: OpenStep
Creates and returns a new collection view item
configured to represent the specified
object. This method uses the item
prototype or registered classes to instantiate
and configure the item appropriately for displaying the
given represented object within the
collection view layout.
- (
NSInteger)
numberOfItemsInSection: (
NSInteger)section;
Availability: MacOS-X 10.11.0
Description forthcoming.
- (
NSInteger)
numberOfSections;
Availability: MacOS-X 10.11.0
Description forthcoming.
- (void)
performBatchUpdates: (GSCollectionViewPerformBatchUpdatesBlock)updates
completionHandler: (GSCollectionViewCompletionHandlerBlock)completionHandler;
Availability: MacOS-X 10.11.0
Not implemented (as of 2025-12-03).
Please help us by producing an implementation of
this and donating it to the GNUstep project.
- (void)
registerClass: (Class)itemClass
forItemWithIdentifier: (
NSUserInterfaceItemIdentifier)identifier;
Availability: MacOS-X 10.11.0
Description forthcoming.
- (void)
reloadData;
Availability: MacOS-X 10.11.0
Description forthcoming.
- (void)
reloadItemsAtIndexPaths: (
NSSet*)indexPaths;
Availability: MacOS-X 10.11.0
Description forthcoming.
- (void)
reloadSections: (
NSIndexSet*)sections;
Availability: MacOS-X 10.11.0
Description forthcoming.
- (void)
scrollToItemsAtIndexPaths: (
NSSet*)indexPaths
scrollPosition: (
NSCollectionViewScrollPosition)scrollPosition;
Availability: MacOS-X 10.11.0
Not implemented (as of 2025-12-03).
Please help us by producing an implementation of
this and donating it to the GNUstep project.
- (IBAction)
selectAll: (id)sender;
Availability: MacOS-X 10.11.0
Description forthcoming.
- (
NSSet*)
selectionIndexPaths;
Availability: MacOS-X 10.11.0
Description forthcoming.
- (
NSIndexSet*)
selectionIndexes;
Availability: OpenStep
Returns the set of indexes identifying currently
selected items in the collection view. The index
set contains the positions of all items that are
currently selected, allowing access to the
selected content objects and providing information
for batch operations on the selection.
- (void)
setAllowsEmptySelection: (BOOL)flag;
Availability: MacOS-X 10.11.0
Description forthcoming.
- (void)
setAllowsMultipleSelection: (BOOL)flag;
Availability: OpenStep
Sets whether the collection view should allow multiple
items to be selected at the same time. Multiple
selection enables users to perform batch
operations on several items and provides more
flexible interaction patterns. Single selection
mode is appropriate when only one item should be
active or highlighted at any given time.
- (void)
setBackgroundColors: (
NSArray*)colors;
Availability: OpenStep
Sets the array of background colors to be
used for item backgrounds in the collection view. The
colors cycle through the provided array to
create alternating background patterns. Pass
nil or an empty array to disable
background coloring and use the default
appearance for all items.
- (void)
setBackgroundView: (
NSView*)backgroundView;
Availability: MacOS-X 10.11.0
Description forthcoming.
- (void)
setBackgroundViewScrollsWithContent: (BOOL)f;
Availability: MacOS-X 10.11.0
Description forthcoming.
- (void)
setCollectionViewLayout: (
NSCollectionViewLayout*)layout;
Availability: MacOS-X 10.11.0
Sets the layout object that will control
item arrangement within the collection view. Changing
the layout can dramatically alter the visual
presentation and behavior of the collection.
The layout change may be animated depending
on the implementation and can trigger extensive
repositioning of visible items.
- (void)
setContent: (
NSArray*)content;
Availability: OpenStep
Sets the array of objects that will be displayed as
items in the collection view. Each object becomes the
represented object for a collection view item,
which handles the visual presentation and user
interaction. Setting new content
triggers a refresh of the displayed items to
reflect the updated data.
- (void)
setDelegate: (id<
NSCollectionViewDelegate>)aDelegate;
Availability: OpenStep
Sets the delegate object that will handle collection
view events and customize behavior. The delegate
receives notifications about user interactions,
selection changes, drag and drop operations, and
item lifecycle events. Pass nil to remove
the current delegate and use default behavior for all
collection view operations.
- (void)
setDraggingSourceOperationMask: (
NSDragOperation)dragOperationMask
forLocal: (BOOL)localDestination;
Availability: OpenStep
Sets the drag operations that this collection view
supports when acting as a drag source. The
operation mask determines what types of drag
operations (copy, move, link, etc.) are offered
to potential drop destinations. The local flag indicates
whether the mask applies to drops within the same
application or external destinations.
- (void)
setItemPrototype: (
NSCollectionViewItem*)prototype;
Availability: OpenStep
Sets the prototype collection view item
that will serve as the template for creating new
items. The prototype's configuration, including view
hierarchy, bindings, and other properties, is
copied when creating items for display. Setting a
new prototype affects subsequently created
items but does not modify existing ones.
- (void)
setMaxItemSize: (
NSSize)size;
Availability: OpenStep
Sets the maximum size that collection view
items are allowed to reach. Items that would
naturally size larger than this limit
are constrained to fit within the maximum bounds. This
prevents oversized items from dominating the
display and maintains consistent visual proportions
across the collection view layout.
- (void)
setMaxNumberOfColumns: (
NSUInteger)number;
Availability: OpenStep
Sets the maximum number of columns for the
collection view layout. Items will wrap to new
rows when this column limit is exceeded, creating a
constrained grid arrangement. Setting this
value affects the overall shape and organization of
the collection view's content presentation.
- (void)
setMaxNumberOfRows: (
NSUInteger)number;
Availability: OpenStep
Sets the maximum number of rows for the
collection view layout. When this limit is
reached, the layout behavior depends on the
configuration, potentially wrapping items to
additional columns or constraining the total
number of visible items within the
specified row count.
- (void)
setMinItemSize: (
NSSize)size;
Availability: OpenStep
Sets the minimum size that collection view
items must maintain. Items that would naturally
size smaller than this limit are expanded
to meet the minimum requirements. This ensures all items
remain visible and interactive while maintaining
consistent appearance standards across the
collection view.
- (void)
setPrefetchDataSource: (id<
NSCollectionViewPrefetching>)prefetchDataSource;
Availability: MacOS-X 10.11.0
Description forthcoming.
- (void)
setSelectable: (BOOL)flag;
Availability: OpenStep
Sets whether items in the collection view should
respond to selection attempts. Enabling selection
allows users to interact with items and receive
visual feedback about their choices. Disabling
selection creates a read-only display where items
cannot be highlighted or chosen, though other
interactions may still function.
- (void)
setSelectionIndexPaths: (
NSSet*)indexPaths;
Availability: MacOS-X 10.11.0
Sets the index paths of items that should be selected
in the collection view. Index paths specify both section
and item positions, providing precise control over
selection in multi-section layouts. This
programmatically updates the selection
state and may trigger delegate notifications and
visual feedback updates.
- (void)
setSelectionIndexes: (
NSIndexSet*)indexes;
Availability: OpenStep
Sets the indexes of items that should be
selected in the collection view. This
programmatically changes the selection
state, potentially triggering delegate notifications
and visual updates. The selection respects the
collection view's multiple selection settings
and other selection constraints.
- (
NSView*)
supplementaryViewForElementKind: (
NSCollectionViewSupplementaryElementKind)elementKind
atIndexPath: (
NSIndexPath*)indexPath;
Availability: MacOS-X 10.11.0
Returns the supplementary view of the specified
kind at the given index path. Supplementary views
provide additional layout elements such as section
headers, footers, or decorative content that
complements the primary collection view items.
Returns nil if no supplementary view
exists at the specified location.
- (void)
tile;
Availability: OpenStep
Recalculates and updates the layout of all
items in the collection view. This method triggers a
complete relayout operation, repositioning items
according to the current layout configuration,
content changes, and view bounds. Tiling is
typically called automatically when needed but
can be invoked manually for custom layout updates.
- (IBAction)
toggleSectionCollapse: (id)sender;
Availability: MacOS-X 10.12.0
Not implemented (as of 2025-12-03).
Please help us by producing an implementation of
this and donating it to the GNUstep project.
- (
NSArray*)
visibleItems;
Availability: MacOS-X 10.11.0
Returns an array of currently visible collection
view items within the collection view's bounds.
Visible items are those that are at least partially
displayed and have been instantiated for
rendering. This provides access to the actual
item objects for direct inspection or manipulation of
the currently displayed content.
- (
NSArray*)
visibleSupplementaryViewsOfKind: (
NSCollectionViewSupplementaryElementKind)elementKind;
Availability: MacOS-X 10.11.0
Returns an array of visible supplementary views of
the specified kind. Supplementary views include
headers, footers, and other decorative or
informational views that are not primary
content items. This method provides access to
currently displayed supplementary views for
inspection or direct manipulation.
Instance Variables for NSCollectionView Class
@protected BOOL
_allowReload;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected BOOL
_allowsEmptySelection;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected BOOL
_allowsMultipleSelection;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSArray*
_backgroundColors;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSView*
_backgroundView;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected BOOL
_backgroundViewScrollsWithContent;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSCollectionViewLayout*
_collectionViewLayout;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSArray*
_content;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected id
_dataSource;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected id _delegate;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSUInteger _draggingOnIndex;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSUInteger _draggingOnRow;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSDragOperation _draggingSourceOperationMaskForLocal;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSDragOperation _draggingSourceOperationMaskForRemote;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected CGFloat _horizontalMargin;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSMutableSet* _indexPathsForSupplementaryElementsOfKind;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSMapTable* _indexPathsToItems;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected BOOL _isSelectable;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSSize _itemSize;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSMutableArray* _items;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSMapTable* _itemsToAttributes;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSMapTable* _itemsToIndexPaths;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSSize _maxItemSize;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSUInteger _maxNumberOfColumns;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSUInteger _maxNumberOfRows;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSSize _minItemSize;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSUInteger _numberOfColumns;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected id _prefetchDataSource;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSMapTable* _registeredClasses;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSMapTable* _registeredNibs;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSSet* _selectionIndexPaths;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSIndexSet* _selectionIndexes;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected CGFloat _tileWidth;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected CGFloat _verticalMargin;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSMutableArray* _visibleItems;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSMutableDictionary* _visibleSupplementaryViews;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSCollectionViewItem* itemPrototype;
Availability: OpenStep
Description forthcoming.
- Declared in:
- AppKit/NSCollectionView.h
- Conforms to:
- NSObject
Availability: MacOS-X 10.11.0
Description forthcoming.
- (
NSInteger)
numberOfSectionsInCollectionView: (
NSCollectionView*)collectionView;
Availability: MacOS-X 10.11.0
Description forthcoming.
- Declared in:
- AppKit/NSCollectionView.h
- Conforms to:
- NSObject
Availability: OpenStep
Description forthcoming.
- (BOOL)
collectionView: (
NSCollectionView*)collectionView
canDragItemsAtIndexPaths: (
NSSet*)indexPaths
withEvent: (
NSEvent*)event;
Availability: MacOS-X 10.11.0
Return a boolean indicating if the
indexPaths on collectionView
can be dragged with the passed in event.
- (BOOL)
collectionView: (
NSCollectionView*)collectionView
canDragItemsAtIndexes: (
NSIndexSet*)indexes
withEvent: (
NSEvent*)event;
Availability: MacOS-X 10.6.0
Return a boolean indicating if the
indexes on collectionView can
be dragged with the passed in event.
- (void)
collectionView: (
NSCollectionView*)collectionView
didChangeItemsAtIndexPaths: (
NSSet*)indexPaths
toHighlightState: (
NSCollectionViewItemHighlightState)highlightState;
Availability: MacOS-X 10.11.0
This is sent to inform the delegate of those items
that did change highlightState.
- (void)
collectionView: (
NSCollectionView*)collectionView
didDeselectItemsAtIndexPaths: (
NSSet*)indexPaths;
Availability: MacOS-X 10.11.0
Called to inform the delegate of those items that
were deselected.
- (void)
collectionView: (
NSCollectionView*)collectionView
didEndDisplayingItem: (
NSCollectionViewItem*)item
forRepresentedObjectAtIndexPath: (
NSIndexPath*)indexPath;
Availability: MacOS-X 10.11.0
Called to inform the delegate that the
collectionView will end display of
item for the object at
indexPath.
- (void)
collectionView: (
NSCollectionView*)collectionView
didEndDisplayingSupplementaryView: (
NSView*)view
forElementOfKind: (
NSCollectionViewSupplementaryElementKind)elementKind
atIndexPath: (
NSIndexPath*)indexPath;
Availability: MacOS-X 10.11.0
Called to inform the delegate that the
collectionView will end display of
supplementaryView for the object at
indexPath.
- (void)
collectionView: (
NSCollectionView*)collectionView
didSelectItemsAtIndexPaths: (
NSSet*)indexPaths;
Availability: MacOS-X 10.11.0
Called to inform the delegate of those items that
were selected.
- (
NSImage*)
collectionView: (
NSCollectionView*)collectionView
draggingImageForItemsAtIndexPaths: (
NSSet*)indexPaths
withEvent: (
NSEvent*)event
offset: (
NSPointPointer)dragImageOffset;
Availability: MacOS-X 10.11.0
Returns an NSImage representing the items at
indexPaths which are being dragged.
- (
NSImage*)
collectionView: (
NSCollectionView*)collectionView
draggingImageForItemsAtIndexes: (
NSIndexSet*)indexes
withEvent: (
NSEvent*)event
offset: (
NSPointPointer)dragImageOffset;
Availability: MacOS-X 10.6.0
Returns an NSImage representing the items at
indexes which are being dragged.
- (void)
collectionView: (
NSCollectionView*)collectionView
draggingSession: (NSDraggingSession*)session
endedAtPoint: (
NSPoint)screenPoint
dragOperation: (
NSDragOperation)operation;
Availability: OpenStep
Allows application to specify the
screenPoint at which a dragging
session did end
- (void)
collectionView: (
NSCollectionView*)collectionView
draggingSession: (NSDraggingSession*)session
willBeginAtPoint: (
NSPoint)screenPoint
forItemsAtIndexPaths: (
NSSet*)indexPaths;
Availability: MacOS-X 10.11.0
Allows application to specify the
screenPoint at which a dragging
session will begin for the given
indexPaths
- (void)
collectionView: (
NSCollectionView*)collectionView
draggingSession: (NSDraggingSession*)session
willBeginAtPoint: (
NSPoint)screenPoint
forItemsAtIndexes: (
NSIndexSet*)indexes;
Availability: OpenStep
Allows application to specify the
screenPoint at which a dragging
session will begin for the given
indexes
- (
NSArray*)
collectionView: (
NSCollectionView*)collectionView
namesOfPromisedFilesDroppedAtDestination: (
NSURL*)dropURL
forDraggedItemsAtIndexPaths: (
NSSet*)indexPaths;
Availability: MacOS-X 10.11.0
Returns an array of filenames for files at
indexPaths that will be dropped at the
destination specified by NSURL.
- (
NSArray*)
collectionView: (
NSCollectionView*)collectionView
namesOfPromisedFilesDroppedAtDestination: (
NSURL*)dropURL
forDraggedItemsAtIndexes: (
NSIndexSet*)indexes;
Availability: MacOS-X 10.6.0
Returns an array of filenames for files at
indexes that will be dropped at the
destination specified by NSURL.
- (id<
NSPasteboardWriting>)
collectionView: (
NSCollectionView*)collectionView
pasteboardWriterForItemAtIndexPath: (
NSIndexPath*)indexPath;
Availability: MacOS-X 10.11.0
Return NSPasteboardWriting object for
collectionView at indexPath
- (
NSSet*)
collectionView: (
NSCollectionView*)collectionView
shouldChangeItemsAtIndexPaths: (
NSSet*)indexPaths
toHighlightState: (
NSCollectionViewItemHighlightState)highlightState;
Availability: MacOS-X 10.11.0
Returns the set of indexPaths that
should change their selection. This is sent to
inform the delegate of those items that the
collectionView would like to change to
highlightState.
- (
NSSet*)
collectionView: (
NSCollectionView*)collectionView
shouldDeselectItemsAtIndexPaths: (
NSSet*)indexPaths;
Availability: MacOS-X 10.11.0
Returns the set of NSIndexPath objects that should
be deselected given the proposed indexPaths.
- (
NSSet*)
collectionView: (
NSCollectionView*)collectionView
shouldSelectItemsAtIndexPaths: (
NSSet*)indexPaths;
Availability: MacOS-X 10.11.0
Returns the set of indexPaths that
should change.
- (void)
collectionView: (
NSCollectionView*)collectionView
updateDraggingItemsForDrag: (id<
NSDraggingInfo>)draggingInfo;
Availability: OpenStep
Update items include in the drag operation for
collectionView.
- (void)
collectionView: (
NSCollectionView*)collectionView
willDisplayItem: (
NSCollectionViewItem*)item
forRepresentedObjectAtIndexPath: (
NSIndexPath*)indexPath;
Availability: MacOS-X 10.11.0
Called to inform the delegate that the
item representing the object at
indexPath will be displayed.
- (BOOL)
collectionView: (
NSCollectionView*)collectionView
writeItemsAtIndexPaths: (
NSSet*)indexPaths
toPasteboard: (
NSPasteboard*)pasteboard;
Availability: MacOS-X 10.11.0
Return a boolean if the items at
indexPaths can be written to the
pasteboard
- (BOOL)
collectionView: (
NSCollectionView*)collectionView
writeItemsAtIndexes: (
NSIndexSet*)indexes
toPasteboard: (
NSPasteboard*)pasteboard;
Availability: MacOS-X 10.6.0
Return a boolean if the items at indexes
can be written to the pasteboard
- Declared in:
- AppKit/NSCollectionView.h
- Conforms to:
- NSObject
- NSUserInterfaceItemIdentification
Availability: MacOS-X 10.11.0
Description forthcoming.
- (void)
prepareForReuse;
Availability: MacOS-X 10.11.0
Description forthcoming.
- Declared in:
- AppKit/NSCollectionView.h
- Conforms to:
- NSObject
Availability: MacOS-X 10.11.0
Description forthcoming.
- (void)
collectionView: (
NSCollectionView*)collectionView
cancelPrefetchingForItemsAtIndexPaths: (
NSArray*)indexPaths;
Availability: MacOS-X 10.11.0
Cancel the prefetch request for the listed
indexPaths.
- (void)
collectionView: (
NSCollectionView*)collectionView
prefetchItemsAtIndexPaths: (
NSArray*)indexPaths;
Availability: MacOS-X 10.11.0
Load the items listed in indexPaths in
collectionView before they are displayed
Up