pub struct NestedScrollConnection { /* private fields */ }Expand description
Scroll and fling consumption coordinated with an ancestor connection.
Implementations§
Source§impl NestedScrollConnection
impl NestedScrollConnection
Sourcepub fn with_coordinate_scale(self, scale: State<f32>) -> Self
pub fn with_coordinate_scale(self, scale: State<f32>) -> Self
Uses the observed local-to-window scale for coordinate conversion.
Sourcepub fn in_space(&self, transform: LocalToWindow) -> NestedScrollSpace<'_>
pub fn in_space(&self, transform: LocalToWindow) -> NestedScrollSpace<'_>
Views this connection in the supplied caller coordinate space.
Sourcepub fn with_parent(self, parent: Option<Self>) -> Self
pub fn with_parent(self, parent: Option<Self>) -> Self
Sets the ancestor that receives motion remaining after local consumption.
Sourcepub fn with_pre_scroll_handler(
self,
handler: CallbackWith<PreScrollInput, ScrollDelta>,
) -> Self
pub fn with_pre_scroll_handler( self, handler: CallbackWith<PreScrollInput, ScrollDelta>, ) -> Self
Sets the callback that consumes displacement before the child scrolls.
Sourcepub fn with_post_scroll_handler(
self,
handler: CallbackWith<PostScrollInput, ScrollDelta>,
) -> Self
pub fn with_post_scroll_handler( self, handler: CallbackWith<PostScrollInput, ScrollDelta>, ) -> Self
Sets the callback that consumes remaining displacement after the child scrolls.
Sourcepub fn with_pre_fling_handler(
self,
handler: CallbackWith<PreFlingInput, ScrollVelocity>,
) -> Self
pub fn with_pre_fling_handler( self, handler: CallbackWith<PreFlingInput, ScrollVelocity>, ) -> Self
Sets the callback that consumes velocity before the child flings.
Sourcepub fn pre_scroll(
&self,
available: ScrollDelta,
source: ScrollEventSource,
) -> ScrollDelta
pub fn pre_scroll( &self, available: ScrollDelta, source: ScrollEventSource, ) -> ScrollDelta
Dispatches displacement before child consumption and returns the consumed amount.
Sourcepub fn with_post_fling_handler(
self,
handler: CallbackWith<ScrollVelocity, ScrollVelocity>,
) -> Self
pub fn with_post_fling_handler( self, handler: CallbackWith<ScrollVelocity, ScrollVelocity>, ) -> Self
Sets the callback that consumes velocity after the child flings.
Sourcepub fn post_fling(&self, available: ScrollVelocity) -> ScrollVelocity
pub fn post_fling(&self, available: ScrollVelocity) -> ScrollVelocity
Dispatches velocity after the child flings and returns the consumed amount.
Sourcepub fn post_scroll(
&self,
consumed_by_child: ScrollDelta,
available: ScrollDelta,
source: ScrollEventSource,
) -> ScrollDelta
pub fn post_scroll( &self, consumed_by_child: ScrollDelta, available: ScrollDelta, source: ScrollEventSource, ) -> ScrollDelta
Dispatches remaining displacement after child consumption and returns the consumed amount.
Sourcepub fn pre_fling(&self, available: ScrollVelocity) -> ScrollVelocity
pub fn pre_fling(&self, available: ScrollVelocity) -> ScrollVelocity
Dispatches velocity before the child flings and returns the consumed amount.
Trait Implementations§
Source§impl BuildModifierNode for NestedScrollConnection
impl BuildModifierNode for NestedScrollConnection
Source§fn apply(&self, _runtime: &mut TesseraRuntime)
fn apply(&self, _runtime: &mut TesseraRuntime)
Source§fn nested_scroll_connection(&self) -> Option<Self>
fn nested_scroll_connection(&self) -> Option<Self>
Source§fn materialize(&self, _context: &mut ModifierBuildContext) -> Option<Modifier>
fn materialize(&self, _context: &mut ModifierBuildContext) -> Option<Modifier>
Source§impl Clone for NestedScrollConnection
impl Clone for NestedScrollConnection
Source§fn clone(&self) -> NestedScrollConnection
fn clone(&self) -> NestedScrollConnection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for NestedScrollConnection
impl Default for NestedScrollConnection
impl Eq for NestedScrollConnection
Source§impl PartialEq for NestedScrollConnection
impl PartialEq for NestedScrollConnection
impl StructuralPartialEq for NestedScrollConnection
Auto Trait Implementations§
impl Freeze for NestedScrollConnection
impl RefUnwindSafe for NestedScrollConnection
impl Send for NestedScrollConnection
impl Sync for NestedScrollConnection
impl Unpin for NestedScrollConnection
impl UnsafeUnpin for NestedScrollConnection
impl UnwindSafe for NestedScrollConnection
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.