本文整理汇总了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();
}
}
示例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);
}