Class TextWidget
Assembly: Ritchie.Toolbox.dll
Syntax
public class TextWidget : Widget, IFontFamilyProvider, IInspectable, IMouseClickHandler, IMouseHandler, IUpdateThemeProperties, IAccessibleDescription
Properties
AccessibleContent
Gets a string of text representing the widget's content, in a screen-reader-friendly format.
Declaration
public string? AccessibleContent { get; }
Property Value
AllowEmoji
Declaration
public bool AllowEmoji { get; set; }
Property Value
FontFamily
Declaration
public FontFamilyInfo FontFamily { get; set; }
Property Value
FontSize
Declaration
public int? FontSize { get; set; }
Property Value
FontWeight
Declaration
public FontWeight FontWeight { get; set; }
Property Value
HasSelection
Declaration
public bool HasSelection { get; }
Property Value
ImageLocator
Gets or sets a reference to an object implementing IImageLocator for retrieving images in TextWidget markup.
Changing this property does not automatically tell extisting text widgets to re-render, you must do that yourself.
Declaration
public static IImageLocator? ImageLocator { get; set; }
Property Value
ShowMarkup
Declaration
public bool ShowMarkup { get; set; }
Property Value
Text
Declaration
public string Text { get; set; }
Property Value
TextAlignment
Declaration
public TextAlignment TextAlignment { get; set; }
Property Value
TextColor
Declaration
public Color TextColor { get; }
Property Value
TextColorOverride
Declaration
public Color? TextColorOverride { get; set; }
Property Value
UseMarkup
Declaration
public bool UseMarkup { get; set; }
Property Value
WordWrapping
Declaration
public bool WordWrapping { get; set; }
Property Value
Methods
ArrangeChildren(IGuiContext, LayoutRect)
Declaration
protected override void ArrangeChildren(IGuiContext context, LayoutRect availableSpace)
Parameters
Overrides
BeforeRender()
Declaration
protected override void BeforeRender()
Overrides
GetContentSize(Point)
Declaration
protected override Point GetContentSize(Point availableSize)
Parameters
Type |
Name |
Description |
Point |
availableSize |
|
Returns
Overrides
GetLineAtIndex(int)
Declaration
public int GetLineAtIndex(int characterIndex)
Parameters
Type |
Name |
Description |
int |
characterIndex |
|
Returns
GetLineCount()
Declaration
public int GetLineCount()
Returns
GetLineLength(int)
Declaration
public int GetLineLength(int line)
Parameters
Type |
Name |
Description |
int |
line |
|
Returns
GetLineStart(int)
Declaration
public int GetLineStart(int line)
Parameters
Type |
Name |
Description |
int |
line |
|
Returns
GetLineStartElement(int)
Declaration
public int GetLineStartElement(int line)
Parameters
Type |
Name |
Description |
int |
line |
|
Returns
GetPositionOfCharacter(int)
Declaration
public LayoutRect GetPositionOfCharacter(int characterIndex)
Parameters
Type |
Name |
Description |
int |
characterIndex |
|
Returns
Inspect(IInspector)
Declaration
public override void Inspect(IInspector inspector)
Parameters
Overrides
OnMouseClick(MouseButtonEvent)
Declaration
public void OnMouseClick(MouseButtonEvent e)
Parameters
RebuildGeometry(GeometryHelper)
Declaration
protected override void RebuildGeometry(GeometryHelper geometry)
Parameters
Overrides
SelectAll()
Declaration
SelectNone()
Declaration
SetSelection(int, int)
Declaration
public void SetSelection(int start, int count)
Parameters
Type |
Name |
Description |
int |
start |
|
int |
count |
|
TryFindLink(Point, out string?)
Declaration
public bool TryFindLink(Point position, out string? linkId)
Parameters
Type |
Name |
Description |
Point |
position |
|
string |
linkId |
|
Returns
UpdateThemeProperties()
Retrieves layout properties from the visual style. Called by the UI system on every
frame before layout updates occur. If layout properties change during this method call,
the widget will automatically invalidate its own layout.
Declaration
public void UpdateThemeProperties()
Events
LInkClicked
Declaration
public event Action<string>? LInkClicked
Event Type
Implements
Extension Methods