Cocos2d-x  v3.15
TableViewDataSource Class Referenceabstract

Data source that governs table backend data. More...

Public Member Functions

virtual ~TableViewDataSource ()
 NA NA
 
virtual Size tableCellSizeForIndex (TableView *table, ssize_t idx)
 cell size for a given index More...
 
virtual Size cellSizeForTable (TableView *table)
 cell height for a given table. More...
 
virtual TableViewCelltableCellAtIndex (TableView *table, ssize_t idx)=0
 a cell instance at a given index More...
 
virtual ssize_t numberOfCellsInTableView (TableView *table)=0
 Returns number of cells in a given table view. More...
 

Detailed Description

Data source that governs table backend data.

Member Function Documentation

◆ tableCellSizeForIndex()

virtual Size tableCellSizeForIndex ( TableView table,
ssize_t  idx 
)
virtual

cell size for a given index

Parameters
idxthe index of a cell to get a size
Returns
size of a cell at given index

◆ cellSizeForTable()

virtual Size cellSizeForTable ( TableView table)
virtual

cell height for a given table.

Parameters
tabletable to hold the instances of Class
Returns
cell size

◆ tableCellAtIndex()

virtual TableViewCell* tableCellAtIndex ( TableView table,
ssize_t  idx 
)
pure virtual

a cell instance at a given index

Parameters
idxindex to search for a cell
Returns
cell found at idx

◆ numberOfCellsInTableView()

virtual ssize_t numberOfCellsInTableView ( TableView table)
pure virtual

Returns number of cells in a given table view.

Returns
number of cells

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