From 623390b7fd56cc318863d38e25e0c5448bd69d56 Mon Sep 17 00:00:00 2001 From: Seoyeon Kim Date: Wed, 10 May 2017 17:00:13 +0900 Subject: [PATCH] Text Control devel Properties manual binding - TextEditor / TextField / TextLabel Change-Id: I67dac52150c46b1a74cfe6557abdd66c24381c44 Signed-off-by: Seoyeon Kim --- src/Tizen.NUI/src/internal/ManualPINVOKE.cs | 31 +++++ .../src/public/BaseComponents/TextEditor.cs | 108 ++++++++++++++++++ .../src/public/BaseComponents/TextField.cs | 36 ++++++ .../src/public/BaseComponents/TextLabel.cs | 38 ++++++ 4 files changed, 213 insertions(+) diff --git a/src/Tizen.NUI/src/internal/ManualPINVOKE.cs b/src/Tizen.NUI/src/internal/ManualPINVOKE.cs index 4509c4933..f2fcee0c1 100644 --- a/src/Tizen.NUI/src/internal/ManualPINVOKE.cs +++ b/src/Tizen.NUI/src/internal/ManualPINVOKE.cs @@ -548,6 +548,37 @@ namespace Tizen.NUI public static extern global::System.IntPtr ImfManager_SWIGUpcast(global::System.IntPtr jarg1); ///////////////////////////////////////////////////////////// + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextEditor_Property_SMOOTH_SCROLL_get")] + public static extern int TextEditor_Property_SMOOTH_SCROLL_get(); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextEditor_Property_SMOOTH_SCROLL_DURATION_get")] + public static extern int TextEditor_Property_SMOOTH_SCROLL_DURATION_get(); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextEditor_Property_ENABLE_SCROLL_BAR_get")] + public static extern int TextEditor_Property_ENABLE_SCROLL_BAR_get(); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextEditor_Property_SCROLL_BAR_SHOW_DURATION_get")] + public static extern int TextEditor_Property_SCROLL_BAR_SHOW_DURATION_get(); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextEditor_Property_SCROLL_BAR_FADE_DURATION_get")] + public static extern int TextEditor_Property_SCROLL_BAR_FADE_DURATION_get(); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextEditor_Property_PIXEL_SIZE_get")] + public static extern int TextEditor_Property_PIXEL_SIZE_get(); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextField_Property_HIDDEN_INPUT_SETTINGS_get")] + public static extern int TextField_Property_HIDDEN_INPUT_SETTINGS_get(); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextField_Property_PIXEL_SIZE_get")] + public static extern int TextField_Property_PIXEL_SIZE_get(); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextLabel_Property_PIXEL_SIZE_get")] + public static extern int TextLabel_Property_PIXEL_SIZE_get(); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextLabel_Property_ELLIPSIS_get")] + public static extern int TextLabel_Property_ELLIPSIS_get(); + + } } diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs index 8f2a7a5b3..fdc33dc4a 100644 --- a/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs @@ -240,6 +240,12 @@ namespace Tizen.NUI.BaseComponents internal static readonly int INPUT_EMBOSS = NDalicPINVOKE.TextEditor_Property_INPUT_EMBOSS_get(); internal static readonly int OUTLINE = NDalicPINVOKE.TextEditor_Property_OUTLINE_get(); internal static readonly int INPUT_OUTLINE = NDalicPINVOKE.TextEditor_Property_INPUT_OUTLINE_get(); + internal static readonly int SMOOTH_SCROLL = NDalicManualPINVOKE.TextEditor_Property_SMOOTH_SCROLL_get(); + internal static readonly int SMOOTH_SCROLL_DURATION = NDalicManualPINVOKE.TextEditor_Property_SMOOTH_SCROLL_DURATION_get(); + internal static readonly int ENABLE_SCROLL_BAR = NDalicManualPINVOKE.TextEditor_Property_ENABLE_SCROLL_BAR_get(); + internal static readonly int SCROLL_BAR_SHOW_DURATION = NDalicManualPINVOKE.TextEditor_Property_SCROLL_BAR_SHOW_DURATION_get(); + internal static readonly int SCROLL_BAR_FADE_DURATION = NDalicManualPINVOKE.TextEditor_Property_SCROLL_BAR_FADE_DURATION_get(); + internal static readonly int PIXEL_SIZE = NDalicManualPINVOKE.TextEditor_Property_PIXEL_SIZE_get(); } @@ -1079,6 +1085,108 @@ namespace Tizen.NUI.BaseComponents } } + /// + /// SmoothScroll property. + /// + public bool SmoothScroll + { + get + { + bool temp = false; + GetProperty(TextEditor.Property.SMOOTH_SCROLL).Get(ref temp); + return temp; + } + set + { + SetProperty(TextEditor.Property.SMOOTH_SCROLL, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// SmoothScrollDuration property. + /// + public float SmoothScrollDuration + { + get + { + float temp = 0.0f; + GetProperty(TextEditor.Property.SMOOTH_SCROLL_DURATION).Get(ref temp); + return temp; + } + set + { + SetProperty(TextEditor.Property.SMOOTH_SCROLL_DURATION, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// EnableScrollBar property. + /// + public bool EnableScrollBar + { + get + { + bool temp = false; + GetProperty(TextEditor.Property.ENABLE_SCROLL_BAR).Get(ref temp); + return temp; + } + set + { + SetProperty(TextEditor.Property.ENABLE_SCROLL_BAR, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// ScrollBarShowDuration property. + /// + public float ScrollBarShowDuration + { + get + { + float temp = 0.0f; + GetProperty(TextEditor.Property.SCROLL_BAR_SHOW_DURATION).Get(ref temp); + return temp; + } + set + { + SetProperty(TextEditor.Property.SCROLL_BAR_SHOW_DURATION, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// ScrollBarFadeDuration property. + /// + public float ScrollBarFadeDuration + { + get + { + float temp = 0.0f; + GetProperty(TextEditor.Property.SCROLL_BAR_FADE_DURATION).Get(ref temp); + return temp; + } + set + { + SetProperty(TextEditor.Property.SCROLL_BAR_FADE_DURATION, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// PixelSize property. + /// + public float PixelSize + { + get + { + float temp = 0.0f; + GetProperty(TextEditor.Property.PIXEL_SIZE).Get(ref temp); + return temp; + } + set + { + SetProperty(TextEditor.Property.PIXEL_SIZE, new Tizen.NUI.PropertyValue(value)); + } + } + } } diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextField.cs b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs index 3975a76fc..3044e8a0e 100644 --- a/src/Tizen.NUI/src/public/BaseComponents/TextField.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs @@ -312,6 +312,8 @@ namespace Tizen.NUI.BaseComponents internal static readonly int INPUT_EMBOSS = NDalicPINVOKE.TextField_Property_INPUT_EMBOSS_get(); internal static readonly int OUTLINE = NDalicPINVOKE.TextField_Property_OUTLINE_get(); internal static readonly int INPUT_OUTLINE = NDalicPINVOKE.TextField_Property_INPUT_OUTLINE_get(); + internal static readonly int HIDDEN_INPUT_SETTINGS = NDalicManualPINVOKE.TextField_Property_HIDDEN_INPUT_SETTINGS_get(); + internal static readonly int PIXEL_SIZE = NDalicManualPINVOKE.TextField_Property_PIXEL_SIZE_get(); } @@ -1322,6 +1324,40 @@ namespace Tizen.NUI.BaseComponents } } + /// + /// HiddenInputSettings property. + /// + public Tizen.NUI.PropertyMap HiddenInputSettings + { + get + { + Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); + GetProperty(TextField.Property.HIDDEN_INPUT_SETTINGS).Get(temp); + return temp; + } + set + { + SetProperty(TextField.Property.HIDDEN_INPUT_SETTINGS, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// PixelSize property. + /// + public float PixelSize + { + get + { + float temp = 0.0f; + GetProperty(TextField.Property.PIXEL_SIZE).Get(ref temp); + return temp; + } + set + { + SetProperty(TextField.Property.PIXEL_SIZE, new Tizen.NUI.PropertyValue(value)); + } + } + } } diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs b/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs index 3794ec8d8..523731abb 100644 --- a/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs @@ -145,6 +145,8 @@ namespace Tizen.NUI.BaseComponents internal static readonly int SHADOW = NDalicPINVOKE.TextLabel_Property_SHADOW_get(); internal static readonly int EMBOSS = NDalicPINVOKE.TextLabel_Property_EMBOSS_get(); 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(); } @@ -706,5 +708,41 @@ namespace Tizen.NUI.BaseComponents } } + /// + /// PixelSize property.
+ /// The size of font in pixels.
+ ///
+ public float PixelSize + { + get + { + float temp = 0.0f; + GetProperty(TextLabel.Property.PIXEL_SIZE).Get(ref temp); + return temp; + } + set + { + SetProperty(TextLabel.Property.PIXEL_SIZE, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// Ellipsis property.
+ /// Enable or disable the ellipsis.
+ ///
+ public bool Ellipsis + { + get + { + bool temp = false; + GetProperty(TextLabel.Property.ELLIPSIS).Get(ref temp); + return temp; + } + set + { + SetProperty(TextLabel.Property.ELLIPSIS, new Tizen.NUI.PropertyValue(value)); + } + } + } } -- 2.34.1