ControlList GetExportableChildren(Gwen::Controls::Base* pRoot) { ControlList list; for (int i = 0; i < pRoot->NumChildren(); i++) { Gwen::Controls::Base* pBaseChild = pRoot->GetChild(i); if (!pBaseChild) continue; // // If we have a child is isn't exportable - maybe it has a // child that is // We will count it as one of our children. // if (!pBaseChild->UserData.Exists("ControlFactory")) { list.Add(GetExportableChildren(pBaseChild)); continue; } list.Add(pBaseChild); } return list; }
void Hierarchy::OnNodeSelected( Event::Info info ) { if ( !info.ControlCaller->UserData.Exists( "TargetControl" ) ) return; Controls::Base* ctrl = info.ControlCaller->UserData.Get<Controls::Base*>( "TargetControl" ); ControlList list; list.Add( ctrl ); m_pCanvas->SelectControls( list ); }