pub struct Textarea {
pub states: TextareaStates,
/* private fields */
}Expand description
Fields§
§states: TextareaStatesImplementations§
Source§impl Textarea
impl Textarea
Sourcepub fn foreground(self, fg: Color) -> Self
pub fn foreground(self, fg: Color) -> Self
Set the main foreground color. This may get overwritten by individual text styles.
Sourcepub fn background(self, bg: Color) -> Self
pub fn background(self, bg: Color) -> Self
Set the main background color. This may get overwritten by individual text styles.
Sourcepub fn modifiers(self, m: TextModifiers) -> Self
pub fn modifiers(self, m: TextModifiers) -> Self
Set the main text modifiers. This may get overwritten by individual text styles.
Sourcepub fn style(self, style: Style) -> Self
pub fn style(self, style: Style) -> Self
Set the main style. This may get overwritten by individual text styles.
This option will overwrite any previous foreground, background and modifiers!
Sourcepub fn inactive(self, s: Style) -> Self
pub fn inactive(self, s: Style) -> Self
Set a custom style for the border when the component is unfocused.
Sourcepub fn step(self, step: usize) -> Self
pub fn step(self, step: usize) -> Self
Set the scroll stepping to use on Cmd::Scroll(Direction::Up) or Cmd::Scroll(Direction::Down).
Sourcepub fn highlight_str<S: Into<LineStatic>>(self, s: S) -> Self
pub fn highlight_str<S: Into<LineStatic>>(self, s: S) -> Self
Set the Symbol and Style for the indicator of the current line.
Sourcepub fn text_rows<T>(self, text: impl IntoIterator<Item = T>) -> Selfwhere
T: Into<LineStatic>,
pub fn text_rows<T>(self, text: impl IntoIterator<Item = T>) -> Selfwhere
T: Into<LineStatic>,
Set the Text content via a array or iterator.
§Example
Sourcepub fn text(self, text: impl Into<TextStatic>) -> Self
pub fn text(self, text: impl Into<TextStatic>) -> Self
Set the Text content via a single struct.
§Example
Trait Implementations§
Source§impl Component for Textarea
impl Component for Textarea
Source§fn view(&mut self, render: &mut Frame<'_>, area: Rect)
fn view(&mut self, render: &mut Frame<'_>, area: Rect)
Based on the current properties and states, renders the component in the provided area frame.
Render can also mutate the component state if this is required
Source§fn query<'a>(&'a self, attr: Attribute) -> Option<QueryResult<'a>>
fn query<'a>(&'a self, attr: Attribute) -> Option<QueryResult<'a>>
Query attribute of component properties. Read more
Auto Trait Implementations§
impl Freeze for Textarea
impl !RefUnwindSafe for Textarea
impl Send for Textarea
impl Sync for Textarea
impl Unpin for Textarea
impl UnsafeUnpin for Textarea
impl !UnwindSafe for Textarea
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