[NUI] Use new Extents in Tizen.NUI.Compoents (#1116)
authorAdunFang <30402408+AdunFang@users.noreply.github.com>
Tue, 5 Nov 2019 07:12:38 +0000 (15:12 +0800)
committerJiyun Yang <ji.yang@samsung.com>
Tue, 5 Nov 2019 07:12:38 +0000 (16:12 +0900)
* [NUI] Use new Extents in Tizen.NUI.Compoents

* [NUI] Hide the internal used method

src/Tizen.NUI.Components/Attributes/DropDownAttributes.cs
src/Tizen.NUI.Components/Attributes/SelectButtonAttributes.cs
src/Tizen.NUI.Components/Attributes/TabAttributes.cs
src/Tizen.NUI.Components/Attributes/TextFieldAttributes.cs
src/Tizen.NUI.Components/Attributes/ViewAttributes.cs
src/Tizen.NUI.Components/Controls/Button.cs
src/Tizen.NUI.Components/Controls/DropDown.cs
src/Tizen.NUI.Components/Controls/SelectButton.cs
src/Tizen.NUI.Components/Controls/Tab.cs
src/Tizen.NUI.Components/Controls/Toast.cs
src/Tizen.NUI/src/public/Extents.cs

index b9b9002..09add4c 100755 (executable)
@@ -37,7 +37,7 @@ namespace Tizen.NUI.Components
             SpaceBetweenButtonTextAndIcon = 0;
             Space = new Vector4(0, 0, 0, 0);
             ListRelativeOrientation = DropDown.ListOrientation.Left;
-            ListMargin = new Vector4(0, 0, 0, 0);
+            ListMargin = new Extents(0, 0, 0, 0);
             FocusedItemIndex = 0;
         }
         /// <summary>
@@ -76,7 +76,7 @@ namespace Tizen.NUI.Components
 
             if (attributes.ListMargin != null)
             {
-                ListMargin = new Vector4(attributes.ListMargin.X, attributes.ListMargin.Y, attributes.ListMargin.Z, attributes.ListMargin.W);
+                ListMargin = new Extents(attributes.ListMargin.Start, attributes.ListMargin.End, attributes.ListMargin.Top, attributes.ListMargin.Bottom);
             }
 
             if (attributes.ListSize != null)
@@ -172,7 +172,7 @@ namespace Tizen.NUI.Components
         /// <since_tizen> 6 </since_tizen>
         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public Vector4 ListMargin
+        public Extents ListMargin
         {
             get;
             set;
@@ -265,7 +265,7 @@ namespace Tizen.NUI.Components
                 CheckImageAttributes = attributes.CheckImageAttributes.Clone() as ImageAttributes;
             }
 
-            CheckImageRightSpace = attributes.CheckImageRightSpace;
+            CheckImageGapToBoundary = attributes.CheckImageGapToBoundary;
             IsSelected = attributes.IsSelected;
         }
 
@@ -306,12 +306,12 @@ namespace Tizen.NUI.Components
         }
 
         /// <summary>
-        /// Right space from check image.
+        /// Gap of Check image to boundary.
         /// </summary>
         /// <since_tizen> 6 </since_tizen>
         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public int CheckImageRightSpace
+        public int CheckImageGapToBoundary
         {
             get;
             set;
index 6019119..e874bb4 100755 (executable)
@@ -63,7 +63,7 @@ namespace Tizen.NUI.Components
         }
 
         /// <summary>
-        /// Check image's attributes.
+        /// Selectable image's attributes.
         /// </summary>
         /// <since_tizen> 6 </since_tizen>
         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
index bab29ff..0cb5a74 100755 (executable)
@@ -34,7 +34,7 @@ namespace Tizen.NUI.Components
         [EditorBrowsable(EditorBrowsableState.Never)]
         public TabAttributes() : base()
         {
-            Space = new Vector4(0, 0, 0, 0);
+            Space = new Extents(0, 0, 0, 0);
             UseTextNaturalSize = false;
             ItemSpace = 0;
         }
@@ -65,11 +65,11 @@ namespace Tizen.NUI.Components
 
             if (attributes.Space != null)
             {
-                Space = new Vector4(attributes.Space.X, attributes.Space.Y, attributes.Space.Z, attributes.Space.W);
+                Space = new Extents(attributes.Space.Start, attributes.Space.End, attributes.Space.Top, attributes.Space.Bottom);
             }
             else
             {
-                Space = new Vector4(0, 0, 0, 0);
+                Space = new Extents(0, 0, 0, 0);
             }
             ItemSpace = attributes.ItemSpace;
             UseTextNaturalSize = attributes.UseTextNaturalSize;
@@ -129,7 +129,7 @@ namespace Tizen.NUI.Components
         /// <since_tizen> 6 </since_tizen>
         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public Vector4 Space
