[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextEditor_Property_FONT_SIZE_SCALE_get")]
public static extern int FontSizeScaleGet();
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextEditor_Property_ENABLE_FONT_SIZE_SCALE_get")]
+ public static extern int EnableFontSizeScaleGet();
+
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextEditor_Property_GRAB_HANDLE_COLOR_get")]
public static extern int GrabHandleColorGet();
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextField_Property_FONT_SIZE_SCALE_get")]
public static extern int FontSizeScaleGet();
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextField_Property_ENABLE_FONT_SIZE_SCALE_get")]
+ public static extern int EnableFontSizeScaleGet();
+
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextField_Property_GRAB_HANDLE_COLOR_get")]
public static extern int GrabHandleColorGet();
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_Property_FONT_SIZE_SCALE_get")]
public static extern int FontSizeScaleGet();
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_Property_ENABLE_FONT_SIZE_SCALE_get")]
+ public static extern int EnableFontSizeScaleGet();
+
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_GetTextSize")]
public static extern global::System.IntPtr GetTextSize(global::System.Runtime.InteropServices.HandleRef textLabelRef, uint start, uint end);
}
/// <summary>
+ /// The EnableFontSizeScale property.<br />
+ /// Whether the font size scale is enabled. (The default value is true)
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool EnableFontSizeScale
+ {
+ get
+ {
+ return (bool)GetValue(EnableFontSizeScaleProperty);
+ }
+ set
+ {
+ SetValue(EnableFontSizeScaleProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ /// <summary>
/// The InputMethodSettings property.<br />
/// The settings to relating to the System's Input Method, Key and Value.<br />
/// </summary>
internal static readonly int VerticalScrollPosition = Interop.TextEditor.VerticalScrollPositionGet();
internal static readonly int PrimaryCursorPosition = Interop.TextEditor.PrimaryCursorPositionGet();
internal static readonly int FontSizeScale = Interop.TextEditor.FontSizeScaleGet();
+ internal static readonly int EnableFontSizeScale = Interop.TextEditor.EnableFontSizeScaleGet();
internal static readonly int GrabHandleColor = Interop.TextEditor.GrabHandleColorGet();
internal static readonly int EnableGrabHandle = Interop.TextEditor.EnableGrabHandleGet();
internal static readonly int EnableGrabHandlePopup = Interop.TextEditor.EnableGrabHandlePopupGet();
return temp;
}));
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty EnableFontSizeScaleProperty = BindableProperty.Create(nameof(EnableFontSizeScale), typeof(bool), typeof(TextEditor), default(bool), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var textEditor = (TextEditor)bindable;
+ if (newValue != null)
+ {
+ using (var property = new Tizen.NUI.PropertyValue((bool)newValue))
+ {
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textEditor.SwigCPtr, TextEditor.Property.EnableFontSizeScale, property);
+ }
+ }
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var textEditor = (TextEditor)bindable;
+ bool temp;
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textEditor.SwigCPtr, TextEditor.Property.EnableFontSizeScale).Get(out temp);
+ return temp;
+ }));
+
/// This will be public opened in tizen_6.5 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty GrabHandleColorProperty = BindableProperty.Create(nameof(GrabHandleColor), typeof(Color), typeof(TextEditor), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
}
}
+ /// <summary>
+ /// The EnableFontSizeScale property.<br />
+ /// Whether the font size scale is enabled. (The default value is true)
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool EnableFontSizeScale
+ {
+ get
+ {
+ return (bool)GetValue(EnableFontSizeScaleProperty);
+ }
+ set
+ {
+ SetValue(EnableFontSizeScaleProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
/// Only used by the IL of xaml, will never changed to not hidden.
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool IsCreateByXaml
internal static readonly int EnableEditing = Interop.TextField.EnableEditingGet();
internal static readonly int PrimaryCursorPosition = Interop.TextField.PrimaryCursorPositionGet();
internal static readonly int FontSizeScale = Interop.TextField.FontSizeScaleGet();
+ internal static readonly int EnableFontSizeScale = Interop.TextField.EnableFontSizeScaleGet();
internal static readonly int GrabHandleColor = Interop.TextField.GrabHandleColorGet();
internal static readonly int EllipsisPosition = Interop.TextField.EllipsisPositionGet();
internal static readonly int InputFilter = Interop.TextField.InputFilterGet();
Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textField.SwigCPtr, TextField.Property.FontSizeScale).Get(out temp);
return temp;
}));
+
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty EnableFontSizeScaleProperty = BindableProperty.Create(nameof(EnableFontSizeScale), typeof(bool), typeof(TextField), default(bool), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var textField = (TextField)bindable;
+ if (newValue != null)
+ {
+ using (var property = new Tizen.NUI.PropertyValue((bool)newValue))
+ {
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textField.SwigCPtr, TextField.Property.EnableFontSizeScale, property);
+ }
+ }
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var textField = (TextField)bindable;
+ bool temp;
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textField.SwigCPtr, TextField.Property.EnableFontSizeScale).Get(out temp);
+ return temp;
+ }));
+
/// This will be public opened in tizen_6.5 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty GrabHandleColorProperty = BindableProperty.Create(nameof(TextField.GrabHandleColor), typeof(Color), typeof(TextField), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
}
}
+ /// <summary>
+ /// The EnableFontSizeScale property.<br />
+ /// Whether the font size scale is enabled. (The default value is true)
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool EnableFontSizeScale
+ {
+ get
+ {
+ return (bool)GetValue(EnableFontSizeScaleProperty);
+ }
+ set
+ {
+ SetValue(EnableFontSizeScaleProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
private TextLabelSelectorData EnsureSelectorData() => selectorData ?? (selectorData = new TextLabelSelectorData());
/// <summary>
internal static readonly int TextFit = Interop.TextLabel.TextFitGet();
internal static readonly int MinLineSize = Interop.TextLabel.MinLineSizeGet();
internal static readonly int FontSizeScale = Interop.TextLabel.FontSizeScaleGet();
+ internal static readonly int EnableFontSizeScale = Interop.TextLabel.EnableFontSizeScaleGet();
internal static readonly int EllipsisPosition = Interop.TextLabel.EllipsisPositionGet();
}
return temp;
}));
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty EnableFontSizeScaleProperty = BindableProperty.Create(nameof(EnableFontSizeScale), typeof(bool), typeof(TextLabel), default(bool), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var textLabel = (TextLabel)bindable;
+ if (newValue != null)
+ {
+ using (var property = new Tizen.NUI.PropertyValue((bool)newValue))
+ {
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EnableFontSizeScale, property);
+ textLabel.RequestLayout();
+ }
+ }
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var textLabel = (TextLabel)bindable;
+ bool temp;
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.EnableFontSizeScale).Get(out temp);
+ return temp;
+ }));
+
/// <summary>
/// ShadowOffsetProperty
/// </summary>
testingTarget.Dispose();
tlog.Debug(tag, $"TextEditorTranslatablePlaceholderText END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("TextEditor FontSizeScale.")]
+ [Property("SPEC", "Tizen.NUI.TextEditor.FontSizeScale A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "bowon.ryu@samsung.com")]
+ public void TextEditorFontSizeScale()
+ {
+ tlog.Debug(tag, $"TextEditorFontSizeScale START");
+
+ var testingTarget = new TextEditor(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextEditor");
+ Assert.IsInstanceOf<TextEditor>(testingTarget, "Should be an instance of TextEditor type.");
+
+ testingTarget.FontSizeScale = 2.0f;
+ Assert.AreEqual(2.0f, testingTarget.FontSizeScale, "Should be equal!");
+
+ testingTarget.FontSizeScale = Tizen.NUI.FontSizeScale.UseSystemSetting;
+ Assert.AreEqual(Tizen.NUI.FontSizeScale.UseSystemSetting, testingTarget.FontSizeScale, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextEditorFontSizeScale END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextEditor EnableFontSizeScale.")]
+ [Property("SPEC", "Tizen.NUI.TextEditor.EnableFontSizeScale A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "bowon.ryu@samsung.com")]
+ public void TextEditorEnableFontSizeScale()
+ {
+ tlog.Debug(tag, $"TextEditorEnableFontSizeScale START");
+
+ var testingTarget = new TextEditor(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextEditor");
+ Assert.IsInstanceOf<TextEditor>(testingTarget, "Should be an instance of TextEditor type.");
+
+ testingTarget.EnableFontSizeScale = false;
+ Assert.AreEqual(false, testingTarget.EnableFontSizeScale, "Should be equal!");
+
+ testingTarget.EnableFontSizeScale = true;
+ Assert.AreEqual(true, testingTarget.EnableFontSizeScale, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextEditorEnableFontSizeScale END (OK)");
+ }
}
}
Assert.AreEqual(2.0f, testingTarget.FontSizeScale, "Should be equal!");
testingTarget.FontSizeScale = Tizen.NUI.FontSizeScale.UseSystemSetting;
+ Assert.AreEqual(Tizen.NUI.FontSizeScale.UseSystemSetting, testingTarget.FontSizeScale, "Should be equal!");
testingTarget.Dispose();
tlog.Debug(tag, $"TextFieldFontSizeScale END (OK)");
[Test]
[Category("P1")]
+ [Description("TextField EnableFontSizeScale.")]
+ [Property("SPEC", "Tizen.NUI.TextField.EnableFontSizeScale A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "bowon.ryu@samsung.com")]
+ public void TextFieldEnableFontSizeScale()
+ {
+ tlog.Debug(tag, $"TextFieldEnableFontSizeScale START");
+
+ var testingTarget = new TextField(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextField");
+ Assert.IsInstanceOf<TextField>(testingTarget, "Should be an instance of TextField type.");
+
+ testingTarget.EnableFontSizeScale = false;
+ Assert.AreEqual(false, testingTarget.EnableFontSizeScale, "Should be equal!");
+
+ testingTarget.EnableFontSizeScale = true;
+ Assert.AreEqual(true, testingTarget.EnableFontSizeScale, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextFieldEnableFontSizeScale END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
[Description("TextField SelectWholeText.")]
[Property("SPEC", "Tizen.NUI.TextField.SelectWholeText M")]
[Property("SPEC_URL", "-")]
--- /dev/null
+using global::System;
+using NUnit.Framework;
+using NUnit.Framework.TUnit;
+using Tizen.NUI.Components;
+using Tizen.NUI.BaseComponents;
+using System.Collections.Generic;
+
+namespace Tizen.NUI.Devel.Tests
+{
+ using tlog = Tizen.Log;
+
+ [TestFixture]
+ [Description("public/BaseComponents/TextLabel")]
+ public class PublicTextLabelTest
+ {
+ private const string tag = "NUITEST";
+
+ [SetUp]
+ public void Init()
+ {
+ tlog.Info(tag, "Init() is called!");
+ }
+
+ [TearDown]
+ public void Destroy()
+ {
+ tlog.Info(tag, "Destroy() is called!");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextLabel FontSizeScale.")]
+ [Property("SPEC", "Tizen.NUI.TextLabel.FontSizeScale A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "bowon.ryu@samsung.com")]
+ public void TextLabelFontSizeScale()
+ {
+ tlog.Debug(tag, $"TextLabelFontSizeScale START");
+
+ var testingTarget = new TextLabel(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextLabel");
+ Assert.IsInstanceOf<TextLabel>(testingTarget, "Should be an instance of TextLabel type.");
+
+ testingTarget.FontSizeScale = 2.0f;
+ Assert.AreEqual(2.0f, testingTarget.FontSizeScale, "Should be equal!");
+
+ testingTarget.FontSizeScale = Tizen.NUI.FontSizeScale.UseSystemSetting;
+ Assert.AreEqual(Tizen.NUI.FontSizeScale.UseSystemSetting, testingTarget.FontSizeScale, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextLabelFontSizeScale END (OK)");
+ }
+
+ [Test]
+ [Category("P1")]
+ [Description("TextLabel EnableFontSizeScale.")]
+ [Property("SPEC", "Tizen.NUI.TextLabel.EnableFontSizeScale A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "bowon.ryu@samsung.com")]
+ public void TextLabelEnableFontSizeScale()
+ {
+ tlog.Debug(tag, $"TextLabelEnableFontSizeScale START");
+
+ var testingTarget = new TextLabel(true);
+ Assert.IsNotNull(testingTarget, "Can't create success object TextLabel");
+ Assert.IsInstanceOf<TextLabel>(testingTarget, "Should be an instance of TextLabel type.");
+
+ testingTarget.EnableFontSizeScale = false;
+ Assert.AreEqual(false, testingTarget.EnableFontSizeScale, "Should be equal!");
+
+ testingTarget.EnableFontSizeScale = true;
+ Assert.AreEqual(true, testingTarget.EnableFontSizeScale, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextLabelEnableFontSizeScale END (OK)");
+ }
+ }
+}