本文整理汇总了C++中Geom::toggleDisplayChildrenFlag方法的典型用法代码示例。如果您正苦于以下问题:C++ Geom::toggleDisplayChildrenFlag方法的具体用法?C++ Geom::toggleDisplayChildrenFlag怎么用?C++ Geom::toggleDisplayChildrenFlag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Geom
的用法示例。
在下文中一共展示了Geom::toggleDisplayChildrenFlag方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: s_select_gui
void GeomScreen::s_select_gui()
{
vector<Geom*> selVec = getSelectedGeomVec();
//==== Find Last Selected Geom ====//
int last = geomUI->geomBrowser->value();
if ( (last >= 2) && Fl::event_state(FL_ALT) )
{ // select children
// Geom* lastSel = aircraftPtr->getGeomVec()[last-2];
Geom* lastSel = aircraftPtr->getDisplayGeomVec()[last-2];
vector<Geom*> cVec;
lastSel->loadChildren( cVec );
for (int i = 0; i < (int)cVec.size(); i++)
{
selectGeomBrowser( cVec[i] );
selVec.push_back(cVec[i]);
}
}
//==== Check if Geom Already Selected ====//
collaspeFlag = false;
if ( lastSelectedGeom && selVec.size() == 1 )
{
Geom* lastSel = selVec[0];
if ( lastSel == lastSelectedGeom )
{
collaspeFlag = true;
lastSel->toggleDisplayChildrenFlag();
if ( lastSel->getChildren().size() == 0 )
lastSel->setDisplayChildrenFlag( 1 );
}
}
lastSelectedGeom = NULL;
if ( selVec.size() == 1 )
lastSelectedGeom = selVec[0];
aircraftPtr->setActiveGeomVec(selVec);
loadActiveGeomOutput();
screenMgrPtr->updateGeomScreens();
aircraftPtr->flagActiveGeom();
aircraftPtr->triggerDraw();
loadGeomBrowser();
if (selVec.size() == 0)
{
scriptMgr->addLine("select", "Aircraft");
geomUI->geomBrowser->value(1);
}
else
{
scriptMgr->addLine("select", getNameString(selVec));
}
}