您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ CC_CONTINUE_IF函数代码示例

51自学网 2021-06-01 19:57:36
  C++
这篇教程C++ CC_CONTINUE_IF函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中CC_CONTINUE_IF函数的典型用法代码示例。如果您正苦于以下问题:C++ CC_CONTINUE_IF函数的具体用法?C++ CC_CONTINUE_IF怎么用?C++ CC_CONTINUE_IF使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了CC_CONTINUE_IF函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: getContentOffset

void CACollectionView::loadCollectionCell(){	CCRect rect = this->getBounds();	rect.origin = getContentOffset();	rect.origin.y -= rect.size.height * 0.1f;	rect.size.height *= 1.2f;	std::map<CAIndexPath3E, CACollectionViewCell*>::iterator itr;	for (itr = m_pUsedCollectionCells.begin(); itr != m_pUsedCollectionCells.end(); itr++)	{		CC_CONTINUE_IF(itr->second != NULL);		CAIndexPath3E r = itr->first;		CCRect cellRect = m_rUsedCollectionCellRects[r];		CC_CONTINUE_IF(!rect.intersectsRect(cellRect));		CACollectionViewCell* cell = m_pCollectionViewDataSource->collectionCellAtIndex(this, cellRect.size, r.section, r.row, r.item);		if (cell)		{			cell->m_nSection = r.section;			cell->m_nRow = r.row;			cell->m_nItem = r.item;			cell->updateDisplayedAlpha(this->getAlpha());			this->addSubview(cell);			cell->setFrame(cellRect);			itr->second = cell;			if (m_pSelectedCollectionCells.count(r))			{				cell->setControlStateSelected();			}		}	}}
开发者ID:dksai414,项目名称:CrossApp,代码行数:34,


示例2: getContentOffset

void CAListView::recoveryCell(){	DRect rect = this->getBounds();	rect.origin = getContentOffset();    rect.origin.y -= rect.size.height * 0.1f;    rect.origin.x -= rect.size.width * 0.1f;    rect.size.width *= 1.2f;    rect.size.height *= 1.2f;    	std::map<unsigned int, CAListViewCell*>::iterator itr;	for (itr = m_mpUsedListCells.begin(); itr != m_mpUsedListCells.end(); itr++)	{		CAListViewCell* cell = itr->second;		CC_CONTINUE_IF(cell == NULL);		DRect cellRect = cell->getFrame();		CC_CONTINUE_IF(rect.intersectsRect(cellRect));				m_mpFreedListCells[cell->getReuseIdentifier()].pushBack(cell);		cell->removeFromSuperview();		cell->resetCell();		itr->second = NULL;        m_vpUsedListCells.eraseObject(cell);		        CAView* line = m_pUsedLines[itr->first];        CC_CONTINUE_IF(line == NULL);        m_pFreedLines.pushBack(line);        line->removeFromSuperview();        m_pUsedLines[itr->first] = NULL;	}}
开发者ID:WoYang,项目名称:CrossApp,代码行数:31,


示例3: getContentOffset

void CATableView::recoveryTableCell(){    CCRect rect = this->getBounds();	rect.origin = getContentOffset();    rect.origin.y -= rect.size.height * 0.1f;    rect.size.height *= 1.2f;        std::map<CAIndexPath2E, CATableViewCell*>::iterator itr;    for (itr=m_pUsedTableCells.begin();         itr!=m_pUsedTableCells.end();         itr++)    {        CATableViewCell* cell = itr->second;        CC_CONTINUE_IF(cell == NULL);        CCRect cellRect = cell->getFrame();        CC_CONTINUE_IF(rect.intersectsRect(cellRect));        m_pFreedTableCells[cell->getReuseIdentifier()].pushBack(cell);        cell->removeFromSuperview();        cell->resetTableViewCell();        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;    }}
开发者ID:Brian1900,项目名称:CrossApp,代码行数:29,


