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§
Sourcefn single_context_data(
self: Handle<Self>,
app: &App,
) -> &ScrollPositionWithSingleContextData
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!).
Sourcefn single_context_data_mut(
self: Handle<Self>,
app: &mut App,
) -> &mut ScrollPositionWithSingleContextData
fn single_context_data_mut( self: Handle<Self>, app: &mut App, ) -> &mut ScrollPositionWithSingleContextData
See single_context_data.
Provided Methods§
Sourcefn axis_direction(self: Handle<Self>, app: &App) -> AxisDirection
fn axis_direction(self: Handle<Self>, app: &App) -> AxisDirection
Dart’s ScrollPositionWithSingleContext.axisDirection.
Sourcefn set_pixels(self: Handle<Self>, app: &mut App, new_pixels: f64) -> f64
fn set_pixels(self: Handle<Self>, app: &mut App, new_pixels: f64) -> f64
Dart’s ScrollPositionWithSingleContext.setPixels.
Sourcefn absorb(self: Handle<Self>, app: &mut App, other: AnyScrollPosition)
fn absorb(self: Handle<Self>, app: &mut App, other: AnyScrollPosition)
Dart’s ScrollPositionWithSingleContext.absorb.
Sourcefn apply_new_dimensions(self: Handle<Self>, app: &mut App)
fn apply_new_dimensions(self: Handle<Self>, app: &mut App)
Dart’s ScrollPositionWithSingleContext.applyNewDimensions.
Sourcefn begin_activity(
self: Handle<Self>,
app: &mut App,
new_activity: Option<ScrollActivityRef>,
)
fn begin_activity( self: Handle<Self>, app: &mut App, new_activity: Option<ScrollActivityRef>, )
Dart’s ScrollPositionWithSingleContext.beginActivity.
Sourcefn apply_user_offset(self: Handle<Self>, app: &mut App, delta: f64)
fn apply_user_offset(self: Handle<Self>, app: &mut App, delta: f64)
Dart’s ScrollPositionWithSingleContext.applyUserOffset.
Sourcefn go_ballistic(self: Handle<Self>, app: &mut App, velocity: f64)
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.
Sourcefn user_scroll_direction(self: Handle<Self>, app: &App) -> ScrollDirection
fn user_scroll_direction(self: Handle<Self>, app: &App) -> ScrollDirection
Dart’s ScrollPositionWithSingleContext.userScrollDirection.
Sourcefn update_user_scroll_direction(
self: Handle<Self>,
app: &mut App,
value: ScrollDirection,
)
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.
Sourcefn animate_to(
self: Handle<Self>,
app: &mut App,
to: f64,
duration: Duration,
curve: Rc<dyn Curve>,
) -> CompleterFuture<()> ⓘ
fn animate_to( self: Handle<Self>, app: &mut App, to: f64, duration: Duration, curve: Rc<dyn Curve>, ) -> CompleterFuture<()> ⓘ
Dart’s ScrollPositionWithSingleContext.animateTo.
Sourcefn jump_to(self: Handle<Self>, app: &mut App, value: f64)
fn jump_to(self: Handle<Self>, app: &mut App, value: f64)
Dart’s ScrollPositionWithSingleContext.jumpTo.
Sourcefn pointer_scroll(self: Handle<Self>, app: &mut App, delta: f64)
fn pointer_scroll(self: Handle<Self>, app: &mut App, delta: f64)
Dart’s ScrollPositionWithSingleContext.pointerScroll.
Sourcefn jump_to_without_settling(self: Handle<Self>, app: &mut App, value: f64)
fn jump_to_without_settling(self: Handle<Self>, app: &mut App, value: f64)
Dart’s deprecated ScrollPositionWithSingleContext.jumpToWithoutSettling.
Sourcefn hold(
self: Handle<Self>,
app: &mut App,
hold_cancel_callback: Listener,
) -> Rc<dyn ScrollHoldController>
fn hold( self: Handle<Self>, app: &mut App, hold_cancel_callback: Listener, ) -> Rc<dyn ScrollHoldController>
Dart’s ScrollPositionWithSingleContext.hold.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".