pub struct Scroll<'a, T> {
pub state: &'a mut ScrollState<T>,
pub axis: Axis,
pub animation: Animation,
pub scroll_speed: f32,
pub inertia_friction: f32,
pub minimum_thumb_extent: T,
pub floating: bool,
}Expand description
use for arbitrary content such as forms and small collections builds all content every frame
Fields§
§state: &'a mut ScrollState<T>§axis: Axis§animation: Animation§scroll_speed: f32§inertia_friction: f32§minimum_thumb_extent: T§floating: boolscrollbars cover the content instead of taking space beside it
Implementations§
Source§impl<'a, T: Scalar> Scroll<'a, T>
impl<'a, T: Scalar> Scroll<'a, T>
Sourcepub fn new(state: &'a mut ScrollState<T>) -> Self
pub fn new(state: &'a mut ScrollState<T>) -> Self
creates a new Scroll
Sourcepub fn state(self, value: &'a mut ScrollState<T>) -> Self
pub fn state(self, value: &'a mut ScrollState<T>) -> Self
sets Self::state
Sourcepub fn axis(self, value: Axis) -> Self
pub fn axis(self, value: Axis) -> Self
sets Self::axis
Sourcepub fn animation(self, value: impl Into<Animation>) -> Self
pub fn animation(self, value: impl Into<Animation>) -> Self
sets Self::animation
Sourcepub fn scroll_speed(self, value: f32) -> Self
pub fn scroll_speed(self, value: f32) -> Self
sets Self::scroll_speed
Sourcepub fn inertia_friction(self, value: f32) -> Self
pub fn inertia_friction(self, value: f32) -> Self
Sourcepub fn minimum_thumb_extent(self, value: T) -> Self
pub fn minimum_thumb_extent(self, value: T) -> Self
Sourcepub fn floating(self, value: bool) -> Self
pub fn floating(self, value: bool) -> Self
sets Self::floating
Auto Trait Implementations§
impl<'a, T> !UnwindSafe for Scroll<'a, T>
impl<'a, T> Forget for Scroll<'a, T>
impl<'a, T> Freeze for Scroll<'a, T>
impl<'a, T> Move for Scroll<'a, T>
impl<'a, T> RefUnwindSafe for Scroll<'a, T>
impl<'a, T> Send for Scroll<'a, T>
impl<'a, T> Sync for Scroll<'a, T>
impl<'a, T> Unpin for Scroll<'a, T>
impl<'a, T> UnsafeUnpin for Scroll<'a, T>
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