nativeview_scroll_physics/
lib.rs1#![cfg_attr(doctest, doc = include_str!("../README.md"))]
9
10mod axis;
11mod behavior;
12mod pool;
13mod profile;
14mod resolve;
15mod table;
16
17use nativeview_layout::{LaidOutScene, StoreLayoutEngine};
18
19pub use axis::{ActiveScrollAxis, AxisPhase};
20pub use behavior::{
21 BoundaryPhysics, ClampBoundary, ComposedScrollBehavior, DetentSnap, ExponentialDecayFling,
22 FixedExtentSnap, FlingPhysics, FreeScroll, InstantWheel, MAX_DETENT_STOPS, NoFling,
23 ExplicitRubberBandBoundary, PageSnap, RubberBandBoundary, ScrollBehavior, SmoothWheel,
24 SnapPhysics, SnapQuery, SpringReturn, WheelPhysics,
25};
26pub use pool::{ActiveScrollEntry, MAX_ACTIVE_SCROLL_ENTRIES, PooledScrollPhysics};
27pub use profile::{
28 PlatformScrollPhysics, ScrollPhysicsProfile, rubber_band_forward, rubber_band_inverse,
29};
30pub use table::{ScrollBoundaryMode, ScrollPhysics, ScrollSnapMode};
31
32#[inline]
34pub fn install_platform_scroll_physics<L: StoreLayoutEngine>(scene: &mut LaidOutScene<L>) {
35 scene.set_scroll_physics(Box::new(PlatformScrollPhysics::platform_default()));
36}