Rect GuiTableComposition::GetBounds()
			{
				Rect cached = previousBounds;
				Rect result = GuiBoundsComposition::GetBounds();

				bool cellMinSizeModified = false;
				SortedList<GuiCellComposition*> cells;
				FOREACH(GuiCellComposition*, cell, cellCompositions)
				{
					if (cell && !cells.Contains(cell))
					{
						cells.Add(cell);
						Size newSize = cell->GetPreferredBounds().GetSize();
						if (cell->lastPreferredSize != newSize)
						{
							cell->lastPreferredSize = newSize;
							cellMinSizeModified = true;
						}
					}
				}

				if (cached != result || cellMinSizeModified)
				{
					UpdateCellBounds();
				}
				return result;
			}
Beispiel #2
0
			static void CollectTypeDescriptors(ITypeDescriptor* td, SortedList<ITypeDescriptor*>& tds)
			{
				if (!tds.Contains(td))
				{
					tds.Add(td);
				}
			}
void SearchLeafClasses(List<ParsingSymbol*>& classes, List<ParsingSymbol*>& leafClasses)
{
	SortedList<ParsingSymbol*> parents;
	CopyFrom(
		parents,
		From(classes)
			.Select([](ParsingSymbol* type){ return type->GetDescriptorSymbol(); })
			.Distinct()
		);
	CopyFrom(
		leafClasses,
		From(classes)
			.Where([&parents](ParsingSymbol* type){ return !parents.Contains(type); })
		);
}