Struct TextInputProps
pub struct TextInputProps {
pub value: Bound<String>,
pub placeholder: Option<String>,
pub lines: Option<i64>,
pub title: bool,
pub enabled: bool,
pub autofocus: bool,
pub changed_by: Option<Person>,
pub previous: Option<String>,
pub entry: bool,
pub key: Option<String>,
pub submit: Event,
}Expand description
A field to type text into, bound to the text it edits. Each edit is spliced into that text, never written over it, so people typing in the same text at once all keep what they typed.
Fields§
§value: Bound<String>The text it edits.
placeholder: Option<String>What to type, shown while it is empty.
lines: Option<i64>Room for this many lines: the field wraps and grows with what is typed.
title: boolThe title of the document the window is for, edited in place as its large title.
enabled: boolWhether it can be typed into now.
autofocus: boolIt is where the person types next (an entry a command just opened): it takes the keyboard as soon as it is in the window, once.
changed_by: Option<Person>Someone else changed the text and the person has not seen it yet: the field takes their colour. The host sets it, from what the field is bound to (task-legibility §3).
previous: Option<String>What the text was before that change, said when the field is hovered.
entry: boolThe entry at the end of a list: what is typed makes an item when Enter or leaving the field commits it, and the field clears; nothing typed leaves nothing (Escape, or leaving it empty). Its own draft, not a record: the item exists once it is committed.
key: Option<String>The plain key that focuses this control while its window has the keyboard, as the app
declared it (key: "Ctrl+N"): a window’s primary action brings the person to the list’s
entry rather than making an empty item. Never drawn here.
submit: EventEnter was pressed: what was typed is done (a list’s entry), carried with it. With it, Enter ends the text rather than breaking its line; Shift+Enter still breaks a wrapping field’s line.
Trait Implementations§
§impl Component for TextInputProps
impl Component for TextInputProps
fn describe() -> Description
§fn from_source(source: &mut dyn Source) -> Result<TextInputProps, Error>
fn from_source(source: &mut dyn Source) -> Result<TextInputProps, Error>
source gives. Read more§impl Default for TextInputProps
impl Default for TextInputProps
§fn default() -> TextInputProps
fn default() -> TextInputProps
Auto Trait Implementations§
impl Freeze for TextInputProps
impl !RefUnwindSafe for TextInputProps
impl !Send for TextInputProps
impl !Sync for TextInputProps
impl Unpin for TextInputProps
impl UnsafeUnpin for TextInputProps
impl !UnwindSafe for TextInputProps
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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.§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.§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.§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.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§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>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§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.§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.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more