pub struct TextArea { /* private fields */ }Expand description
A block of editable text.
Build one with text_area. The area keeps the editor and the glyph
runs of the paragraphs it shows, and rebuilds the runs only when the
editor laid a paragraph out again, the area moved or scrolled, or the
resolved text color changed.
Trait Implementations§
Source§impl Widget for TextArea
impl Widget for TextArea
Source§fn semantics(&self) -> Option<Semantics>
fn semantics(&self) -> Option<Semantics>
Reports the area’s placeholder as the accessible name and its text as the accessible value.
An area with no placeholder reports no name, which leaves the announcement to the area’s surroundings.
Source§fn paint(&self, cx: &PaintCx<'_>, out: &mut Vec<PaintOp>)
fn paint(&self, cx: &PaintCx<'_>, out: &mut Vec<PaintOp>)
Appends the selection, the underline under a composing preedit, the text or the placeholder, in that order, for the paragraphs the content box shows.
Painting also records the content box, which the pointer handlers and the next edit read, and places the caret against it. An edit has placed the caret already, so this only moves it when the box itself changed, which lands one frame later like every size-driven change.
§Panics
Panics under the conditions of TextSystem::with,
or when the glyph run cache is already borrowed on this thread,
which the paint pass cannot do.