[go: up one dir, main page]

Module text

Module text 

Source
Expand description

Editing and displaying text.

Structs§

AttributeSpans
A collection of spans of attributes of various kinds.
AttributesAdder
Adds Attributes to the text.
EditSession
Editable text state.
EnvUpdateCtx
Provides information about keys change for more fine grained invalidation
FontDescriptor
A collection of attributes that describe a font.
FontFamily
A reference to a font family.
FontWeight
A font weight, represented as a value in the range 1..=1000.
LayoutMetrics
Metrics describing the layout text.
Link
A clickable range of text with an associated Command.
ParseFormatter
A naive Formatter for types that implement FromStr.
RichText
Text with optional style spans.
RichTextBuilder
A builder for creating RichText objects.
Selection
A range of selected text, or a caret.
StringCursor
A cursor type that implements EditableTextCursor for String
TextComponent
A widget that accepts text input.
TextLayout
A component for displaying text on screen.
Validation
The result of a Formatter attempting to validate some partial input.
ValidationError
An error returned by a Formatter when it cannot parse input.

Enums§

Affinity
Distinguishes between two visually distinct locations with the same byte index.
Attribute
Attributes that can be applied to text.
Direction
Indicates a horizontal direction in the text.
FontStyle
A font style, which may be italic or regular.
ImeInvalidation
An event representing an application-initiated change in InputHandler state.
Movement
Indicates a movement that transforms a particular text position in a document.
TextAction
A special text editing command sent from the platform to the application.
TextAlignment
The alignment of text in a TextLayout.
VerticalMovement
Indicates a vertical movement in a text document.
WritingDirection
Indicates a horizontal direction for writing text.

Traits§

EditableText
An EditableText trait.
EditableTextCursor
A cursor with convenience functions for moving through EditableText.
Formatter
A trait for types that create, interpret, and validate textual representations of values.
ImeHandlerRef
A trait for input handlers registered by widgets.
InputHandler
A lock on a text field that allows the platform to retrieve state and make edits.
TextStorage
A type that represents text that can be displayed.

Functions§

movement
Compute the result of a Movement on a Selection.
offset_for_delete_backwards
Calculate resulting offset for a backwards delete.

Type Aliases§

ArcStr
A reference counted string slice.