Class RichText
- Namespace
- Lime
- Assembly
- Lime.dll
[TangerineNodeBuilder("BuildForTangerine")]
[TangerineAllowedChildrenTypes(new Type[] { typeof(TextStyle) })]
[TangerineVisualHintGroup("/All/Nodes/Text", null)]
public class RichText : Widget, IDisposable, IAnimatorHost, IRenderChainBuilder, IAnimable, ICloneable, IText
- Inheritance
-
RichText
- Implements
- Inherited Members
- Extension Methods
Constructors
RichText()
public RichText()
Properties
Caret
public ICaretPosition Caret { get; set; }
Property Value
DisplayText
public string DisplayText { get; }
Property Value
ErrorMessage
public string ErrorMessage { get; }
Property Value
HAlignment
[YuzuMember]
[TangerineKeyframeColor(13)]
public HAlignment HAlignment { get; set; }
Property Value
Localizable
public bool Localizable { get; set; }
Property Value
MaxDisplayCharacters
public int MaxDisplayCharacters { get; set; }
Property Value
OverflowMode
[YuzuMember]
[TangerineKeyframeColor(15)]
public TextOverflowMode OverflowMode { get; set; }
Property Value
Text
Get or sets a label upon the widget. For widgets which can not have a label returns null.
[YuzuMember]
[TangerineKeyframeColor(12)]
public override string Text { get; set; }
Property Value
TrimWhitespaces
public bool TrimWhitespaces { get; set; }
Property Value
VAlignment
[YuzuMember]
[TangerineKeyframeColor(14)]
public VAlignment VAlignment { get; set; }
Property Value
WordSplitAllowed
[YuzuMember]
[TangerineKeyframeColor(16)]
public bool WordSplitAllowed { get; set; }
Property Value
Methods
AddToRenderChain(RenderChain)
Adds widget and all its descendants to render chain.
public override void AddToRenderChain(RenderChain chain)
Parameters
chain
RenderChain
CalcNumCharacters()
public int CalcNumCharacters()
Returns
CanDisplay(char)
public bool CanDisplay(char ch)
Parameters
ch
char
Returns
Dispose()
Stops all tasks and calls Dispose of all descendants.
public override void Dispose()
Escape(string)
public static string Escape(string text)
Parameters
text
string
Returns
GetCharPair(Vector2, out (CharPosition, CharPosition))
public bool GetCharPair(Vector2 point, out (CharPosition, CharPosition) pair)
Parameters
point
Vector2pair
(CharPosition, CharPosition)
Returns
GetRenderObject()
TODO: Add summary.
protected override RenderObject GetRenderObject()
Returns
HitTest(Vector2, out TextStyle)
Make a hit test. Returns style of a text chunk a user hit to. TODO: implement more advanced system with tag attributes like ...
public bool HitTest(Vector2 point, out TextStyle style)
Parameters
Returns
Invalidate()
public void Invalidate()
MeasureText()
Returns the text's bounding box.
public Rectangle MeasureText()
Returns
OnSizeChanged(Vector2)
protected override void OnSizeChanged(Vector2 sizeDelta)
Parameters
sizeDelta
Vector2
RemoveUnusedStyles()
public void RemoveUnusedStyles()
SetLocalizeArguments(params string[])
Arguments that will be passed into Text.Localize(...)
public void SetLocalizeArguments(params string[] args)
Parameters
args
string[]
StaticScale(float, bool)
TODO: Add summary
public override void StaticScale(float ratio, bool roundCoordinates)
Parameters
Events
GlobalTextProcessor
Processes a text assigned to any RichText instance.
public static event TextProcessorDelegate GlobalTextProcessor
Event Type
Submitted
public event Action<string> Submitted
Event Type
TextProcessor
Processes a text assigned to this RichText instance.
public event TextProcessorDelegate TextProcessor