Skip to main content

ScrollPositionBase

Struct ScrollPositionBase 

Source
pub struct ScrollPositionBase;
Expand description

The shared bodies of Dart’s ScrollPosition: call one where Dart writes super.….

Implementations§

Source§

impl ScrollPositionBase

Source

pub fn init<P: ScrollPosition>( this: Handle<P>, app: &mut App, old_position: Option<AnyScrollPosition>, )

Dart’s ScrollPosition constructor body: absorb the old position, then restore the saved scroll offset.

A leaf’s constructor calls this right after App::create, where Dart’s superclass constructor would run.

Source

pub fn pixels<P: ScrollPosition>(this: Handle<P>, app: &App) -> f64

See ViewportOffset::pixels, which a ScrollPosition answers from its bag.

Source

pub fn has_pixels<P: ScrollPosition>(this: Handle<P>, app: &App) -> bool

See ViewportOffset::has_pixels, which a ScrollPosition answers from its bag.

Source

pub fn absorb<P: ScrollPosition>( this: Handle<P>, app: &mut App, other: AnyScrollPosition, )

Source

pub fn set_pixels<P: ScrollPosition>( this: Handle<P>, app: &mut App, new_pixels: f64, ) -> f64

Source

pub fn correct_by<P: ScrollPosition>( this: Handle<P>, app: &mut App, correction: f64, )

Source

pub fn force_pixels<P: ScrollPosition>( this: Handle<P>, app: &mut App, value: f64, )

Source

pub fn save_scroll_offset<P: ScrollPosition>(this: Handle<P>, app: &mut App)

Source

pub fn restore_scroll_offset<P: ScrollPosition>(this: Handle<P>, app: &mut App)

Source

pub fn restore_offset<P: ScrollPosition>( this: Handle<P>, app: &mut App, offset: f64, initial_restore: bool, )

Source

pub fn save_offset<P: ScrollPosition>(this: Handle<P>, app: &mut App)

Source

pub fn apply_boundary_conditions<P: ScrollPosition>( this: Handle<P>, app: &mut App, value: f64, ) -> f64

Source

pub fn apply_viewport_dimension<P: ScrollPosition>( this: Handle<P>, app: &mut App, viewport_dimension: f64, ) -> bool

Source

pub fn apply_content_dimensions<P: ScrollPosition>( this: Handle<P>, app: &mut App, min_scroll_extent: f64, max_scroll_extent: f64, ) -> bool

Source

pub fn correct_for_new_dimensions<P: ScrollPosition>( this: Handle<P>, app: &mut App, old_position: &dyn ScrollMetrics, new_position: &dyn ScrollMetrics, ) -> bool

Source

pub fn apply_new_dimensions<P: ScrollPosition>(this: Handle<P>, app: &mut App)

Source

pub fn ensure_visible<P: ScrollPosition>( this: Handle<P>, app: &mut App, object: AnyRenderObject, alignment: f64, duration: Duration, curve: Rc<dyn Curve>, alignment_policy: ScrollPositionAlignmentPolicy, target_render_object: Option<AnyRenderObject>, ) -> CompleterFuture<()> ⓘ

Source

pub fn move_to<P: ScrollPosition>( this: Handle<P>, app: &mut App, to: f64, duration: Option<Duration>, curve: Option<Rc<dyn Curve>>, clamp: Option<bool>, ) -> CompleterFuture<()> ⓘ

See ViewportOffset::move_to, which a ScrollPosition overrides.

Source

pub fn allow_implicit_scrolling<P: ScrollPosition>( this: Handle<P>, app: &App, ) -> bool

Source

pub fn begin_activity<P: ScrollPosition>( this: Handle<P>, app: &mut App, new_activity: Option<ScrollActivityRef>, )

Source

pub fn did_start_scroll<P: ScrollPosition>(this: Handle<P>, app: &mut App)

Source

pub fn did_update_scroll_position_by<P: ScrollPosition>( this: Handle<P>, app: &mut App, delta: f64, )

Source

pub fn did_end_scroll<P: ScrollPosition>(this: Handle<P>, app: &mut App)

Source

pub fn did_overscroll_by<P: ScrollPosition>( this: Handle<P>, app: &mut App, value: f64, )

Source

pub fn did_update_scroll_direction<P: ScrollPosition>( this: Handle<P>, app: &mut App, direction: ScrollDirection, )

Source

pub fn did_update_scroll_metrics<P: ScrollPosition>( this: Handle<P>, app: &mut App, )

Source

pub fn recommend_deferred_loading<P: ScrollPosition>( this: Handle<P>, app: &mut App, context: BuildContext, ) -> bool

Source

pub fn dispose<P: ScrollPosition>(this: Handle<P>, app: &mut App)

Source

pub fn debug_fill_description<P: ScrollPosition>( this: Handle<P>, app: &App, description: &mut Vec<String>, )

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,