TextComponent

Description

abstract class Tinman.Engine.GUI.Components.TextComponent

Derived from

Component abstract
ITextProperty

Extended by

InputField
LabelView sealed

Abstract base class for components that display textual content.

The Component.ComputeLayoutSize method computes the layout width as the maximum measured width of ITextProperty.Text and TextMeasure using IPixelFontInfo.Measure. The layout height is computed using IPixelFontInfo.PaddingCompact.

The Component.ComputeLayoutBaseline method computes the baseline as the sum of IPixelFontInfo.Ascent and IPixelFontInfo.PaddingOffset, i.e. subclasses may use the anchor Anchor.TopLeft at coordinates (0; textOffset).

Public / Attributes

Text​Measure


public attribute TextMeasure → (get,set)

value : string

The layout width measurement string or null.

Optional string value to use for computing the width.

Protected / Constructors

Text​Component


protected constructor TextComponent → ()

Creates a new instance of TextComponent.

Protected / Methods

Text​Changed


[EmptyBody]
protected virtual method TextChanged → ()

This method is called each time the ITextProperty.Text value has changed.

Protected / Attributes

text​Offset


protected attribute textOffset → (int32)

The text render offset, computed by Component.ComputeLayoutSize.