本文整理汇总了C++中CAListViewCell::resetListViewCell方法的典型用法代码示例。如果您正苦于以下问题:C++ CAListViewCell::resetListViewCell方法的具体用法?C++ CAListViewCell::resetListViewCell怎么用?C++ CAListViewCell::resetListViewCell使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAListViewCell
的用法示例。
在下文中一共展示了CAListViewCell::resetListViewCell方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: recoveryCollectionCell
void CAListView::recoveryCollectionCell()
{
CCRect rect = this->getBounds();
rect.origin = getContentOffset();
rect.origin.y -= rect.size.height * 0.1f;
rect.size.height *= 1.2f;
std::map<unsigned int, CAListViewCell*>::iterator itr;
for (itr = m_pUsedListCells.begin(); itr != m_pUsedListCells.end(); itr++)
{
CAListViewCell* cell = itr->second;
CC_CONTINUE_IF(cell == NULL);
CCRect cellRect = cell->getFrame();
CC_CONTINUE_IF(rect.intersectsRect(cellRect));
m_pFreedListCells[cell->getReuseIdentifier()].pushBack(cell);
cell->removeFromSuperview();
cell->resetListViewCell();
itr->second = NULL;
CAView* line = m_pUsedLines[itr->first];
CC_CONTINUE_IF(line == NULL);
m_pFreedLines.pushBack(line);
line->removeFromSuperview();
m_pUsedLines[itr->first] = NULL;
}
}
示例2: clearData
void CAListView::clearData()
{
std::map<unsigned int, CAView*>::iterator it = m_pUsedLines.begin();
for (; it != m_pUsedLines.end(); ++it)
{
CAView* view = it->second;
CC_CONTINUE_IF(view == NULL);
m_pFreedLines.pushBack(view);
view->removeFromSuperview();
}
m_pUsedLines.clear();
m_mpUsedListCells.clear();
for (int i = 0; i < m_vpUsedListCells.size(); i++)
{
CAListViewCell* cell = m_vpUsedListCells.at(i);
CC_CONTINUE_IF(cell == NULL);
m_mpFreedListCells[cell->getReuseIdentifier()].pushBack(cell);
cell->removeFromSuperview();
cell->resetListViewCell();
}
m_vpUsedListCells.clear();
m_pSelectedListCells.clear();
m_nIndexs = 0;
m_rIndexRects.clear();
m_rLineRects.clear();
m_rHeaderRect = m_rFooterRect = DRectZero;
m_pHighlightedListCells = NULL;
}