Modules§
- cmd
- Commands that control the editable text.
- icon
- Glyph icon widget, properties and nodes.
- node
- UI nodes used for building a text widget.
Macros§
Structs§
- Auto
Selection - Defines when text is auto-selected on focus.
- Caret
Status - Display info of edit caret position.
- Change
Stop Args - Arguments for
on_change_stop
. - Font
Features Mix m
Advanced font config, features, kerning, variations and more.- FontMix
m
Basic text font properties.- LangMix
m
Language and text direction properties.- Paragraph
Mix m
Text paragraph properties.- Selection
Toolbar Args - Arguments for
selection_toolbar_fn
. - Selection
Toolbar Mix m
Selection toolbar properties.- Text
W
A configured text run.- Text
Align Mix m
Text align, justify.- Text
Decoration Mix m
Text underline, overline and strikethrough lines.- Text
Edit Mix m
Text edit properties.- Text
Fill Mix m
Text color properties.- Text
Inspect Mix m
Properties that probes various state from the text widget.- Text
Spacing Mix m
Text spacing properties.- Text
Transform Mix m
Text transform properties.- Text
Wrap Mix m
Text wrap, hyphenation.- Underline
Skip - Represents what parts of a text the underline must skip over.
Enums§
- Caret
Shape - Defines the position of an interactive caret in relation to the selection.
- Change
Stop Cause - Cause of an
on_change_stop
. - Interactive
Caret Mode - Defines when the interactive carets are used.
- Lines
Wrap Count - Represents the number of lines and number of wrap lines in a text.
- Text
Overflow - Defines how text overflow is handled by the text widgets.
- Underline
Position - Defines what line gets traced by the text underline decoration.
Statics§
- ACCEPTS_
ENTER_ VAR - Accepts
'\n'
input when editable. - ACCEPTS_
TAB_ VAR - Accepts
'\t'
input when editable. - AUTO_
SELECTION_ VAR - Auto selection on keyboard focus.
- CARET_
COLOR_ VAR - Caret color, inherits from
FONT_COLOR_VAR
. - CHANGE_
STOP_ DELAY_ VAR - Debounce time for change stop.
- FONT_
AA_ VAR - Font anti-aliasing of
Text!
spans. - FONT_
COLOR_ VAR - Color of
Text!
glyphs that are not colored by palette. - FONT_
FAMILY_ VAR - Font family of
Text!
spans. - FONT_
FEATURES_ VAR - Font features of
Text!
spans. - FONT_
PALETTE_ COLORS_ VAR - Overrides of specific colors in the selected colored glyph palette.
- FONT_
PALETTE_ VAR - Color of
Text!
glyphs that are colored by palette, mostly Emoji. - FONT_
SIZE_ VAR - Font size of
Text!
spans. - FONT_
STRETCH_ VAR - Font stretch of
Text!
spans. - FONT_
STYLE_ VAR - Font style of
Text!
spans. - FONT_
SYNTHESIS_ VAR - Font synthesis of
Text!
spans. - FONT_
VARIATIONS_ VAR - Font variations of
Text!
spans. - FONT_
WEIGHT_ VAR - Font weight of
Text!
spans. - HYPHENS_
VAR - Text hyphenation config.
- HYPHEN_
CHAR_ VAR - Hyphen text rendered when auto-hyphenating.
- IME_
UNDERLINE_ STYLE_ VAR - Underline style for the IME preview underline.
- IME_
UNDERLINE_ THICKNESS_ VAR - Underline thickness for the IME preview underline.
- INTERACTIVE_
CARET_ VAR - Interactive caret mode.
- INTERACTIVE_
CARET_ VISUAL_ VAR - Interactive caret visual.
- JUSTIFY_
MODE_ VAR - Text justify mode when text align is fill.
- LETTER_
SPACING_ VAR - Extra letter spacing of
Text!
spans. - LINE_
BREAK_ VAR - Configuration of line breaks in Chinese, Japanese, or Korean text.
- LINE_
HEIGHT_ VAR - Text line height of
Text!
spans. - LINE_
SPACING_ VAR - Extra spacing in between lines of
Text!
spans. - MAX_
CHARS_ COUNT_ VAR - Maximum number of characters that can be input.
- OBSCURE_
TXT_ VAR - If text characters are replaced with
OBSCURING_CHAR_VAR
for rendering. - OBSCURING_
CHAR_ VAR - Replacement character used when obscuring text.
- OVERLINE_
COLOR_ VAR - Overline color, inherits from
FONT_COLOR_VAR
. - OVERLINE_
STYLE_ VAR - Overline style.
- OVERLINE_
THICKNESS_ VAR - Overline thickness.
- PARAGRAPH_
SPACING_ VAR - Extra paragraph spacing of text blocks.
- SELECTION_
COLOR_ VAR - Selection background color.
- SELECTION_
TOOLBAR_ ANCHOR_ VAR - Position the selection toolbar in relation to the bounding box of all selection rectangles.
- SELECTION_
TOOLBAR_ FN_ VAR - Selection toolbar function.
- STRIKETHROUGH_
COLOR_ VAR - Strikethrough color, inherits from
FONT_COLOR_VAR
. - STRIKETHROUGH_
STYLE_ VAR - Strikethrough style.
- STRIKETHROUGH_
THICKNESS_ VAR - Strikethrough thickness.
- TAB_
LENGTH_ VAR - Length of the
TAB
space. - TEXT_
ALIGN_ VAR - Text alignment inside the available space.
- TEXT_
EDITABLE_ VAR - Text is editable.
- TEXT_
OVERFLOW_ ALIGN_ VAR - Text alignment inside the available space when it overflows.
- TEXT_
OVERFLOW_ VAR - Text overflow handling.
- TEXT_
SELECTABLE_ VAR - Text is selectable.
- TEXT_
TRANSFORM_ VAR - Text transformation function applied to
Text!
spans. - TEXT_
WRAP_ VAR - If line breaks are automatically inserted to fill the available space.
- TXT_
PARSE_ LIVE_ VAR - If text parse updated for every text change.
- UNDERLINE_
COLOR_ VAR - Underline color, inherits from
FONT_COLOR_VAR
. - UNDERLINE_
POSITION_ VAR - Position of the underline.
- UNDERLINE_
SKIP_ VAR - Parts of text skipped by underline.
- UNDERLINE_
STYLE_ VAR - Underline style.
- UNDERLINE_
THICKNESS_ VAR - Underline thickness.
- WHITE_
SPACE_ VAR - Text white space transform of
Text!
spans. - WORD_
BREAK_ VAR - Configuration of line breaks inside words during text wrap.
- WORD_
SPACING_ VAR - Extra word spacing of
Text!
spans.
Traits§
- TxtParse
Value - Represents a type that can be a var value, parse and display.
Functions§
- accepts_
enter P
If the'\n'
character is inserted when enter is pressed and the text is editable.- accepts_
tab P
If the'\t'
character is inserted when tab is pressed and the text is editable.- auto_
selection P
Auto-selection on focus when the text is selectable.- caret_
color P
Defines the color of the non-interactive caret.- change_
stop_ delay P
Debounce time foron_change_stop
.- direction
P
Sets the layout direction used in the layout of the widget and descendants.- font_aa
P
Configure the anti-aliasing used to render text glyphs inside the widget.- font_
annotation P
Sets the font annotation alternative feature.- font_
caps P
Sets the font capital variant features.- font_
char_ variant P
Sets the font character variant alternative feature.- font_
cn_ variant P
Sets the Chinese logographic set.- font_
color P
Defines the color the most text glyphs are filled with.- font_
common_ lig P
Sets the font common ligatures features.- font_
contextual_ alt P
Sets the font contextual alternatives feature.- font_
discretionary_ lig P
Sets the font discretionary ligatures feature.- font_
ea_ width P
Sets the East Asian figure width.- font_
family P
Font family name or list of names for texts in this widget or descendants.- font_
features P
Sets font features.- font_
historical_ forms P
Sets the font historical forms alternative feature.- font_
historical_ lig P
Sets the font historical ligatures feature.- font_
jp_ variant P
Sets the Japanese logographic set.- font_
kerning P
Sets the font kerning feature.- font_
num_ fraction P
Sets the font numeric fraction features.- font_
num_ spacing P
Sets the font numeric spacing features.- font_
numeric P
Sets the font numeric variant features.- font_
ornaments P
Sets the font ornaments alternative feature.- font_
palette P
Defines the palette used to render colored glyphs (Emoji).- font_
palette_ colors P
Defines custom palette colors that affect Emoji colors.- font_
position P
Sets the font sub/super script position alternative feature.- font_
size P
Sets the font size for the widget and descendants.- font_
stretch P
Defines how condensed or expanded the preferred font should be.- font_
style P
Defines the skew style of the font glyphs.- font_
style_ set P
Sets the font stylistic set alternative feature.- font_
stylistic P
Sets the font stylistic alternative feature.- font_
swash P
Sets the font swash features.- font_
synthesis P
Configure if a synthetic font is generated for fonts that do not implement bold or oblique variants.- font_
variations P
Sets font variations.- font_
weight P
Defines the thickness or boldness the preferred font should have.- get_
caret_ index P
Gets the caret char index, if the text is editable.- get_
caret_ status P
Gets the caret display status, if the text is editable.- get_
chars_ count P
Gets the number of character in the text.- get_
font_ use P
Gets a vector of font and ranges.- get_
lines_ len P
Gets the number of lines in the text, including wrap lines.- get_
lines_ wrap_ count P
Gets the number of wrap lines per text lines.- get_
overflow P
Gets the overflow text, that is a clone of the text starting from the first overflow character.- hyphen_
char P
The char or small string that is rendered when text is auto-hyphenated.- hyphens
P
Configure hyphenation.- ime_
underline P
Style and thickness of the line drawn under the IME preview text.- interactive_
caret P
Defines when the interactive carets are used.- interactive_
caret_ visual P
Defines custom caret visual for interactive caret.- is_
line_ overflown P
Gets if the text has an entire line overflown.- is_
overflown P
Gets if the text is overflown.- is_
parse_ pending P
If text has changed buttxt_parse
has not tried to parse the new text yet.- justify_
mode P
Config the automatic spacing inserted between words and letters when text is aligned to fill.- lang
P
Sets the text language and script for the widget and descendants.- letter_
spacing P
Extra spacing added in between text letters. If not set inherits theletter_spacing
from the parent widget.- line_
break P
Configuration of text wrapping for Chinese, Japanese, or Korean text.- line_
height P
Height of each text line. If not set inherits theline_height
from the parent widget.- line_
spacing P
Extra spacing in-between text lines. If not set inherits theline_spacing
from the parent widget.- max_
chars_ count P
Maximum number of characters that can be input.- obscure_
txt P
If the typed text is obscured in render.- obscuring_
char P
Replacement character used when obscuring text.- on_
change_ stop P
Called after the text changed and interaction has stopped.- overline
P
Draw lines above each text line.- overline_
color P
Customoverline
color, if not set thefont_color
is used.- paragraph_
spacing P
Extra spacing in-between paragraphs.- selection_
color P
Sets theSELECTION_COLOR_VAR
.- selection_
toolbar P
Defines the floating mini-toolbar that shows near a new text selection.- selection_
toolbar_ anchor P
Position the selection toolbar in relation to the bounding box of all selection rectangles.- selection_
toolbar_ fn P
Defines the floating mini-toolbar that shows near a new text selection.- strikethrough
P
Draw lines across each text line.- strikethrough_
color P
Customstrikethrough
color, if not set thefont_color
is used.- tab_
length P
Length of the TAB character space, relative to the normal space advance.- txt
c
The text string.- txt_
align P
Alignment of text inside available space.- txt_
editable P
Enable text caret, input and makes the widget focusable.- txt_
highlight P
Highlight a text range.- txt_
overflow P
Defines if text overflow is truncated, with optional suffix append.- txt_
overflow_ align P
Alignment of text inside available space when the text overflows.- txt_
parse P
Value that is parsed from the text and displayed as the text.- txt_
parse_ live P
Iftxt_parse
tries to parse after any text change immediately.- txt_
parse_ on_ stop P
Shorthand property, disables live parsing and parse on change stop.- txt_
selectable P
Enable text selection, copy and makes the widget focusable.- txt_
transform P
Text transform, character replacement applied to the text before it is processed by the text widget.- txt_
wrap P
Enables or disables text wrap.- underline
P
Draw lines under each text line.- underline_
color P
Customunderline
color, if not set thefont_color
is used.- underline_
position P
Defines what font line gets traced by the underline.- underline_
skip P
Defines what segments of each text line are skipped when tracing theunderline
.- white_
space P
Text white space transform.- with_
font_ feature - Include the font feature config in the widget context.
- with_
font_ palette_ color - Set the palette color in the font palette colors.
- with_
font_ variation - Includes the font variation config in the widget context.
- word_
break P
Configure line breaks inside words during text wrap.- word_
spacing P
Extra spacing added to the UnicodeU+0020 SPACE
character. If not set inherits theword_spacing
from the parent widget.