Struct egui::style::ScrollAnimation
source · pub struct ScrollAnimation {
pub points_per_second: f32,
pub duration: Rangef,
}
Expand description
Scroll animation configuration, used when programmatically scrolling somewhere (e.g. with [crate::Ui::scroll_to_cursor]
)
The animation duration is calculated based on the distance to be scrolled via [ScrollAnimation::points_per_second]
and can be clamped to a min / max duration via [ScrollAnimation::duration]
.
Fields§
§points_per_second: f32
With what speed should we scroll? (Default: 1000.0)
duration: Rangef
The min / max scroll duration.
Implementations§
Trait Implementations§
source§impl Clone for ScrollAnimation
impl Clone for ScrollAnimation
source§fn clone(&self) -> ScrollAnimation
fn clone(&self) -> ScrollAnimation
Returns a copy 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 ScrollAnimation
impl Debug for ScrollAnimation
source§impl Default for ScrollAnimation
impl Default for ScrollAnimation
source§impl PartialEq for ScrollAnimation
impl PartialEq for ScrollAnimation
impl Copy for ScrollAnimation
impl StructuralPartialEq for ScrollAnimation
Auto Trait Implementations§
impl Freeze for ScrollAnimation
impl RefUnwindSafe for ScrollAnimation
impl Send for ScrollAnimation
impl Sync for ScrollAnimation
impl Unpin for ScrollAnimation
impl UnwindSafe for ScrollAnimation
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)