Table of Contents

Class SimpleText

Namespace
Lime
Assembly
Lime.dll
[TangerineVisualHintGroup("/All/Nodes/Text", null)]
public class SimpleText : Widget, IDisposable, IAnimatorHost, IRenderChainBuilder, IAnimable, ICloneable, IText
Inheritance
SimpleText
Implements
Derived
Inherited Members
Extension Methods

Constructors

SimpleText()

public SimpleText()

Properties

Caret

public ICaretPosition Caret { get; set; }

Property Value

ICaretPosition

DisplayText

public string DisplayText { get; }

Property Value

string

EffectiveMaxSize

public override Vector2 EffectiveMaxSize { get; }

Property Value

Vector2

EffectiveMinSize

public override Vector2 EffectiveMinSize { get; }

Property Value

Vector2

Font

[YuzuMember]
[TangerineKeyframeColor(29)]
public SerializableFont Font { get; set; }

Property Value

SerializableFont

FontHeight

[YuzuMember]
[TangerineKeyframeColor(31)]
[Validation.Range(0, 3.4028235E+38)]
public float FontHeight { get; set; }

Property Value

float

ForceUncutText

[YuzuMember]
public bool ForceUncutText { get; set; }

Property Value

bool

GradientMapIndex

[YuzuMember]
public int GradientMapIndex { get; set; }

Property Value

int

HAlignment

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

Property Value

HAlignment

LetterSpacing

[YuzuMember]
[TangerineKeyframeColor(7)]
public float LetterSpacing { get; set; }

Property Value

float

Localizable

public bool Localizable { get; set; }

Property Value

bool

OverflowMode

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

Property Value

TextOverflowMode

RenderMode

public TextRenderingMode RenderMode { get; set; }

Property Value

TextRenderingMode

Spacing

[YuzuMember]
[TangerineKeyframeColor(1)]
public float Spacing { get; set; }

Property Value

float

Text

Get or sets a label upon the widget. For widgets which can not have a label returns null.

[YuzuMember]
[TangerineKeyframeColor(30)]
public override string Text { get; set; }

Property Value

string

TextColor

[YuzuMember]
[TangerineKeyframeColor(6)]
public Color4 TextColor { get; set; }

Property Value

Color4

TrimWhitespaces

public bool TrimWhitespaces { get; set; }

Property Value

bool

VAlignment

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

Property Value

VAlignment

WordSplitAllowed

[YuzuMember]
[TangerineKeyframeColor(5)]
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

CanDisplay(char)

public bool CanDisplay(char ch)

Parameters

ch char

Returns

bool

FitTextInsideWidgetArea(float)

Changes FontHeight and Spacing to make the text inside widget's area.

public void FitTextInsideWidgetArea(float minFontHeight = 10)

Parameters

minFontHeight float

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

Invalidate()

public void Invalidate()

MeasureText()

Gets the text's bounding box.

public Rectangle MeasureText()

Returns

Rectangle

MeasureUncutText()

public Vector2 MeasureUncutText()

Returns

Vector2

OnSizeChanged(Vector2)

protected override void OnSizeChanged(Vector2 sizeDelta)

Parameters

sizeDelta Vector2

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 SimpleText 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 SimpleText instance.

public event TextProcessorDelegate TextProcessor

Event Type

TextProcessorDelegate