pub struct DragScrollActivity { /* private fields */ }Expand description
The activity a scroll view performs when the user drags their finger across the screen.
See also:
ScrollDragController, which listens to thewaft_gestures::Dragand actually scrolls the scroll view.
Implementations§
Source§impl DragScrollActivity
impl DragScrollActivity
Sourcepub fn new(
app: &mut App,
delegate: AnyScrollActivityDelegate,
controller: Ref<ScrollDragController>,
) -> Ref<DragScrollActivity>
pub fn new( app: &mut App, delegate: AnyScrollActivityDelegate, controller: Ref<ScrollDragController>, ) -> Ref<DragScrollActivity>
Creates an activity for when the user drags their finger across the screen.
Trait Implementations§
Source§impl ScrollActivity for DragScrollActivity
impl ScrollActivity for DragScrollActivity
Source§fn velocity(self: Handle<Self>, _app: &mut App) -> f64
fn velocity(self: Handle<Self>, _app: &mut App) -> f64
DragScrollActivity is not independently changing velocity yet
until the drag is ended.
Source§fn scroll_activity_data(self: Handle<Self>, app: &App) -> &ScrollActivityData
fn scroll_activity_data(self: Handle<Self>, app: &App) -> &ScrollActivityData
Source§fn scroll_activity_data_mut(
self: Handle<Self>,
app: &mut App,
) -> &mut ScrollActivityData
fn scroll_activity_data_mut( self: Handle<Self>, app: &mut App, ) -> &mut ScrollActivityData
See
scroll_activity_data.Source§fn dispatch_scroll_start_notification(
self: Handle<Self>,
app: &mut App,
metrics: Rc<dyn ScrollMetrics>,
context: Option<BuildContext>,
)
fn dispatch_scroll_start_notification( self: Handle<Self>, app: &mut App, metrics: Rc<dyn ScrollMetrics>, context: Option<BuildContext>, )
Dispatch a
ScrollStartNotification with the given metrics.Source§fn dispatch_scroll_update_notification(
self: Handle<Self>,
app: &mut App,
metrics: Rc<dyn ScrollMetrics>,
context: BuildContext,
scroll_delta: f64,
)
fn dispatch_scroll_update_notification( self: Handle<Self>, app: &mut App, metrics: Rc<dyn ScrollMetrics>, context: BuildContext, scroll_delta: f64, )
Dispatch a
ScrollUpdateNotification with the given metrics and scroll delta.Source§fn dispatch_overscroll_notification(
self: Handle<Self>,
app: &mut App,
metrics: Rc<dyn ScrollMetrics>,
context: BuildContext,
overscroll: f64,
)
fn dispatch_overscroll_notification( self: Handle<Self>, app: &mut App, metrics: Rc<dyn ScrollMetrics>, context: BuildContext, overscroll: f64, )
Dispatch an
OverscrollNotification with the given metrics and overscroll.Source§fn dispatch_scroll_end_notification(
self: Handle<Self>,
app: &mut App,
metrics: Rc<dyn ScrollMetrics>,
context: BuildContext,
)
fn dispatch_scroll_end_notification( self: Handle<Self>, app: &mut App, metrics: Rc<dyn ScrollMetrics>, context: BuildContext, )
Dispatch a
ScrollEndNotification with the given metrics and overscroll.Source§fn should_ignore_pointer(self: Handle<Self>, app: &App) -> bool
fn should_ignore_pointer(self: Handle<Self>, app: &App) -> bool
Whether the scroll view should ignore pointer events while performing this
activity. Read more
Source§fn is_scrolling(self: Handle<Self>, _app: &App) -> bool
fn is_scrolling(self: Handle<Self>, _app: &App) -> bool
Whether performing this activity constitutes scrolling. Read more
Source§fn dispose(self: Handle<Self>, app: &mut App)
fn dispose(self: Handle<Self>, app: &mut App)
Called when the scroll view stops performing this activity.
Source§fn describe(self: Handle<Self>, app: &App) -> String
fn describe(self: Handle<Self>, app: &App) -> String
Dart’s
toString, which reads the arena and so cannot be std::fmt::Debug.Source§fn delegate(self: Handle<Self>, app: &App) -> AnyScrollActivityDelegate
fn delegate(self: Handle<Self>, app: &App) -> AnyScrollActivityDelegate
The delegate that this activity will use to actuate the scroll view.
Source§fn is_disposed(self: Handle<Self>, app: &App) -> bool
fn is_disposed(self: Handle<Self>, app: &App) -> bool
Whether
dispose has run; Dart’s _isDisposed.Source§fn update_delegate(
self: Handle<Self>,
app: &mut App,
value: AnyScrollActivityDelegate,
)
fn update_delegate( self: Handle<Self>, app: &mut App, value: AnyScrollActivityDelegate, )
Updates the activity’s link to the
ScrollActivityDelegate. Read moreSource§fn reset_activity(self: Handle<Self>, app: &mut App)
fn reset_activity(self: Handle<Self>, app: &mut App)
Called by the
ScrollActivityDelegate when it has changed type (for
example, when changing from an Android-style scroll position to an
iOS-style scroll position). If this activity can differ between the two
modes, then it should tell the position to restart that activity
appropriately. Read moreSource§fn apply_new_dimensions(self: Handle<Self>, app: &mut App)
fn apply_new_dimensions(self: Handle<Self>, app: &mut App)
Called when the scroll view that is performing this activity changes its metrics.
Source§fn as_hold_controller(
self: Handle<Self>,
) -> Option<Rc<dyn ScrollHoldController>>
fn as_hold_controller( self: Handle<Self>, ) -> Option<Rc<dyn ScrollHoldController>>
Dart’s
activity is ScrollHoldController; None — the default — for every activity
but HoldScrollActivity.Source§fn as_activity(self: Handle<Self>) -> AnyScrollActivity
fn as_activity(self: Handle<Self>) -> AnyScrollActivity
This activity as the erased
AnyScrollActivity — what to pass where a Dart API takes
a ScrollActivity.Auto Trait Implementations§
impl !RefUnwindSafe for DragScrollActivity
impl !Send for DragScrollActivity
impl !Sync for DragScrollActivity
impl !UnwindSafe for DragScrollActivity
impl Forget for DragScrollActivity
impl Freeze for DragScrollActivitywhere
NonZero<u32>: Freeze,
&'static ScrollActivityDelegateVTable: Freeze,
PhantomData<fn() -> ScrollDragController>: Freeze,
*const RcInner<Keep> is !null: Freeze,
PhantomData<RcInner<Keep>>: Freeze,
impl Move for DragScrollActivity
impl Unpin for DragScrollActivity
impl UnsafeUnpin for DragScrollActivitywhere
NonZeroU32Inner: UnsafeUnpin,
&'static ScrollActivityDelegateVTable: UnsafeUnpin,
PhantomData<fn() -> ScrollDragController>: UnsafeUnpin,
*const RcInner<Keep> is !null: UnsafeUnpin,
PhantomData<RcInner<Keep>>: UnsafeUnpin,
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