From ef160e1e6980ff5a06c08afd2bedab8bb18d6a1a Mon Sep 17 00:00:00 2001 From: YeongJong Lee Date: Thu, 29 Oct 2020 15:01:13 +0900 Subject: [PATCH] [NUI] add exception docs of layout classes (#2052) Requested by TCT reviewr. Co-authored-by: Jiyun Yang --- src/Tizen.NUI/src/public/Layouting/FlexLayout.cs | 22 +++++- src/Tizen.NUI/src/public/Layouting/GridLayout.cs | 88 +++++++++++++++++++----- 2 files changed, 92 insertions(+), 18 deletions(-) diff --git a/src/Tizen.NUI/src/public/Layouting/FlexLayout.cs b/src/Tizen.NUI/src/public/Layouting/FlexLayout.cs index ae9a60a..d043366 100755 --- a/src/Tizen.NUI/src/public/Layouting/FlexLayout.cs +++ b/src/Tizen.NUI/src/public/Layouting/FlexLayout.cs @@ -104,6 +104,7 @@ namespace Tizen.NUI /// /// The child view. /// The value of alignment self. + /// The cannot be null. /// 8 public static AlignmentType GetFlexAlignmentSelf(View view) => GetAttachedValue(view, FlexAlignmentSelfProperty); @@ -113,6 +114,7 @@ namespace Tizen.NUI /// /// The child view. /// The value of position type + /// The cannot be null. /// 8 public static PositionType GetFlexPositionType(View view) => GetAttachedValue(view, FlexPositionTypeProperty); @@ -122,6 +124,7 @@ namespace Tizen.NUI /// /// The child view. /// The value of aspect ratio + /// The cannot be null. /// 8 public static float GetFlexAspectRatio(View view) => GetAttachedValue(view, FlexAspectRatioProperty); @@ -131,6 +134,7 @@ namespace Tizen.NUI /// /// The child view. /// The value of basis + /// The cannot be null. /// 8 public static float GetFlexBasis(View view) => GetAttachedValue(view, FlexBasisProperty); @@ -140,6 +144,7 @@ namespace Tizen.NUI /// /// The child view. /// The value of shrink + /// The cannot be null. /// 8 public static float GetFlexShrink(View view) => GetAttachedValue(view, FlexShrinkProperty); @@ -149,6 +154,7 @@ namespace Tizen.NUI /// /// The child view. /// The value of grow + /// The cannot be null. /// 8 public static float GetFlexGrow(View view) => GetAttachedValue(view, FlexGrowProperty); @@ -160,6 +166,8 @@ namespace Tizen.NUI /// /// The child view. /// The value of alignment self. + /// The cannot be null. + /// The should be . /// 8 public static void SetFlexAlignmentSelf(View view, AlignmentType value) => SetAttachedValue(view, FlexAlignmentSelfProperty, value); @@ -173,6 +181,8 @@ namespace Tizen.NUI /// /// The child view. /// The value of position type. + /// The cannot be null. + /// The should be . /// 8 public static void SetFlexPositionType(View view, PositionType value) => SetAttachedValue(view, FlexPositionTypeProperty, value); @@ -184,6 +194,8 @@ namespace Tizen.NUI /// /// The child view. /// The value of aspect ratio + /// The cannot be null. + /// The cannot be less than or equal to 0.0f. /// 8 public static void SetFlexAspectRatio(View view, float value) => SetAttachedValue(view, FlexAspectRatioProperty, value); @@ -196,6 +208,8 @@ namespace Tizen.NUI /// /// The child view. /// The value of basis + /// The cannot be null. + /// The cannot be less than 0.0f. /// 8 public static void SetFlexBasis(View view, float value) => SetAttachedValue(view, FlexBasisProperty, value); @@ -204,10 +218,12 @@ namespace Tizen.NUI /// Flex shrink describes how to shrink children along the main axis in the case that the total size of the children overflow the size of the container on the main axis.
/// Flex shrink is very similar to flex grow and can be thought of in the same way if any overflowing size is considered to be negative remaining space. /// These two properties also work well together by allowing children to grow and shrink as needed.
- /// Flex shrink accepts any floating point value >= 0, with 1 being the default value. A container will shrink its children weighted by the child’s flex shrink value. + /// Flex shrink accepts any floating point value >= 0, with 1 being the default value. A container will shrink its children weighted by the child's flex shrink value. /// /// The child view. /// The value of shrink + /// The cannot be null. + /// The cannot be less than 0.0f. /// 8 public static void SetFlexShrink(View view, float value) => SetAttachedValue(view, FlexShrinkProperty, value); @@ -216,10 +232,12 @@ namespace Tizen.NUI /// Flex grow describes how any space within a container should be distributed among its children along the main axis. /// After laying out its children, a container will distribute any remaining space according to the flex grow values specified by its children.
/// Flex grow accepts any floating point value >= 0, with 0 being the default value.
- /// A container will distribute any remaining space among its children weighted by the child’s flex grow value. + /// A container will distribute any remaining space among its children weighted by the child's flex grow value. /// /// The child view. /// The value of flex + /// The cannot be null. + /// The cannot be less than 0.0f. /// 8 public static void SetFlexGrow(View view, float value) => SetAttachedValue(view, FlexGrowProperty, value); diff --git a/src/Tizen.NUI/src/public/Layouting/GridLayout.cs b/src/Tizen.NUI/src/public/Layouting/GridLayout.cs index 4928d73..0bb0010 100755 --- a/src/Tizen.NUI/src/public/Layouting/GridLayout.cs +++ b/src/Tizen.NUI/src/public/Layouting/GridLayout.cs @@ -74,7 +74,7 @@ namespace Tizen.NUI [EditorBrowsable(EditorBrowsableState.Never)] public static readonly BindableProperty VerticalAlignmentProperty = BindableProperty.CreateAttached("VerticalAlignment", typeof(Alignment), typeof(GridLayout), Alignment.Start, validateValue: ValidateEnum((int)Alignment.Start, (int)Alignment.End), propertyChanged: OnChildPropertyChanged); - private const int CellUndefined = int.MinValue; + private const int CellUndefined = -1; private Orientation gridOrientation = Orientation.Horizontal; private int columns = 1; private int rows = 1; @@ -98,98 +98,154 @@ namespace Tizen.NUI } /// - /// Get the column index. + /// Gets the column index. /// + /// The child view. + /// The column index of . + /// The cannot be null. /// 8 public static int GetColumn(View view) => GetAttachedValue(view, ColumnProperty); /// - /// Get the column span. + /// Gets the column span. /// + /// The child view. + /// The column span of . + /// The cannot be null. /// 8 public static int GetColumnSpan(View view) => GetAttachedValue(view, ColumnSpanProperty); /// - /// Get the row index. + /// Gets the row index. /// + /// The child view. + /// The row index of . + /// The cannot be null. /// 8 public static int GetRow(View view) => GetAttachedValue(view, RowProperty); /// - /// Get the row span. + /// Gets the row span. /// + /// The child view. + /// The row span of . + /// The cannot be null. /// 8 public static int GetRowSpan(View view) => GetAttachedValue(view, RowSpanProperty); /// - /// Get the value how child is resized within its horizontal space. + /// Gets the value how child is resized within its horizontal space. /// + /// The child view. + /// The horizontal stretch flag of . + /// The cannot be null. /// 8 public static StretchFlags GetHorizontalStretch(View view) => GetAttachedValue(view, HorizontalStretchProperty); /// - /// Get the value how child is resized within its vertical space. + /// Gets the value how child is resized within its vertical space. /// + /// The child view. + /// The vertical stretch flag of . + /// The cannot be null. /// 8 public static StretchFlags GetVerticalStretch(View view) => GetAttachedValue(view, VerticalStretchProperty); /// - /// Get the horizontal alignment of this child. + /// Gets the horizontal alignment of this child. /// + /// The child view. + /// The horizontal alignment of . + /// The cannot be null. /// 8 public static Alignment GetHorizontalAlignment(View view) => GetAttachedValue(view, HorizontalAlignmentProperty); /// - /// Get the vertical alignment of this child. + /// Gets the vertical alignment of this child. /// + /// The child view. + /// The vertical alignment of . + /// The cannot be null. /// 8 public static Alignment GetVerticalAlignment(View view) => GetAttachedValue(view, VerticalAlignmentProperty); /// - /// Set the column index. + /// Sets the column index the child occupies. the default value is -1. /// + /// The child view. + /// The column index of . + /// The cannot be null. + /// The cannot be less than 0. /// 8 public static void SetColumn(View view, int value) => SetAttachedValue(view, ColumnProperty, value); /// - /// Set the column span. + /// Sets the column span the child occupies. the default value is 1. /// + /// The child view. + /// The column span of . + /// The cannot be null. + /// The cannot be less than 1. /// 8 public static void SetColumnSpan(View view, int value) => SetAttachedValue(view, ColumnSpanProperty, value); /// - /// Set the row index. + /// Sets the row index the child occupies. the default value is -1. /// + /// The child view. + /// The row index of . + /// The cannot be null. + /// The cannot be less than 0. /// 8 public static void SetRow(View view, int value) => SetAttachedValue(view, RowProperty, value); /// - /// Set the row span. + /// Sets the row span the child occupies. the default value is 1. /// + /// The child view. + /// The row span of . + /// The cannot be null. + /// The cannot be less than 1. /// 8 public static void SetRowSpan(View view, int value) => SetAttachedValue(view, RowSpanProperty, value); /// - /// Set the value how child is resized within its horizontal space. by default. + /// Sets the value how child is resized within its horizontal space. by default. /// + /// The child view. + /// The horizontal stretch flag of . + /// The cannot be null. + /// The should be . /// 8 public static void SetHorizontalStretch(View view, StretchFlags value) => SetAttachedValue(view, HorizontalStretchProperty, value); /// - /// Set the value how child is resized within its vertical space. by default. + /// Set the value how child is resized within its vertical space. by default. /// + /// The child view. + /// The vertical stretch flag of . + /// The cannot be null. + /// The should be . /// 8 public static void SetVerticalStretch(View view, StretchFlags value) => SetAttachedValue(view, VerticalStretchProperty, value); /// - /// Set the horizontal alignment of this child inside the cells. + /// Set the horizontal alignment of this child inside the cells. by default. /// + /// The child view. + /// The horizontal alignment flag of . + /// The cannot be null. + /// The should be . /// 8 public static void SetHorizontalAlignment(View view, Alignment value) => SetAttachedValue(view, HorizontalAlignmentProperty, value); /// /// Set the vertical alignment of this child inside the cells. /// + /// The child view. + /// The vertical alignment flag of . + /// The cannot be null. + /// The should be . /// 8 public static void SetVerticalAlignment(View view, Alignment value) => SetAttachedValue(view, VerticalAlignmentProperty, value); -- 2.7.4