Skip to main content

ScrollPositionWithSingleContextLeaf

Trait ScrollPositionWithSingleContextLeaf 

Source
pub trait ScrollPositionWithSingleContextLeaf: ScrollPosition + ScrollActivityDelegate {
Show 20 methods // Required methods fn single_context_data( self: Handle<Self>, app: &App, ) -> &ScrollPositionWithSingleContextData; fn single_context_data_mut( self: Handle<Self>, app: &mut App, ) -> &mut ScrollPositionWithSingleContextData; // Provided methods fn axis_direction(self: Handle<Self>, app: &App) -> AxisDirection { ... } fn set_pixels(self: Handle<Self>, app: &mut App, new_pixels: f64) -> f64 { ... } fn absorb(self: Handle<Self>, app: &mut App, other: AnyScrollPosition) { ... } fn apply_new_dimensions(self: Handle<Self>, app: &mut App) { ... } fn begin_activity( self: Handle<Self>, app: &mut App, new_activity: Option<ScrollActivityRef>, ) { ... } fn apply_user_offset(self: Handle<Self>, app: &mut App, delta: f64) { ... } fn go_idle(self: Handle<Self>, app: &mut App) { ... } fn go_ballistic(self: Handle<Self>, app: &mut App, velocity: f64) { ... } fn user_scroll_direction(self: Handle<Self>, app: &App) -> ScrollDirection { ... } fn update_user_scroll_direction( self: Handle<Self>, app: &mut App, value: ScrollDirection, ) { ... } fn animate_to( self: Handle<Self>, app: &mut App, to: f64, duration: Duration, curve: Rc<dyn Curve>, ) -> CompleterFuture<()> ⓘ { ... } fn jump_to(self: Handle<Self>, app: &mut App, value: f64) { ... } fn pointer_scroll(self: Handle<Self>, app: &mut App, delta: f64) { ... } fn jump_to_without_settling(self: Handle<Self>, app: &mut App, value: f64) { ... } fn hold( self: Handle<Self>, app: &mut App, hold_cancel_callback: Listener, ) -> Rc<dyn ScrollHoldController> { ... } fn drag( self: Handle<Self>, app: &mut App, details: DragStartDetails, drag_cancel_callback: Listener, ) -> Rc<dyn Drag> { ... } fn dispose(self: Handle<Self>, app: &mut App) { ... } fn debug_fill_description( self: Handle<Self>, app: &App, description: &mut Vec<String>, ) { ... }
}
Expand description

A ScrollPosition with the field Dart’s ScrollPositionWithSingleContext declares and the members it overrides.

The shared bodies are associated functions on ScrollPositionWithSingleContext; an override calls one where Dart writes super.….

A leaf writes scroll_position_with_single_context_viewport_offset_overrides!, scroll_position_with_single_context_overrides! and scroll_position_with_single_context_delegate_overrides! to route the ViewportOffset, ScrollPosition and ScrollActivityDelegate virtuals here.

Required Methods§

Source

fn single_context_data( self: Handle<Self>, app: &App, ) -> &ScrollPositionWithSingleContextData

Dart’s ScrollPositionWithSingleContext fields, held under the field single_context (scroll_position_with_single_context_accessors!).

Source

fn single_context_data_mut( self: Handle<Self>, app: &mut App, ) -> &mut ScrollPositionWithSingleContextData

Provided Methods§

Source

fn axis_direction(self: Handle<Self>, app: &App) -> AxisDirection

Dart’s ScrollPositionWithSingleContext.axisDirection.

Source

fn set_pixels(self: Handle<Self>, app: &mut App, new_pixels: f64) -> f64

Dart’s ScrollPositionWithSingleContext.setPixels.

Source

fn absorb(self: Handle<Self>, app: &mut App, other: AnyScrollPosition)

Dart’s ScrollPositionWithSingleContext.absorb.

Source

fn apply_new_dimensions(self: Handle<Self>, app: &mut App)

Dart’s ScrollPositionWithSingleContext.applyNewDimensions.

Source

fn begin_activity( self: Handle<Self>, app: &mut App, new_activity: Option<ScrollActivityRef>, )

Dart’s ScrollPositionWithSingleContext.beginActivity.

Source

fn apply_user_offset(self: Handle<Self>, app: &mut App, delta: f64)

Dart’s ScrollPositionWithSingleContext.applyUserOffset.

Source

fn go_idle(self: Handle<Self>, app: &mut App)

Dart’s ScrollPositionWithSingleContext.goIdle.

Source

fn go_ballistic(self: Handle<Self>, app: &mut App, velocity: f64)

Start a physics-driven simulation that settles the ViewportOffset::pixels position, starting at a particular velocity.

This method defers to crate::ScrollPhysics::create_ballistic_simulation, which typically provides a bounce simulation when the current position is out of bounds and a friction simulation when the position is in bounds but has a non-zero velocity.

The velocity should be in logical pixels per second.

Source

fn user_scroll_direction(self: Handle<Self>, app: &App) -> ScrollDirection

Dart’s ScrollPositionWithSingleContext.userScrollDirection.

Source

fn update_user_scroll_direction( self: Handle<Self>, app: &mut App, value: ScrollDirection, )

Set ViewportOffset::user_scroll_direction to the given value.

If this changes the value, then a crate::UserScrollNotification is dispatched.

Source

fn animate_to( self: Handle<Self>, app: &mut App, to: f64, duration: Duration, curve: Rc<dyn Curve>, ) -> CompleterFuture<()> ⓘ

Dart’s ScrollPositionWithSingleContext.animateTo.

Source

fn jump_to(self: Handle<Self>, app: &mut App, value: f64)

Dart’s ScrollPositionWithSingleContext.jumpTo.

Source

fn pointer_scroll(self: Handle<Self>, app: &mut App, delta: f64)

Dart’s ScrollPositionWithSingleContext.pointerScroll.

Source

fn jump_to_without_settling(self: Handle<Self>, app: &mut App, value: f64)

Dart’s deprecated ScrollPositionWithSingleContext.jumpToWithoutSettling.

Source

fn hold( self: Handle<Self>, app: &mut App, hold_cancel_callback: Listener, ) -> Rc<dyn ScrollHoldController>

Dart’s ScrollPositionWithSingleContext.hold.

Source

fn drag( self: Handle<Self>, app: &mut App, details: DragStartDetails, drag_cancel_callback: Listener, ) -> Rc<dyn Drag>

Dart’s ScrollPositionWithSingleContext.drag.

Source

fn dispose(self: Handle<Self>, app: &mut App)

Dart’s ScrollPositionWithSingleContext.dispose.

Source

fn debug_fill_description( self: Handle<Self>, app: &App, description: &mut Vec<String>, )

Dart’s ScrollPositionWithSingleContext.debugFillDescription.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§