From 5b3cc2d7a1186274c7c427bf19646c8fe939a63a Mon Sep 17 00:00:00 2001 From: "Jinho, Lee" Date: Fri, 12 May 2017 00:46:57 +0900 Subject: [PATCH] TextLabel devel properties manual binding for auto scroll animation Change-Id: I5366d48a5009b964e3e31f5157c84e25d0a49514 --- Tizen.NUI/src/internal/ManualPINVOKE.cs | 4 ++ Tizen.NUI/src/public/BaseComponents/TextLabel.cs | 53 ++++++++++++++++++++++++ 2 files changed, 57 insertions(+) mode change 100644 => 100755 Tizen.NUI/src/public/BaseComponents/TextLabel.cs diff --git a/Tizen.NUI/src/internal/ManualPINVOKE.cs b/Tizen.NUI/src/internal/ManualPINVOKE.cs index f2fcee0..56da23b 100644 --- a/Tizen.NUI/src/internal/ManualPINVOKE.cs +++ b/Tizen.NUI/src/internal/ManualPINVOKE.cs @@ -578,7 +578,11 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextLabel_Property_ELLIPSIS_get")] public static extern int TextLabel_Property_ELLIPSIS_get(); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_TextLabel_Property_AUTO_SCROLL_STOP_MODE_get")] + public static extern int TextLabel_Property_AUTO_SCROLL_STOP_MODE_get(); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_TextLabel_Property_AUTO_SCROLL_LOOP_DELAY_get")] + public static extern int TextLabel_Property_AUTO_SCROLL_LOOP_DELAY_get(); } } diff --git a/Tizen.NUI/src/public/BaseComponents/TextLabel.cs b/Tizen.NUI/src/public/BaseComponents/TextLabel.cs old mode 100644 new mode 100755 index 523731a..8b24a6f --- a/Tizen.NUI/src/public/BaseComponents/TextLabel.cs +++ b/Tizen.NUI/src/public/BaseComponents/TextLabel.cs @@ -38,6 +38,8 @@ namespace Tizen.NUI.BaseComponents internal TextLabel(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.TextLabel_SWIGUpcast(cPtr), cMemoryOwn) { swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + // By default, we do not want the position to use the anchor point + PositionUsesAnchorPoint = false; } internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextLabel obj) @@ -147,6 +149,8 @@ namespace Tizen.NUI.BaseComponents internal static readonly int OUTLINE = NDalicPINVOKE.TextLabel_Property_OUTLINE_get(); internal static readonly int PIXEL_SIZE = NDalicManualPINVOKE.TextLabel_Property_PIXEL_SIZE_get(); internal static readonly int ELLIPSIS = NDalicManualPINVOKE.TextLabel_Property_ELLIPSIS_get(); + internal static readonly int AUTO_SCROLL_STOP_MODE = NDalicManualPINVOKE.TextLabel_Property_AUTO_SCROLL_STOP_MODE_get(); + internal static readonly int AUTO_SCROLL_LOOP_DELAY = NDalicManualPINVOKE.TextLabel_Property_AUTO_SCROLL_LOOP_DELAY_get(); } @@ -744,5 +748,54 @@ namespace Tizen.NUI.BaseComponents } } + /// + /// AutoScrollLoopDelay property.
+ /// do something.
+ ///
+ public float AutoScrollLoopDelay + { + get + { + float temp = 0.0f; + GetProperty(TextLabel.Property.AUTO_SCROLL_LOOP_DELAY).Get(ref temp); + return temp; + } + set + { + SetProperty(TextLabel.Property.AUTO_SCROLL_LOOP_DELAY, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// AutoScrollStopMode property.
+ /// do something.
+ ///
+ public AutoScrollStopMode AutoScrollStopMode + { + get + { + string temp; + if(GetProperty(TextLabel.Property.AUTO_SCROLL_STOP_MODE).Get(out temp) == false) + { +#if DEBUG_ON + Tizen.Log.Error("NUI", "AutoScrollStopMode get error!"); +#endif + } + switch (temp) + { + case "FINISH_LOOP": + return AutoScrollStopMode.FinishLoop; + case "IMMEDIATE": + return AutoScrollStopMode.Immediate; + default: + return AutoScrollStopMode.FinishLoop; + } + } + set + { + SetProperty(TextLabel.Property.AUTO_SCROLL_STOP_MODE, new Tizen.NUI.PropertyValue((int)value)); + } + } + } } -- 2.7.4