[NUI] add exception docs of layout classes (#2052)
authorYeongJong Lee <cleanlyj@naver.com>
Thu, 29 Oct 2020 06:01:13 +0000 (15:01 +0900)
committerGitHub <noreply@github.com>
Thu, 29 Oct 2020 06:01:13 +0000 (15:01 +0900)
Requested by TCT reviewr.

Co-authored-by: Jiyun Yang <ji.yang@samsung.com>
src/Tizen.NUI/src/public/Layouting/FlexLayout.cs
src/Tizen.NUI/src/public/Layouting/GridLayout.cs

index ae9a60a..d043366 100755 (executable)
@@ -104,6 +104,7 @@ namespace Tizen.NUI
         /// <seealso cref="SetFlexAlignmentSelf(View, AlignmentType)"/>
         /// <param name="view">The child view.</param>
         /// <returns> The value of alignment self.</returns>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
         /// <since_tizen> 8 </since_tizen>
         public static AlignmentType GetFlexAlignmentSelf(View view) => GetAttachedValue<AlignmentType>(view, FlexAlignmentSelfProperty);
 
@@ -113,6 +114,7 @@ namespace Tizen.NUI
         /// <seealso cref="SetFlexPositionType(View, PositionType)"/>
         /// <param name="view">The child view.</param>
         /// <returns> The value of position type</returns>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
         /// <since_tizen> 8 </since_tizen>
         public static PositionType GetFlexPositionType(View view) => GetAttachedValue<PositionType>(view, FlexPositionTypeProperty);
 
@@ -122,6 +124,7 @@ namespace Tizen.NUI
         /// <seealso cref="SetFlexAspectRatio(View, float)"/>
         /// <param name="view">The child view.</param>
         /// <returns> The value of aspect ratio</returns>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
         /// <since_tizen> 8 </since_tizen>
         public static float GetFlexAspectRatio(View view) => GetAttachedValue<float>(view, FlexAspectRatioProperty);
 
@@ -131,6 +134,7 @@ namespace Tizen.NUI
         /// <seealso cref="SetFlexBasis(View, float)"/>
         /// <param name="view">The child view.</param>
         /// <returns> The value of basis</returns>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
         /// <since_tizen> 8 </since_tizen>
         public static float GetFlexBasis(View view) => GetAttachedValue<float>(view, FlexBasisProperty);
 
@@ -140,6 +144,7 @@ namespace Tizen.NUI
         /// <seealso cref="SetFlexShrink(View, float)"/>
         /// <param name="view">The child view.</param>
         /// <returns> The value of shrink</returns>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
         /// <since_tizen> 8 </since_tizen>
         public static float GetFlexShrink(View view) => GetAttachedValue<float>(view, FlexShrinkProperty);
 
@@ -149,6 +154,7 @@ namespace Tizen.NUI
         /// <seealso cref="SetFlexGrow(View, float)"/>
         /// <param name="view">The child view.</param>
         /// <returns> The value of grow</returns>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
         /// <since_tizen> 8 </since_tizen>
         public static float GetFlexGrow(View view) => GetAttachedValue<float>(view, FlexGrowProperty);
 
@@ -160,6 +166,8 @@ namespace Tizen.NUI
         /// </summary>
         /// <param name="view">The child view.</param>
         /// <param name="value">The value of alignment self.</param>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
+        /// <exception cref="ArgumentException">The <paramref name="value"/> should be <see cref="AlignmentType"/>.</exception>
         /// <since_tizen> 8 </since_tizen>
         public static void SetFlexAlignmentSelf(View view, AlignmentType value) => SetAttachedValue(view, FlexAlignmentSelfProperty, value);
 
@@ -173,6 +181,8 @@ namespace Tizen.NUI
         /// </summary>
         /// <param name="view">The child view.</param>
         /// <param name="value">The value of position type.</param>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
+        /// <exception cref="ArgumentException">The <paramref name="value"/> should be <see cref="PositionType"/>.</exception>
         /// <since_tizen> 8 </since_tizen>
         public static void SetFlexPositionType(View view, PositionType value) => SetAttachedValue(view, FlexPositionTypeProperty, value);
 
@@ -184,6 +194,8 @@ namespace Tizen.NUI
         /// </summary>
         /// <param name="view">The child view.</param>
         /// <param name="value">The value of aspect ratio</param>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
+        /// <exception cref="ArgumentException">The <paramref name="value"/> cannot be less than or equal to 0.0f.</exception>
         /// <since_tizen> 8 </since_tizen>
         public static void SetFlexAspectRatio(View view, float value) => SetAttachedValue(view, FlexAspectRatioProperty, value);
 
@@ -196,6 +208,8 @@ namespace Tizen.NUI
         /// </summary>
         /// <param name="view">The child view.</param>
         /// <param name="value">The value of basis</param>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
+        /// <exception cref="ArgumentException">The <paramref name="value"/> cannot be less than 0.0f.</exception>
         /// <since_tizen> 8 </since_tizen>
         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.<br/>
         /// 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.<br/>
-        /// Flex shrink accepts any floating point value >= 0, with 1 being the default value. A container will shrink its children weighted by the childs 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.
         /// </summary>
         /// <param name="view">The child view.</param>
         /// <param name="value">The value of shrink</param>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
+        /// <exception cref="ArgumentException">The <paramref name="value"/> cannot be less than 0.0f.</exception>
         /// <since_tizen> 8 </since_tizen>
         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.<br/>
         /// Flex grow accepts any floating point value >= 0, with 0 being the default value.<br/>
-        /// A container will distribute any remaining space among its children weighted by the childs flex grow value.
+        /// A container will distribute any remaining space among its children weighted by the child's flex grow value.
         /// </summary>
         /// <param name="view">The child view.</param>
         /// <param name="value">The value of flex</param>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
+        /// <exception cref="ArgumentException">The <paramref name="value"/> cannot be less than 0.0f.</exception>
         /// <since_tizen> 8 </since_tizen>
         public static void SetFlexGrow(View view, float value) => SetAttachedValue(view, FlexGrowProperty, value);
 
index 4928d73..0bb0010 100755 (executable)
@@ -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
         }
 
         /// <summary>
