2 * Copyright(c) 2021 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 extern alias TizenSystemSettings;
19 using TizenSystemSettings.Tizen.System;
22 using System.Globalization;
23 using System.ComponentModel;
25 using Tizen.NUI.Binding;
27 namespace Tizen.NUI.BaseComponents
30 /// A control which renders a short text string.<br />
31 /// Text labels are lightweight, non-editable, and do not respond to the user input.<br />
33 /// <since_tizen> 3 </since_tizen>
34 public partial class TextLabel : View
36 internal class TextLabelLayout : LayoutItem
38 protected override void OnMeasure(MeasureSpecification widthMeasureSpec, MeasureSpecification heightMeasureSpec)
40 // Padding will be automatically applied by DALi TextLabel.
41 float totalWidth = widthMeasureSpec.Size.AsDecimal();
42 float totalHeight = heightMeasureSpec.Size.AsDecimal();
44 if (widthMeasureSpec.Mode == MeasureSpecification.ModeType.Exactly)
46 if (heightMeasureSpec.Mode != MeasureSpecification.ModeType.Exactly)
48 totalHeight = Owner.GetHeightForWidth(totalWidth);
49 heightMeasureSpec = new MeasureSpecification(new LayoutLength(totalHeight), MeasureSpecification.ModeType.Exactly);
54 var minSize = Owner.MinimumSize;
55 var maxSize = Owner.MaximumSize;
56 var naturalSize = Owner.GetNaturalSize();
58 if (heightMeasureSpec.Mode == MeasureSpecification.ModeType.Exactly)
60 // GetWidthForHeight is not implemented.
61 totalWidth = Math.Min(Math.Max(naturalSize.Width, minSize.Width), (maxSize.Width < 0 ? Int32.MaxValue : maxSize.Width));
62 widthMeasureSpec = new MeasureSpecification(new LayoutLength(totalWidth), MeasureSpecification.ModeType.Exactly);
66 totalWidth = Math.Min(Math.Max(naturalSize.Width, minSize.Width), (maxSize.Width < 0 ? Int32.MaxValue : maxSize.Width));
67 totalHeight = Math.Min(Math.Max(naturalSize.Height, minSize.Height), (maxSize.Height < 0 ? Int32.MaxValue : maxSize.Height));
69 heightMeasureSpec = new MeasureSpecification(new LayoutLength(totalHeight), MeasureSpecification.ModeType.Exactly);
70 widthMeasureSpec = new MeasureSpecification(new LayoutLength(totalWidth), MeasureSpecification.ModeType.Exactly);
74 MeasuredSize.StateType childWidthState = MeasuredSize.StateType.MeasuredSizeOK;
75 MeasuredSize.StateType childHeightState = MeasuredSize.StateType.MeasuredSizeOK;
77 SetMeasuredDimensions(ResolveSizeAndState(new LayoutLength(totalWidth), widthMeasureSpec, childWidthState),
78 ResolveSizeAndState(new LayoutLength(totalHeight), heightMeasureSpec, childHeightState));
82 static TextLabel() { }
84 private static SystemFontTypeChanged systemFontTypeChanged = new SystemFontTypeChanged();
85 private static SystemLocaleLanguageChanged systemLocaleLanguageChanged = new SystemLocaleLanguageChanged();
86 static private string defaultStyleName = "Tizen.NUI.BaseComponents.TextLabel";
87 static private string defaultFontFamily = "BreezeSans";
88 private string textLabelSid = null;
89 private TextLabelSelectorData selectorData;
90 private string fontFamily = defaultFontFamily;
91 private float fontSizeScale = 1.0f;
92 private bool hasSystemLanguageChanged = false;
93 private bool hasSystemFontSizeChanged = false;
94 private bool hasSystemFontTypeChanged = false;
96 private Color internalTextColor;
97 private Color internalAnchorColor;
98 private Color internalAnchorClickedColor;
101 /// Creates the TextLabel control.
103 /// <since_tizen> 3 </since_tizen>
104 public TextLabel() : this(Interop.TextLabel.New(ThemeManager.GetStyle(defaultStyleName) == null ? false : true), true)
106 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
109 /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
110 [EditorBrowsable(EditorBrowsableState.Never)]
111 public TextLabel(TextLabelStyle viewStyle) : this(Interop.TextLabel.New(ThemeManager.GetStyle(defaultStyleName) == null ? false : true), true, viewStyle)
116 /// Creates the TextLabel with setting the status of shown or hidden.
118 /// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
119 /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
120 [EditorBrowsable(EditorBrowsableState.Never)]
121 public TextLabel(bool shown) : this(Interop.TextLabel.New(ThemeManager.GetStyle(defaultStyleName) == null ? false : true), true)
123 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
128 /// Creates the TextLabel control.
130 /// <param name="text">The text to display</param>
131 /// <since_tizen> 3 </since_tizen>
132 public TextLabel(string text) : this(Interop.TextLabel.New(text, ThemeManager.GetStyle(defaultStyleName) == null ? false : true), true)
134 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
138 /// Creates the TextLabel with setting the status of shown or hidden.
140 /// <param name="text">The text to display</param>
141 /// <param name="shown">false : Not displayed (hidden), true : displayed (shown)</param>
142 /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
143 [EditorBrowsable(EditorBrowsableState.Never)]
144 public TextLabel(string text, bool shown) : this(Interop.TextLabel.New(text, ThemeManager.GetStyle(defaultStyleName) == null ? false : true), true)
146 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
150 internal TextLabel(TextLabel handle, bool shown = true) : this(Interop.TextLabel.NewTextLabel(TextLabel.getCPtr(handle)), true)
152 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
160 internal TextLabel(global::System.IntPtr cPtr, bool cMemoryOwn, ViewStyle viewStyle, bool shown = true) : base(cPtr, cMemoryOwn, viewStyle)
168 internal TextLabel(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown = true) : base(cPtr, cMemoryOwn, null)
176 private bool HasStyle()
178 return ThemeManager.GetStyle(this.GetType()) == null ? false : true;
182 /// The TranslatableText property.<br />
183 /// The text can set the SID value.<br />
185 /// <exception cref='ArgumentNullException'>
186 /// ResourceManager about multilingual is null.
188 /// <since_tizen> 4 </since_tizen>
189 public string TranslatableText
193 return (string)GetValue(TranslatableTextProperty);
197 SetValue(TranslatableTextProperty, value);
200 private string translatableText
208 if (NUIApplication.MultilingualResourceManager == null)
210 throw new ArgumentNullException(null, "ResourceManager about multilingual is null");
212 string translatableText = null;
213 textLabelSid = value;
214 translatableText = NUIApplication.MultilingualResourceManager?.GetString(textLabelSid, new CultureInfo(SystemSettings.LocaleLanguage.Replace("_", "-")));
215 if (translatableText != null)
217 Text = translatableText;
218 if (hasSystemLanguageChanged == false)
220 systemLocaleLanguageChanged.Add(SystemSettingsLocaleLanguageChanged);
221 hasSystemLanguageChanged = true;
228 NotifyPropertyChanged();
233 /// The Text property.<br />
234 /// The text to display in the UTF-8 format.<br />
236 /// <since_tizen> 3 </since_tizen>
241 return (string)GetValue(TextProperty);
245 SetValue(TextProperty, value);
246 NotifyPropertyChanged();
251 /// The FontFamily property.<br />
252 /// The requested font family to use.<br />
254 /// <since_tizen> 3 </since_tizen>
255 public string FontFamily
259 return (string)GetValue(FontFamilyProperty);
263 SetValue(FontFamilyProperty, value);
264 NotifyPropertyChanged();
268 private string InternalFontFamily
275 return Object.InternalGetPropertyString(this.SwigCPtr, TextLabel.Property.FontFamily);
279 string newFontFamily;
281 if (string.Equals(fontFamily, value)) return;
284 if (fontFamily == Tizen.NUI.FontFamily.UseSystemSetting)
288 newFontFamily = SystemSettings.FontType;
292 Console.WriteLine("{0} Exception caught.", e);
293 newFontFamily = defaultFontFamily;
295 AddSystemSettingsFontTypeChanged();
299 newFontFamily = fontFamily;
300 RemoveSystemSettingsFontTypeChanged();
303 SetInternalFontFamily(newFontFamily);
307 private void SetInternalFontFamily(string fontFamily)
309 Object.InternalSetPropertyString(this.SwigCPtr, TextLabel.Property.FontFamily, (string)fontFamily);
314 /// The FontStyle property.<br />
315 /// The requested font style to use.<br />
316 /// The fontStyle map contains the following keys :<br />
317 /// <list type="table">
318 /// <item><term>width (string)</term><description>The width key defines occupied by each glyph. (values: ultraCondensed, extraCondensed, condensed, semiCondensed, normal, semiExpanded, expanded, extraExpanded, ultraExpanded)</description></item>
319 /// <item><term>weight (string)</term><description>The weight key defines the thickness or darkness of the glyphs. (values: thin, ultraLight, extraLight, light, demiLight, semiLight, book, normal, regular, medium, demiBold, semiBold, bold, ultraBold, extraBold, black, heavy, extraBlack)</description></item>
320 /// <item><term>slant (string)</term><description>The slant key defines whether to use italics. (values: normal, roman, italic, oblique)</description></item>
323 /// <since_tizen> 3 </since_tizen>
324 [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
325 public PropertyMap FontStyle
329 return (PropertyMap)GetValue(FontStyleProperty);
333 SetValue(FontStyleProperty, value);
334 NotifyPropertyChanged();
339 /// Set FontStyle to TextLabel. <br />
341 /// <param name="fontStyle">The FontStyle</param>
343 /// SetFontStyle specifies the requested font style through <see cref="Tizen.NUI.Text.FontStyle"/>. <br />
346 /// The following example demonstrates how to use the SetFontStyle method.
348 /// var fontStyle = new Tizen.NUI.Text.FontStyle();
349 /// fontStyle.Width = FontWidthType.Expanded;
350 /// fontStyle.Weight = FontWeightType.Bold;
351 /// fontStyle.Slant = FontSlantType.Italic;
352 /// label.SetFontStyle(fontStyle);
355 [EditorBrowsable(EditorBrowsableState.Never)]
356 public void SetFontStyle(FontStyle fontStyle)
358 using (var fontStyleMap = TextMapHelper.GetFontStyleMap(fontStyle))
360 SetValue(FontStyleProperty, fontStyleMap);
365 /// Get FontStyle from TextLabel. <br />
367 /// <returns>The FontStyle</returns>
369 /// <see cref="Tizen.NUI.Text.FontStyle"/>
371 [EditorBrowsable(EditorBrowsableState.Never)]
372 public FontStyle GetFontStyle()
375 using (var fontStyleMap = (PropertyMap)GetValue(FontStyleProperty))
377 fontStyle = TextMapHelper.GetFontStyleStruct(fontStyleMap);
383 /// The PointSize property.<br />
384 /// The size of font in points.<br />
386 /// <since_tizen> 3 </since_tizen>
387 [Binding.TypeConverter(typeof(PointSizeTypeConverter))]
388 public float PointSize
392 return (float)GetValue(PointSizeProperty);
396 SetValue(PointSizeProperty, value);
397 NotifyPropertyChanged();
402 /// The MultiLine property.<br />
403 /// The single-line or multi-line layout option.<br />
405 /// <since_tizen> 3 </since_tizen>
406 public bool MultiLine
410 return (bool)GetValue(MultiLineProperty);
414 SetValue(MultiLineProperty, value);
415 NotifyPropertyChanged();
420 /// The HorizontalAlignment property.<br />
421 /// The line horizontal alignment.<br />
423 /// <since_tizen> 3 </since_tizen>
424 public HorizontalAlignment HorizontalAlignment
428 return (HorizontalAlignment)GetValue(HorizontalAlignmentProperty);
432 SetValue(HorizontalAlignmentProperty, value);
433 NotifyPropertyChanged();
438 /// The VerticalAlignment property.<br />
439 /// The line vertical alignment.<br />
441 /// <since_tizen> 3 </since_tizen>
442 public VerticalAlignment VerticalAlignment
446 return (VerticalAlignment)GetValue(VerticalAlignmentProperty);
450 SetValue(VerticalAlignmentProperty, value);
451 NotifyPropertyChanged();
456 /// The TextColor property.<br />
457 /// The color of the text.<br />
458 /// Animation framework can be used to change the color of the text when not using mark up.<br />
459 /// Cannot animate the color when text is auto scrolling.<br />
462 /// The property cascade chaining set is possible. For example, this (textLabel.TextColor.X = 0.1f;) is possible.
464 /// <since_tizen> 3 </since_tizen>
465 public Color TextColor
469 Color temp = (Color)GetValue(TextColorProperty);
470 return new Color(OnTextColorChanged, temp.R, temp.G, temp.B, temp.A);
474 SetValue(TextColorProperty, value);
475 NotifyPropertyChanged();
480 /// The ShadowOffset property.<br />
481 /// The drop shadow offset 0 indicates no shadow.<br />
483 /// <since_tizen> 3 </since_tizen>
485 /// Deprecated.(API Level 6) Use Shadow instead.
486 /// The property cascade chaining set is possible. For example, this (textLabel.ShadowOffset.X = 0.1f;) is possible.
488 [Obsolete("Do not use this ShadowOffset(Deprecated). Use Shadow instead.")]
489 public Vector2 ShadowOffset
493 return GetValue(ShadowOffsetProperty) as Vector2;
497 SetValue(ShadowOffsetProperty, value);
501 private Vector2 InternalShadowOffset
505 float x = 0.0f, y = 0.0f;
506 using (var propertyValue = Shadow.Find(TextLabel.Property.SHADOW, "offset"))
507 using (var shadowOffset = new Vector2())
509 if (null != propertyValue)
511 propertyValue.Get(shadowOffset);
516 return new Vector2(OnShadowOffsetChanged, x, y);
520 using (var map = new PropertyMap())
522 map.Add("offset", value);
524 var shadowMap = Shadow;
525 shadowMap.Merge(map);
527 SetValue(ShadowProperty, shadowMap);
528 NotifyPropertyChanged();
534 /// The ShadowColor property.<br />
535 /// The color of a drop shadow.<br />
537 /// <since_tizen> 3 </since_tizen>
539 /// Deprecated.(API Level 6) Use Shadow instead.
540 /// The property cascade chaining set is possible. For example, this (textLabel.ShadowColor.X = 0.1f;) is possible.
542 [Obsolete("Do not use this ShadowColor(Deprecated). Use Shadow instead.")]
543 public Vector4 ShadowColor
547 return GetValue(ShadowColorProperty) as Vector4;
551 SetValue(ShadowColorProperty, value);
555 private Vector4 InternalShadowColor
559 float x = 0.0f, y = 0.0f, z = 0.0f, w = 0.0f;
560 using (var propertyValue = Shadow.Find(TextLabel.Property.SHADOW, "color"))
561 using (var shadowColor = new Vector4())
563 if (null != propertyValue)
565 propertyValue.Get(shadowColor);
572 return new Vector4(OnShadowColorChanged, x, y, z, w);
576 using (var map = new PropertyMap())
578 map.Add("color", value);
579 var shadowMap = Shadow;
580 shadowMap.Merge(map);
581 SetValue(ShadowProperty, shadowMap);
582 NotifyPropertyChanged();
588 /// The UnderlineEnabled property.<br />
589 /// The underline enabled flag.<br />
591 /// <since_tizen> 3 </since_tizen>
593 /// Deprecated.(API Level 6) Use Underline instead.
595 [Obsolete("Do not use this UnderlineEnabled(Deprecated). Use Underline instead.")]
596 public bool UnderlineEnabled
600 return (bool)GetValue(UnderlineEnabledProperty);
604 SetValue(UnderlineEnabledProperty, value);
608 private bool InternalUnderlineEnabled
612 bool underlineEnabled = false;
613 using (var propertyValue = Underline.Find(TextLabel.Property.UNDERLINE, "enable"))
615 if (propertyValue != null)
617 propertyValue.Get(out underlineEnabled);
620 return underlineEnabled;
624 using (var map = new PropertyMap())
626 map.Add("enable", value);
627 var undelineMap = Underline;
628 undelineMap.Merge(map);
629 SetValue(UnderlineProperty, undelineMap);
630 NotifyPropertyChanged();
636 /// The UnderlineColor property.<br />
637 /// Overrides the underline height from font metrics.<br />
639 /// <since_tizen> 3 </since_tizen>
641 /// Deprecated.(API Level 6) Use Underline instead.
642 /// The property cascade chaining set is possible. For example, this (textLabel.UnderlineColor.X = 0.1f;) is possible.
644 [Obsolete("Do not use this UnderlineColor(Deprecated). Use Underline instead.")]
645 public Vector4 UnderlineColor
649 return GetValue(UnderlineColorProperty) as Vector4;
653 SetValue(UnderlineColorProperty, value);
657 private Vector4 InternalUnderlineColor
661 float x = 0.0f, y = 0.0f, z = 0.0f, w = 0.0f;
662 using (var propertyValue = Underline.Find(TextLabel.Property.UNDERLINE, "color"))
663 using (var underlineColor = new Vector4())
665 if (null != propertyValue)
667 propertyValue.Get(underlineColor);
668 x = underlineColor.X;
669 y = underlineColor.Y;
670 z = underlineColor.Z;
671 w = underlineColor.W;
674 return new Vector4(OnUnderlineColorChanged, x, y, z, w);
678 using (var map = new PropertyMap())
680 map.Add("color", value);
681 var undelineMap = Underline;
682 undelineMap.Merge(map);
683 SetValue(UnderlineProperty, undelineMap);
684 NotifyPropertyChanged();
690 /// The UnderlineHeight property.<br />
691 /// Overrides the underline height from font metrics.<br />
693 /// <since_tizen> 3 </since_tizen>
695 /// Deprecated.(API Level 6) Use Underline instead.
697 [Obsolete("Do not use this UnderlineHeight(Deprecated). Use Underline instead.")]
698 public float UnderlineHeight
702 return (float)GetValue(UnderlineHeightProperty);
706 SetValue(UnderlineHeightProperty, value);
710 private float InternalUnderlineHeight
714 float underlineHeight = 0.0f;
715 using (var propertyValue = Underline.Find(TextLabel.Property.UNDERLINE, "height"))
717 if (null != propertyValue)
719 propertyValue.Get(out underlineHeight);
722 return underlineHeight;
726 using (var map = new PropertyMap())
728 map.Add("height", value);
729 var undelineMap = Underline;
730 undelineMap.Merge(map);
731 SetValue(UnderlineProperty, undelineMap);
732 NotifyPropertyChanged();
738 /// The EnableMarkup property.<br />
739 /// Whether the mark-up processing is enabled.<br />
741 /// <since_tizen> 3 </since_tizen>
742 public bool EnableMarkup
746 return (bool)GetValue(EnableMarkupProperty);
750 SetValue(EnableMarkupProperty, value);
751 NotifyPropertyChanged();
756 /// The EnableAutoScroll property.<br />
757 /// Starts or stops auto scrolling.<br />
759 /// <since_tizen> 3 </since_tizen>
760 public bool EnableAutoScroll
764 return (bool)GetValue(EnableAutoScrollProperty);
768 SetValue(EnableAutoScrollProperty, value);
769 NotifyPropertyChanged();
774 /// The AutoScrollSpeed property.<br />
775 /// Sets the speed of scrolling in pixels per second.<br />
777 /// <since_tizen> 3 </since_tizen>
778 public int AutoScrollSpeed
782 return (int)GetValue(AutoScrollSpeedProperty);
786 SetValue(AutoScrollSpeedProperty, value);
787 NotifyPropertyChanged();
792 /// The AutoScrollLoopCount property.<br />
793 /// Number of complete loops when scrolling enabled.<br />
795 /// <since_tizen> 3 </since_tizen>
796 public int AutoScrollLoopCount
800 return (int)GetValue(AutoScrollLoopCountProperty);
804 SetValue(AutoScrollLoopCountProperty, value);
805 NotifyPropertyChanged();
810 /// The AutoScrollGap property.<br />
811 /// Gap before scrolling wraps.<br />
813 /// <since_tizen> 3 </since_tizen>
814 public float AutoScrollGap
818 return (float)GetValue(AutoScrollGapProperty);
822 SetValue(AutoScrollGapProperty, value);
823 NotifyPropertyChanged();
828 /// The LineSpacing property.<br />
829 /// The default extra space between lines in points.<br />
831 /// <since_tizen> 3 </since_tizen>
832 public float LineSpacing
836 return (float)GetValue(LineSpacingProperty);
840 SetValue(LineSpacingProperty, value);
841 NotifyPropertyChanged();
846 /// The relative height of the line (a factor that will be multiplied by text height). <br />
847 /// If the value is less than 1, the lines could to be overlapped.
849 [EditorBrowsable(EditorBrowsableState.Never)]
850 public float RelativeLineHeight
854 return (float)GetValue(RelativeLineHeightProperty);
858 SetValue(RelativeLineHeightProperty, value);
859 NotifyPropertyChanged();
864 /// The Underline property.<br />
865 /// The default underline parameters.<br />
866 /// The underline map contains the following keys :<br />
867 /// <list type="table">
868 /// <item><term>enable (bool)</term><description>Whether the underline is enabled (the default value is false)</description></item>
869 /// <item><term>color (Color)</term><description>The color of the underline (If not provided then the color of the text is used)</description></item>
870 /// <item><term>height (float)</term><description>The height in pixels of the underline (the default value is 1.f)</description></item>
873 /// <since_tizen> 3 </since_tizen>
874 [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
875 public PropertyMap Underline
879 return (PropertyMap)GetValue(UnderlineProperty);
883 SetValue(UnderlineProperty, value);
884 NotifyPropertyChanged();
889 /// Set Underline to TextLabel. <br />
891 /// <param name="underline">The Underline</param>
893 /// SetUnderline specifies the underline of the text through <see cref="Tizen.NUI.Text.Underline"/>. <br />
896 /// The following example demonstrates how to use the SetUnderline method.
898 /// var underline = new Tizen.NUI.Text.Underline();
899 /// underline.Enable = true;
900 /// underline.Color = new Color("#3498DB");
901 /// underline.Height = 2.0f;
902 /// label.SetUnderline(underline);
905 [EditorBrowsable(EditorBrowsableState.Never)]
906 public void SetUnderline(Underline underline)
908 using (var underlineMap = TextMapHelper.GetUnderlineMap(underline))
910 SetValue(UnderlineProperty, underlineMap);
915 /// Get Underline from TextLabel. <br />
917 /// <returns>The Underline</returns>
919 /// <see cref="Tizen.NUI.Text.Underline"/>
921 [EditorBrowsable(EditorBrowsableState.Never)]
922 public Underline GetUnderline()
925 using (var underlineMap = (PropertyMap)GetValue(UnderlineProperty))
927 underline = TextMapHelper.GetUnderlineStruct(underlineMap);
933 /// The Shadow property.<br />
934 /// The default shadow parameters.<br />
935 /// The shadow map contains the following keys :<br />
936 /// <list type="table">
937 /// <item><term>color (Color)</term><description>The color of the shadow (the default color is Color.Black)</description></item>
938 /// <item><term>offset (Vector2)</term><description>The offset in pixels of the shadow (If not provided then the shadow is not enabled)</description></item>
939 /// <item><term>blurRadius (float)</term><description>The radius of the Gaussian blur for the soft shadow (If not provided then the soft shadow is not enabled)</description></item>
942 /// <since_tizen> 3 </since_tizen>
943 [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
944 public PropertyMap Shadow
948 return (PropertyMap)GetValue(ShadowProperty);
952 SetValue(ShadowProperty, value);
953 NotifyPropertyChanged();
958 /// Set Shadow to TextLabel. <br />
960 /// <param name="shadow">The Shadow</param>
962 /// SetShadow specifies the shadow of the text through <see cref="Tizen.NUI.Text.Shadow"/>. <br />
965 /// The following example demonstrates how to use the SetShadow method.
967 /// var shadow = new Tizen.NUI.Text.Shadow();
968 /// shadow.Offset = new Vector2(3, 3);
969 /// shadow.Color = new Color("#F1C40F");
970 /// shadow.BlurRadius = 4.0f;
971 /// label.SetShadow(shadow);
974 [EditorBrowsable(EditorBrowsableState.Never)]
975 public void SetShadow(Tizen.NUI.Text.Shadow shadow)
977 using (var shadowMap = TextMapHelper.GetShadowMap(shadow))
979 SetValue(ShadowProperty, shadowMap);
984 /// Get Shadow from TextLabel. <br />
986 /// <returns>The Shadow</returns>
988 /// <see cref="Tizen.NUI.Text.Shadow"/>
990 [EditorBrowsable(EditorBrowsableState.Never)]
991 public Tizen.NUI.Text.Shadow GetShadow()
993 Tizen.NUI.Text.Shadow shadow;
994 using (var shadowMap = (PropertyMap)GetValue(ShadowProperty))
996 shadow = TextMapHelper.GetShadowStruct(shadowMap);
1002 /// Describes a text shadow for a TextLabel.
1003 /// It is null by default.
1005 [EditorBrowsable(EditorBrowsableState.Never)]
1006 public TextShadow TextShadow
1010 return (TextShadow)GetValue(TextShadowProperty);
1014 SetValue(TextShadowProperty, value);
1015 NotifyPropertyChanged();
1020 /// The Emboss property.<br />
1021 /// The default emboss parameters.<br />
1023 /// <since_tizen> 3 </since_tizen>
1024 public string Emboss
1028 return (string)GetValue(EmbossProperty);
1032 SetValue(EmbossProperty, value);
1033 NotifyPropertyChanged();
1038 /// The Outline property.<br />
1039 /// The default outline parameters.<br />
1040 /// The outline map contains the following keys :<br />
1041 /// <list type="table">
1042 /// <item><term>color (Color)</term><description>The color of the outline (the default color is Color.White)</description></item>
1043 /// <item><term>width (float)</term><description>The width in pixels of the outline (If not provided then the outline is not enabled)</description></item>
1046 /// <since_tizen> 3 </since_tizen>
1047 [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
1048 public PropertyMap Outline
1052 return (PropertyMap)GetValue(OutlineProperty);
1056 SetValue(OutlineProperty, value);
1057 NotifyPropertyChanged();
1062 /// Set Outline to TextLabel. <br />
1064 /// <param name="outline">The Outline</param>
1066 /// SetOutline specifies the outline of the text through <see cref="Tizen.NUI.Text.Outline"/>. <br />
1069 /// The following example demonstrates how to use the SetOutline method.
1071 /// var outline = new Tizen.NUI.Text.Outline();
1072 /// outline.Width = 2.0f;
1073 /// outline.Color = new Color("#45B39D");
1074 /// label.SetOutline(outline);
1077 [EditorBrowsable(EditorBrowsableState.Never)]
1078 public void SetOutline(Outline outline)
1080 using (var outlineMap = TextMapHelper.GetOutlineMap(outline))
1082 SetValue(OutlineProperty, outlineMap);
1087 /// Get Outline from TextLabel. <br />
1089 /// <returns>The Outline</returns>
1091 /// <see cref="Tizen.NUI.Text.Outline"/>
1093 [EditorBrowsable(EditorBrowsableState.Never)]
1094 public Outline GetOutline()
1097 using (var outlineMap = (PropertyMap)GetValue(OutlineProperty))
1099 outline = TextMapHelper.GetOutlineStruct(outlineMap);
1105 /// Set Strikethrough to TextLabel. <br />
1107 /// <param name="strikethrough">The Strikethrough</param>
1109 /// SetStrikethrough specifies the strikethrough of the text through <see cref="Tizen.NUI.Text.Strikethrough"/>. <br />
1112 /// The following example demonstrates how to use the SetStrikethrough method.
1114 /// var strikethrough = new Tizen.NUI.Text.Strikethrough();
1115 /// strikethrough.Enable = true;
1116 /// strikethrough.Color = new Color("#3498DB");
1117 /// strikethrough.Height = 2.0f;
1118 /// label.SetStrikethrough(strikethrough);
1121 [EditorBrowsable(EditorBrowsableState.Never)]
1122 public void SetStrikethrough(Strikethrough strikethrough)
1124 using (var map = TextMapHelper.GetStrikethroughMap(strikethrough))
1125 using (var propertyValue = new PropertyValue(map))
1127 SetProperty(TextLabel.Property.Strikethrough, propertyValue);
1132 /// Get Strikethrough from TextLabel. <br />
1134 /// <returns>The Strikethrough</returns>
1136 /// <see cref="Tizen.NUI.Text.Strikethrough"/>
1138 [EditorBrowsable(EditorBrowsableState.Never)]
1139 public Strikethrough GetStrikethrough()
1141 Strikethrough strikethrough;
1142 using (var propertyValue = GetProperty(TextLabel.Property.Strikethrough))
1143 using (var map = new PropertyMap())
1145 propertyValue.Get(map);
1146 strikethrough = TextMapHelper.GetStrikethroughStruct(map);
1148 return strikethrough;
1152 /// The PixelSize property.<br />
1153 /// The size of font in pixels.<br />
1155 /// <since_tizen> 3 </since_tizen>
1156 [Binding.TypeConverter(typeof(FloatGraphicsTypeConverter))]
1157 public float PixelSize
1161 return (float)GetValue(PixelSizeProperty);
1165 SetValue(PixelSizeProperty, value);
1166 NotifyPropertyChanged();
1171 /// The Ellipsis property.<br />
1172 /// Enable or disable the ellipsis.<br />
1174 /// <since_tizen> 3 </since_tizen>
1175 public bool Ellipsis
1179 return (bool)GetValue(EllipsisProperty);
1183 SetValue(EllipsisProperty, value);
1184 NotifyPropertyChanged();
1189 /// The ellipsis position of the text.
1190 /// Specifies which portion of the text should be replaced with an ellipsis when the text size exceeds the layout size.<br />
1192 /// <since_tizen> 9 </since_tizen>
1193 public EllipsisPosition EllipsisPosition
1197 return (EllipsisPosition)GetValue(EllipsisPositionProperty);
1201 SetValue(EllipsisPositionProperty, value);
1202 NotifyPropertyChanged();
1207 /// The AutoScrollLoopDelay property.<br />
1208 /// The amount of time to delay the starting time of auto scrolling and further loops.<br />
1210 /// <since_tizen> 3 </since_tizen>
1211 public float AutoScrollLoopDelay
1215 return (float)GetValue(AutoScrollLoopDelayProperty);
1219 SetValue(AutoScrollLoopDelayProperty, value);
1220 NotifyPropertyChanged();
1225 /// The AutoScrollStopMode property.<br />
1226 /// The auto scrolling stop behaviour.<br />
1227 /// The default value is AutoScrollStopMode.FinishLoop. <br />
1229 /// <since_tizen> 3 </since_tizen>
1230 public AutoScrollStopMode AutoScrollStopMode
1234 return (AutoScrollStopMode)GetValue(AutoScrollStopModeProperty);
1238 SetValue(AutoScrollStopModeProperty, value);
1239 NotifyPropertyChanged();
1244 /// The line count of the text.
1246 /// <since_tizen> 3 </since_tizen>
1247 public int LineCount
1252 using (var propertyValue = GetProperty(TextLabel.Property.LineCount))
1254 propertyValue.Get(out lineCount);
1261 /// The LineWrapMode property.<br />
1262 /// line wrap mode when the text lines over layout width.<br />
1264 /// <since_tizen> 4 </since_tizen>
1265 public LineWrapMode LineWrapMode
1269 return (LineWrapMode)GetValue(LineWrapModeProperty);
1273 SetValue(LineWrapModeProperty, value);
1274 NotifyPropertyChanged();
1279 /// The direction of the text such as left to right or right to left.
1281 /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
1282 [EditorBrowsable(EditorBrowsableState.Never)]
1283 public TextDirection TextDirection
1287 int textDirection = 0;
1288 using (var propertyValue = GetProperty(TextLabel.Property.TextDirection))
1290 propertyValue.Get(out textDirection);
1292 return (TextDirection)textDirection;
1297 /// The vertical line alignment of the text.
1299 /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
1300 [EditorBrowsable(EditorBrowsableState.Never)]
1301 public VerticalLineAlignment VerticalLineAlignment
1305 return (VerticalLineAlignment)GetValue(VerticalLineAlignmentProperty);
1309 SetValue(VerticalLineAlignmentProperty, value);
1310 NotifyPropertyChanged();
1315 /// The text alignment to match the direction of the system language.
1317 /// <since_tizen> 6 </since_tizen>
1318 public bool MatchSystemLanguageDirection
1322 return (bool)GetValue(MatchSystemLanguageDirectionProperty);
1326 SetValue(MatchSystemLanguageDirectionProperty, value);
1327 NotifyPropertyChanged();
1332 /// The text fit parameters.<br />
1333 /// The textFit map contains the following keys :<br />
1334 /// <list type="table">
1335 /// <item><term>enable (bool)</term><description>True to enable the text fit or false to disable (the default value is false)</description></item>
1336 /// <item><term>minSize (float)</term><description>Minimum Size for text fit (the default value is 10.f)</description></item>
1337 /// <item><term>maxSize (float)</term><description>Maximum Size for text fit (the default value is 100.f)</description></item>
1338 /// <item><term>stepSize (float)</term><description>Step Size for font increase (the default value is 1.f)</description></item>
1339 /// <item><term>fontSize (string)</term><description>The size type of font, You can choose between "pointSize" or "pixelSize". (the default value is "pointSize")</description></item>
1342 /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
1343 [EditorBrowsable(EditorBrowsableState.Never)]
1344 [System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1721: Property names should not match get methods")]
1345 public PropertyMap TextFit
1349 return (PropertyMap)GetValue(TextFitProperty);
1353 SetValue(TextFitProperty, value);
1354 NotifyPropertyChanged();
1359 /// Set TextFit to TextLabel. <br />
1361 /// <param name="textFit">The TextFit</param>
1363 /// SetTextFit specifies the textFit of the text through <see cref="Tizen.NUI.Text.TextFit"/>. <br />
1366 /// The following example demonstrates how to use the SetTextFit method.
1368 /// var textFit = new Tizen.NUI.Text.TextFit();
1369 /// textFit.Enable = true;
1370 /// textFit.MinSize = 10.0f;
1371 /// textFit.MaxSize = 100.0f;
1372 /// textFit.StepSize = 5.0f;
1373 /// textFit.FontSizeType = FontSizeType.PointSize;
1374 /// label.SetTextFit(textFit);
1377 [EditorBrowsable(EditorBrowsableState.Never)]
1378 public void SetTextFit(TextFit textFit)
1380 using (var textFitMap = TextMapHelper.GetTextFitMap(textFit))
1382 SetValue(TextFitProperty, textFitMap);
1387 /// Get TextFit from TextLabel. <br />
1389 /// <returns>The TextFit</returns>
1391 /// TextFit is always returned based on PointSize. <br />
1392 /// If the user sets FontSizeType to PixelSize, then MinSize, MaxSize, and StepSize are converted based on PointSize and returned. <br />
1393 /// <see cref="Tizen.NUI.Text.TextFit"/>
1395 [EditorBrowsable(EditorBrowsableState.Never)]
1396 public TextFit GetTextFit()
1399 using (var textFitMap = (PropertyMap)GetValue(TextFitProperty))
1401 textFit = TextMapHelper.GetTextFitStruct(textFitMap);
1407 /// The MinLineSize property.<br />
1408 /// The height of the line in points. <br />
1409 /// If the font size is larger than the line size, it works with the font size. <br />
1411 /// This will be public opened in next release of tizen after ACR done. Before ACR, it is used as HiddenAPI (InhouseAPI).
1412 [EditorBrowsable(EditorBrowsableState.Never)]
1413 public float MinLineSize
1417 return (float)GetValue(MinLineSizeProperty);
1421 SetValue(MinLineSizeProperty, value);
1422 NotifyPropertyChanged();
1427 /// The spaces between characters in Pixels.
1429 /// A positive value will make the characters far apart (expanded) and a negative value will bring them closer (condensed).<br />
1430 /// The default value is 0.f which does nothing.
1433 [EditorBrowsable(EditorBrowsableState.Never)]
1434 public float CharacterSpacing
1438 return (float)GetValue(CharacterSpacingProperty);
1442 SetValue(CharacterSpacingProperty, value);
1443 NotifyPropertyChanged();
1448 /// The AnchorColor property.<br />
1449 /// The color of the anchor.<br />
1450 /// This property is used as the default color of the markup anchor tag.<br />
1451 /// If there is a color attribute in the markup anchor tag, the markup attribute takes precedence.
1454 /// The property cascade chaining set is possible. For example, this (textLabel.AnchorColor.X = 0.1f;) is possible.
1456 [EditorBrowsable(EditorBrowsableState.Never)]
1457 public Color AnchorColor
1461 Color color = (Color)GetValue(AnchorColorProperty);
1462 return new Color(OnAnchorColorChanged, color.R, color.G, color.B, color.A);
1466 SetValue(AnchorColorProperty, value);
1467 NotifyPropertyChanged();
1472 /// The AnchorClickedColor property.<br />
1473 /// The color of the clicked anchor.<br />
1474 /// This property is used as the default clicked color of the markup anchor tag.<br />
1475 /// If there is a color attribute in the markup anchor tag, the markup attribute takes precedence.
1478 /// The property cascade chaining set is possible. For example, this (textLabel.AnchorClickedColor.X = 0.1f;) is possible.
1480 [EditorBrowsable(EditorBrowsableState.Never)]
1481 public Color AnchorClickedColor
1485 Color color = (Color)GetValue(AnchorClickedColorProperty);
1486 return new Color(OnAnchorClickedColorChanged, color.R, color.G, color.B, color.A);
1490 SetValue(AnchorClickedColorProperty, value);
1491 NotifyPropertyChanged();
1496 /// The FontSizeScale property for scaling the specified font size up or down. <br />
1497 /// The default value is 1.0. <br />
1498 /// The given font size scale value is used for multiplying the specified font size before querying fonts. <br />
1499 /// If FontSizeScale.UseSystemSetting, will use the SystemSettings.FontSize internally. <br />
1501 /// <since_tizen> 9 </since_tizen>
1502 public float FontSizeScale
1506 return (float)GetValue(FontSizeScaleProperty);
1510 SetValue(FontSizeScaleProperty, value);
1511 NotifyPropertyChanged();
1515 private float InternalFontSizeScale
1519 return fontSizeScale;
1523 float newFontSizeScale;
1525 if (fontSizeScale == value) return;
1527 fontSizeScale = value;
1528 if (fontSizeScale == Tizen.NUI.FontSizeScale.UseSystemSetting)
1530 SystemSettingsFontSize systemSettingsFontSize;
1534 systemSettingsFontSize = SystemSettings.FontSize;
1538 Console.WriteLine("{0} Exception caught.", e);
1539 systemSettingsFontSize = SystemSettingsFontSize.Normal;
1541 newFontSizeScale = TextUtils.GetFontSizeScale(systemSettingsFontSize);
1542 AddSystemSettingsFontSizeChanged();
1546 newFontSizeScale = fontSizeScale;
1547 RemoveSystemSettingsFontSizeChanged();
1550 SetInternalFontSizeScale(newFontSizeScale);
1554 private void SetInternalFontSizeScale(float fontSizeScale)
1556 Object.InternalSetPropertyFloat(this.SwigCPtr, TextLabel.Property.FontSizeScale, (float)fontSizeScale);
1561 /// The EnableFontSizeScale property.<br />
1562 /// Whether the font size scale is enabled. (The default value is true)
1564 [EditorBrowsable(EditorBrowsableState.Never)]
1565 public bool EnableFontSizeScale
1569 return (bool)GetValue(EnableFontSizeScaleProperty);
1573 SetValue(EnableFontSizeScaleProperty, value);
1574 NotifyPropertyChanged();
1578 private TextLabelSelectorData EnsureSelectorData() => selectorData ?? (selectorData = new TextLabelSelectorData());
1581 /// Downcasts a handle to textLabel handle
1583 /// <param name="handle"></param>
1584 /// <returns></returns>
1585 /// <exception cref="ArgumentNullException"> Thrown when handle is null. </exception>
1586 /// <since_tizen> 3 </since_tizen>
1587 /// Do not use this, that will be deprecated. Use as keyword instead.
1588 [Obsolete("Do not use this, that will be deprecated. Use as keyword instead. " +
1590 "BaseHandle handle = new TextLabel(\"Hello World!\"); " +
1591 "TextLabel label = handle as TextLabel")]
1592 [EditorBrowsable(EditorBrowsableState.Never)]
1593 public static TextLabel DownCast(BaseHandle handle)
1597 throw new ArgumentNullException(nameof(handle));
1599 TextLabel ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as TextLabel;
1600 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
1605 [EditorBrowsable(EditorBrowsableState.Never)]
1606 protected override void Dispose(DisposeTypes type)
1613 internalTextColor?.Dispose();
1614 internalAnchorColor?.Dispose();
1615 internalAnchorClickedColor?.Dispose();
1617 if (hasSystemLanguageChanged)
1619 systemLocaleLanguageChanged.Remove(SystemSettingsLocaleLanguageChanged);
1622 RemoveSystemSettingsFontTypeChanged();
1623 RemoveSystemSettingsFontSizeChanged();
1625 if (type == DisposeTypes.Explicit)
1628 //Release your own managed resources here.
1629 //You should release all of your own disposable objects here.
1630 selectorData?.Reset(this);
1635 if (textLabelTextFitChangedCallbackDelegate != null)
1637 TextFitChangedSignal().Disconnect(textLabelTextFitChangedCallbackDelegate);
1644 /// This will not be public opened.
1645 [EditorBrowsable(EditorBrowsableState.Never)]
1646 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
1648 Interop.TextLabel.DeleteTextLabel(swigCPtr);
1652 /// Get attribues, it is abstract function and must be override.
1654 [EditorBrowsable(EditorBrowsableState.Never)]
1655 protected override ViewStyle CreateViewStyle()
1657 return new TextLabelStyle();
1660 internal override LayoutItem CreateDefaultLayout()
1662 return new TextLabelLayout();
1666 /// Invoked whenever the binding context of the textlabel changes. Implement this method to add class handling for this event.
1668 protected override void OnBindingContextChanged()
1670 base.OnBindingContextChanged();
1673 private void SystemSettingsLocaleLanguageChanged(object sender, LocaleLanguageChangedEventArgs e)
1675 Text = NUIApplication.MultilingualResourceManager?.GetString(textLabelSid, new CultureInfo(e.Value.Replace("_", "-")));
1678 private void SystemSettingsFontSizeChanged(object sender, FontSizeChangedEventArgs e)
1680 float newFontSizeScale = TextUtils.GetFontSizeScale(e.Value);
1681 SetInternalFontSizeScale(newFontSizeScale);
1684 private void AddSystemSettingsFontSizeChanged()
1686 if (hasSystemFontSizeChanged != true)
1690 SystemFontSizeChangedManager.Add(SystemSettingsFontSizeChanged);
1691 hasSystemFontSizeChanged = true;
1695 Console.WriteLine("{0} Exception caught.", e);
1696 hasSystemFontSizeChanged = false;
1701 private void RemoveSystemSettingsFontSizeChanged()
1703 if (hasSystemFontSizeChanged == true)
1707 SystemFontSizeChangedManager.Remove(SystemSettingsFontSizeChanged);
1708 hasSystemFontSizeChanged = false;
1712 Console.WriteLine("{0} Exception caught.", e);
1713 hasSystemFontSizeChanged = true;
1718 private void SystemSettingsFontTypeChanged(object sender, FontTypeChangedEventArgs e)
1720 SetInternalFontFamily(e.Value);
1723 private void AddSystemSettingsFontTypeChanged()
1725 if (HasStyle() && !hasSystemFontTypeChanged)
1729 systemFontTypeChanged.Add(SystemSettingsFontTypeChanged);
1730 hasSystemFontTypeChanged = true;
1734 Console.WriteLine("{0} Exception caught.", e);
1735 hasSystemFontTypeChanged = false;
1740 private void RemoveSystemSettingsFontTypeChanged()
1742 if (hasSystemFontTypeChanged)
1746 systemFontTypeChanged.Remove(SystemSettingsFontTypeChanged);
1747 hasSystemFontTypeChanged = false;
1751 Console.WriteLine("{0} Exception caught.", e);
1752 hasSystemFontTypeChanged = true;
1757 private void RequestLayout()
1759 Layout?.RequestLayout();
1762 internal new class Property
1764 internal static readonly int TEXT = Interop.TextLabel.TextGet();
1765 internal static readonly int FontFamily = Interop.TextLabel.FontFamilyGet();
1766 internal static readonly int FontStyle = Interop.TextLabel.FontStyleGet();
1767 internal static readonly int PointSize = Interop.TextLabel.PointSizeGet();
1768 internal static readonly int MultiLine = Interop.TextLabel.MultiLineGet();
1769 internal static readonly int HorizontalAlignment = Interop.TextLabel.HorizontalAlignmentGet();
1770 internal static readonly int VerticalAlignment = Interop.TextLabel.VerticalAlignmentGet();
1771 internal static readonly int TextColor = Interop.TextLabel.TextColorGet();
1772 internal static readonly int EnableMarkup = Interop.TextLabel.EnableMarkupGet();
1773 internal static readonly int EnableAutoScroll = Interop.TextLabel.EnableAutoScrollGet();
1774 internal static readonly int AutoScrollSpeed = Interop.TextLabel.AutoScrollSpeedGet();
1775 internal static readonly int AutoScrollLoopCount = Interop.TextLabel.AutoScrollLoopCountGet();
1776 internal static readonly int AutoScrollGap = Interop.TextLabel.AutoScrollGapGet();
1777 internal static readonly int LineSpacing = Interop.TextLabel.LineSpacingGet();
1778 internal static readonly int RelativeLineHeight = Interop.TextLabel.RelativeLineHeightGet();
1779 internal static readonly int UNDERLINE = Interop.TextLabel.UnderlineGet();
1780 internal static readonly int SHADOW = Interop.TextLabel.ShadowGet();
1781 internal static readonly int EMBOSS = Interop.TextLabel.EmbossGet();
1782 internal static readonly int OUTLINE = Interop.TextLabel.OutlineGet();
1783 internal static readonly int PixelSize = Interop.TextLabel.PixelSizeGet();
1784 internal static readonly int ELLIPSIS = Interop.TextLabel.EllipsisGet();
1785 internal static readonly int AutoScrollStopMode = Interop.TextLabel.AutoScrollStopModeGet();
1786 internal static readonly int AutoScrollLoopDelay = Interop.TextLabel.AutoScrollLoopDelayGet();
1787 internal static readonly int LineCount = Interop.TextLabel.LineCountGet();
1788 internal static readonly int LineWrapMode = Interop.TextLabel.LineWrapModeGet();
1789 internal static readonly int TextDirection = Interop.TextLabel.TextDirectionGet();
1790 internal static readonly int VerticalLineAlignment = Interop.TextLabel.VerticalLineAlignmentGet();
1791 internal static readonly int MatchSystemLanguageDirection = Interop.TextLabel.MatchSystemLanguageDirectionGet();
1792 internal static readonly int TextFit = Interop.TextLabel.TextFitGet();
1793 internal static readonly int MinLineSize = Interop.TextLabel.MinLineSizeGet();
1794 internal static readonly int FontSizeScale = Interop.TextLabel.FontSizeScaleGet();
1795 internal static readonly int EnableFontSizeScale = Interop.TextLabel.EnableFontSizeScaleGet();
1796 internal static readonly int EllipsisPosition = Interop.TextLabel.EllipsisPositionGet();
1797 internal static readonly int Strikethrough = Interop.TextLabel.StrikethroughGet();
1798 internal static readonly int CharacterSpacing = Interop.TextLabel.CharacterSpacingGet();
1799 internal static readonly int AnchorColor = Interop.TextLabel.AnchorColorGet();
1800 internal static readonly int AnchorClickedColor = Interop.TextLabel.AnchorClickedColorGet();
1803 private void OnShadowColorChanged(float x, float y, float z, float w)
1805 ShadowColor = new Vector4(x, y, z, w);
1807 private void OnShadowOffsetChanged(float x, float y)
1809 ShadowOffset = new Vector2(x, y);
1811 private void OnTextColorChanged(float r, float g, float b, float a)
1813 TextColor = new Color(r, g, b, a);
1815 private void OnUnderlineColorChanged(float x, float y, float z, float w)
1817 UnderlineColor = new Vector4(x, y, z, w);
1819 private void OnAnchorColorChanged(float r, float g, float b, float a)
1821 AnchorColor = new Color(r, g, b, a);
1823 private void OnAnchorClickedColorChanged(float r, float g, float b, float a)
1825 AnchorClickedColor = new Color(r, g, b, a);