+        public Extents Space
         {
             get;
             set;
index b45ed30..9d22f39 100755 (executable)
@@ -27,7 +27,7 @@ namespace Tizen.NUI.Components
     public class TextFieldAttributes : ViewAttributes
     {
         /// <summary>
-        /// Creates a new instance of a TextField.
+        /// Creates a new instance of a TextFieldAttributes.
         /// </summary>
         /// <since_tizen> 6 </since_tizen>
         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
@@ -35,9 +35,9 @@ namespace Tizen.NUI.Components
         public TextFieldAttributes() : base() { }
 
         /// <summary>
-        /// Creates a new instance of a TextField with style.
+        /// Construct with specified attribute.
         /// </summary>
-        /// <param name="attributes">Create TextField by special style defined in UX.</param>
+        /// <param name="attributes">The specified TextFieldAttributes.</param>
         /// <since_tizen> 6 </since_tizen>
         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
index 4bfd671..9fc58b4 100755 (executable)
@@ -99,10 +99,7 @@ namespace Tizen.NUI.Components
                 Opacity = attributes.Opacity.Clone() as FloatSelector;
             }
 
-            PaddingLeft = attributes.PaddingLeft;
-            PaddingRight = attributes.PaddingRight;
-            PaddingTop = attributes.PaddingTop;
-            PaddingBottom = attributes.PaddingBottom;
+            Padding.CopyFrom(attributes.Padding);
         }
         /// <summary>
         /// View Position
@@ -215,41 +212,11 @@ namespace Tizen.NUI.Components
             set;
         }
         /// <summary>
-        /// View left padding
+        /// View padding
         /// </summary>
         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public int PaddingLeft
-        {
-            get;
-            set;
-        }
-        /// <summary>
-        /// View right padding
-        /// </summary>
-        /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public int PaddingRight
-        {
-            get;
-            set;
-        }
-        /// <summary>
-        /// View top padding
-        /// </summary>
-        /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public int PaddingTop
-        {
-            get;
-            set;
-        }
-        /// <summary>
-        /// View bottom padding
-        /// </summary>
-        /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public int PaddingBottom
+        public Extents Padding
         {
             get;
             set;
index f6340ba..ee7b9e6 100755 (executable)
@@ -40,6 +40,10 @@ namespace Tizen.NUI.Components
         private bool isSelected = false;
         private bool isEnabled = true;
         private bool isPressed = false;
+
+        private Extents iconPadding = null;
+        private Extents textPadding = null;
+
         /// <summary>
         /// Creates a new instance of a Button.
         /// </summary>
@@ -733,24 +737,31 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                if (null == buttonAttributes || null == buttonAttributes.IconAttributes)
-                {
-                    return null;
-                }
-                else
-                {
-                    return new Extents((ushort)buttonAttributes.IconAttributes.PaddingLeft, (ushort)buttonAttributes.IconAttributes.PaddingRight, (ushort)buttonAttributes.IconAttributes.PaddingTop, (ushort)buttonAttributes.IconAttributes.PaddingBottom);
-                }
+                return iconPadding;
             }
             set
             {
                 if (null != value)
                 {
                     CreateIconAttributes();
-                    buttonAttributes.IconAttributes.PaddingLeft = value.Start;
-                    buttonAttributes.IconAttributes.PaddingRight = value.End;
-                    buttonAttributes.IconAttributes.PaddingTop = value.Top;
-                    buttonAttributes.IconAttributes.PaddingBottom = value.Bottom;
+                    buttonAttributes.IconAttributes.Padding.CopyFrom(value);
+
+                    if (null == iconPadding)
+                    {
+                        iconPadding = new Extents((ushort start, ushort end, ushort top, ushort bottom) =>
+                        {
+                            buttonAttributes.IconAttributes.Padding.Start = start;
+                            buttonAttributes.IconAttributes.Padding.End = end;
+                            buttonAttributes.IconAttributes.Padding.Top = top;
+                            buttonAttributes.IconAttributes.Padding.Bottom = bottom;
+                            RelayoutRequest();
+                        }, value.Start, value.End, value.Top, value.Bottom);
+                    }
+                    else
+                    {
+                        iconPadding.CopyFrom(value);
+                    }
+
                     RelayoutRequest();
                 }
             }
@@ -764,24 +775,32 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                if (null == buttonAttributes || null == buttonAttributes.TextAttributes)
-                {
-                    return null;
-                }
-                else
-                {
-                    return new Extents((ushort)buttonAttributes.TextAttributes.PaddingLeft, (ushort)buttonAttributes.TextAttributes.PaddingRight, (ushort)buttonAttributes.TextAttributes.PaddingTop, (ushort)buttonAttributes.TextAttributes.PaddingBottom);
-                }
+                return textPadding;
             }
             set
             {
                 if (null != value)
                 {
                     CreateTextAttributes();
-                    buttonAttributes.TextAttributes.PaddingLeft = value.Start;
-                    buttonAttributes.TextAttributes.PaddingRight = value.End;
-                    buttonAttributes.TextAttributes.PaddingTop = value.Top;
-                    buttonAttributes.TextAttributes.PaddingBottom = value.Bottom;
+
+                    buttonAttributes.TextAttributes.Padding.CopyFrom(value);
+
+                    if (null == textPadding)
+                    {
+                        textPadding = new Extents((ushort start, ushort end, ushort top, ushort bottom) =>
+                        {
+                            buttonAttributes.TextAttributes.Padding.Start = start;
+                            buttonAttributes.TextAttributes.Padding.End = end;
+                            buttonAttributes.TextAttributes.Padding.Top = top;
+                            buttonAttributes.TextAttributes.Padding.Bottom = bottom;
+                            RelayoutRequest();
+                        }, value.Start, value.End, value.Top, value.Bottom);
+                    }
+                    else
+                    {
+                        textPadding.CopyFrom(value);
+                    }
+
                     RelayoutRequest();
                 }
             }
