26#include <Objectively/IndexPath.h>
57typedef struct CollectionViewInterface CollectionViewInterface;
175struct CollectionViewInterface {
180 ControlInterface controlInterface;
234 IndexPath *(*indexPathForItemAtPoint)(
const CollectionView *self,
const SDL_Point *point);
The CollectionItemView type.
static void selectAll(CollectionView *self)
static void deselectItemAtIndexPath(CollectionView *self, const IndexPath *indexPath)
static void deselectItemsAtIndexPaths(CollectionView *self, const Array *indexPaths)
static Array * selectionIndexPaths(const CollectionView *self)
static void selectItemsAtIndexPaths(CollectionView *self, const Array *indexPaths)
static SDL_Size naturalSize(const CollectionView *self)
static void selectItemAtIndexPath(CollectionView *self, const IndexPath *indexPath)
static void deselectAll(CollectionView *self)
static void reloadData(CollectionView *self)
OBJECTIVELYMVC_EXPORT const EnumName CollectionViewAxisNames[]
Controls are Views which capture events and dispatch Actions.
#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.
Class * _CollectionView(void)
The CollectionView archetype.
Control control
The superclass.
MutableArray * items
The items.
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 events and dispatch Actions.
Views are the fundamental building blocks of ObjectivelyMVC user interfaces.