pub struct Paragraph<'a> { /* private fields */ }Expand description
List widget.
Fully compatible with ratatui Paragraph. Add Scroll and event-handling.
Implementations§
Source§impl<'a> Paragraph<'a>
impl<'a> Paragraph<'a>
pub fn new<T>(text: T) -> Self
Sourcepub fn hide_focus(self, show: bool) -> Self
pub fn hide_focus(self, show: bool) -> Self
Hide focus markings
Sourcepub fn styles(self, styles: ParagraphStyle) -> Self
pub fn styles(self, styles: ParagraphStyle) -> Self
Styles.
Sourcepub fn focus_style(self, style: Style) -> Self
pub fn focus_style(self, style: Style) -> Self
Base style.
Sourcepub fn left_aligned(self) -> Self
pub fn left_aligned(self) -> Self
Text alignment.
Sourcepub fn right_aligned(self) -> Self
pub fn right_aligned(self) -> Self
Text alignment.
Sourcepub fn line_width(&self) -> usize
pub fn line_width(&self) -> usize
Line width when not wrapped.
Sourcepub fn line_height(&self, width: u16) -> usize
pub fn line_height(&self, width: u16) -> usize
Line height for the supposed width.
Trait Implementations§
Source§impl<'a> StatefulWidget for &Paragraph<'a>
impl<'a> StatefulWidget for &Paragraph<'a>
Source§impl StatefulWidget for Paragraph<'_>
impl StatefulWidget for Paragraph<'_>
Auto Trait Implementations§
impl<'a> !Freeze for Paragraph<'a>
impl<'a> !RefUnwindSafe for Paragraph<'a>
impl<'a> Send for Paragraph<'a>
impl<'a> !Sync for Paragraph<'a>
impl<'a> Unpin for Paragraph<'a>
impl<'a> UnwindSafe for Paragraph<'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> 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