-        /// Get the column index.
+        /// Gets the column index.
         /// </summary>
+        /// <param name="view">The child view.</param>
+        /// <returns>The column index of <paramref name="view"/>.</returns>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
         /// <since_tizen> 8 </since_tizen>
         public static int GetColumn(View view) => GetAttachedValue<int>(view, ColumnProperty);
 
         /// <summary>
-        /// Get the column span.
+        /// Gets the column span.
         /// </summary>
+        /// <param name="view">The child view.</param>
+        /// <returns>The column span of <paramref name="view"/>.</returns>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
         /// <since_tizen> 8 </since_tizen>
         public static int GetColumnSpan(View view) => GetAttachedValue<int>(view, ColumnSpanProperty);
 
         /// <summary>
-        /// Get the row index.
+        /// Gets the row index.
         /// </summary>
+        /// <param name="view">The child view.</param>
+        /// <returns>The row index of <paramref name="view"/>.</returns>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
         /// <since_tizen> 8 </since_tizen>
         public static int GetRow(View view) => GetAttachedValue<int>(view, RowProperty);
 
         /// <summary>
-        /// Get the row span.
+        /// Gets the row span.
         /// </summary>
+        /// <param name="view">The child view.</param>
+        /// <returns>The row span of <paramref name="view"/>.</returns>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
         /// <since_tizen> 8 </since_tizen>
         public static int GetRowSpan(View view) => GetAttachedValue<int>(view, RowSpanProperty);
 
         /// <summary>
-        /// Get the value how child is resized within its horizontal space.
+        /// Gets the value how child is resized within its horizontal space.
         /// </summary>
+        /// <param name="view">The child view.</param>
+        /// <returns>The horizontal stretch flag of <paramref name="view"/>.</returns>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
         /// <since_tizen> 8 </since_tizen>
         public static StretchFlags GetHorizontalStretch(View view) => GetAttachedValue<StretchFlags>(view, HorizontalStretchProperty);
 
         /// <summary>
-        /// Get the value how child is resized within its vertical space.
+        /// Gets the value how child is resized within its vertical space.
         /// </summary>
+        /// <param name="view">The child view.</param>
+        /// <returns>The vertical stretch flag of <paramref name="view"/>.</returns>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
         /// <since_tizen> 8 </since_tizen>
         public static StretchFlags GetVerticalStretch(View view) => GetAttachedValue<StretchFlags>(view, VerticalStretchProperty);
 
         /// <summary>
-        /// Get the horizontal alignment of this child.
+        /// Gets the horizontal alignment of this child.
         /// </summary>
+        /// <param name="view">The child view.</param>
+        /// <returns>The horizontal alignment of <paramref name="view"/>.</returns>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
         /// <since_tizen> 8 </since_tizen>
         public static Alignment GetHorizontalAlignment(View view) => GetAttachedValue<Alignment>(view, HorizontalAlignmentProperty);
 
         /// <summary>
-        /// Get the vertical alignment of this child.
+        /// Gets the vertical alignment of this child.
         /// </summary>
+        /// <param name="view">The child view.</param>
+        /// <returns>The vertical alignment of <paramref name="view"/>.</returns>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
         /// <since_tizen> 8 </since_tizen>
         public static Alignment GetVerticalAlignment(View view) => GetAttachedValue<Alignment>(view, VerticalAlignmentProperty);
 
         /// <summary>
