GrabHandleColor property can set the color of grab handle in TextField/TextEditor.
exmaple)
field.GrabHandleColor = new Color(0.0f, 1.0f, 0.0f, 1.0f);
this patch should be merged after below patches are applied.
https://review.tizen.org/gerrit/#/c/platform/core/uifw/dali-toolkit/+/255726/
https://review.tizen.org/gerrit/#/c/platform/core/uifw/dali-csharp-binder/+/255739/
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
[NUI] Use Color type instead of Vector4 for GrabHandleColor
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
[NUI] Add missing code for GrabHandleColor
field.GrabHandleColor = new Color(0.0f, 1.0f, 0.0f, 1.0f);
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
[NUI] Replace Vector4 with Color in TextField/TextEditorBindableProperty
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
[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_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_GRAB_HANDLE_COLOR_get")]
+ public static extern int GrabHandleColorGet();
}
}
}
}
/// <summary>
+ /// The GrabHandleColor property.
+ /// </summary>
+ /// <remarks>
+ /// The property cascade chaining set is possible. For example, this (textEditor.GrabHandleColor.X = 0.1f;) is possible.
+ /// </remarks>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Color GrabHandleColor
+ {
+ get
+ {
+ Color temp = (Color)GetValue(GrabHandleColorProperty);
+ return new Color(OnGrabHandleColorChanged, temp.R, temp.G, temp.B, temp.A);
+ }
+ set
+ {
+ SetValue(GrabHandleColorProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ /// <summary>
/// The Placeholder property.
/// Gets or sets the placeholder: text, color, font family, font style, point size, and pixel size.
/// </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 GrabHandleColor = Interop.TextEditor.GrabHandleColorGet();
}
internal class InputStyle
{
TextColor = new Vector4(x, y, z, w);
}
-
+ private void OnGrabHandleColorChanged(float r, float g, float b, float a)
+ {
+ GrabHandleColor = new Color(r, g, b, a);
+ }
}
}
Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textEditor.SwigCPtr, TextEditor.Property.FontSizeScale).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) =>
+ {
+ var textEditor = (TextEditor)bindable;
+ if (newValue != null)
+ {
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textEditor.SwigCPtr, TextEditor.Property.GrabHandleColor, new Tizen.NUI.PropertyValue((Color)newValue));
+ }
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var textEditor = (TextEditor)bindable;
+ Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textEditor.SwigCPtr, TextEditor.Property.GrabHandleColor).Get(temp);
+ return temp;
+ }));
}
}
}
/// <summary>
+ /// The GrabHandleColor property.
+ /// </summary>
+ /// <remarks>
+ /// The property cascade chaining set is possible. For example, this (textField.GrabHandleColor.X = 0.1f;) is possible.
+ /// </remarks>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Color GrabHandleColor
+ {
+ get
+ {
+ Color temp = (Color)GetValue(GrabHandleColorProperty);
+ return new Color(OnGrabHandleColorChanged, temp.R, temp.G, temp.B, temp.A);
+ }
+ set
+ {
+ SetValue(GrabHandleColorProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ /// <summary>
/// The Placeholder property.
/// Gets or sets the placeholder: text, color, font family, font style, point size, and pixel size.
/// </summary>
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 GrabHandleColor = Interop.TextField.GrabHandleColorGet();
}
internal class InputStyle
{
TextColor = new Color(r, g, b, a);
}
+ private void OnGrabHandleColorChanged(float r, float g, float b, float a)
+ {
+ GrabHandleColor = new Color(r, g, b, a);
+ }
}
}
Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textField.SwigCPtr, TextField.Property.FontSizeScale).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) =>
+ {
+ var textField = (TextField)bindable;
+ if (newValue != null)
+ {
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textField.SwigCPtr, TextField.Property.GrabHandleColor, new Tizen.NUI.PropertyValue((Color)newValue));
+ }
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var textField = (TextField)bindable;
+ Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textField.SwigCPtr, TextField.Property.GrabHandleColor).Get(temp);
+ return temp;
+ }));
#region Selectors
internal static readonly BindableProperty TranslatableTextSelectorProperty = BindableProperty.Create("TranslatableTextSelector", typeof(Selector<string>), typeof(TextField), null, propertyChanged: (bindable, oldValue, newValue) =>