Skip to main content

ScrollableDetails

Struct ScrollableDetails 

Source
pub struct ScrollableDetails {
    pub direction: AxisDirection,
    pub controller: Option<ScrollControllerRef>,
    pub physics: Option<ScrollPhysicsRef>,
    pub decoration_clip_behavior: Option<Clip>,
}
Expand description

Describes the aspects of a Scrollable widget to inform inherited widgets like crate::ScrollBehavior for decorating or enumerate the properties of combined scrollables, such as TwoDimensionalScrollable.

Decorations like GlowingOverscrollIndicators and Scrollbars require information about the scrollable in order to be initialized.

Fields§

§direction: AxisDirection

The direction in which the widget scrolls.

§controller: Option<ScrollControllerRef>

An object that can be used to control the position to which the widget is scrolled.

§physics: Option<ScrollPhysicsRef>

How the widgets should respond to user input.

§decoration_clip_behavior: Option<Clip>

The clip a decorator such as a StretchingOverscrollIndicator should honour.

This Clip does not affect the viewport’s own clip behaviour, but is rather passed from the same value by Scrollable so that decorators honour the same clip.

Defaults to None.

Implementations§

Source§

impl ScrollableDetails

Source

pub fn new(direction: AxisDirection) -> ScrollableDetails

Creates a set of details describing the Scrollable.

Source

pub fn vertical(reverse: bool) -> ScrollableDetails

A constructor specific to a Scrollable with an waft_painting::Axis::Vertical.

Source

pub fn horizontal(reverse: bool) -> ScrollableDetails

A constructor specific to a Scrollable with an waft_painting::Axis::Horizontal.

Source

pub fn controller(self, controller: ScrollControllerRef) -> ScrollableDetails

Dart ScrollableDetails(controller:).

Source

pub fn physics(self, physics: ScrollPhysicsRef) -> ScrollableDetails

Dart ScrollableDetails(physics:).

Source

pub fn decoration_clip_behavior( self, decoration_clip_behavior: Clip, ) -> ScrollableDetails

Dart ScrollableDetails(decorationClipBehavior:).

Source

pub fn clip_behavior(self, clip_behavior: Clip) -> ScrollableDetails

👎Deprecated:

Migrate to decoration_clip_behavior. This property was deprecated so that its application is clearer. This clip applies to decorators, and does not directly clip a scroll view. This feature was deprecated after v3.9.0-1.0.pre.

Deprecated setter for decoration_clip_behavior.

Source

pub fn copy_with(&self) -> ScrollableDetails

Copy the current ScrollableDetails with the given values replacing the current values.

Trait Implementations§

Source§

impl Clone for ScrollableDetails

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ScrollableDetails

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ScrollableDetails

Source§

fn eq(&self, other: &ScrollableDetails) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for ScrollableDetails

§

impl !Send for ScrollableDetails

§

impl !Sync for ScrollableDetails

§

impl !UnwindSafe for ScrollableDetails

§

impl Forget for ScrollableDetails

§

impl Freeze for ScrollableDetails
where NonZero<u32>: Freeze, &'static ScrollControllerVTable: Freeze, *const RcInner<Keep> is !null: Freeze, PhantomData<RcInner<Keep>>: Freeze, *const RcInner<dyn ScrollPhysics> is !null: Freeze, PhantomData<RcInner<dyn ScrollPhysics>>: Freeze,

§

impl Move for ScrollableDetails

§

impl Unpin for ScrollableDetails
where NonZero<u32>: Unpin, &'static ScrollControllerVTable: Unpin, Rc<Keep>: Unpin, Rc<dyn ScrollPhysics>: Unpin,

§

impl UnsafeUnpin for ScrollableDetails
where NonZeroU32Inner: UnsafeUnpin, &'static ScrollControllerVTable: UnsafeUnpin, *const RcInner<Keep> is !null: UnsafeUnpin, PhantomData<RcInner<Keep>>: UnsafeUnpin, *const RcInner<dyn ScrollPhysics> is !null: UnsafeUnpin, PhantomData<RcInner<dyn ScrollPhysics>>: UnsafeUnpin,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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>