[NUI][API11] Add Cutout Property to TextLabel
authorANZ1217 <chihun.jeong@samsung.com>
Thu, 2 May 2024 09:46:37 +0000 (18:46 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Fri, 10 May 2024 11:04:32 +0000 (20:04 +0900)
src/Tizen.NUI/src/internal/Interop/Interop.TextLabel.cs
src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs
src/Tizen.NUI/src/public/BaseComponents/TextLabelBindableProperty.cs

index c1367bf..d05d081 100755 (executable)
@@ -213,6 +213,9 @@ namespace Tizen.NUI
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_Property_REMOVE_BACK_INSET_get")]
             public static extern int RemoveBackInsetGet();
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_Property_CUTOUT_get")]
+            public static extern int CutoutGet();
         }
     }
 }
index 74261ef..26f02fd 100755 (executable)
@@ -2427,6 +2427,24 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
+        /// <summary>
+        /// The Cutout property.<br />
+        /// Whether the Cutout is enabled. (The default value is false)
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public bool Cutout
+        {
+            get
+            {
+                return (bool)GetValue(Cutout);
+            }
+            set
+            {
+                SetValue(Cutout, value);
+                NotifyPropertyChanged();
+            }
+        }
+
         private TextLabelSelectorData EnsureSelectorData() => selectorData ?? (selectorData = new TextLabelSelectorData());
 
         /// <summary>
@@ -2652,6 +2670,7 @@ namespace Tizen.NUI.BaseComponents
             internal static readonly int AnchorClickedColor = Interop.TextLabel.AnchorClickedColorGet();
             internal static readonly int RemoveFrontInset = Interop.TextLabel.RemoveFrontInsetGet();
             internal static readonly int RemoveBackInset = Interop.TextLabel.RemoveBackInsetGet();
+            internal static readonly int Cutout = Interop.TextLabel.CutoutGet();
 
 
             internal static void Preload()
index 8724476..abe9a57 100755 (executable)
@@ -931,6 +931,24 @@ namespace Tizen.NUI.BaseComponents
             return instance.InternalUnderlineHeight;
         }
 
+        /// <summary>
+        /// CutoutProperty
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static readonly BindableProperty CutoutProperty = BindableProperty.Create(nameof(Cutout), typeof(bool), typeof(TextLabel), false, propertyChanged: (bindable, oldValue, newValue) =>
+        {
+            var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
+            if (newValue != null)
+            {
+                instance.InternalUnderlineHeight = (float)newValue;
+            }
+        },
+        defaultValueCreator: (bindable) =>
+        {
+            var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
+            return instance.InternalUnderlineHeight;
+        });
+
         internal Selector<string> TranslatableTextSelector
         {
             get => GetSelector<string>(selectorData?.TranslatableText, TextLabel.TranslatableTextProperty);