ObjectivelyMVC 0.1.0
Object oriented MVC framework for OpenGL, SDL2 and GNU C
Data Fields
TableViewDelegate Struct Reference

The TableView delegate protocol. More...

#include <TableView.h>

Data Fields

TableCellView *(* cellForColumnAndRow )(const TableView *tableView, const TableColumn *column, size_t row)
 Called by the TableView to instantiate cells. More...
 
void(* didSelectRowsAtIndexes )(TableView *tableView, const IndexSet *selectedRowIndexes)
 Called by the TableView when the row selection changes. More...
 
void(* didSetSortColumn )(TableView *tableView)
 Called by the TableView when the sort column or order changes. More...
 
ident self
 The delegate self-reference. More...
 

Detailed Description

The TableView delegate protocol.

Definition at line 83 of file TableView.h.

Field Documentation

◆ cellForColumnAndRow

TableCellView *(* TableViewDelegate::cellForColumnAndRow) (const TableView *tableView, const TableColumn *column, size_t row)

Called by the TableView to instantiate cells.

Parameters
tableViewThe TableView.
columnThe TableColumn.
rowThe row number.
Returns
The cell for the given column and row number.

Definition at line 97 of file TableView.h.

◆ didSelectRowsAtIndexes

void(* TableViewDelegate::didSelectRowsAtIndexes) (TableView *tableView, const IndexSet *selectedRowIndexes)

Called by the TableView when the row selection changes.

Parameters
tableViewThe TableView.
selectedRowIndexesThe indexes of the selected rows.
Remarks
This function is optional.

Definition at line 105 of file TableView.h.

◆ didSetSortColumn

void(* TableViewDelegate::didSetSortColumn) (TableView *tableView)

Called by the TableView when the sort column or order changes.

Parameters
tableViewThe TableView.
Remarks
This function is optional.
A typical implementation of this function would sort the data set by the sort column's Comparator, and then call $(tableView, reloadData).

Definition at line 114 of file TableView.h.

◆ self

ident TableViewDelegate::self

The delegate self-reference.

Definition at line 88 of file TableView.h.


The documentation for this struct was generated from the following file: