pub struct AutoScrollProps {
pub threshold: f64,
pub speed: f64,
pub speed_px_per_second: Option<f64>,
pub axis: ScrollAxis,
pub active: Option<bool>,
pub drag_pointer: Option<Point>,
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: f64Legacy maximum movement per nominal 60 Hz frame. Kept for 3.x source
and behavior compatibility; new code should prefer
speed_px_per_second.
speed_px_per_second: Option<f64>Exact maximum scroll velocity in CSS pixels per second. When set, this
takes precedence over the legacy speed prop.
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.
drag_pointer: Option<Point>Optional pointer supplied by a host that tracks movement outside this
element’s DOM event stream, expressed in this window’s client
coordinates. The sample is used only with active: Some(true); pass
the matching drag’s live active state so a retained coordinate cannot
scroll idle or settling content.
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), .speed_px_per_second(...)(optional), .axis(...)(optional), .active(...)(optional), .drag_pointer(...)(optional), .on_scroll(...)(optional), .attributes(...)(optional), .children(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of AutoScrollProps.
Trait Implementations§
Source§impl Clone for AutoScrollProps
impl Clone for AutoScrollProps
Source§impl PartialEq for AutoScrollProps
impl PartialEq for AutoScrollProps
Source§impl Properties for AutoScrollPropswhere
Self: Clone,
impl Properties for AutoScrollPropswhere
Self: Clone,
Source§type Builder = AutoScrollPropsBuilder<((), (), (), (), (), (), (), (), ())>
type Builder = AutoScrollPropsBuilder<((), (), (), (), (), (), (), (), ())>
Source§fn memoize(&mut self, new: &Self) -> bool
fn memoize(&mut self, new: &Self) -> bool
Source§fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
Auto Trait Implementations§
impl !Freeze for AutoScrollProps
impl !RefUnwindSafe for AutoScrollProps
impl !Send for AutoScrollProps
impl !Sync for AutoScrollProps
impl !UnwindSafe for AutoScrollProps
impl Unpin for AutoScrollProps
impl UnsafeUnpin for AutoScrollProps
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DependencyElement for T
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more