@@ -1088,24 +1107,24 @@ namespace Tizen.NUI.Components
             }
             buttonText.WidthResizePolicy = ResizePolicyType.Fixed;
             buttonText.HeightResizePolicy = ResizePolicyType.Fixed;
-            int textPaddingLeft = buttonAttributes.TextAttributes.PaddingLeft;
-            int textPaddingRight = buttonAttributes.TextAttributes.PaddingRight;
-            int textPaddingTop = buttonAttributes.TextAttributes.PaddingTop;
-            int textPaddingBottom = buttonAttributes.TextAttributes.PaddingBottom;
+            int textPaddingStart = buttonAttributes.TextAttributes.Padding.Start;
+            int textPaddingEnd = buttonAttributes.TextAttributes.Padding.End;
+            int textPaddingTop = buttonAttributes.TextAttributes.Padding.Top;
+            int textPaddingBottom = buttonAttributes.TextAttributes.Padding.Bottom;
 
-            int iconPaddingLeft = buttonAttributes.IconAttributes.PaddingLeft;
-            int iconPaddingRight = buttonAttributes.IconAttributes.PaddingRight;
-            int iconPaddingTop = buttonAttributes.IconAttributes.PaddingTop;
-            int iconPaddingBottom = buttonAttributes.IconAttributes.PaddingBottom;
+            int iconPaddingStart = buttonAttributes.IconAttributes.Padding.Start;
+            int iconPaddingEnd = buttonAttributes.IconAttributes.Padding.End;
+            int iconPaddingTop = buttonAttributes.IconAttributes.Padding.Top;
+            int iconPaddingBottom = buttonAttributes.IconAttributes.Padding.Bottom;
 
             if (IconRelativeOrientation == IconOrientation.Top || IconRelativeOrientation == IconOrientation.Bottom)
             {
-                buttonText.SizeWidth = SizeWidth - textPaddingLeft - textPaddingRight;
+                buttonText.SizeWidth = SizeWidth - textPaddingStart - textPaddingEnd;
                 buttonText.SizeHeight = SizeHeight - textPaddingTop - textPaddingBottom - iconPaddingTop - iconPaddingBottom - buttonIcon.SizeHeight;
             }
             else
             {
-                buttonText.SizeWidth = SizeWidth - textPaddingLeft - textPaddingRight - iconPaddingLeft - iconPaddingRight - buttonIcon.SizeWidth;
+                buttonText.SizeWidth = SizeWidth - textPaddingStart - textPaddingEnd - iconPaddingStart - iconPaddingEnd - buttonIcon.SizeWidth;
                 buttonText.SizeHeight = SizeHeight - textPaddingTop - textPaddingBottom;
             }
         }
@@ -1122,15 +1141,15 @@ namespace Tizen.NUI.Components
                 return;
             }
 
-            int textPaddingLeft = buttonAttributes.TextAttributes.PaddingLeft;
-            int textPaddingRight = buttonAttributes.TextAttributes.PaddingRight;
-            int textPaddingTop = buttonAttributes.TextAttributes.PaddingTop;
-            int textPaddingBottom = buttonAttributes.TextAttributes.PaddingBottom;
+            int textPaddingStart = buttonAttributes.TextAttributes.Padding.Start;
+            int textPaddingEnd = buttonAttributes.TextAttributes.Padding.End;
+            int textPaddingTop = buttonAttributes.TextAttributes.Padding.Top;
+            int textPaddingBottom = buttonAttributes.TextAttributes.Padding.Bottom;
 
