Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RichTextLabel ¶ added in v0.3.0
type RichTextLabel struct {
// Face defines the text style.
Font font.Font
// Text is the content displayed by the label.
Text string
// TextSize determines the size of the text glyphs.
TextSize unit.Sp
// Alignment specifies the text alignment.
Alignment text.Alignment
// WrapPolicy configures how displayed text will be broken into lines.
WrapLine bool
// LineHeight controls the distance between the baselines of lines of text.
// If zero, a sensible default will be used.
LineHeight unit.Sp
// LineHeightScale applies a scaling factor to the LineHeight. If zero, a
// sensible default will be used.
LineHeightScale float32
// contains filtered or unexported fields
}
RichTextLabel is a widget for laying out and drawing rich text.
func (*RichTextLabel) Layout ¶ added in v0.3.0
func (l *RichTextLabel) Layout(gtx layout.Context) layout.Dimensions
Layout the label with the given shaper, font, size, text, and material, returning metadata about the shaped text.
func (*RichTextLabel) SetColorScheme ¶ added in v0.3.0
func (l *RichTextLabel) SetColorScheme(cs *syntax.ColorScheme)
func (*RichTextLabel) SetText ¶ added in v0.3.0
func (l *RichTextLabel) SetText(text string, textStyles []syntax.Token, decorations []decoration.Decoration)
func (*RichTextLabel) Update ¶ added in v0.3.0
func (l *RichTextLabel) Update(gtx layout.Context)
Click to show internal directories.
Click to hide internal directories.