[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextEditor_New")]
public static extern global::System.IntPtr New();
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextEditor_New_With_Style")]
+ public static extern global::System.IntPtr New(bool hasStyle);
+
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_TextEditor__SWIG_0")]
public static extern global::System.IntPtr NewTextEditor();
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextField_New")]
public static extern global::System.IntPtr New();
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextField_New_With_Style")]
+ public static extern global::System.IntPtr New(bool hasStyle);
+
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_TextField__SWIG_0")]
public static extern global::System.IntPtr NewTextField();
public static extern global::System.IntPtr New();
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_New__SWIG_1")]
- public static extern global::System.IntPtr New(string jarg1);
+ public static extern global::System.IntPtr New(string text);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_New_With_Style")]
+ public static extern global::System.IntPtr New(bool hasStyle);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextLabel_New_With_String_Style")]
+ public static extern global::System.IntPtr New(string text, bool hasStyle);
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_TextLabel__SWIG_0")]
public static extern global::System.IntPtr NewTextLabel();
return textEditorStyle.relativeLineHeight;
});
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty FontSizeScaleProperty = BindableProperty.Create(nameof(FontSizeScale), typeof(float?), typeof(TextEditorStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var textEditorStyle = (TextEditorStyle)bindable;
+ textEditorStyle.fontSizeScale = (float?)newValue;
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var textEditorStyle = (TextEditorStyle)bindable;
+ return textEditorStyle.fontSizeScale;
+ });
+
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty SelectionPopupStyleProperty = BindableProperty.Create(nameof(SelectionPopupStyle), typeof(PropertyMap), typeof(TextEditorStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
{
private float? lineSpacing;
private float? minLineSize;
private float? relativeLineHeight;
+ private float? fontSizeScale;
static TextEditorStyle() { }
set => SetValue(RelativeLineHeightProperty, value);
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public float? FontSizeScale
+ {
+ get => (float?)GetValue(FontSizeScaleProperty);
+ set => SetValue(FontSizeScaleProperty, value);
+ }
+
[EditorBrowsable(EditorBrowsableState.Never)]
public PropertyMap SelectionPopupStyle
{
var textFieldStyle = (TextFieldStyle)bindable;
return textFieldStyle.pointSize;
});
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty FontSizeScaleProperty = BindableProperty.Create(nameof(FontSizeScale), typeof(float?), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var textFieldStyle = (TextFieldStyle)bindable;
+ textFieldStyle.fontSizeScale = (float?)newValue;
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var textFieldStyle = (TextFieldStyle)bindable;
+ return textFieldStyle.fontSizeScale;
+ });
/// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty TextColorProperty = BindableProperty.Create(nameof(TextColor), typeof(Color), typeof(TextFieldStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
private string fontFamily;
private Color textColor;
private float? pointSize;
+ private float? fontSizeScale;
private Vector4 placeholderTextColor;
private Vector4 primaryCursorColor;
private PropertyMap fontStyle;
set => SetValue(PointSizeProperty, value);
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public float? FontSizeScale
+ {
+ get => (float?)GetValue(FontSizeScaleProperty);
+ set => SetValue(FontSizeScaleProperty, value);
+ }
+
/// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public Vector4 PlaceholderTextColor
var textLabelStyle = (TextLabelStyle)bindable;
return textLabelStyle.characterSpacing;
});
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty FontSizeScaleProperty = BindableProperty.Create(nameof(FontSizeScale), typeof(float?), typeof(TextLabelStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var textLabelStyle = (TextLabelStyle)bindable;
+ textLabelStyle.fontSizeScale = (float?)newValue;
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var textLabelStyle = (TextLabelStyle)bindable;
+ return textLabelStyle.fontSizeScale;
+ });
/// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty MatchSystemLanguageDirectionProperty = BindableProperty.Create(nameof(MatchSystemLanguageDirection), typeof(bool?), typeof(TextLabelStyle), null, propertyChanged: (bindable, oldValue, newValue) =>
private Selector<TextShadow> textShadow;
private PropertyMap fontStyle;
private float? characterSpacing;
+ private float? fontSizeScale;
static TextLabelStyle() { }
set => SetValue(CharacterSpacingProperty, value);
}
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public float? FontSizeScale
+ {
+ get => (float?)GetValue(FontSizeScaleProperty);
+ set => SetValue(FontSizeScaleProperty, value);
+ }
+
/// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public bool? MatchSystemLanguageDirection
private float fontSizeScale = 1.0f;
private bool hasFontSizeChangedCallback = false;
private bool isSettingTextInCSharp = false;
+ static private string defaultStyleName = "Tizen.NUI.BaseComponents.TextEditor";
private Color internalPlaceholderTextColor = null;
private Vector4 internalPrimaryCursorColor = null;
/// Creates the TextEditor control.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public TextEditor() : this(Interop.TextEditor.New(), true)
+ public TextEditor() : this(Interop.TextEditor.New(ThemeManager.GetStyle(defaultStyleName) == null ? false : true), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// Creates the TextEditor with specified style.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public TextEditor(TextEditorStyle style) : this(Interop.TextLabel.New(), true, style: style)
+ public TextEditor(TextEditorStyle style) : this(Interop.TextEditor.New(ThemeManager.GetStyle(defaultStyleName) == null ? false : true), true, style: style)
{
}
/// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
/// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
[EditorBrowsable(EditorBrowsableState.Never)]
- public TextEditor(bool shown) : this(Interop.TextEditor.New(), true)
+ public TextEditor(bool shown) : this(Interop.TextEditor.New(ThemeManager.GetStyle(defaultStyleName) == null ? false : true), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
SetVisible(shown);
/// </summary>
/// <since_tizen> 9 </since_tizen>
public float FontSizeScale
+ {
+ get
+ {
+ return (float)GetValue(FontSizeScaleProperty);
+ }
+ set
+ {
+ SetValue(FontSizeScaleProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private float InternalFontSizeScale
{
get
{
removeFontSizeChangedCallback();
}
- SetValue(FontSizeScaleProperty, newFontSizeScale);
- NotifyPropertyChanged();
+ SetInternalFontSizeScale(newFontSizeScale);
+ }
+ }
+
+ private void SetInternalFontSizeScale(float fontSizeScale)
+ {
+#if NUI_PROPERTY_CHANGE_2
+ Object.InternalSetPropertyFloat(this.SwigCPtr, TextEditor.Property.FontSizeScale, (float)fontSizeScale);
+#else
+ using (var property = new Tizen.NUI.PropertyValue((float)fontSizeScale))
+ {
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)this.SwigCPtr, TextEditor.Property.FontSizeScale, property);
}
+#endif
}
/// <summary>
private void SystemSettingsFontSizeChanged(object sender, FontSizeChangedEventArgs e)
{
float newFontSizeScale = TextUtils.GetFontSizeScale(e.Value);
- SetValue(FontSizeScaleProperty, newFontSizeScale);
- NotifyPropertyChanged();
+ SetInternalFontSizeScale(newFontSizeScale);
}
private void addFontSizeChangedCallback()
var textEditor = (TextEditor)bindable;
if (newValue != null)
{
-#if NUI_PROPERTY_CHANGE_2
- Object.InternalSetPropertyFloat(textEditor.SwigCPtr, TextEditor.Property.FontSizeScale, (float)newValue);
-#else
- using (var property = new Tizen.NUI.PropertyValue((float)newValue))
- {
- Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textEditor.SwigCPtr, TextEditor.Property.FontSizeScale, property);
- }
-#endif
+ textEditor.InternalFontSizeScale = (float)newValue;
}
}),
defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var textEditor = (TextEditor)bindable;
-#if NUI_PROPERTY_CHANGE_2
- return Object.InternalGetPropertyFloat(textEditor.SwigCPtr, TextEditor.Property.FontSizeScale);
-#else
- float temp;
- Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textEditor.SwigCPtr, TextEditor.Property.FontSizeScale).Get(out temp);
- return temp;
-#endif
+ return textEditor.InternalFontSizeScale;
}));
[EditorBrowsable(EditorBrowsableState.Never)]
private float fontSizeScale = 1.0f;
private bool hasFontSizeChangedCallback = false;
private bool isSettingTextInCSharp = false;
+ static private string defaultStyleName = "Tizen.NUI.BaseComponents.TextField";
private Vector4 internalPlaceholderTextColor = null;
/// Creates the TextField control.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public TextField() : this(Interop.TextField.New(), true)
+ public TextField() : this(Interop.TextField.New(ThemeManager.GetStyle(defaultStyleName) == null ? false : true), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
/// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
[EditorBrowsable(EditorBrowsableState.Never)]
- public TextField(bool shown) : this(Interop.TextField.New(), true)
+ public TextField(bool shown) : this(Interop.TextField.New(ThemeManager.GetStyle(defaultStyleName) == null ? false : true), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
SetVisible(shown);
/// </summary>
/// <since_tizen> 9 </since_tizen>
public float FontSizeScale
+ {
+ get
+ {
+ return (float)GetValue(FontSizeScaleProperty);
+ }
+ set
+ {
+ SetValue(FontSizeScaleProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private float InternalFontSizeScale
{
get
{
removeFontSizeChangedCallback();
}
- SetValue(FontSizeScaleProperty, newFontSizeScale);
- NotifyPropertyChanged();
+ SetInternalFontSizeScale(newFontSizeScale);
+ }
+ }
+
+ private void SetInternalFontSizeScale(float fontSizeScale)
+ {
+#if NUI_PROPERTY_CHANGE_2
+ Object.InternalSetPropertyFloat(this.SwigCPtr, TextField.Property.FontSizeScale, (float)fontSizeScale);
+#else
+ using (var property = new Tizen.NUI.PropertyValue((float)fontSizeScale))
+ {
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)this.SwigCPtr, TextField.Property.FontSizeScale, property);
}
+#endif
}
/// <summary>
private void SystemSettingsFontSizeChanged(object sender, FontSizeChangedEventArgs e)
{
float newFontSizeScale = TextUtils.GetFontSizeScale(e.Value);
- SetValue(FontSizeScaleProperty, newFontSizeScale);
- NotifyPropertyChanged();
+ SetInternalFontSizeScale(newFontSizeScale);
}
private void addFontSizeChangedCallback()
var textField = (TextField)bindable;
if (newValue != null)
{
-#if NUI_PROPERTY_CHANGE_2
- Object.InternalSetPropertyFloat(textField.SwigCPtr, TextField.Property.FontSizeScale, (float)newValue);
-#else
- using (var property = new Tizen.NUI.PropertyValue((float)newValue))
- {
- Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textField.SwigCPtr, TextField.Property.FontSizeScale, property);
- }
-#endif
+ textField.InternalFontSizeScale = (float)newValue;
}
}),
defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var textField = (TextField)bindable;
-#if NUI_PROPERTY_CHANGE_2
- return Object.InternalGetPropertyFloat(textField.SwigCPtr, TextField.Property.FontSizeScale);
-#else
- float temp;
- Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textField.SwigCPtr, TextField.Property.FontSizeScale).Get(out temp);
- return temp;
-#endif
+ return textField.InternalFontSizeScale;
}));
[EditorBrowsable(EditorBrowsableState.Never)]
private TextLabelSelectorData selectorData;
private float fontSizeScale = 1.0f;
private bool hasFontSizeChangedCallback = false;
+ static private string defaultStyleName = "Tizen.NUI.BaseComponents.TextLabel";
private Color internalTextColor;
/// Creates the TextLabel control.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public TextLabel() : this(Interop.TextLabel.New(), true)
+ public TextLabel() : this(Interop.TextLabel.New(ThemeManager.GetStyle(defaultStyleName) == null ? false : true), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
[EditorBrowsable(EditorBrowsableState.Never)]
- public TextLabel(TextLabelStyle viewStyle) : this(Interop.TextLabel.New(), true, viewStyle)
+ public TextLabel(TextLabelStyle viewStyle) : this(Interop.TextLabel.New(ThemeManager.GetStyle(defaultStyleName) == null ? false : true), true, viewStyle)
{
}
/// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
/// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
[EditorBrowsable(EditorBrowsableState.Never)]
- public TextLabel(bool shown) : this(Interop.TextLabel.New(), true)
+ public TextLabel(bool shown) : this(Interop.TextLabel.New(ThemeManager.GetStyle(defaultStyleName) == null ? false : true), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
SetVisible(shown);
/// </summary>
/// <param name="text">The text to display</param>
/// <since_tizen> 3 </since_tizen>
- public TextLabel(string text) : this(Interop.TextLabel.New(text), true)
+ public TextLabel(string text) : this(Interop.TextLabel.New(text, ThemeManager.GetStyle(defaultStyleName) == null ? false : true), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
/// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
[EditorBrowsable(EditorBrowsableState.Never)]
- public TextLabel(string text, bool shown) : this(Interop.TextLabel.New(text), true)
+ public TextLabel(string text, bool shown) : this(Interop.TextLabel.New(text, ThemeManager.GetStyle(defaultStyleName) == null ? false : true), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
SetVisible(shown);
/// </summary>
/// <since_tizen> 9 </since_tizen>
public float FontSizeScale
+ {
+ get
+ {
+ return (float)GetValue(FontSizeScaleProperty);
+ }
+ set
+ {
+ SetValue(FontSizeScaleProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private float InternalFontSizeScale
{
get
{
removeFontSizeChangedCallback();
}
- SetValue(FontSizeScaleProperty, newFontSizeScale);
- NotifyPropertyChanged();
+ SetInternalFontSizeScale(newFontSizeScale);
+ }
+ }
+
+ private void SetInternalFontSizeScale(float fontSizeScale)
+ {
+#if NUI_PROPERTY_CHANGE_2
+ Object.InternalSetPropertyFloat(this.SwigCPtr, TextLabel.Property.FontSizeScale, (float)fontSizeScale);
+#else
+ using (var property = new Tizen.NUI.PropertyValue((float)fontSizeScale))
+ {
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)this.SwigCPtr, TextLabel.Property.FontSizeScale, property);
}
+#endif
+ RequestLayout();
}
/// <summary>
private void SystemSettingsFontSizeChanged(object sender, FontSizeChangedEventArgs e)
{
float newFontSizeScale = TextUtils.GetFontSizeScale(e.Value);
- SetValue(FontSizeScaleProperty, newFontSizeScale);
+ SetInternalFontSizeScale(newFontSizeScale);
}
private void addFontSizeChangedCallback()
var textLabel = (TextLabel)bindable;
if (newValue != null)
{
-#if NUI_PROPERTY_CHANGE_2
- Object.InternalSetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.FontSizeScale, (float)newValue);
- textLabel.RequestLayout();
-#else
- using (var property = new Tizen.NUI.PropertyValue((float)newValue))
- {
- Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontSizeScale, property);
- textLabel.RequestLayout();
- }
-#endif
+ textLabel.InternalFontSizeScale = (float)newValue;
}
}),
defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var textLabel = (TextLabel)bindable;
-#if NUI_PROPERTY_CHANGE_2
- return Object.InternalGetPropertyFloat(textLabel.SwigCPtr, TextLabel.Property.FontSizeScale);
-#else
- float temp;
- Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textLabel.SwigCPtr, TextLabel.Property.FontSizeScale).Get(out temp);
- return temp;
-#endif
+ return textLabel.InternalFontSizeScale;
}));
[EditorBrowsable(EditorBrowsableState.Never)]
AutoScrollLoopCount = 2,
AutoScrollGap = 50.0f,
AutoScrollSpeed = 80,
+ FontSizeScale = Tizen.NUI.FontSizeScale.UseSystemSetting,
});
// TextField style.
PrimaryCursorColor = new Vector4(0.04f, 0.05f, 0.13f, 1),
SecondaryCursorColor = new Vector4(0.04f, 0.05f, 0.13f, 1),
CursorWidth = 2,
+ FontSizeScale = Tizen.NUI.FontSizeScale.UseSystemSetting,
SelectionHighlightColor = new Vector4(1.00f, 0.38f, 0.00f, 0.30f),
GrabHandleColor = new Color(1.00f, 1.00f, 1.00f, 1),
GrabHandleImage = FrameworkInformation.ResourcePath + "IoT_handler_center_downW.png",
PrimaryCursorColor = new Vector4(0.04f, 0.05f, 0.13f, 1),
SecondaryCursorColor = new Vector4(0.04f, 0.05f, 0.13f, 1),
CursorWidth = 2,
+ FontSizeScale = Tizen.NUI.FontSizeScale.UseSystemSetting,
SelectionHighlightColor = new Vector4(1.00f, 0.38f, 0.00f, 0.30f),
GrabHandleColor = new Color(1.00f, 1.00f, 1.00f, 1),
GrabHandleImage = FrameworkInformation.ResourcePath + "IoT_handler_center_downW.png",