private static (WidgetsDataSubList, int) CreateRow(IWidget widget, int startIdx) { var(x, firstIndexOnSubList) = SumWidthsTilFit(widget.Children, startIdx, WidgetWidth(widget)); var y = MaxHeightInSubList(widget.Children, startIdx, firstIndexOnSubList); var subL = new WidgetsDataSubList(x, y, startIdx, firstIndexOnSubList < 0 ? widget.Children.Count : firstIndexOnSubList); return(subL, firstIndexOnSubList); }
private static (WidgetsDataSubList, int) CreateColumn(IWidget widget, int startIdx) { var(x, firstIndexOnSubList) = SumHeightsTilFit(widget.Children, startIdx, WidgetHeight(widget)); var y = MaxWidthInSubList(widget.Children, startIdx, firstIndexOnSubList); var subL = new WidgetsDataSubList(y, x, startIdx, firstIndexOnSubList < 0 ? widget.Children.Count : firstIndexOnSubList); return(subL, firstIndexOnSubList); }
private static float SubListHeight(WidgetsDataSubList w) => w.Height;
private static float SubListWidth(WidgetsDataSubList w) => w.Width;