Struct rat_widget::scrolled::Scroll
source · pub struct Scroll<'a> { /* private fields */ }Expand description
Scrolling indicator.
Meant to be used like Block.
Implementations§
source§impl<'a> Scroll<'a>
impl<'a> Scroll<'a>
pub fn new() -> Scroll<'a>
sourcepub fn policy(self, policy: ScrollbarPolicy) -> Scroll<'a>
pub fn policy(self, policy: ScrollbarPolicy) -> Scroll<'a>
Scrollbar policy.
sourcepub fn orientation(self, pos: ScrollbarOrientation) -> Scroll<'a>
pub fn orientation(self, pos: ScrollbarOrientation) -> Scroll<'a>
Scrollbar orientation.
sourcepub fn overscroll_by(self, overscroll: usize) -> Scroll<'a>
pub fn overscroll_by(self, overscroll: usize) -> Scroll<'a>
Set overscrolling.
sourcepub fn override_vertical(self) -> Scroll<'a>
pub fn override_vertical(self) -> Scroll<'a>
Ensures a vertical orientation.
sourcepub fn override_horizontal(self) -> Scroll<'a>
pub fn override_horizontal(self) -> Scroll<'a>
Ensures a horizotal orientation.
pub fn is_vertical(&self) -> bool
pub fn is_horizontal(&self) -> bool
pub fn styles(self, styles: ScrolledStyle) -> Scroll<'a>
sourcepub fn thumb_symbol(self, thumb_symbol: &'a str) -> Scroll<'a>
pub fn thumb_symbol(self, thumb_symbol: &'a str) -> Scroll<'a>
Symbol for the Scrollbar.
sourcepub fn thumb_style<S>(self, thumb_style: S) -> Scroll<'a>
pub fn thumb_style<S>(self, thumb_style: S) -> Scroll<'a>
Style for the Scrollbar.
sourcepub fn track_symbol(self, track_symbol: Option<&'a str>) -> Scroll<'a>
pub fn track_symbol(self, track_symbol: Option<&'a str>) -> Scroll<'a>
Symbol for the Scrollbar.
sourcepub fn track_style<S>(self, track_style: S) -> Scroll<'a>
pub fn track_style<S>(self, track_style: S) -> Scroll<'a>
Style for the Scrollbar.
sourcepub fn begin_symbol(self, begin_symbol: Option<&'a str>) -> Scroll<'a>
pub fn begin_symbol(self, begin_symbol: Option<&'a str>) -> Scroll<'a>
Symbol for the Scrollbar.
sourcepub fn begin_style<S>(self, begin_style: S) -> Scroll<'a>
pub fn begin_style<S>(self, begin_style: S) -> Scroll<'a>
Style for the Scrollbar.
sourcepub fn end_symbol(self, end_symbol: Option<&'a str>) -> Scroll<'a>
pub fn end_symbol(self, end_symbol: Option<&'a str>) -> Scroll<'a>
Symbol for the Scrollbar.
sourcepub fn no_symbol(self, no_symbol: Option<&'a str>) -> Scroll<'a>
pub fn no_symbol(self, no_symbol: Option<&'a str>) -> Scroll<'a>
Symbol when no Scrollbar is drawn.
Trait Implementations§
source§impl<'a> StatefulWidget for Scroll<'a>
impl<'a> StatefulWidget for Scroll<'a>
§type State = ScrollState
type State = ScrollState
State associated with the stateful widget. Read more
source§impl<'a> StatefulWidgetRef for Scroll<'a>
impl<'a> StatefulWidgetRef for Scroll<'a>
§type State = ScrollState
type State = ScrollState
State associated with the stateful widget. Read more
source§fn render_ref(
&self,
area: Rect,
buf: &mut Buffer,
state: &mut <Scroll<'a> as StatefulWidgetRef>::State,
)
fn render_ref( &self, area: Rect, buf: &mut Buffer, state: &mut <Scroll<'a> as StatefulWidgetRef>::State, )
Draws the current state of the widget in the given buffer. That is the only method required
to implement a custom stateful widget.
Auto Trait Implementations§
impl<'a> Freeze for Scroll<'a>
impl<'a> RefUnwindSafe for Scroll<'a>
impl<'a> Send for Scroll<'a>
impl<'a> Sync for Scroll<'a>
impl<'a> Unpin for Scroll<'a>
impl<'a> UnwindSafe for Scroll<'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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)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