MCPcopy Create free account
hub / github.com/cogentcore/core / Text

Struct Text

core/text.go:26–42  ·  view source on GitHub ↗

Text is a widget for rendering text. It supports full HTML styling, including links. By default, text wraps and collapses whitespace, although you can change this by changing [styles.Text.WhiteSpace].

Source from the content-addressed store, hash-verified

24// including links. By default, text wraps and collapses whitespace, although
25// you can change this by changing [styles.Text.WhiteSpace].
26type Text struct {
27 WidgetBase
28
29 // Text is the text to display.
30 Text string
31
32 // Type is the styling type of text to use.
33 // It defaults to [TextBodyLarge].
34 Type TextTypes
35
36 // paintText is the [paint.Text] for the text.
37 paintText paint.Text
38
39 // normalCursor is the cached cursor to display when there
40 // is no link being hovered.
41 normalCursor cursors.Cursor
42}
43
44// TextTypes is an enum containing the different
45// possible styling types of [Text] widgets.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected