pub struct ScrollbarConfig {
pub content_size: f64,
pub viewport_size: f64,
pub scroll_offset: f64,
pub min_handle_size: f64,
pub horizontal: bool,
}Expand description
Scrollbar configuration
Fields§
§content_size: f64Total content size (height or width)
viewport_size: f64Visible viewport size
scroll_offset: f64Current scroll offset
min_handle_size: f64Minimum handle size
horizontal: boolWhether this is a horizontal scrollbar
Implementations§
Source§impl ScrollbarConfig
impl ScrollbarConfig
Sourcepub fn calculate_geometry(
&self,
track_rect: Rect,
drag_pos: Option<f64>,
) -> ScrollbarResponse
pub fn calculate_geometry( &self, track_rect: Rect, drag_pos: Option<f64>, ) -> ScrollbarResponse
Calculate scrollbar handle geometry
Trait Implementations§
Source§impl Clone for ScrollbarConfig
impl Clone for ScrollbarConfig
Source§fn clone(&self) -> ScrollbarConfig
fn clone(&self) -> ScrollbarConfig
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 Debug for ScrollbarConfig
impl Debug for ScrollbarConfig
Source§impl Default for ScrollbarConfig
impl Default for ScrollbarConfig
Source§impl<'de> Deserialize<'de> for ScrollbarConfig
impl<'de> Deserialize<'de> for ScrollbarConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ScrollbarConfig
impl RefUnwindSafe for ScrollbarConfig
impl Send for ScrollbarConfig
impl Sync for ScrollbarConfig
impl Unpin for ScrollbarConfig
impl UnsafeUnpin for ScrollbarConfig
impl UnwindSafe for ScrollbarConfig
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