From: Bowon Ryu Date: Wed, 10 Jul 2024 01:26:33 +0000 (+0900) Subject: [NUI] Add RequestAsyncRenderWithFixedWidth to TextLabel X-Git-Tag: submit/tizen/20240821.061804~1^2~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7f8aabed5672afaeeba31454f5e6de2aaeb6cfad;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Add RequestAsyncRenderWithFixedWidth to TextLabel Requests asynchronous text rendering with a fixed width. The height is determined by the content of the text when rendered with the given width. The result will be the same as the height returned by GetHeightForWidth. Signed-off-by: Bowon Ryu --- diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.TextLabel.cs b/src/Tizen.NUI/src/internal/Interop/Interop.TextLabel.cs index 8fb4a55d8..b321719fa 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.TextLabel.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.TextLabel.cs @@ -196,6 +196,9 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_RequestAsyncRenderWithFixedSize")] public static extern void RequestAsyncRenderWithFixedSize(global::System.Runtime.InteropServices.HandleRef textLabelRef, float width, float height); + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_RequestAsyncRenderWithFixedWidth")] + public static extern void RequestAsyncRenderWithFixedWidth(global::System.Runtime.InteropServices.HandleRef textLabelRef, float width); + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_AsyncTextRenderedSignal")] public static extern global::System.IntPtr AsyncTextRenderedSignal(global::System.Runtime.InteropServices.HandleRef jarg1); } diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs b/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs index a9f077028..dc2ba066c 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs @@ -335,6 +335,22 @@ namespace Tizen.NUI.BaseComponents if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Requests asynchronous text rendering with a fixed width. + /// + /// The width of text to render. + /// + /// Only works when AsyncLoad is true.
+ /// The height is determined by the content of the text when rendered with the given width.
+ /// The result will be the same as the height returned by GetHeightForWidth. + ///
+ [EditorBrowsable(EditorBrowsableState.Never)] + public void RequestAsyncRenderWithFixedWidth(float width) + { + Interop.TextLabel.RequestAsyncRenderWithFixedWidth(SwigCPtr, width); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + /// /// The TranslatableText property.
/// The text can set the SID value.