pub trait EditsText: Widget {
// Required methods
fn show_text(&mut self, obj: ObjId);
fn hide_text(&mut self);
fn take_edited(&mut self) -> Option<String>;
fn reset_text(&mut self, text: &str);
fn shown_text(&self) -> &str;
}Expand description
A text control a TextControl drives: it shows the text object it is
bound to and keeps the user’s edits local, for its owner to submit.
Required Methods§
Sourcefn show_text(&mut self, obj: ObjId)
fn show_text(&mut self, obj: ObjId)
Show the text object obj, reading it on every sync, and keep edits
out of the document.
Sourcefn take_edited(&mut self) -> Option<String>
fn take_edited(&mut self) -> Option<String>
The text after the user’s edits since the last call, if any.
Sourcefn reset_text(&mut self, text: &str)
fn reset_text(&mut self, text: &str)
Show text, which is not a user edit.
Sourcefn shown_text(&self) -> &str
fn shown_text(&self) -> &str
The text shown.