pub struct ScrollableText {
pub text: Text,
pub style: Style,
pub wrap: WrapMode,
pub scroll: ScrollState,
pub alignment: Alignment,
pub selectable: bool,
pub region_id: Option<WidgetId>,
/* private fields */
}Fields§
§text: Text§style: Style§wrap: WrapMode§scroll: ScrollState§alignment: Alignment§selectable: bool§region_id: Option<WidgetId>Implementations§
Source§impl ScrollableText
impl ScrollableText
pub fn new(text: Text) -> Self
pub fn raw(content: &str) -> Self
pub fn with_style(self, style: Style) -> Self
pub fn with_theme_tokens(self, tokens: ThemeTokens) -> Self
pub fn wrap(self, mode: WrapMode) -> Self
pub fn with_scroll(self, scroll: ScrollState) -> Self
pub fn alignment(self, alignment: Alignment) -> Self
pub fn with_selectable(self, selectable: bool) -> Self
pub fn with_region_id(self, id: impl Into<WidgetId>) -> Self
pub fn set_text(&mut self, text: Text)
pub fn push_line(&mut self, line: Line)
pub fn invalidate(&self)
pub fn rows_for_width(&self, width: u16) -> Vec<Line>
pub fn with_rows_for_width<R>( &self, width: u16, f: impl FnOnce(&[Line]) -> R, ) -> R
pub fn rendered_height(&self, width: u16) -> usize
pub fn render_with_interaction( &self, buffer: &mut Buffer, area: Rect, layer: &mut InteractionLayer, )
Trait Implementations§
Source§impl Clone for ScrollableText
impl Clone for ScrollableText
Source§fn clone(&self) -> ScrollableText
fn clone(&self) -> ScrollableText
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ScrollableText
impl Debug for ScrollableText
Source§impl From<&str> for ScrollableText
impl From<&str> for ScrollableText
Source§impl From<Text> for ScrollableText
impl From<Text> for ScrollableText
Auto Trait Implementations§
impl !Freeze for ScrollableText
impl !RefUnwindSafe for ScrollableText
impl !Sync for ScrollableText
impl Send for ScrollableText
impl Unpin for ScrollableText
impl UnsafeUnpin for ScrollableText
impl UnwindSafe for ScrollableText
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