-            int iconPaddingLeft = buttonAttributes.IconAttributes.PaddingLeft;
-            int iconPaddingRight = buttonAttributes.IconAttributes.PaddingRight;
-            int iconPaddingTop = buttonAttributes.IconAttributes.PaddingTop;
-            int iconPaddingBottom = buttonAttributes.IconAttributes.PaddingBottom;
+            int iconPaddingStart = buttonAttributes.IconAttributes.Padding.Start;
+            int iconPaddingEnd = buttonAttributes.IconAttributes.Padding.End;
+            int iconPaddingTop = buttonAttributes.IconAttributes.Padding.Top;
+            int iconPaddingBottom = buttonAttributes.IconAttributes.Padding.Bottom;
 
             switch (IconRelativeOrientation)
             {
@@ -1162,24 +1181,24 @@ namespace Tizen.NUI.Components
                         buttonIcon.PositionUsesPivotPoint = true;
                         buttonIcon.ParentOrigin = NUI.ParentOrigin.CenterLeft;
                         buttonIcon.PivotPoint = NUI.PivotPoint.CenterLeft;
-                        buttonIcon.Position2D = new Position2D(iconPaddingLeft, 0);
+                        buttonIcon.Position2D = new Position2D(iconPaddingStart, 0);
 
                         buttonText.PositionUsesPivotPoint = true;
                         buttonText.ParentOrigin = NUI.ParentOrigin.CenterRight;
                         buttonText.PivotPoint = NUI.PivotPoint.CenterRight;
-                        buttonText.Position2D = new Position2D(-textPaddingRight, 0);
+                        buttonText.Position2D = new Position2D(-textPaddingEnd, 0);
                     }
                     else
                     {
                         buttonIcon.PositionUsesPivotPoint = true;
                         buttonIcon.ParentOrigin = NUI.ParentOrigin.CenterRight;
                         buttonIcon.PivotPoint = NUI.PivotPoint.CenterRight;
-                        buttonIcon.Position2D = new Position2D(-iconPaddingLeft, 0);
+                        buttonIcon.Position2D = new Position2D(-iconPaddingStart, 0);
 
                         buttonText.PositionUsesPivotPoint = true;
                         buttonText.ParentOrigin = NUI.ParentOrigin.CenterLeft;
                         buttonText.PivotPoint = NUI.PivotPoint.CenterLeft;
-                        buttonText.Position2D = new Position2D(textPaddingRight, 0);
+                        buttonText.Position2D = new Position2D(textPaddingEnd, 0);
                     }
 
                     break;
@@ -1189,24 +1208,24 @@ namespace Tizen.NUI.Components
                         buttonIcon.PositionUsesPivotPoint = true;
                         buttonIcon.ParentOrigin = NUI.ParentOrigin.CenterLeft;
                         buttonIcon.PivotPoint = NUI.PivotPoint.CenterLeft;
-                        buttonIcon.Position2D = new Position2D(iconPaddingRight, 0);
+                        buttonIcon.Position2D = new Position2D(iconPaddingEnd, 0);
 
                         buttonText.PositionUsesPivotPoint = true;
                         buttonText.ParentOrigin = NUI.ParentOrigin.CenterRight;
                         buttonText.PivotPoint = NUI.PivotPoint.CenterRight;
-                        buttonText.Position2D = new Position2D(-textPaddingLeft, 0);
+                        buttonText.Position2D = new Position2D(-textPaddingStart, 0);
                     }
                     else
                     {
                         buttonIcon.PositionUsesPivotPoint = true;
                         buttonIcon.ParentOrigin = NUI.ParentOrigin.CenterRight;
                         buttonIcon.PivotPoint = NUI.PivotPoint.CenterRight;
-                        buttonIcon.Position2D = new Position2D(-iconPaddingRight, 0);
+                        buttonIcon.Position2D = new Position2D(-iconPaddingEnd, 0);
 
                         buttonText.PositionUsesPivotPoint = true;
                         buttonText.ParentOrigin = NUI.ParentOrigin.CenterLeft;
                         buttonText.PivotPoint = NUI.PivotPoint.CenterLeft;
-                        buttonText.Position2D = new Position2D(textPaddingLeft, 0);
+                        buttonText.Position2D = new Position2D(textPaddingStart, 0);
                     }
                     break;
                 default:
index bb08a03..f224ea5 100755 (executable)
@@ -40,6 +40,9 @@ namespace Tizen.NUI.Components
         private DropDownItemView touchedView = null;
         private int selectedItemIndex = -1;
 
+        private Extents listMargin = null;
+        private Extents listPadding = null;
+
         /// <summary>
         /// Creates a new instance of a DropDown.
         /// </summary>
@@ -530,77 +533,37 @@ namespace Tizen.NUI.Components
         }
 
         /// <summary>
-        /// Left space in list.
-        /// </summary>
-        /// <since_tizen> 6 </since_tizen>
-        /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public int ListLeftMargin
-        {
-            get
-            {
-                return (int)dropDownAttributes.ListMargin.X;
-            }
-            set
-            {
-                dropDownAttributes.ListMargin.X = value;
-                RelayoutRequest();
-            }
-        }
-
-        /// <summary>
-        /// Right space in list.
+        /// Space in list.
         /// </summary>
         /// <since_tizen> 6 </since_tizen>
         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public int ListRigthMargin
+        public Extents ListMargin
         {
             get
             {
-                return (int)dropDownAttributes.ListMargin.Y;
+                return listMargin;
             }
             set
             {
-                dropDownAttributes.ListMargin.Y = value;
-                RelayoutRequest();
-            }
-        }
+                dropDownAttributes.ListMargin.CopyFrom(value);
 
