Trait Text
pub trait Text {
// Required methods
fn text(&self) -> Cow<'_, str>;
fn select(&mut self, start: Point, end: Point, target: Target);
fn select_all(&mut self);
fn deselect(&mut self);
fn copy(&mut self) -> Option<String>;
}Available on crate feature
advanced only.Expand description
The internal state of a widget that has text.
Required Methods§
fn select(&mut self, start: Point, end: Point, target: Target)
fn select(&mut self, start: Point, end: Point, target: Target)
Selects text between the given positions in layout coordinates.
start is the position where the user started selecting from,
while end is the final position of the selection.
fn select_all(&mut self)
fn select_all(&mut self)
Selects all the text of the widget.
fn deselect(&mut self)
fn deselect(&mut self)
Deselects any selected text;