示例4: CC_CONTINUE_IF

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->resetCell();	}	m_vpUsedListCells.clear();		m_nIndexs = 0;	m_rIndexRects.clear();	m_rLineRects.clear();	m_rHeaderRect = m_rFooterRect = DRectZero;	m_pHighlightedListCells = NULL;}
开发者ID:WoYang,项目名称:CrossApp,代码行数:30,


示例5: getContentOffset

void CAAutoCollectionView::updateSectionHeaderAndFooterRects(){	DRect rect = this->getBounds();	rect.origin = getContentOffset();	for (int i = 0; i < m_rCollectionViewSection.size(); i++)	{		CollectionViewSection& cvs = m_rCollectionViewSection[i];		CC_CONTINUE_IF(!rect.intersectsRect(cvs.rSectionRect));		CAView* header = cvs.pSectionHeaderView;		CAView* footer = cvs.pSectionFooterView;				float headerHeight = cvs.nSectionHeaderHeight;		float footerHeight = cvs.nSectionFooterHeight;		if (header && m_bAlwaysTopSectionHeader)		{			DPoint p1 = rect.origin;			p1.y = MAX(p1.y, cvs.rSectionRect.origin.y);			p1.y = MIN(p1.y, cvs.rSectionRect.origin.y + cvs.rSectionRect.size.height				- headerHeight - footerHeight);			header->setFrameOrigin(p1);		}		if (footer && m_bAlwaysBottomSectionFooter)		{			DPoint p2 = DPointZero;			p2.y = MIN(rect.origin.y + this->getBounds().size.height - footerHeight,				cvs.rSectionRect.origin.y + cvs.rSectionRect.size.height - footerHeight);			p2.y = MAX(p2.y, cvs.rSectionRect.origin.y + headerHeight);			footer->setFrameOrigin(p2);		}	}}
开发者ID:jango2015,项目名称:CrossApp,代码行数:35,


示例6: CC_CONTINUE_IF

void CAControl::setContentSize(const CCSize& var){    CAView::setContentSize(var);        for(int i=0; i<CAControlStateAll; i++)    {        CC_CONTINUE_IF(m_pBackGroundView[i] == NULL);        m_pBackGroundView[i]->setFrame(this->getBounds());    }}
开发者ID:DeltaYang,项目名称:CrossApp,代码行数:10,


示例7: CC_CONTINUE_IF

void CAButton::updateWithPreferredSize(){    for (int i=0; i<CAControlStateAll; i++)    {        CC_CONTINUE_IF(m_pBackGroundView[i] == NULL);        CC_CONTINUE_IF(this->getBounds().equals(m_pBackGroundView[i]->getBounds()));                if (CAScale9ImageView* _var = dynamic_cast<CAScale9ImageView*>(m_pBackGroundView[i]))        {            _var->setFrame(this->getBounds());        }        else        {            m_pBackGroundView[i]->setFrame(this->getBounds());        }    }        m_pLabel->setFontSize(this->getBounds().size.height * 0.667f);}
开发者ID:ancon,项目名称:CrossApp,代码行数:19,


示例8: MIN

void CATabBarController::pageViewDidEndTurning(CAPageView* pageView){    for (int i = MAX((int)m_nSelectedIndex - 1, 0);         i < MIN((int)m_nSelectedIndex + 2, m_pViewControllers.size());         i++)    {        CC_CONTINUE_IF(i == pageView->getCurrPage());        m_pViewControllers.at(i)->getView()->setVisible(false);    }    CC_RETURN_IF(m_nSelectedIndex == pageView->getCurrPage());    this->showSelectedViewControllerAtIndex(pageView->getCurrPage());}
开发者ID:wjm0729,项目名称:CrossApp,代码行数:12,


示例9: getLastResponder