-        /// <summary>
-        /// Top space in list.
-        /// </summary>
-        /// <since_tizen> 6 </since_tizen>
-        /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public int ListTopMargin
-        {
-            get
-            {
-                return (int)dropDownAttributes.ListMargin.Z;
-            }
-            set
-            {
-                dropDownAttributes.ListMargin.Z = value;
-                RelayoutRequest();
-            }
-        }
+                if (null == listMargin)
+                {
+                    listMargin = new Extents((ushort start, ushort end, ushort top, ushort bottom) =>
+                    {
+                        dropDownAttributes.ListMargin.Start = start;
+                        dropDownAttributes.ListMargin.End = end;
+                        dropDownAttributes.ListMargin.Top = top;
+                        dropDownAttributes.ListMargin.Bottom = bottom;
+                        RelayoutRequest();
+                    }, value.Start, value.End, value.Top, value.Bottom);
+                }
+                else
+                {
+                    listMargin.CopyFrom(value);
+                }
 
-        /// <summary>
-        /// Bottom space in list.
-        /// </summary>
-        /// <since_tizen> 6 </since_tizen>
-        /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public int ListBottomMargin
-        {
-            get
-            {
-                return (int)dropDownAttributes.ListMargin.W;
-            }
-            set
-            {
-                dropDownAttributes.ListMargin.W = value;
                 RelayoutRequest();
             }
         }
@@ -675,11 +638,28 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                return dropDownAttributes.ListPadding;
+                return listPadding;
             }
             set
             {
-                dropDownAttributes.ListPadding = value;
+                dropDownAttributes.ListPadding.CopyFrom(value);
+
+                if (null == listPadding)
+                {
+                    listPadding = new Extents((ushort start, ushort end, ushort top, ushort bottom) =>
+                    {
+                        dropDownAttributes.ListPadding.Start = start;
+                        dropDownAttributes.ListPadding.End = end;
+                        dropDownAttributes.ListPadding.Top = top;
+                        dropDownAttributes.ListPadding.Bottom = bottom;
+                        RelayoutRequest();
+                    }, value.Start, value.End, value.Top, value.Bottom);
+                }
+                else
+                {
+                    listMargin.CopyFrom(value);
+                }
+
                 RelayoutRequest();
             }
         }
@@ -851,8 +831,8 @@ namespace Tizen.NUI.Components
                 {
                     if (dropDownAttributes.ListMargin != null)
                     {
-                        listBackgroundImageX = (int)dropDownAttributes.ListMargin.X;
-                        listBackgroundImageY = (int)dropDownAttributes.ListMargin.Z;
+                        listBackgroundImageX = (int)dropDownAttributes.ListMargin.Start;
+                        listBackgroundImageY = (int)dropDownAttributes.ListMargin.Top;
                     }
                 }
                 else if (dropDownAttributes.ListRelativeOrientation == ListOrientation.Right)
@@ -864,8 +844,8 @@ namespace Tizen.NUI.Components
                         {
                             listWidth = list.Size2D.Width;
                         }
-                        listBackgroundImageX = Size2D.Width - listWidth - (int)dropDownAttributes.ListMargin.Y;
-                        listBackgroundImageY = (int)dropDownAttributes.ListMargin.Z;
+                        listBackgroundImageX = Size2D.Width - listWidth - (int)dropDownAttributes.ListMargin.End;
+                        listBackgroundImageY = (int)dropDownAttributes.ListMargin.Top;
                     }
                 }
                 listBackgroundImage.Position2D = new Position2D(listBackgroundImageX, listBackgroundImageY);
@@ -1496,11 +1476,11 @@ namespace Tizen.NUI.Components
             {
                 get
                 {
-                    return itemDataAttributes.CheckImageRightSpace;
+                    return itemDataAttributes.CheckImageGapToBoundary;
                 }
                 set
                 {
-                    itemDataAttributes.CheckImageRightSpace = value;
+                    itemDataAttributes.CheckImageGapToBoundary = value;
                 }
             }
 
index d1042a2..ddceca3 100755 (executable)
@@ -44,6 +44,8 @@ namespace Tizen.NUI.Components
 
         private SelectButtonAttributes selectButtonAttributes;
 
+        private Extents selectableImagePadding = null;
+
         /// <summary>
         /// Creates a new instance of a SelectButton.
         /// </summary>
@@ -422,92 +424,49 @@ namespace Tizen.NUI.Components
         /// <since_tizen> 6 </since_tizen>
         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        public int CheckImagePaddingLeft
+        public Extents SelectableImagePadding
         {
             get
             {
-                return selectButtonAttributes?.CheckImageAttributes?.PaddingLeft ?? 0;
+                return selectableImagePadding;
             }
             set
             {
                 CreateCheckImageAttributes();
                 CreateCheckBackgroundImageAttributes();
                 CreateCheckShadowImageAttributes();
-                selectButtonAttributes.CheckImageAttributes.PaddingLeft = value;
-                selectButtonAttributes.CheckBackgroundImageAttributes.PaddingLeft = value;
-                selectButtonAttributes.CheckShadowImageAttributes.PaddingLeft = value;
-                RelayoutRequest();
-            }
-        }
 
