コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 private static float SubListHeight(WidgetsDataSubList w) => w.Height;
コード例 #4
0
 private static float SubListWidth(WidgetsDataSubList w) => w.Width;