[NUI] Add MIN_LINE_SIZE property at TextLabel (#1619)
authorJoogabYun <40262755+JoogabYun@users.noreply.github.com>
Tue, 9 Jun 2020 04:46:04 +0000 (13:46 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Mon, 8 Feb 2021 05:30:08 +0000 (14:30 +0900)
src/Tizen.NUI/src/internal/Interop/Interop.TextLabel.cs
src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs

index 2222426504a42518cc13351ca6e537b753f19790..eed22ccb5150c8320a8964c700365abaaebe05e3 100755 (executable)
@@ -97,7 +97,7 @@ namespace Tizen.NUI
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_TextLabel_Property_ELLIPSIS_get")]
             public static extern int TextLabel_Property_ELLIPSIS_get();
-            
+
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_TextLabel_Property_LINE_COUNT_get")]
             public static extern int TextLabel_Property_LINE_COUNT_get();
 
@@ -124,6 +124,9 @@ namespace Tizen.NUI
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_TextLabel_Property_TEXT_FIT_get")]
             public static extern int TextLabel_Property_TEXT_FIT_get();
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_TextLabel_Property_MIN_LINE_SIZE_get")]
+            public static extern int TextLabel_Property_MIN_LINE_SIZE_get();
         }
     }
 }
\ No newline at end of file
index 8096acffea79cdb089b1e5ac4c23d6d6315b1f57..ee37a14687dec0b972643489705c10855df16d1e 100755 (executable)
@@ -542,6 +542,24 @@ namespace Tizen.NUI.BaseComponents
             return temp;
         });
 
+        /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static readonly BindableProperty MinLineSizeProperty = BindableProperty.Create(nameof(MinLineSize), typeof(float), typeof(TextLabel), default(float), propertyChanged: (bindable, oldValue, newValue) =>
+        {
+            var textLabel = (TextLabel)bindable;
+            if (newValue != null)
+            {
+                Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.MIN_LINE_SIZE, new Tizen.NUI.PropertyValue((float)newValue));
+            }
+        },
+        defaultValueCreator: (bindable) =>
+        {
+            var textLabel = (TextLabel)bindable;
+            float temp = 0.0f;
+            Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.MIN_LINE_SIZE).Get(out temp);
+            return temp;
+        });
+
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
         private string textLabelSid = null;
         private bool systemlangTextFlag = false;
@@ -1345,6 +1363,23 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
+        /// <summary>
+        /// The MinLineSize property.<br />
+        /// This api is supported since API8<br />
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public float MinLineSize
+        {
+            get
+            {
+                return 0.0f;
+            }
+            set
+            {
+                throw new NotSupportedException("MinLineSize not supported. This is supported since API8");
+            }
+        }
+
         /// <summary>
         /// Downcasts a handle to textLabel handle
         /// </summary>
@@ -1576,6 +1611,7 @@ namespace Tizen.NUI.BaseComponents
             internal static readonly int VERTICAL_LINE_ALIGNMENT = Interop.TextLabel.TextLabel_Property_VERTICAL_LINE_ALIGNMENT_get();
             internal static readonly int MATCH_SYSTEM_LANGUAGE_DIRECTION = Interop.TextLabel.TextLabel_Property_MATCH_SYSTEM_LANGUAGE_DIRECTION_get();
             internal static readonly int TEXT_FIT = Interop.TextLabel.TextLabel_Property_TEXT_FIT_get();
+            internal static readonly int MIN_LINE_SIZE = Interop.TextLabel.TextLabel_Property_MIN_LINE_SIZE_get();
         }
 
         private void OnShadowColorChanged(float x, float y, float z, float w)