26#include <Objectively/IndexPath.h>
57typedef struct CollectionViewInterface CollectionViewInterface;
175struct CollectionViewInterface {
180 ControlInterface controlInterface;
197 void (*deselectItemAtIndexPath)(
CollectionView *self,
const IndexPath *indexPath);
206 void (*deselectItemsAtIndexPaths)(
CollectionView *self,
const Array *indexPaths);
234 IndexPath *(*indexPathForItemAtPoint)(
const CollectionView *self,
const SDL_Point *point);
286 void (*selectItemAtIndexPath)(
CollectionView *self,
const IndexPath *indexPath);
295 void (*selectItemsAtIndexPaths)(
CollectionView *self,
const Array *indexPaths);
The CollectionItemView type.
static Array * selectionIndexPaths(const CollectionView *self)
OBJECTIVELYMVC_EXPORT Class * _CollectionView(void)
OBJECTIVELYMVC_EXPORT const EnumName CollectionViewAxisNames[]
Controls are Views which capture and respond to events.
#define OBJECTIVELYMVC_EXPORT
CollectionViewAxis
Axis constants for specifying a CollectionView's primary layout direction.
@ CollectionViewAxisHorizontal
@ CollectionViewAxisVertical
CollectionViewItems are a visual representation of an item within a CollectionView.
The CollectionView data source protocol.
size_t(* numberOfItems)(const CollectionView *collectionView)
ident self
The data source self-reference.
ident(* objectForItemAtIndexPath)(const CollectionView *collectionView, const IndexPath *indexPath)
Called by the CollectionView for the associated object of an item.
The CollectionView delegate protocol.
void(* didModifySelection)(CollectionView *collectionView, const Array *selectionIndexPaths)
Called by the CollectionView when items are selected or deselected.
ident self
The delegate self-reference.
CollectionViews display items in a grid.
SDL_Size itemSize
The item size.
CollectionViewAxis axis
The layout axis.
CollectionViewDelegate delegate
The delegate.
CollectionViewInterface * interface
The interface.
Control control
The superclass.
CollectionViewDataSource dataSource
The data source.
ScrollView * scrollView
The scroll view.
SDL_Size itemSpacing
The item spacing.
View * contentView
The content view.
Controls are Views which capture and respond to events.
Views are the fundamental building blocks of ObjectivelyMVC user interfaces.