Exemple #1
0
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();
}
Exemple #2
0
void nuiFlowView::LayoutLine(nuiWidgetList& line, float& x, float &y, float& w, float& h, float& HSpace, float &VSpace, bool setLayout)
{
  // Process the line
  if (setLayout)
  {
    int32 size = line.size();
    x = 0;
    for (int32 j = 0; j < size; j++)
    {
      nuiWidgetPtr pWidget = line[j];
      nuiRect r(pWidget->GetIdealRect());
      r.SetHeight(h);
      r.MoveTo(x, y);
      pWidget->SetLayout(r);
      x += r.GetWidth();
      x += HSpace;
    }
  }
  line.clear();
  y += h +VSpace;
  h = 0;
  w = 0;
  
}