CAResponder* getLastResponder(CATouch* touch, const CAVector<CAView*>& subviews){    CAResponder* lastResponder = NULL;        for (CAVector<CAView*>::const_reverse_iterator itr=subviews.rbegin();         itr!=subviews.rend();         itr++)    {        CAView* subview = *itr;        if (subview->isVisible())        {            if (CAViewController* viewController = dynamic_cast<CAViewController*>(subview->getContentContainer()))            {                CC_CONTINUE_IF(!viewController->isTouchEnabled());                                DPoint point = subview->convertTouchToNodeSpace(touch);                                if (subview->getBounds().containsPoint(point))                {                    lastResponder = viewController;                    break;                }            }            else            {                CC_CONTINUE_IF(!subview->isTouchEnabled());                                DPoint point = subview->convertTouchToNodeSpace(touch);                                if (subview->getBounds().containsPoint(point))                {                    lastResponder = subview;                    break;                }            }        }    }        return lastResponder;}
开发者ID:wjm0729,项目名称:CrossApp,代码行数:40,


示例10: MIN

void CATabBarController::pageViewDidEndTurning(CAPageView* pageView){    CAApplication::getApplication()->getTouchDispatcher()->setDispatchEventsTrue();    for (int i = MAX((int)m_nSelectedIndex - 1, 0);         i < MIN((int)m_nSelectedIndex + 2, m_pViewControllers.size());         i++)    {        CC_CONTINUE_IF(i == pageView->getCurrPage());        m_pViewControllers.at(i)->getView()->setVisible(false);    }    CC_RETURN_IF(m_nSelectedIndex == pageView->getCurrPage());    this->showSelectedViewControllerAtIndex(pageView->getCurrPage());}
开发者ID:Brian1900,项目名称:CrossApp,代码行数:13,


示例11: getContentOffset

void CACollectionView::recoveryCollectionCell(){	DRect rect = this->getBounds();	rect.origin = getContentOffset();	rect.origin.y -= rect.size.height * 0.1f;	rect.size.height *= 1.2f;	std::map<CAIndexPath3E, CACollectionViewCell*>::iterator itr;	for (itr = m_mpUsedCollectionCells.begin(); itr != m_mpUsedCollectionCells.end(); itr++)	{		CACollectionViewCell* cell = itr->second;		CC_CONTINUE_IF(cell == NULL);		DRect cellRect = cell->getFrame();		CC_CONTINUE_IF(rect.intersectsRect(cellRect));		m_mpFreedCollectionCells[cell->getReuseIdentifier()].pushBack(cell);		cell->removeFromSuperview();		cell->resetCollectionViewCell();		itr->second = NULL;        m_vpUsedCollectionCells.eraseObject(cell);	}}
开发者ID:DreamCastleShanghai,项目名称:dkomClient,代码行数:23,


示例12: MAX

void CAButton::setContentSize(const CCSize & var){    CCSize size = var;    size.height = MAX(size.height, _px(60));    size.width = MAX(size.width, size.height);    CAView::setContentSize(size);    for(int i=0; i<CAControlStateAll; i++)    {        CC_CONTINUE_IF(m_pBackGroundView[i] == NULL);        m_pBackGroundView[i]->setFrame(this->getBounds());    }        this->updateWithPreferredSize();    this->setControlState(m_eControlState);}
开发者ID:ancon,项目名称:CrossApp,代码行数:15,


示例13: CC_CONTINUE_IF

void CATouchController::touchBegan(){    m_tFirstPoint = m_pTouch->getLocation();        std::vector<CAResponder*> vector;        CAView* view = dynamic_cast<CAView*>(CAApplication::getApplication()->getTouchDispatcher()->getFirstResponder());    bool isContainsFirstPoint = view && view->convertRectToWorldSpace(view->getBounds()).containsPoint(m_tFirstPoint);    if (isContainsFirstPoint)    {        vector = this->getEventListener(m_pTouch, view);    }    else    {        vector = this->getEventListener(m_pTouch, CAApplication::getApplication()->getRootWindow());    }        std::vector<CAResponder*>::iterator itr;    for (itr=vector.begin(); itr!=vector.end(); itr++)    {        CC_CONTINUE_IF(!(*itr)->isPriorityScroll());        CC_CONTINUE_IF(!(*itr)->isScrollEnabled());        CC_CONTINUE_IF(!(*itr)->isHorizontalScrollEnabled() && !(*itr)->isVerticalScrollEnabled());        m_vTouchMovedsViewCache.pushBack((*itr));    }    m_vTouchesViews.pushBack(vector.back());        if (!m_vTouchMovedsViewCache.empty())    {        CAScheduler::schedule(schedule_selector(CATouchController::passingTouchesViews), this, 0, 0, 0.05f);    }    else    {        this->passingTouchesViews();    }}
开发者ID:wjm0729,项目名称:CrossApp,代码行数:36,


