예제 #1
0
 public ScrollList(
     [NotNull] List <Widget> children,
     [CanBeNull] Key key = null,
     CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.Start,
     MainAxisAlignment mainAxisAlignment   = MainAxisAlignment.Start
     ) : base(children, key)
 {
     CrossAxisAlignment = crossAxisAlignment;
     MainAxisAlignment  = mainAxisAlignment;
 }
예제 #2
0
파일: Column.cs 프로젝트: Mefodei/UniMob
 public Column(
     [NotNull] List <Widget> children,
     [CanBeNull] Key key = null,
     CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.Start,
     MainAxisAlignment mainAxisAlignment   = MainAxisAlignment.Start,
     AxisSize crossAxisSize = AxisSize.Min,
     AxisSize mainAxisSize  = AxisSize.Min
     ) : base(
         children,
         key
         )
 {
     CrossAxisAlignment = crossAxisAlignment;
     MainAxisAlignment  = mainAxisAlignment;
     CrossAxisSize      = crossAxisSize;
     MainAxisSize       = mainAxisSize;
 }
예제 #3
0
파일: GridFlow.cs 프로젝트: Mefodei/UniMob
 public GridFlow(
     [NotNull] List <Widget> children,
     [CanBeNull] Key key = null,
     CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.Start,
     MainAxisAlignment mainAxisAlignment   = MainAxisAlignment.Start,
     AxisSize crossAxisSize               = AxisSize.Min,
     AxisSize mainAxisSize                = AxisSize.Min,
     [CanBeNull] int?maxCrossAxisCount    = null,
     [CanBeNull] float?maxCrossAxisExtent = null)
     : base(children, key)
 {
     CrossAxisAlignment = crossAxisAlignment;
     MainAxisAlignment  = mainAxisAlignment;
     CrossAxisSize      = crossAxisSize;
     MainAxisSize       = mainAxisSize;
     MaxCrossAxisCount  = Math.Max(maxCrossAxisCount ?? int.MaxValue, 1);
     MaxCrossAxisExtent = Math.Max(maxCrossAxisExtent ?? float.MaxValue, 1);
 }
예제 #4
0
파일: flex.cs 프로젝트: wxFancer/UIWidgets
        public RenderFlex(
            List <RenderBox> children             = null,
            Axis direction                        = Axis.horizontal,
            MainAxisSize mainAxisSize             = MainAxisSize.max,
            MainAxisAlignment mainAxisAlignment   = MainAxisAlignment.start,
            CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center,
            TextDirection textDirection           = TextDirection.ltr,
            VerticalDirection verticalDirection   = VerticalDirection.down,
            TextBaseline textBaseline             = TextBaseline.alphabetic
            )
        {
            this._direction          = direction;
            this._mainAxisAlignment  = mainAxisAlignment;
            this._mainAxisSize       = mainAxisSize;
            this._crossAxisAlignment = crossAxisAlignment;
            this._textDirection      = textDirection;
            this._verticalDirection  = verticalDirection;
            this._textBaseline       = textBaseline;

            this.addAll(children);
        }
        private static TextAnchor ToTextAnchor(MainAxisAlignment main, CrossAxisAlignment cross)
        {
            switch (main)
            {
            case MainAxisAlignment.Center:
                return(cross == CrossAxisAlignment.Start ? TextAnchor.MiddleLeft
                        : cross == CrossAxisAlignment.Center ? TextAnchor.MiddleCenter
                        : TextAnchor.MiddleRight);

            case MainAxisAlignment.End:
                return(cross == CrossAxisAlignment.Start ? TextAnchor.LowerLeft
                        : cross == CrossAxisAlignment.Center ? TextAnchor.LowerCenter
                        : TextAnchor.LowerRight);

            case MainAxisAlignment.Start:
                return(cross == CrossAxisAlignment.Start ? TextAnchor.UpperLeft
                        : cross == CrossAxisAlignment.Center ? TextAnchor.UpperCenter
                        : TextAnchor.UpperRight);

            default:
                return(TextAnchor.UpperLeft);
            }
        }
예제 #6
0
 internal _ButtonBarRow(
     List <Widget> children,
     Axis direction                        = Axis.horizontal,
     MainAxisSize mainAxisSize             = MainAxisSize.max,
     MainAxisAlignment mainAxisAlignment   = MainAxisAlignment.start,
     CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center,
     TextDirection?textDirection           = null,
     VerticalDirection overflowDirection   = VerticalDirection.down,
     TextBaseline?textBaseline             = null,
     float?overflowButtonSpacing           = null
     ) : base(
         children: children,
         direction: direction,
         mainAxisSize: mainAxisSize,
         mainAxisAlignment: mainAxisAlignment,
         crossAxisAlignment: crossAxisAlignment,
         textDirection: textDirection,
         verticalDirection: overflowDirection,
         textBaseline: textBaseline
         )
 {
     this.overflowButtonSpacing = overflowButtonSpacing;
 }
예제 #7
0
 internal _RenderButtonBarRow(
     List <RenderBox> children             = null,
     Axis direction                        = Axis.horizontal,
     MainAxisSize mainAxisSize             = MainAxisSize.max,
     MainAxisAlignment mainAxisAlignment   = MainAxisAlignment.start,
     CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center,
     TextDirection textDirection           = TextDirection.ltr,
     VerticalDirection verticalDirection   = VerticalDirection.down,
     TextBaseline textBaseline             = TextBaseline.alphabetic,
     float?overflowButtonSpacing           = null
     ) : base(
         children: children,
         direction: direction,
         mainAxisSize: mainAxisSize,
         mainAxisAlignment: mainAxisAlignment,
         crossAxisAlignment: crossAxisAlignment,
         textDirection: textDirection,
         verticalDirection: verticalDirection,
         textBaseline: textBaseline
         )
 {
     D.assert(overflowButtonSpacing == null || overflowButtonSpacing >= 0);
     this.overflowButtonSpacing = overflowButtonSpacing;
 }