Expand description
Text widgets display information through writing.
Keyboard shortcuts (applies to both Text and Rich):
| MacOS | Linux/Windows | Effect |
|---|---|---|
Cmd + A | Ctrl + A | Selects all text in the currently focused paragraph |
Cmd + C | Ctrl + C | Copies the selected text to clipboard |
Shift + Left Arrow | Shift + Left Arrow | Moves the selection to the left by one character |
Shift + Right Arrow | Shift + Right Arrow | Moves the selection to the right by one character |
Shift + Opt + Left Arrow | Shift + Ctrl + Left Arrow | Extends the selection to the previous start of a word |
Shift + Opt + Right Arrow | Shift + Ctrl + Right Arrow | Extends the selection to the next end of a word |
Shift + HomeShift + Cmd + Left ArrowShift + Opt + Up Arrow | Shift + HomeShift + Ctrl + Up Arrow | Selects to the beginning of the line |
Shift + EndShift + Cmd + Right ArrowShift + Opt + Down Arrow | Shift + EndShift + Ctrl + Down Arrow | Selects to the end of the line |
Shift + Up Arrow | Shift + Up Arrow | Moves the selection up by one line if possible, or to the start of the current line otherwise |
Shift + Down Arrow | Shift + Down Arrow | Moves the selection down by one line if possible, or to the end of the current line otherwise |
Shift + Opt + HomeShift + Cmd + Up Arrow | Shift + Ctrl + Home | Selects to the beginning of the paragraph |
Shift + Opt + EndShift + Cmd + Down Arrow | Shift + Ctrl + End | Selects to the end of the paragraph |
Structs§
- Rich
- A bunch of
Richtext. - Span
- A span of text.
- State
- The internal state of a
Textwidget. - Style
- The appearance of some text.
- Text
- A bunch of text.
Enums§
- Dragging
- The type of dragging selection.
Traits§
- Catalog
- The theme catalog of a
Text. - Highlighter
- A type capable of highlighting text.
- Into
Fragment - A trait for converting a value to some text
Fragment.
Functions§
- default
- The default text styling; color is inherited.
- draw
- Draws text using the same logic as the
Textwidget. - layout
- Produces the
layout::Nodeof aTextwidget.