-        /// <summary>
-        /// CheckImage right padding in SelectButton.
-        /// </summary>
-        /// <since_tizen> 6 </since_tizen>
-        /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public int CheckImagePaddingRight
-        {
-            get
-            {
-                return selectButtonAttributes?.CheckImageAttributes?.PaddingRight ?? 0;
-            }
-            set
-            {
-                CreateCheckImageAttributes();
-                CreateCheckBackgroundImageAttributes();
-                CreateCheckShadowImageAttributes();
-                selectButtonAttributes.CheckImageAttributes.PaddingRight = value;
-                selectButtonAttributes.CheckBackgroundImageAttributes.PaddingRight = value;
-                selectButtonAttributes.CheckShadowImageAttributes.PaddingRight = value;
-                RelayoutRequest();
-            }
-        }
+                selectButtonAttributes.CheckImageAttributes.Padding.CopyFrom(value);
+                selectButtonAttributes.CheckBackgroundImageAttributes.Padding.CopyFrom(value);
+                selectButtonAttributes.CheckShadowImageAttributes.Padding.CopyFrom(value);
 
-        /// <summary>
-        /// CheckImage top padding in SelectButton.
-        /// </summary>
-        /// <since_tizen> 6 </since_tizen>
-        /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public int CheckImagePaddingTop
-        {
-            get
-            {
-                return selectButtonAttributes?.CheckImageAttributes?.PaddingTop ?? 0;
-            }
-            set
-            {
-                CreateCheckImageAttributes();
-                CreateCheckBackgroundImageAttributes();
-                CreateCheckShadowImageAttributes();
-                selectButtonAttributes.CheckImageAttributes.PaddingTop = value;
-                selectButtonAttributes.CheckBackgroundImageAttributes.PaddingTop = value;
-                selectButtonAttributes.CheckShadowImageAttributes.PaddingTop = value;
-                RelayoutRequest();
-            }
-        }
+                if (null == selectableImagePadding)
+                {
+                    selectableImagePadding = new Extents((ushort start, ushort end, ushort top, ushort bottom) =>
+                    {
+                        selectButtonAttributes.CheckImageAttributes.Padding.Start = start;
+                        selectButtonAttributes.CheckImageAttributes.Padding.End = end;
+                        selectButtonAttributes.CheckImageAttributes.Padding.Top = top;
+                        selectButtonAttributes.CheckImageAttributes.Padding.Bottom = bottom;
+
+                        selectButtonAttributes.CheckBackgroundImageAttributes.Padding.Start = start;
+                        selectButtonAttributes.CheckBackgroundImageAttributes.Padding.End = end;
+                        selectButtonAttributes.CheckBackgroundImageAttributes.Padding.Top = top;
+                        selectButtonAttributes.CheckBackgroundImageAttributes.Padding.Bottom = bottom;
+
+                        selectButtonAttributes.CheckShadowImageAttributes.Padding.Start = start;
+                        selectButtonAttributes.CheckShadowImageAttributes.Padding.End = end;
+                        selectButtonAttributes.CheckShadowImageAttributes.Padding.Top = top;
+                        selectButtonAttributes.CheckShadowImageAttributes.Padding.Bottom = bottom;
+
+                        RelayoutRequest();
+                    }, value.Start, value.End, value.Top, value.Bottom);
+                }
+                else
+                {
+                    selectableImagePadding.CopyFrom(value);
+                }
 
-        /// <summary>
-        /// CheckImage bottom padding in SelectButton.
-        /// </summary>
-        /// <since_tizen> 6 </since_tizen>
-        /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public int CheckImagePaddingBottom
-        {
-            get
-            {
-                return selectButtonAttributes?.CheckImageAttributes?.PaddingBottom ?? 0;
-            }
-            set
-            {
-                CreateCheckImageAttributes();
-                CreateCheckBackgroundImageAttributes();
-                CreateCheckShadowImageAttributes();
-                selectButtonAttributes.CheckImageAttributes.PaddingBottom = value;
-                selectButtonAttributes.CheckBackgroundImageAttributes.PaddingBottom = value;
-                selectButtonAttributes.CheckShadowImageAttributes.PaddingBottom = value;
                 RelayoutRequest();
             }
         }
@@ -742,17 +701,17 @@ namespace Tizen.NUI.Components
 
                 int iconWidth = (int)CheckImageSize.Width;
 
-                int textPaddingLeft = selectButtonAttributes.TextAttributes.PaddingLeft;
-                int textPaddingRight = selectButtonAttributes.TextAttributes.PaddingRight;
+                int textPaddingLeft = selectButtonAttributes.TextAttributes.Padding.Start;
+                int textPaddingRight = selectButtonAttributes.TextAttributes.Padding.End;
 
                 if(selectButtonAttributes.TextAttributes.Size == null)
                 {
-                    selectButtonAttributes.TextAttributes.Size = new Size(Size2D.Width - iconWidth - CheckImagePaddingLeft - CheckImagePaddingRight - textPaddingLeft - textPaddingRight, Size2D.Height);
+                    selectButtonAttributes.TextAttributes.Size = new Size(Size2D.Width - iconWidth - SelectableImagePadding.Start - SelectableImagePadding.End - textPaddingLeft - textPaddingRight, Size2D.Height);
                 }
                 
                 if(selectButtonAttributes.TextAttributes.Position == null)
                 {
-                    selectButtonAttributes.TextAttributes.Position = new Position(CheckImagePaddingLeft + iconWidth + CheckImagePaddingRight + textPaddingLeft, 0);
+                    selectButtonAttributes.TextAttributes.Position = new Position(SelectableImagePadding.Start + iconWidth + SelectableImagePadding.End + textPaddingLeft, 0);
                 }
                 
                 selectButtonAttributes.TextAttributes.VerticalAlignment = VerticalAlignment.Center;
