plushie/widget/text

Text widget builder.

Types

pub opaque type Text
pub type TextStyle {
  DefaultStyle
  PrimaryStyle
  SecondaryStyle
  SuccessStyle
  DangerStyle
  WarningStyle
}

Constructors

  • DefaultStyle
  • PrimaryStyle
  • SecondaryStyle
  • SuccessStyle
  • DangerStyle
  • WarningStyle

Values

pub fn a11y(text: Text, a: a11y.A11y) -> Text

Set accessibility properties for this widget.

pub fn align_x(text: Text, a: alignment.Alignment) -> Text

Set the horizontal alignment.

pub fn align_y(text: Text, a: alignment.Alignment) -> Text

Set the vertical alignment.

pub fn build(text: Text) -> node.Node

Build the text into a renderable Node.

pub fn color(text: Text, c: color.Color) -> Text

Set the color.

pub fn ellipsis(text: Text, e: String) -> Text

Set the text ellipsis mode.

pub fn font(text: Text, f: font.Font) -> Text

Set the font.

pub fn height(text: Text, h: length.Length) -> Text

Set the height.

pub fn line_height(text: Text, h: Float) -> Text

Set the line height.

pub fn new(id: String, content: String) -> Text

Create a new text builder.

pub fn shaping(text: Text, s: shaping.Shaping) -> Text

Set the text shaping strategy.

pub fn size(text: Text, s: Float) -> Text

Set the size.

pub fn style(text: Text, s: TextStyle) -> Text

Set the style.

pub fn width(text: Text, w: length.Length) -> Text

Set the width.

pub fn wrapping(text: Text, w: wrapping.Wrapping) -> Text

Set the text wrapping mode.

Search Document