pub struct TextAreaStyle {
pub focused_border: Color,
pub unfocused_border: Color,
pub disabled_border: Color,
pub text_fg: Color,
pub cursor_fg: Color,
pub placeholder_fg: Color,
pub line_number_fg: Color,
pub current_line_bg: Option<Color>,
pub show_line_numbers: bool,
}Expand description
Configuration for textarea appearance.
Fields§
§focused_border: ColorBorder color when focused.
unfocused_border: ColorBorder color when unfocused.
disabled_border: ColorBorder color when disabled.
text_fg: ColorText foreground color.
cursor_fg: ColorCursor color.
placeholder_fg: ColorPlaceholder text color.
line_number_fg: ColorLine number foreground color.
current_line_bg: Option<Color>Current line background highlight (optional).
show_line_numbers: boolWhether to show line numbers.
Implementations§
Source§impl TextAreaStyle
impl TextAreaStyle
Sourcepub fn focused_border(self, color: Color) -> Self
pub fn focused_border(self, color: Color) -> Self
Set the focused border color.
Sourcepub fn unfocused_border(self, color: Color) -> Self
pub fn unfocused_border(self, color: Color) -> Self
Set the unfocused border color.
Sourcepub fn disabled_border(self, color: Color) -> Self
pub fn disabled_border(self, color: Color) -> Self
Set the disabled border color.
Sourcepub fn placeholder_fg(self, color: Color) -> Self
pub fn placeholder_fg(self, color: Color) -> Self
Set the placeholder color.
Sourcepub fn line_number_fg(self, color: Color) -> Self
pub fn line_number_fg(self, color: Color) -> Self
Set the line number color.
Sourcepub fn current_line_bg(self, color: Option<Color>) -> Self
pub fn current_line_bg(self, color: Option<Color>) -> Self
Set the current line background highlight.
Sourcepub fn show_line_numbers(self, show: bool) -> Self
pub fn show_line_numbers(self, show: bool) -> Self
Enable or disable line numbers.
Trait Implementations§
Source§impl Clone for TextAreaStyle
impl Clone for TextAreaStyle
Source§fn clone(&self) -> TextAreaStyle
fn clone(&self) -> TextAreaStyle
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TextAreaStyle
impl Debug for TextAreaStyle
Auto Trait Implementations§
impl Freeze for TextAreaStyle
impl RefUnwindSafe for TextAreaStyle
impl Send for TextAreaStyle
impl Sync for TextAreaStyle
impl Unpin for TextAreaStyle
impl UnwindSafe for TextAreaStyle
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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