@@ -770,8 +729,8 @@ namespace Tizen.NUI.Components
 
             int iconWidth = (int)CheckImageSize.Width;
 
-            int textPaddingLeft = selectButtonAttributes.TextAttributes.PaddingLeft;
-            int textPaddingRight = selectButtonAttributes.TextAttributes.PaddingRight;
+            int textPaddingLeft = selectButtonAttributes.TextAttributes.Padding.Start;
+            int textPaddingRight = selectButtonAttributes.TextAttributes.Padding.End;
             int pos = 0;
             if (LayoutDirection == ViewLayoutDirectionType.RTL)
             {
index 0c36281..dcc4f7a 100755 (executable)
@@ -35,6 +35,7 @@ namespace Tizen.NUI.Components
         private TabAttributes tabAttributes = null;
         private Animation underlineAni = null;
         private bool isNeedAnimation = false;
+        private Extents space;
 
         /// <summary>
         /// Creates a new instance of a Tab.
@@ -137,20 +138,30 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                if(null == tabAttributes || null == tabAttributes.Space)
-                {
-                    return null;
-                }
-                else
-                {
-                    return new Extents((ushort)tabAttributes.Space.X, (ushort)tabAttributes.Space.Y, (ushort)tabAttributes.Space.Z, (ushort)tabAttributes.Space.W);
-                }
+                return space;
             }
             set
             {
                 if(null != value)
                 {
-                    tabAttributes.Space = new Vector4(value.Start, value.End, value.Top, value.Bottom);
+                    tabAttributes.Space.CopyFrom(value);
+
+                    if (null == space)
+                    {
+                        space = new Extents((ushort start, ushort end, ushort top, ushort bottom) =>
+                        {
+                            tabAttributes.Space.Start = start;
+                            tabAttributes.Space.End = end;
+                            tabAttributes.Space.Top = top;
+                            tabAttributes.Space.Bottom = bottom;
+                            RelayoutRequest();
+                        }, value.Start, value.End, value.Top, value.Bottom);
+                    }
+                    else
+                    {
+                        space.CopyFrom(value);
+                    }
+
                     RelayoutRequest();
                 }
             }
@@ -451,7 +462,7 @@ namespace Tizen.NUI.Components
                 return;
             }
 
-            int preX = (int)tabAttributes.Space.X;
+            int preX = (int)tabAttributes.Space.Start;
             int preW = 0;
             int itemSpace = tabAttributes.ItemSpace;
 
