Class CCTableView

#include <Geode/cocos/extensions/GUI/CCScrollView/CCTableView.h>

UITableView counterpart for cocos2d for iphone.

this is a very basic, minimal implementation to bring UITableView-like component into cocos2d world.

Examples0
Public static methods2
staticcocos2d::extension::CCTableView*create(,)

An intialized table view object

Parameters

dataSource

data source

size

view size
Return value
table view
staticcocos2d::extension::CCTableView*create(,,)

An initialized table view object

Parameters

dataSource

data source;

size

view size

container

parent object for cells
Return value
table view
Public member functions21
cocos2d::extension::CCTableViewDataSource*getDataSource()

data source

voidsetDataSource()
No description provided
cocos2d::extension::CCTableViewDelegate*getDelegate()

delegate

voidsetDelegate()
No description provided
voidsetVerticalFillOrder()

determines how cell is ordered and filled in the view.

cocos2d::extension::CCTableViewVerticalFillOrdergetVerticalFillOrder()
No description provided
boolinitWithViewSize(,)
No description provided
voidupdateCellAtIndex(
uintidx
)

Updates the content of the cell at a given index.

Parameters

idx

index to find a cell
voidinsertCellAtIndex(
uintidx
)

Inserts a new cell at a given index

Parameters

idx

location to insert
voidremoveCellAtIndex(
uintidx
)

Removes a cell at a given index

Parameters

idx

index to find a cell
voidreloadData()

reloads data from data source. the view will be refreshed.

cocos2d::extension::CCTableViewCell*dequeueCell()

Dequeues a free cell if available. nil if not.

Return value
free cell
cocos2d::extension::CCTableViewCell*cellAtIndex(
uintidx
)

Returns an existing cell at a given index. Returns nil if a cell is nonexistent at the moment of query.

Parameters

idx

index
Return value
a cell at a given index
virtualvoidscrollViewDidScroll()
No description provided
virtualvoidscrollViewDidZoom()
No description provided
virtualboolccTouchBegan(,)
No description provided
virtualvoidccTouchMoved(,)
No description provided
virtualvoidccTouchEnded(,)
No description provided
virtualvoidccTouchCancelled(,)
No description provided
void_updateContentSize()
No description provided
voidunregisterAllScriptHandler()
No description provided
Fields9
;
No description provided
;

vertical direction of cell filling

std::set<uint>*m_pIndices
;

index set to query the indexes of the cells used.

std::vector<float>m_vCellsPositions
;

vector with all cell positions

;

cells that are currently in the table

;

free list of cells

;

weak link to the data source object

;

weak link to the delegate object

;
No description provided
Protected member functions8
int__indexFromOffset()
No description provided
uint_indexFromOffset()
No description provided
cocos2d::CCPoint__offsetFromIndex(
uintindex
)
No description provided
cocos2d::CCPoint_offsetFromIndex(
uintindex
)
No description provided
void_moveCellOutOfSight()
No description provided
void_setIndexForCell(
uintindex
,)
No description provided
void_addCellIfNecessary()
No description provided
void_updateCellPositions()
No description provided
Protected fields0
Derived classes0