pub struct AutoScrollProps {
pub threshold: f64,
pub speed: f64,
pub axis: ScrollAxis,
pub active: Option<bool>,
pub on_scroll: Option<EventHandler<Point>>,
pub attributes: Vec<Attribute>,
pub children: Element,
}Expand description
Properties for the AutoScroll component.
Fields§
§threshold: f64Edge band size in px.
speed: f64Max scroll px per event.
axis: ScrollAxisAxes to scroll.
active: Option<bool>Optional external drag-state gate. Some(true) scrolls on pointer
movement, Some(false) suppresses it, and None uses the built-in
pointer contact heuristic.
on_scroll: Option<EventHandler<Point>>Fired with the container’s scroll offset when a sample sees it
changed - after the auto-scroll’s own scrolling, a wheel/trackpad
scroll, or pointer movement over the container - following the
rect-refresh ping. Drive a windowed (virtualized) list from
offset.y. See the module docs for how observation works and its
one blind spot.
attributes: Vec<Attribute>§children: ElementImplementations§
Source§impl AutoScrollProps
impl AutoScrollProps
Sourcepub fn builder() -> AutoScrollPropsBuilder<((), (), (), (), (), (), ())>
pub fn builder() -> AutoScrollPropsBuilder<((), (), (), (), (), (), ())>
Create a builder for building AutoScrollProps.
On the builder, call .threshold(...)(optional), .speed(...)(optional), .axis(...)(optional), .active(...)(optional), .on_scroll(...)(optional), .attributes(...)(optional), .children(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of AutoScrollProps.