示例14: CC_CONTINUE_IF

void CATouchDispatcher::touchesMoved(CCSet *touches, CAEvent *pEvent){    m_bLocked = true;        CATouch *pTouch;    CCSetIterator setIter;    for (setIter = touches->begin(); setIter != touches->end(); setIter++)    {        pTouch = (CATouch *)(*setIter);                CATouchController* touchController = m_vTouchControllers[pTouch->getID()];        CC_CONTINUE_IF(touchController == NULL);        touchController->touchMoved();    }    m_bLocked = false;}
开发者ID:zhaojietong,项目名称:CrossApp,代码行数:16,


示例15: CC_CONTINUE_IF

bool CAAutoCollectionView::ccTouchBegan(CATouch *pTouch, CAEvent *pEvent){    if (!m_vTouches.empty())    {        m_vTouches.replace(0, pTouch);        return true;    }	bool isInertia = m_tInertia.getLength() < 1.0f;	if (!CAScrollView::ccTouchBegan(pTouch, pEvent))		return false;	if (m_bAllowsSelection && this->isScrollWindowNotOutSide() == false && isInertia)	{		DPoint point = m_pContainer->convertTouchToNodeSpace(pTouch);		std::map<CAIndexPath3E, CACollectionViewCell*>::iterator itr;		for (itr = m_mpUsedCollectionCells.begin(); itr != m_mpUsedCollectionCells.end(); ++itr)		{			CACollectionViewCell* pCell = itr->second;			CC_CONTINUE_IF(pCell == NULL);			if (pCell->getFrame().containsPoint(point) && pCell->isVisible())			{				CC_BREAK_IF(pCell->getControlState() == CAControlStateDisabled);                if (m_pHighlightedCollectionCells != pCell)                {                    if (m_pHighlightedCollectionCells)                    {                        m_pHighlightedCollectionCells->setControlStateNormal();                    }                                        m_pHighlightedCollectionCells = pCell;                }				CC_BREAK_IF(pCell->getControlState() == CAControlStateSelected);                CAViewAnimation::beginAnimations(m_s__StrID, NULL);                CAViewAnimation::setAnimationDuration(0.05f);                CAViewAnimation::setAnimationDidStopSelector(pCell, CAViewAnimation0_selector(CACollectionViewCell::setControlStateHighlighted));                CAViewAnimation::commitAnimations();				break;			}		}	}	return true;}
开发者ID:jango2015,项目名称:CrossApp,代码行数:47,


示例16: CC_CONTINUE_IF

void CATableView::clearData(){    m_nSections = 0;    m_nRowsInSections.clear();    m_nSectionHeaderHeights.clear();    m_nSectionFooterHeights.clear();    std::vector<std::vector<unsigned int> >::iterator itr;    for (itr=m_nRowHeightss.begin(); itr!=m_nRowHeightss.end(); itr++)    {        itr->clear();    }    m_nRowHeightss.clear();        std::vector<std::vector<CCRect> >::iterator itr2;    for (itr2=m_rTableCellRectss.begin(); itr2!=m_rTableCellRectss.end(); itr2++)    {        itr2->clear();    }    m_rTableCellRectss.clear();        m_rSectionRects.clear();        std::vector<std::vector<CCRect> >::iterator itr3;    for (itr3=m_rLineRectss.begin(); itr3!=m_rLineRectss.end(); itr3++)    {        itr3->clear();    }    m_rLineRectss.clear();        m_pSelectedTableCells.clear();    m_pUsedLines.clear();        std::map<CAIndexPath2E, CATableViewCell*>::iterator itr4;    for (itr4=m_pUsedTableCells.begin(); itr4!=m_pUsedTableCells.end(); itr4++)    {        CATableViewCell* cell = itr4->second;        CC_CONTINUE_IF(cell == NULL);        m_pFreedTableCells[cell->getReuseIdentifier()].pushBack(cell);        itr4->second = NULL;        cell->removeFromSuperview();        cell->resetTableViewCell();    }    m_pUsedTableCells.clear();    m_pSectionHeaderViews.clear();    m_pSectionHeaderViews.clear();}
开发者ID:Brian1900,项目名称:CrossApp,代码行数:46,