@@ -470,7 +481,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    preW = (Size2D.Width - (int)tabAttributes.Space.X - (int)tabAttributes.Space.Y) / totalNum;
+                    preW = (Size2D.Width - (int)tabAttributes.Space.Start - (int)tabAttributes.Space.End) / totalNum;
                     for (int i = 0; i < totalNum; i++)
                     {
                         itemList[i].Position2D.X = preX;
@@ -482,7 +493,7 @@ namespace Tizen.NUI.Components
             }
             else
             {
-                preX = (int)tabAttributes.Space.Y;
+                preX = (int)tabAttributes.Space.End;
                 if (tabAttributes.UseTextNaturalSize == true)
                 {
                     int w = Size2D.Width;
@@ -497,7 +508,7 @@ namespace Tizen.NUI.Components
                 }
                 else
                 {
-                    preW = (Size2D.Width - (int)tabAttributes.Space.X - (int)tabAttributes.Space.Y) / totalNum;
+                    preW = (Size2D.Width - (int)tabAttributes.Space.Start - (int)tabAttributes.Space.End) / totalNum;
                     for (int i = totalNum - 1; i >= 0; i--)
                     {
                         itemList[i].Position2D.X = preX;
@@ -530,7 +541,7 @@ namespace Tizen.NUI.Components
         private void AddItemByIndex(TabItemData itemData, int index)
         {
             int h = 0;
-            int topSpace = (int)tabAttributes.Space.Z;
+            int topSpace = (int)tabAttributes.Space.Top;
             if (tabAttributes.UnderLineAttributes != null && tabAttributes.UnderLineAttributes.Size != null)
             {
                 h = (int)tabAttributes.UnderLineAttributes.Size.Height;
index 57af5b1..ee5bd8c 100755 (executable)
@@ -37,6 +37,8 @@ namespace Tizen.NUI.Components
         private NPatchVisual toastBackground = null;
         private Timer timer = null;
 
+        private Extents textPadding = null;
+
         private readonly int maxTextAreaWidth = 808;
         private readonly uint textLineHeight = 56;
         private readonly uint textLineSpace = 4;
@@ -250,24 +252,31 @@ namespace Tizen.NUI.Components
         {
             get
             {
-                if (null != toastAttributes?.TextAttributes)
-                {
-                    return new Extents((ushort)toastAttributes.TextAttributes.PaddingLeft, (ushort)toastAttributes.TextAttributes.PaddingRight, (ushort)toastAttributes.TextAttributes.PaddingTop, (ushort)toastAttributes.TextAttributes.PaddingBottom);
-                }
-                else
-                {
-                    return null;
-                }
+                return textPadding;
             }
             set
             {
                 if (null != value)
                 {
                     CreateTextAttributes();
-                    toastAttributes.TextAttributes.PaddingLeft = value.Start;
-                    toastAttributes.TextAttributes.PaddingRight = value.End;
-                    toastAttributes.TextAttributes.PaddingTop = value.Top;
-                    toastAttributes.TextAttributes.PaddingBottom = value.Bottom;
+                    toastAttributes.TextAttributes.Padding.CopyFrom(value);
+
+                    if (null == textPadding)
+                    {
+                        textPadding = new Extents((ushort start, ushort end, ushort top, ushort bottom) =>
+                        {
+                            toastAttributes.TextAttributes.Padding.Start = start;
+                            toastAttributes.TextAttributes.Padding.End = end;
+                            toastAttributes.TextAttributes.Padding.Top = top;
+                            toastAttributes.TextAttributes.Padding.Bottom = bottom;
+                            RelayoutRequest();
+                        }, value.Start, value.End, value.Top, value.Bottom);
+                    }
+                    else
+                    {
+                        textPadding.CopyFrom(value);
+                    }
+
                     RelayoutRequest();
                 }
             }
@@ -387,10 +396,10 @@ namespace Tizen.NUI.Components
         [EditorBrowsable(EditorBrowsableState.Never)]
         protected virtual void LayoutChild()
         {
-            int _textPaddingLeft = toastAttributes.TextAttributes?.PaddingLeft ?? textPaddingLeft;
-            int _textPaddingRight = toastAttributes.TextAttributes?.PaddingRight ?? _textPaddingLeft;
-            int _textPaddingTop = toastAttributes.TextAttributes?.PaddingTop ?? textPaddingTop;
-            int _textPaddingBottom = toastAttributes.TextAttributes?.PaddingBottom ?? _textPaddingTop;
+            int _textPaddingLeft = toastAttributes.TextAttributes?.Padding.Start ?? textPaddingLeft;
+            int _textPaddingRight = toastAttributes.TextAttributes?.Padding.End ?? _textPaddingLeft;
+            int _textPaddingTop = toastAttributes.TextAttributes?.Padding.Top ?? textPaddingTop;
+            int _textPaddingBottom = toastAttributes.TextAttributes?.Padding.Bottom ?? _textPaddingTop;
 
             int _textAreaWidth = this.Size2D.Width - _textPaddingLeft - _textPaddingRight;
             int _textAreaHeight = this.Size2D.Height - _textPaddingTop - _textPaddingBottom;
index 82ca906..27b77fe 100755 (executable)
@@ -73,13 +73,47 @@ namespace Tizen.NUI
             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
         }
 
-        internal Extents(ExtentsChangedCallback cb, ushort start, ushort end, ushort top, ushort bottom) : this(Interop.Extents.new_Extents__SWIG_2(start, end, top, bottom), true)
+        /// <summary>
+        /// Constructor
+        /// </summary>
+        /// <param name="cb"></param>
+        /// <param name="start"></param>
+        /// <param name="end"></param>
+        /// <param name="top"></param>
+        /// <param name="bottom"></param>
+        /// <since_tizen> Only used by Tizen.NUI.Components, will not be opened </since_tizen>
+        [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+        public Extents(ExtentsChangedCallback cb, ushort start, ushort end, ushort top, ushort bottom) : this(Interop.Extents.new_Extents__SWIG_2(start, end, top, bottom), true)
         {
             callback = cb;
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
-        internal delegate void ExtentsChangedCallback(ushort start, ushort end, ushort top, ushort botton);
+        /// <summary>
+        /// Copy other extents
+        /// </summary>
+        /// <param name="that"></param>
+        /// <since_tizen> Only used by Tizen.NUI.Components, will not be opened </since_tizen>
+        [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+        public void CopyFrom(Extents that)
+        {
+            Interop.Extents.Extents_start_set(swigCPtr, that.Start);
+            Interop.Extents.Extents_end_set(swigCPtr, that.End);
+            Interop.Extents.Extents_top_set(swigCPtr, that.Top);
+            Interop.Extents.Extents_bottom_set(swigCPtr, that.End);
+        }
+
+        /// <summary>
+        /// Constructor
+        /// </summary>
+        /// <param name="cb"></param>
+        /// <param name="start"></param>
+        /// <param name="end"></param>
+        /// <param name="top"></param>
+        /// <param name="bottom"></param>
+        /// <since_tizen> Only used by Tizen.NUI.Components, will not be opened </since_tizen>
+               [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
+        public delegate void ExtentsChangedCallback(ushort start, ushort end, ushort top, ushort bottom);
         private ExtentsChangedCallback callback = null;
 
         /// <summary>