-        /// Set the column index.
+        /// Sets the column index the child occupies. the default value is -1.
         /// </summary>
+        /// <param name="view">The child view.</param>
+        /// <param name="value">The column index of <paramref name="view"/>.</param>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
+        /// <exception cref="ArgumentException">The <paramref name="value"/> cannot be less than 0.</exception>
         /// <since_tizen> 8 </since_tizen>
         public static void SetColumn(View view, int value) => SetAttachedValue(view, ColumnProperty, value);
 
         /// <summary>
-        /// Set the column span.
+        /// Sets the column span the child occupies. the default value is 1.
         /// </summary>
+        /// <param name="view">The child view.</param>
+        /// <param name="value">The column span of <paramref name="view"/>.</param>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
+        /// <exception cref="ArgumentException">The <paramref name="value"/> cannot be less than 1.</exception>
         /// <since_tizen> 8 </since_tizen>
         public static void SetColumnSpan(View view, int value) => SetAttachedValue(view, ColumnSpanProperty, value);
 
         /// <summary>
-        /// Set the row index.
+        /// Sets the row index the child occupies. the default value is -1.
         /// </summary>
+        /// <param name="view">The child view.</param>
+        /// <param name="value">The row index of <paramref name="view"/>.</param>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
+        /// <exception cref="ArgumentException">The <paramref name="value"/> cannot be less than 0.</exception>
         /// <since_tizen> 8 </since_tizen>
         public static void SetRow(View view, int value) => SetAttachedValue(view, RowProperty, value);
 
         /// <summary>
-        /// Set the row span.
+        /// Sets the row span the child occupies. the default value is 1.
         /// </summary>
+        /// <param name="view">The child view.</param>
+        /// <param name="value">The row span of <paramref name="view"/>.</param>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
+        /// <exception cref="ArgumentException">The <paramref name="value"/> cannot be less than 1.</exception>
         /// <since_tizen> 8 </since_tizen>
         public static void SetRowSpan(View view, int value) => SetAttachedValue(view, RowSpanProperty, value);
 
         /// <summary>
-        /// Set the value how child is resized within its horizontal space. <see cref="StretchFlags.Fill"/> by default.
+        /// Sets the value how child is resized within its horizontal space. <see cref="StretchFlags.None"/> by default.
         /// </summary>
+        /// <param name="view">The child view.</param>
+        /// <param name="value">The horizontal stretch flag of <paramref name="view"/>.</param>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
+        /// <exception cref="ArgumentException">The <paramref name="value"/> should be <see cref="StretchFlags"/>.</exception>
         /// <since_tizen> 8 </since_tizen>
         public static void SetHorizontalStretch(View view, StretchFlags value) => SetAttachedValue(view, HorizontalStretchProperty, value);
 
         /// <summary>
-        /// Set the value how child is resized within its vertical space. <see cref="StretchFlags.Fill"/> by default.
+        /// Set the value how child is resized within its vertical space. <see cref="StretchFlags.None"/> by default.
         /// </summary>
+        /// <param name="view">The child view.</param>
+        /// <param name="value">The vertical stretch flag of <paramref name="view"/>.</param>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
+        /// <exception cref="ArgumentException">The <paramref name="value"/> should be <see cref="StretchFlags"/>.</exception>
         /// <since_tizen> 8 </since_tizen>
         public static void SetVerticalStretch(View view, StretchFlags value) => SetAttachedValue(view, VerticalStretchProperty, value);
 
         /// <summary>
-        /// Set the horizontal alignment of this child inside the cells.
+        /// Set the horizontal alignment of this child inside the cells. <see cref="Alignment.Start"/> by default.
         /// </summary>
+        /// <param name="view">The child view.</param>
+        /// <param name="value">The horizontal alignment flag of <paramref name="view"/>.</param>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
+        /// <exception cref="ArgumentException">The <paramref name="value"/> should be <see cref="Alignment"/>.</exception>
         /// <since_tizen> 8 </since_tizen>
         public static void SetHorizontalAlignment(View view, Alignment value) => SetAttachedValue(view, HorizontalAlignmentProperty, value);
 
         /// <summary>
         /// Set the vertical alignment of this child inside the cells.
         /// </summary>
+        /// <param name="view">The child view.</param>
+        /// <param name="value">The vertical alignment flag of <paramref name="view"/>.</param>
+        /// <exception cref="ArgumentNullException">The <paramref name="view"/> cannot be null.</exception>
+        /// <exception cref="ArgumentException">The <paramref name="value"/> should be <see cref="Alignment"/>.</exception>
         /// <since_tizen> 8 </since_tizen>
         public static void SetVerticalAlignment(View view, Alignment value) => SetAttachedValue(view, VerticalAlignmentProperty, value);