From dd2aa54133077086e51d59393f075ff8f8ff98d4 Mon Sep 17 00:00:00 2001 From: ANZ1217 Date: Thu, 2 May 2024 18:46:37 +0900 Subject: [PATCH] [NUI][API11] Add Cutout Property to TextLabel --- .../src/internal/Interop/Interop.TextLabel.cs | 3 +++ src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs | 19 +++++++++++++++++++ .../BaseComponents/TextLabelBindableProperty.cs | 18 ++++++++++++++++++ 3 files changed, 40 insertions(+) diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.TextLabel.cs b/src/Tizen.NUI/src/internal/Interop/Interop.TextLabel.cs index c1367bf..d05d081 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.TextLabel.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.TextLabel.cs @@ -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(); } } } diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs b/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs index 74261ef..26f02fd 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs @@ -2427,6 +2427,24 @@ namespace Tizen.NUI.BaseComponents } } + /// + /// The Cutout property.
+ /// Whether the Cutout is enabled. (The default value is false) + ///
+ [EditorBrowsable(EditorBrowsableState.Never)] + public bool Cutout + { + get + { + return (bool)GetValue(Cutout); + } + set + { + SetValue(Cutout, value); + NotifyPropertyChanged(); + } + } + private TextLabelSelectorData EnsureSelectorData() => selectorData ?? (selectorData = new TextLabelSelectorData()); /// @@ -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() diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextLabelBindableProperty.cs b/src/Tizen.NUI/src/public/BaseComponents/TextLabelBindableProperty.cs index 8724476..abe9a57 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextLabelBindableProperty.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextLabelBindableProperty.cs @@ -931,6 +931,24 @@ namespace Tizen.NUI.BaseComponents return instance.InternalUnderlineHeight; } + /// + /// CutoutProperty + /// + [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 TranslatableTextSelector { get => GetSelector(selectorData?.TranslatableText, TextLabel.TranslatableTextProperty); -- 2.7.4