pub struct EditOptions {
pub style: TextStyle,
pub multiline: bool,
pub wrap: bool,
pub autofocus: bool,
pub accent: Option<Color>,
}Expand description
How a text_edit node behaves: its text style, whether it is a
single-line field or a multiline document, and how it takes focus and
paints its selection. Build one with struct update syntax from
Default.
Fields§
§style: TextStyle§multiline: boolA document rather than a field: Enter inserts a newline, the text wraps to the box, and the caret opens at the top.
wrap: boolA single-line editor that folds to its width, by style.wrap, the
way a document does — instead of taking one line and scrolling it
under the caret. Its keyboard is still a field’s:
Enter submits, a newline is never admitted, the caret opens at the
end. In the bindings this is the wrap row being declared on the
element; off, a field does not read style.wrap at all. A
multiline editor wraps either way and ignores this.
autofocus: boolTakes keyboard focus on the frame this declaration starts — a new editor, one back after a gap, one whose flag just turned on — and only while nothing holds focus: never from a focused control, and never again after a blur.
accent: Option<Color>Selection highlight color. None is the theme’s selection,
which is what a field gets unless the caller says otherwise — so a
selection over a label and one over a field are the same tint on
both bases.
Trait Implementations§
Source§impl Clone for EditOptions
impl Clone for EditOptions
Source§fn clone(&self) -> EditOptions
fn clone(&self) -> EditOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EditOptions
impl Debug for EditOptions
Source§impl Default for EditOptions
impl Default for EditOptions
Source§fn default() -> EditOptions
fn default() -> EditOptions
Auto Trait Implementations§
impl Freeze for EditOptions
impl RefUnwindSafe for EditOptions
impl Send for EditOptions
impl Sync for EditOptions
impl Unpin for EditOptions
impl UnsafeUnpin for EditOptions
impl UnwindSafe for EditOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.