示例17: CC_CONTINUE_IF

bool CAListView::ccTouchBegan(CATouch *pTouch, CAEvent *pEvent){	if (m_pTouches->count() > 0)	{		m_pTouches->replaceObjectAtIndex(0, pTouch);		return true;	}    bool isInertia = m_tInertia.getLength() < 1.0f;	if (!CAScrollView::ccTouchBegan(pTouch, pEvent))		return false;	if (m_bAllowsSelection && this->isScrollWindowNotOutSide() == false && isInertia)	{		CCPoint point = m_pContainer->convertTouchToNodeSpace(pTouch);		std::map<unsigned int, CAListViewCell*>::iterator itr;		for (itr = m_pUsedListCells.begin(); itr != m_pUsedListCells.end(); ++itr)		{			CAListViewCell* pCell = itr->second;			CC_CONTINUE_IF(pCell == NULL);			if (pCell->getFrame().containsPoint(point) && pCell->isVisible())			{				CC_BREAK_IF(pCell->getControlState() == CAControlStateDisabled);				if (m_pHighlightedListCells)				{					m_pHighlightedListCells->setControlStateNormal();				}				m_pHighlightedListCells = pCell;				CC_BREAK_IF(pCell->getControlState() == CAControlStateSelected);				CCDelayTime* delayTime = CCDelayTime::create(0.05f);				CCCallFunc* func = CCCallFunc::create(pCell, callfunc_selector(CAListViewCell::setControlStateHighlighted));				CCSequence* actions = CCSequence::create(delayTime, func, NULL);				m_pContainer->runAction(actions);				break;			}		}	}	return true;}
开发者ID:dksai414,项目名称:CrossApp,代码行数:44,


示例18: CC_CONTINUE_IF

