Table of Contents

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

ICaretPosition

DisplayText

public string DisplayText { get; }

Property Value

string

ErrorMessage

public string ErrorMessage { get; }

Property Value

string

HAlignment

[YuzuMember]
[TangerineKeyframeColor(13)]
public HAlignment HAlignment { get; set; }

Property Value

HAlignment

Localizable

public bool Localizable { get; set; }

Property Value

bool

MaxDisplayCharacters

public int MaxDisplayCharacters { get; set; }

Property Value

int

OverflowMode

[YuzuMember]
[TangerineKeyframeColor(15)]
public TextOverflowMode OverflowMode { get; set; }

Property Value

TextOverflowMode

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

string

TrimWhitespaces

public bool TrimWhitespaces { get; set; }

Property Value

bool

VAlignment

[YuzuMember]
[TangerineKeyframeColor(14)]
public VAlignment VAlignment { get; set; }

Property Value

VAlignment

WordSplitAllowed

[YuzuMember]
[TangerineKeyframeColor(16)]
public bool WordSplitAllowed { get; set; }

Property Value

bool

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

int

CanDisplay(char)

public bool CanDisplay(char ch)

Parameters

ch char

Returns

bool

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

string

GetCharPair(Vector2, out (CharPosition, CharPosition))

public bool GetCharPair(Vector2 point, out (CharPosition, CharPosition) pair)

Parameters

point Vector2
pair (CharPosition, CharPosition)

Returns

bool

GetRenderObject()

TODO: Add summary.

protected override RenderObject GetRenderObject()

Returns

RenderObject

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

point Vector2
style TextStyle

Returns

bool

Invalidate()

public void Invalidate()

MeasureText()

Returns the text's bounding box.

public Rectangle MeasureText()

Returns

Rectangle

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

ratio float
roundCoordinates bool

Events

GlobalTextProcessor

Processes a text assigned to any RichText instance.

public static event TextProcessorDelegate GlobalTextProcessor

Event Type

TextProcessorDelegate

Submitted

public event Action<string> Submitted

Event Type

Action<string>

TextProcessor

Processes a text assigned to this RichText instance.

public event TextProcessorDelegate TextProcessor

Event Type

TextProcessorDelegate