pub struct Scrollbar { /* private fields */ }Expand description
A scrollbar for a VirtualWindow.
The same component draws vertical and horizontal bars, uses the active theme by default, and permits local glyph/style overrides. It draws nothing when the whole collection fits in the window.

Implementations§
Source§impl Scrollbar
impl Scrollbar
Sourcepub fn vertical(window: VirtualWindow) -> Self
pub fn vertical(window: VirtualWindow) -> Self
Create a vertical scrollbar for window.
Sourcepub fn horizontal(window: VirtualWindow) -> Self
pub fn horizontal(window: VirtualWindow) -> Self
Create a horizontal scrollbar for window.
Sourcepub fn track_glyph(self, glyph: char) -> Self
pub fn track_glyph(self, glyph: char) -> Self
Replace the track glyph.
Sourcepub fn thumb_glyph(self, glyph: char) -> Self
pub fn thumb_glyph(self, glyph: char) -> Self
Replace the thumb glyph.
Sourcepub fn track_style(self, style: Style) -> Self
pub fn track_style(self, style: Style) -> Self
Override the track style for this bar.
Sourcepub fn thumb_style(self, style: Style) -> Self
pub fn thumb_style(self, style: Style) -> Self
Override the thumb style for this bar.
Trait Implementations§
Source§impl View for Scrollbar
impl View for Scrollbar
Source§fn measure(&self, available: Size, _ctx: &RenderCtx<'_>) -> Size
fn measure(&self, available: Size, _ctx: &RenderCtx<'_>) -> Size
Report the intrinsic content size wanted given
available and ctx.Source§fn render(&self, area: Rect, surface: &mut Surface<'_>, ctx: &RenderCtx<'_>)
fn render(&self, area: Rect, surface: &mut Surface<'_>, ctx: &RenderCtx<'_>)
Paint the view into the assigned
area through surface.Source§fn measure_request(&self, request: MeasureRequest, ctx: &RenderCtx<'_>) -> Size
fn measure_request(&self, request: MeasureRequest, ctx: &RenderCtx<'_>) -> Size
Answer a measurement request with optional known axes and intrinsic
sizing modes. Read more
Auto Trait Implementations§
impl Freeze for Scrollbar
impl RefUnwindSafe for Scrollbar
impl Send for Scrollbar
impl Sync for Scrollbar
impl Unpin for Scrollbar
impl UnsafeUnpin for Scrollbar
impl UnwindSafe for Scrollbar
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