uint nuiList::GetUnselected(nuiWidgetList& unselitems) { IteratorPtr pIt; for (pIt = GetFirstChild(); pIt && pIt->IsValid(); GetNextChild(pIt)) { nuiWidgetPtr pItem = pIt->GetWidget(); if (!pItem->IsSelected()) unselitems.push_back(pItem); } delete pIt; return unselitems.size(); }
void nuiContainer::GetChildren(nuiSize X, nuiSize Y, nuiWidgetList& rChildren, bool DeepSearch) { CheckValid(); X -= mRect.mLeft; Y -= mRect.mTop; IteratorPtr pIt; for (pIt = GetLastChild(); pIt && pIt->IsValid(); GetPreviousChild(pIt)) { nuiWidgetPtr pItem = pIt->GetWidget(); if (pItem && pItem->IsInsideFromParent(X,Y)) { if (DeepSearch) { nuiContainerPtr pContainer = dynamic_cast<nuiContainerPtr>(pItem); if (pContainer) pContainer->GetChildren(X, Y, rChildren, DeepSearch); } rChildren.push_back(pItem); } } delete pIt; }