当前位置: 首页>>代码示例>>C++>>正文


C++ CInterfaceManager::getAllMasterGroup方法代码示例

本文整理汇总了C++中CInterfaceManager::getAllMasterGroup方法的典型用法代码示例。如果您正苦于以下问题:C++ CInterfaceManager::getAllMasterGroup方法的具体用法?C++ CInterfaceManager::getAllMasterGroup怎么用?C++ CInterfaceManager::getAllMasterGroup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CInterfaceManager的用法示例。


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

示例1: execute

	virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */)
	{
		CInterfaceManager *pIM = CInterfaceManager::getInstance();
		const vector<CInterfaceManager::SMasterGroup> &rVMG = pIM->getAllMasterGroup();
		for (uint32 nMasterGroup = 0; nMasterGroup < rVMG.size(); nMasterGroup++)
		{
//			const CInterfaceManager::SMasterGroup &rMG = rVMG[nMasterGroup];
			pIM->getMasterGroup((uint8)nMasterGroup).unlockAllContainers();
		}
	}
开发者ID:AzyxWare,项目名称:ryzom,代码行数:10,代码来源:action_handler.cpp

示例2: saver

// ***************************************************************************
void CInterfaceConfig::CDesktopImage::fromCurrentDesktop()
{
	CInterfaceManager *pIM = CInterfaceManager::getInstance();
	// Count number of container to save
	uint32 nCount = 0, nMasterGroup, i, nCount2;

	const vector<CInterfaceManager::SMasterGroup> &rVMG = pIM->getAllMasterGroup();
	for (nMasterGroup = 0; nMasterGroup < rVMG.size(); nMasterGroup++)
	{
		const CInterfaceManager::SMasterGroup &rMG = rVMG[nMasterGroup];
		const vector<CInterfaceGroup*> &rV = rMG.Group->getGroups();
		for (i = 0; i < rV.size(); ++i)
		{
			CGroupContainer		*pGC= dynamic_cast<CGroupContainer*>(rV[i]);
			if ( pGC != NULL && pGC->isSavable() )
				nCount++;
		}
	}

	GCImages.resize(nCount);
	SCont contTmp;
	nCount2 = 0;
	// retrieve all containers
	for (nMasterGroup = 0; nMasterGroup < rVMG.size(); nMasterGroup++)
	{
		const CInterfaceManager::SMasterGroup &rMG = rVMG[nMasterGroup];
		const vector<CInterfaceGroup*> &rV = rMG.Group->getGroups();
		for (i = 0; i < rV.size(); ++i)
		{
			CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(rV[i]);
			if ( pGC != NULL && pGC->isSavable() )
			{
				GCImages[nCount2].setFrom(pGC);
				nCount2++;
			}
		}
	}
	nlassert(nCount2 == nCount);
	// set extra data stream version (in memory)
	Version = INTERFACE_CONFIG_STREAM_VERSION;
	// serial extra data in the stream
	NLMISC::CMemStream &f = ExtraDatas;
	if (f.isReading())
	{
		f.invert();
	}
	f.resetPtrTable();
	f.seek(0, NLMISC::IStream::begin);
	// Save the Top Window for this config.
	CInterfaceGroup	*topWindow= pIM->getTopWindow(pIM->getLastTopWindowPriority());
	string	topWindowName;
	if (topWindow)
	{
		CGroupContainer *pGC= dynamic_cast<CGroupContainer*>(topWindow);
		if (pGC != NULL && pGC->isSavable())
			topWindowName = pGC->getId();
	}
	f.serial(topWindowName);


	// retrieve number of elements that want their config saved
	CCountUIElemWithConfigVisitor counter;
	pIM->visit(&counter);
	f.serial(counter.Count);
	// Serial specific infos for each widget that reclaims it
	CSaveUIConfigVisitor saver(f);
	pIM->visit(&saver);
}
开发者ID:Darkhunter,项目名称:Tranquillien-HCRP-Project-using-NeL,代码行数:69,代码来源:interface_config.cpp


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