[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextEditor_Property_HORIZONTAL_ALIGNMENT_get")]
public static extern int HorizontalAlignmentGet();
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextEditor_Property_VERTICAL_ALIGNMENT_get")]
+ public static extern int VerticalAlignmentGet();
+
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextEditor_Property_SCROLL_THRESHOLD_get")]
public static extern int ScrollThresholdGet();
propertyChanged: (bindable, oldValue, newValue) => ((TextEditorStyle)bindable).horizontalAlignment = (HorizontalAlignment?)newValue,
defaultValueCreator: (bindable) => ((TextEditorStyle)bindable).horizontalAlignment);
+ /// <summary> The bindable property of VerticalAlignment. </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ internal static readonly BindableProperty VerticalAlignmentProperty = BindableProperty.Create(nameof(VerticalAlignment), typeof(VerticalAlignment?), typeof(TextEditorStyle), null,
+ propertyChanged: (bindable, oldValue, newValue) => ((TextEditorStyle)bindable).verticalAlignment = (VerticalAlignment?)newValue,
+ defaultValueCreator: (bindable) => ((TextEditorStyle)bindable).verticalAlignment);
+
/// <summary> The bindable property of SecondaryCursorColor. </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
internal static readonly BindableProperty SecondaryCursorColorProperty = BindableProperty.Create(nameof(SecondaryCursorColor), typeof(Vector4), typeof(TextEditorStyle), null,
});
private HorizontalAlignment? horizontalAlignment;
+ private VerticalAlignment? verticalAlignment;
private Vector4 secondaryCursorColor;
private bool? enableCursorBlink;
private float? cursorBlinkInterval;
}
/// <summary>
+ /// The VerticalAlignment property.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public VerticalAlignment? VerticalAlignment
+ {
+ get => (VerticalAlignment?)GetValue(VerticalAlignmentProperty);
+ set => SetValue(VerticalAlignmentProperty, value);
+ }
+
+ /// <summary>
/// The SecondaryCursorColor property.
/// Note that the cascade chaining set is impossible. Please set a whole value.
/// </summary>
}
/// <summary>
+ /// The VerticalAlignment property.<br />
+ /// The line vertical alignment.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public VerticalAlignment VerticalAlignment
+ {
+ get
+ {
+ return (VerticalAlignment)GetValue(VerticalAlignmentProperty);
+ }
+ set
+ {
+ SetValue(VerticalAlignmentProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ /// <summary>
/// The ScrollThreshold property.<br />
/// Horizontal scrolling will occur if the cursor is this close to the control border.<br />
/// </summary>
internal static readonly int FontStyle = Interop.TextEditor.FontStyleGet();
internal static readonly int PointSize = Interop.TextEditor.PointSizeGet();
internal static readonly int HorizontalAlignment = Interop.TextEditor.HorizontalAlignmentGet();
+ internal static readonly int VerticalAlignment = Interop.TextEditor.VerticalAlignmentGet();
internal static readonly int ScrollThreshold = Interop.TextEditor.ScrollThresholdGet();
internal static readonly int ScrollSpeed = Interop.TextEditor.ScrollSpeedGet();
internal static readonly int PrimaryCursorColor = Interop.TextEditor.PrimaryCursorColorGet();
return temp.GetValueByDescription<HorizontalAlignment>();
}));
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty VerticalAlignmentProperty = BindableProperty.Create(nameof(VerticalAlignment), typeof(VerticalAlignment), typeof(TextEditor), VerticalAlignment.Bottom, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var textEditor = (TextEditor)bindable;
+ if (newValue != null)
+ {
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textEditor.SwigCPtr, TextEditor.Property.VerticalAlignment, new Tizen.NUI.PropertyValue((int)newValue));
+ }
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var textEditor = (TextEditor)bindable;
+ string temp;
+ if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textEditor.SwigCPtr, TextEditor.Property.VerticalAlignment).Get(out temp) == false)
+ {
+ NUILog.Error("VerticalAlignment get error!");
+ }
+
+ return temp.GetValueByDescription<VerticalAlignment>();
+ }));
/// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty ScrollThresholdProperty = BindableProperty.Create(nameof(ScrollThreshold), typeof(float), typeof(TextEditor), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
testingTarget.Dispose();
tlog.Debug(tag, $"TextEditorCharacterSpacing END (OK)");
}
+
+ [Test]
+ [Category("P1")]
+ [Description("TextEditor VerticalAlignment.")]
+ [Property("SPEC", "Tizen.NUI.TextEditor.VerticalAlignment A")]
+ [Property("SPEC_URL", "-")]
+ [Property("CRITERIA", "CONSTR")]
+ [Property("AUTHOR", "bowon.ryu@samsung.com")]
+ public void TextEditorVerticalAlignment()
+ {
+ tlog.Debug(tag, $"TextEditorVerticalAlignment 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.VerticalAlignment = VerticalAlignment.Bottom;
+ Assert.AreEqual(VerticalAlignment.Bottom, testingTarget.VerticalAlignment, "Should be equal!");
+
+ testingTarget.VerticalAlignment = VerticalAlignment.Top;
+ Assert.AreEqual(VerticalAlignment.Top, testingTarget.VerticalAlignment, "Should be equal!");
+
+ testingTarget.VerticalAlignment = VerticalAlignment.Center;
+ Assert.AreEqual(VerticalAlignment.Center, testingTarget.VerticalAlignment, "Should be equal!");
+
+ testingTarget.Dispose();
+ tlog.Debug(tag, $"TextEditorVerticalAlignment END (OK)");
+ }
}
}