From 7406dd9b3e755f77ee57f420cc362bb37d01229b Mon Sep 17 00:00:00 2001 From: "taeyoon0.lee" Date: Thu, 30 Nov 2017 15:30:03 +0900 Subject: [PATCH] [NUI] Added text direction property Change-Id: Id3feaf39a6e77a3f649e12afac63f336f233acff --- src/Tizen.NUI/src/internal/ManualPINVOKE.cs | 3 +++ .../src/public/BaseComponents/TextLabel.cs | 20 +++++++++++++++++-- src/Tizen.NUI/src/public/NUIConstants.cs | 23 +++++++++++++++++++++- 3 files changed, 43 insertions(+), 3 deletions(-) diff --git a/src/Tizen.NUI/src/internal/ManualPINVOKE.cs b/src/Tizen.NUI/src/internal/ManualPINVOKE.cs index 1b75ff9..da4ad10 100755 --- a/src/Tizen.NUI/src/internal/ManualPINVOKE.cs +++ b/src/Tizen.NUI/src/internal/ManualPINVOKE.cs @@ -713,6 +713,9 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextLabel_Property_LINE_WRAP_MODE_get")] public static extern int TextLabel_Property_LINE_WRAP_MODE_get(); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextLabel_Property_TEXT_DIRECTION_get")] + public static extern int TextLabel_Property_TEXT_DIRECTION_get(); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_HIDDENINPUT_PROPERTY_MODE_get")] public static extern int HIDDENINPUT_PROPERTY_MODE_get(); diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs b/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs index 8485438..21f92c3 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs @@ -110,7 +110,7 @@ namespace Tizen.NUI.BaseComponents internal static readonly int AUTO_SCROLL_LOOP_DELAY = NDalicManualPINVOKE.TextLabel_Property_AUTO_SCROLL_LOOP_DELAY_get(); internal static readonly int LINE_COUNT = NDalicManualPINVOKE.TextLabel_Property_LINE_COUNT_get(); internal static readonly int LINE_WRAP_MODE = NDalicManualPINVOKE.TextLabel_Property_LINE_WRAP_MODE_get(); - + internal static readonly int TEXT_DIRECTION = NDalicManualPINVOKE.TextLabel_Property_TEXT_DIRECTION_get(); } /// @@ -837,5 +837,21 @@ namespace Tizen.NUI.BaseComponents SetProperty(TextLabel.Property.LINE_WRAP_MODE, new Tizen.NUI.PropertyValue((int)value)); } } + + /// + /// The text direction. + /// + /// 5 + /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + public TextDirection TextDirection + { + get + { + int temp = 0; + GetProperty(TextLabel.Property.TEXT_DIRECTION).Get(out temp); + return (TextDirection)temp; + } + } } -} \ No newline at end of file +} diff --git a/src/Tizen.NUI/src/public/NUIConstants.cs b/src/Tizen.NUI/src/public/NUIConstants.cs index cf49fad..5b96197 100755 --- a/src/Tizen.NUI/src/public/NUIConstants.cs +++ b/src/Tizen.NUI/src/public/NUIConstants.cs @@ -2387,7 +2387,7 @@ namespace Tizen.NUI Finished } - /// + /// /// An enum of the line wrap mode of text controls. /// /// 4 @@ -2406,4 +2406,25 @@ namespace Tizen.NUI Character } + /// + /// An enum of text direction. + /// + /// 5 + /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + public enum TextDirection + { + /// + /// Text direction is from left to right. + /// + /// 5 + LeftToRight, + + /// + /// Text direction is from right to left. + /// + /// 5 + RightToLeft + } + } -- 2.7.4