void CCEGLViewProtocol::getSetOfTouchesEndOrCancel(CCSet& set, int num, int ids[], float xs[], float ys[]){    for (int i = 0; i < num; ++i)    {        int id = ids[i];        float x = xs[i];        float y = ys[i];        CC_CONTINUE_IF(s_TouchesIntergerDict.find(id) == s_TouchesIntergerDict.end());        int index = s_TouchesIntergerDict.at(id);        /* Add to the set to send to the director */        CATouch* pTouch = s_pTouches[index];        if (pTouch)        {            CCLOGINFO("Ending touches with id: %d, x=%f, y=%f", id, x, y);            pTouch->setTouchInfo(index,                                 (x - m_obViewPortRect.origin.x) / m_fScaleX,                                 (y - m_obViewPortRect.origin.y) / m_fScaleY);            set.addObject(pTouch);            // release the object            pTouch->release();            s_pTouches[index] = NULL;            removeUsedIndexBit(index);            s_TouchesIntergerDict.erase(id);        }        else        {            CCLOG("Ending touches with id: %d error", id);            return;        }    }    if (set.count() == 0)    {        CCLOG("touchesEnded or touchesCancel: count = 0");        return;    }}
开发者ID:khjl12345,项目名称:CrossApp,代码行数:44,


示例19: CC_CONTINUE_IF

void CATabBarController::renderingSelectedViewController(){    m_pTabBar->setSelectedAtIndex(m_nSelectedIndex);        for (int i=0; i<m_pViewControllers.size(); i++)    {        CC_CONTINUE_IF(!m_pViewControllers.at(i)->getView()->isVisible());        m_pViewControllers.at(i)->getView()->setVisible(false);        m_pViewControllers.at(i)->viewDidDisappear();    }        if (m_pViewControllers.at(m_nSelectedIndex)->getView()->getSuperview() == NULL)    {        m_pViewControllers.at(m_nSelectedIndex)->getView()->setFrame(m_pContainer->getBounds());        m_pViewControllers.at(m_nSelectedIndex)->addViewFromSuperview(m_pContainer);    }        m_pViewControllers.at(m_nSelectedIndex)->getView()->setVisible(true);    m_pViewControllers.at(m_nSelectedIndex)->viewDidAppear();}
开发者ID:dlpc,项目名称:CrossApp,代码行数:20,


示例20: CCAssert

CABatchView * CABatchView::addViewWithoutQuad(CAView* view, unsigned int z, int aTag){    CCAssert( view != NULL, "Argument must be non-NULL");    view->setAtlasIndex(z);    int i=0;     CAVector<CAView*>::iterator itr;    for (itr=m_obDescendants.begin(); itr!=m_obDescendants.end(); itr++)    {        CC_CONTINUE_IF((*itr)->getAtlasIndex() < z);        ++i;    }    m_obDescendants.insert(i, view);    CAView::insertSubview(view, z);    view->setTag(aTag);    reorderBatch(false);    return this;}
开发者ID:Brian1900,项目名称:CrossApp,代码行数:22,


示例21: CC_CONTINUE_IF

void CACollectionView::mouseMoved(CATouch* pTouch, CAEvent* pEvent){    if (m_bAllowsSelection)    {        DPoint point = m_pContainer->convertTouchToNodeSpace(pTouch);                std::map<CAIndexPath3E, CACollectionViewCell*>::iterator itr;        for (itr = m_mpUsedCollectionCells.begin(); itr != m_mpUsedCollectionCells.end(); ++itr)        {            CACollectionViewCell* cell = itr->second;            CC_CONTINUE_IF(cell == NULL);            if (cell->getFrame().containsPoint(point) && cell->isVisible())            {                CC_BREAK_IF(cell->getControlState() == CAControlStateDisabled);                                if (m_pHighlightedCollectionCells)                {                    CAIndexPath3E index = CAIndexPath3E(m_pHighlightedCollectionCells->getSection(),                                                        m_pHighlightedCollectionCells->getRow(),                                                        m_pHighlightedCollectionCells->getItem());                    if (m_pSelectedCollectionCells.count(index))                    {                        m_pHighlightedCollectionCells->setControlStateHighlighted();                    }                    else                    {                        m_pHighlightedCollectionCells->setControlStateNormal();                    }                                    }                                m_pHighlightedCollectionCells = cell;                cell->setControlStateHighlighted();                                break;            }        }    }}
开发者ID:DreamCastleShanghai,项目名称:dkomClient,代码行数:39,


示例22: switch

void CATabBarController::update(float dt){    CCRect rect = m_pContainer->getFrame();    CCSize size = m_pContainer->getViewSize();    switch (m_eTabBarVerticalAlignment)    {    case CABarVerticalAlignmentTop:    {        rect.origin.y = m_pTabBar->getFrame().origin.y + m_pTabBar->getFrame().size.height;        rect.size.height = this->getView()->getBounds().size.height - rect.origin.y;    }    break;    case CABarVerticalAlignmentBottom:    {        rect.size.height = m_pTabBar->getFrame().origin.y;    }    break;    default:        break;    }    size.height = rect.size.height;    m_pContainer->setFrame(rect);    CCPoint point = m_pContainer->getContentOffset();    m_pContainer->setViewSize(size);    m_pContainer->setContentOffset(point, false);    for (unsigned int i=0; i<m_pViewControllers.size(); i++)    {        CAViewController* viewController = m_pViewControllers.at(i);        CAView* superview = viewController->getView()->getSuperview();        CC_CONTINUE_IF(superview == NULL);        rect.origin.x = superview->getFrameOrigin().x;        rect.origin.y = 0;        superview->setFrame(rect);        viewController->getSuperViewRect(superview->getBounds());    }}
开发者ID:Rogerlin2013,项目名称:CrossApp,代码行数:39,


示例23: CC_CONTINUE_IF

void CAListView::mouseMoved(CATouch* pTouch, CAEvent* pEvent){    if (m_bAllowsSelection)    {        DPoint point = m_pContainer->convertTouchToNodeSpace(pTouch);                std::map<unsigned int, CAListViewCell*>::iterator itr;        for (itr = m_mpUsedListCells.begin(); itr != m_mpUsedListCells.end(); ++itr)        {            CAListViewCell* pCell = itr->second;            CC_CONTINUE_IF(pCell == NULL);                        if (pCell->getFrame().containsPoint(point) && pCell->isVisible())            {                CC_BREAK_IF(pCell->getControlState() == CAControlStateDisabled);                                if (m_pHighlightedListCells)                {                    unsigned int index = m_pHighlightedListCells->getIndex();                    if (m_pSelectedListCells.count(index))                    {                        m_pHighlightedListCells->setControlStateHighlighted();                    }                    else                    {                        m_pHighlightedListCells->setControlStateNormal();                    }                                    }                                m_pHighlightedListCells = pCell;                pCell->setControlStateHighlighted();                break;            }        }    }}
开发者ID:jango2015,项目名称:CrossApp,代码行数:38,


示例24: addSubview

void CAListView::reloadData(){	if (m_pListViewDataSource == NULL)		return;        this->reloadViewSizeData();        this->removeAllSubviews();        m_pUsedLines.clear();	m_pUsedListCells.clear();	m_pFreedListCells.clear();    m_pSelectedListCells.clear();		CCRect winRect = this->getBounds();    winRect.origin = this->getContentOffset();    	if (m_nListHeaderHeight > 0)	{		if (m_pListHeaderView)		{			m_pListHeaderView->setFrame(m_rHeaderRect);			addSubview(m_pListHeaderView);		}	}	unsigned int cellCount = m_pListViewDataSource->numberOfIndex(this);	for (unsigned i = 0; i < cellCount; i++)	{		if (m_nIndexs > 0)		{			std::pair<std::map<unsigned int, CAListViewCell*>::iterator, bool> itrResult =				m_pUsedListCells.insert(std::make_pair(i, (CAListViewCell*)NULL));			CC_CONTINUE_IF(!winRect.intersectsRect(m_rIndexRects[i]));			CAListViewCell* pCellView = m_pListViewDataSource->listViewCellAtIndex(this, m_rIndexRects[i].size, i);			if (pCellView)			{				pCellView->m_nIndex = i;				pCellView->setFrame(m_rIndexRects[i]);				addSubview(pCellView);				itrResult.first->second = pCellView;			}		}        		if (m_nSeparatorViewHeight > 0)		{			CAView* view = CAView::createWithFrame(m_rLineRects[i], m_obSeparatorColor);			addSubview(view);            m_pUsedLines[i] = view;		}	}	if (m_nListFooterHeight > 0)	{		if (m_pListFooterView)		{			m_pListFooterView->setFrame(m_rFooterRect);			addSubview(m_pListFooterView);		}	}    this->layoutPullToRefreshView();    this->startDeaccelerateScroll();}
开发者ID:Brian1900,项目名称:CrossApp,代码行数:65,


示例25: CC_RETURN_IF

void CACollectionView::reloadData(){	CC_RETURN_IF(m_pCollectionViewDataSource == NULL);    	this->reloadViewSizeData();    	this->removeAllSubviews();    	DRect winRect = this->getBounds();	winRect.origin = getContentOffset();	float width = winRect.size.width;	int y = 0;    	if (m_nCollectionHeaderHeight > 0 && m_pCollectionHeaderView)	{		m_pCollectionHeaderView->setDisplayRange(true);		m_pCollectionHeaderView->setFrame(DRect(0, y, width, m_nCollectionHeaderHeight));		addSubview(m_pCollectionHeaderView);		y += m_nCollectionHeaderHeight;	}    ;    int begin = (int)m_rSectionRects.size();    m_rSectionRects.resize(m_rSectionRects.size() + m_nSections);	for (int i = 0; i < m_nSections; i++)	{		unsigned int iSectionHeaderHeight = m_nSectionHeaderHeights.at(i);		DRect sectionHeaderRect = DRect(0, y, width, iSectionHeaderHeight);		if (iSectionHeaderHeight>0)		{			CAView* pSectionHeaderView = m_pCollectionViewDataSource->collectionViewSectionViewForHeaderInSection(this, sectionHeaderRect.size, i);			if (pSectionHeaderView != NULL)			{				pSectionHeaderView->setDisplayRange(true);				pSectionHeaderView->setFrame(sectionHeaderRect);				insertSubview(pSectionHeaderView, 1);				m_pSectionHeaderViews[i] = pSectionHeaderView;				y += iSectionHeaderHeight;			}		}        		y += m_nVertInterval;		unsigned int rowCount = m_nRowsInSections.at(i);		for (int j = 0; j < rowCount; j++)		{			int iHeight = m_nRowHeightss.at(i).at(j);            			unsigned int itemCount = m_pCollectionViewDataSource->numberOfItemsInRowsInSection(this, i, j);            			unsigned int cellWidth = 0;			if (itemCount>0)			{				cellWidth = (width - m_nHoriInterval) / itemCount - m_nHoriInterval;			}			for (int k = 0; k < itemCount; k++)			{				CAIndexPath3E indexPath = CAIndexPath3E(i, j, k);				DRect cellRect = DRect(m_nHoriInterval + (cellWidth + m_nHoriInterval)*k, y, cellWidth, iHeight);				m_rUsedCollectionCellRects[indexPath] = cellRect;                				std::pair<std::map<CAIndexPath3E, CACollectionViewCell*>::iterator, bool> itrResult =                m_mpUsedCollectionCells.insert(std::make_pair(indexPath, (CACollectionViewCell*)NULL));                				CC_CONTINUE_IF(!winRect.intersectsRect(cellRect));                				CACollectionViewCell* cell = m_pCollectionViewDataSource->collectionCellAtIndex(this, cellRect.size, i, j, k);				if (cell)				{					addSubview(cell);					cell->setFrame(cellRect);					cell->m_nSection = i;					cell->m_nRow = j;					cell->m_nItem = k;					itrResult.first->second = cell;                    m_vpUsedCollectionCells.pushBack(cell);                                        if (m_pCollectionViewDataSource)                    {                        m_pCollectionViewDataSource->collectionViewWillDisplayCellAtIndex(this, cell, i, j, k);                    }				}			}			y += (iHeight + m_nVertInterval);		}        		unsigned int iSectionFooterHeight = m_nSectionFooterHeights.at(i);		DRect sectionFooterRect = DRect(0, y, width, iSectionFooterHeight);		if (iSectionFooterHeight > 0)		{			CAView* pSectionFooterView = m_pCollectionViewDataSource->collectionViewSectionViewForFooterInSection(this, sectionFooterRect.size, i);			if (pSectionFooterView != NULL)			{				pSectionFooterView->setDisplayRange(true);				pSectionFooterView->setFrame(sectionFooterRect);				insertSubview(pSectionFooterView, 1);				m_pSectionFooterViews[i] = pSectionFooterView;				y += iSectionFooterHeight;			}		}        //.........这里部分代码省略.........
开发者ID:DreamCastleShanghai,项目名称:dkomClient,代码行数:101,



注:本文中的CC_CONTINUE_IF函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ CC_DEGREES_TO_RADIANS函数代码示例
C++ CC_CONTENT_SCALE_FACTOR函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。