Struct rat_widget::textarea::RTextArea
source · pub struct RTextArea<'a> { /* private fields */ }Implementations§
source§impl<'a> RTextArea<'a>
impl<'a> RTextArea<'a>
pub fn new() -> Self
sourcepub fn styles(self, style: TextAreaStyle) -> Self
pub fn styles(self, style: TextAreaStyle) -> Self
Set the combined style.
sourcepub fn focus_style(self, style: Style) -> Self
pub fn focus_style(self, style: Style) -> Self
Style when focused.
sourcepub fn select_style(self, style: Style) -> Self
pub fn select_style(self, style: Style) -> Self
Style for selection
sourcepub fn text_style<T: IntoIterator<Item = Style>>(self, styles: T) -> Self
pub fn text_style<T: IntoIterator<Item = Style>>(self, styles: T) -> Self
List of text-styles.
Use rat_input::textarea::TextAreaState::add_style() to refer a text range to one of these styles.
pub fn block(self, block: Block<'a>) -> Self
Trait Implementations§
source§impl<'a> ScrollingWidget<RTextAreaState> for RTextArea<'a>
impl<'a> ScrollingWidget<RTextAreaState> for RTextArea<'a>
source§fn need_scroll(&self, area: Rect, state: &mut RTextAreaState) -> (bool, bool)
fn need_scroll(&self, area: Rect, state: &mut RTextAreaState) -> (bool, bool)
Widget wants a (horizontal, vertical) scrollbar.
This gets combined with the ScrollbarPolicy.
source§impl<'a> StatefulWidget for RTextArea<'a>
impl<'a> StatefulWidget for RTextArea<'a>
source§impl<'a> StatefulWidgetRef for RTextArea<'a>
impl<'a> StatefulWidgetRef for RTextArea<'a>
§type State = RTextAreaState
type State = RTextAreaState
State associated with the stateful widget. Read more
Auto Trait Implementations§
impl<'a> Freeze for RTextArea<'a>
impl<'a> RefUnwindSafe for RTextArea<'a>
impl<'a> Send for RTextArea<'a>
impl<'a> Sync for RTextArea<'a>
impl<'a> Unpin for RTextArea<'a>
impl<'a> UnwindSafe for RTextArea<'a>
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