pub struct ScrollArea<'a> { /* private fields */ }Expand description
Utility widget for rendering a combination of a Block and one or two Scroll(bars). Any of these can be None.
Implementations§
Source§impl<'a> ScrollArea<'a>
impl<'a> ScrollArea<'a>
pub fn new() -> Self
Sourcepub fn ignore_block(self) -> Self
pub fn ignore_block(self) -> Self
Ignores the block when rendering and renders only the scrollbars. The block is still considered when calculating everything.
Sourcepub fn ignore_scroll(self) -> Self
pub fn ignore_scroll(self) -> Self
Ignores the scrollbars when rendering and renders only the block. The scrollbars are still considered when calculating everything.
Sourcepub fn inner(
&self,
area: Rect,
hscroll_state: Option<&ScrollState>,
vscroll_state: Option<&ScrollState>,
) -> Rect
pub fn inner( &self, area: Rect, hscroll_state: Option<&ScrollState>, vscroll_state: Option<&ScrollState>, ) -> Rect
Calculate the size of the inner area.
Trait Implementations§
Source§impl<'a> Clone for ScrollArea<'a>
impl<'a> Clone for ScrollArea<'a>
Source§fn clone(&self) -> ScrollArea<'a>
fn clone(&self) -> ScrollArea<'a>
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<'a> Debug for ScrollArea<'a>
impl<'a> Debug for ScrollArea<'a>
Source§impl<'a> Default for ScrollArea<'a>
impl<'a> Default for ScrollArea<'a>
Source§fn default() -> ScrollArea<'a>
fn default() -> ScrollArea<'a>
Returns the “default value” for a type. Read more
Source§impl<'a> StatefulWidget for &ScrollArea<'a>
impl<'a> StatefulWidget for &ScrollArea<'a>
Source§impl<'a> StatefulWidget for ScrollArea<'a>
impl<'a> StatefulWidget for ScrollArea<'a>
Auto Trait Implementations§
impl<'a> Freeze for ScrollArea<'a>
impl<'a> RefUnwindSafe for ScrollArea<'a>
impl<'a> Send for ScrollArea<'a>
impl<'a> Sync for ScrollArea<'a>
impl<'a> Unpin for ScrollArea<'a>
impl<'a> UnwindSafe for ScrollArea<'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