pub struct ScrollbarPresentation { /* private fields */ }Expand description
Selectable visual and geometric policy for a Scrollbar.
The presentation stores separate glyph sets for both orientations so the same value can compose vertical and horizontal semantic scrollbars. A caller can clone a Theme-owned presentation and replace either set or any logical part style without changing the semantic value.
Implementations§
Source§impl ScrollbarPresentation
impl ScrollbarPresentation
Sourcepub fn new(thumb_style: TextStyle, track_style: TextStyle) -> Self
pub fn new(thumb_style: TextStyle, track_style: TextStyle) -> Self
Creates a proportional presentation with conventional thin rails.
pub fn get_glyphs(&self, orientation: ScrollbarOrientation) -> &ScrollbarGlyphs
Sourcepub fn glyphs(
self,
orientation: ScrollbarOrientation,
glyphs: ScrollbarGlyphs,
) -> Self
pub fn glyphs( self, orientation: ScrollbarOrientation, glyphs: ScrollbarGlyphs, ) -> Self
Replaces the glyph set for one orientation.
pub const fn get_thumb_sizing(&self) -> ScrollbarThumbSizing
Sourcepub const fn thumb_sizing(self, thumb_sizing: ScrollbarThumbSizing) -> Self
pub const fn thumb_sizing(self, thumb_sizing: ScrollbarThumbSizing) -> Self
Replaces the policy that maps viewport state onto the track.
pub fn get_style(&self, role: ScrollbarRole) -> &TextStyle
Sourcepub fn style(self, role: ScrollbarRole, style: TextStyle) -> Self
pub fn style(self, role: ScrollbarRole, style: TextStyle) -> Self
Replaces one complete logical part style.
pub fn thumb_style(self, style: TextStyle) -> Self
pub fn track_style(self, style: TextStyle) -> Self
pub fn begin_style(self, style: TextStyle) -> Self
pub fn end_style(self, style: TextStyle) -> Self
Trait Implementations§
Source§impl Clone for ScrollbarPresentation
impl Clone for ScrollbarPresentation
Source§fn clone(&self) -> ScrollbarPresentation
fn clone(&self) -> ScrollbarPresentation
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 ScrollbarPresentation
impl Debug for ScrollbarPresentation
Source§impl PartialEq for ScrollbarPresentation
impl PartialEq for ScrollbarPresentation
Source§fn eq(&self, other: &ScrollbarPresentation) -> bool
fn eq(&self, other: &ScrollbarPresentation) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for ScrollbarPresentation
impl StructuralPartialEq for ScrollbarPresentation
Auto Trait Implementations§
impl Freeze for ScrollbarPresentation
impl RefUnwindSafe for ScrollbarPresentation
impl Send for ScrollbarPresentation
impl Sync for ScrollbarPresentation
impl Unpin for ScrollbarPresentation
impl UnsafeUnpin for ScrollbarPresentation
impl UnwindSafe for ScrollbarPresentation
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