pub struct TextBox<'a, I: ApplicationInfo = EmptyInfo> { /* private fields */ }Expand description
Widget for rendering a multi-line text box.
Implementations§
Source§impl<'a, I> TextBox<'a, I>where
I: ApplicationInfo,
impl<'a, I> TextBox<'a, I>where
I: ApplicationInfo,
Sourcepub fn style(self, style: Style) -> Self
pub fn style(self, style: Style) -> Self
Set the style to use for rendering text within the TextBoxState.
Sourcepub fn oneline(self) -> Self
pub fn oneline(self) -> Self
Force the text to render on a single line. LF and CR will be rendered as ^J and ^M respectively.
Any gutters will not be shown.
Sourcepub fn prompt(self, prompt: impl Into<Span<'a>>) -> Self
pub fn prompt(self, prompt: impl Into<Span<'a>>) -> Self
Display a prompt in the top left of the text box when focused.
Sourcepub fn left_gutter(self, lw: u16) -> Self
pub fn left_gutter(self, lw: u16) -> Self
Set the width of the left gutter.
Sourcepub fn right_gutter(self, rw: u16) -> Self
pub fn right_gutter(self, rw: u16) -> Self
Set the width of the right gutter.
Trait Implementations§
Source§impl<I> Default for TextBox<'_, I>where
I: ApplicationInfo,
impl<I> Default for TextBox<'_, I>where
I: ApplicationInfo,
Source§impl<I> StatefulWidget for TextBox<'_, I>where
I: ApplicationInfo,
impl<I> StatefulWidget for TextBox<'_, I>where
I: ApplicationInfo,
Auto Trait Implementations§
impl<'a, I> Freeze for TextBox<'a, I>
impl<'a, I> RefUnwindSafe for TextBox<'a, I>where
I: RefUnwindSafe,
impl<'a, I> Send for TextBox<'a, I>where
I: Send,
impl<'a, I> Sync for TextBox<'a, I>where
I: Sync,
impl<'a, I> Unpin for TextBox<'a, I>where
I: Unpin,
impl<'a, I> UnsafeUnpin for TextBox<'a, I>
impl<'a, I> UnwindSafe for TextBox<'a, I>where
I: UnwindSafe,
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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