26#include <Objectively/IndexPath.h>
57typedef struct CollectionViewInterface CollectionViewInterface;
178struct CollectionViewInterface {
183 ControlInterface controlInterface;
237 IndexPath *(*indexPathForItemAtPoint)(
const CollectionView *self,
const SDL_Point *point);
The CollectionItemView type.
static void deselectItemAtIndexPath(CollectionView *self, const IndexPath *indexPath)
const EnumName CollectionViewAxisNames[]
static void deselectItemsAtIndexPaths(CollectionView *self, const Array *indexPaths)
static Array * selectionIndexPaths(const CollectionView *self)
static void deselectAll(CollectionView *self)
OBJECTIVELYMVC_EXPORT Class * _CollectionView(void)
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[0]
The interface type.
void reloadData(CollectionView *self)
Reloads this CollectionView's visible items.
Control control
The superclass.
void selectItemsAtIndexPaths(CollectionView *self, const Array *indexPaths)
Selects the items at the given index paths.
CollectionViewDataSource dataSource
The data source.
void selectItemAtIndexPath(CollectionView *self, const IndexPath *indexPath)
Selects the item at the given index path.
SDL_Size naturalSize(const CollectionView *self)
void selectAll(CollectionView *self)
Selects all items in this CollectionView.
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.
SDL_Rect frame
The frame, relative to the superview.