Skip to main content

ScrollList

Struct ScrollList 

Source
pub struct ScrollList<'a, T> {
    pub state: &'a mut ScrollListState<T>,
    pub axis: Axis,
    pub count: Option<usize>,
    pub animation: Animation,
    pub scroll_speed: f32,
    pub inertia_friction: f32,
    pub minimum_thumb_extent: T,
    pub floating: bool,
}
Expand description

use for large lists with variable or unknown row extents measures a bounded viewport window and estimates remaining extents rows must have positive finite extents along the axis an absent count scrolls indefinitely with a thumb covering the explored range

Fields§

§state: &'a mut ScrollListState<T>§axis: Axis§count: Option<usize>§animation: Animation§scroll_speed: f32§inertia_friction: f32§minimum_thumb_extent: T§floating: bool

scrollbars cover the content instead of taking space beside it

Implementations§

Source§

impl<'a, T> ScrollList<'a, T>
where T: Scalar,

Source

pub fn new(state: &'a mut ScrollListState<T>) -> ScrollList<'a, T>

creates a new ScrollList

Source

pub fn state(self, value: &'a mut ScrollListState<T>) -> ScrollList<'a, T>

Source

pub fn axis(self, value: Axis) -> ScrollList<'a, T>

Source

pub fn count(self, value: impl Into<Option<usize>>) -> ScrollList<'a, T>

Source

pub fn animation(self, value: impl Into<Animation>) -> ScrollList<'a, T>

Source

pub fn scroll_speed(self, value: f32) -> ScrollList<'a, T>

Source

pub fn inertia_friction(self, value: f32) -> ScrollList<'a, T>

Source

pub fn minimum_thumb_extent(self, value: T) -> ScrollList<'a, T>

Source

pub fn floating(self, value: bool) -> ScrollList<'a, T>

Source§

impl<'state, T> ScrollList<'state, T>
where T: Scalar,

Source

pub fn begin<'ui, C, S>(self, ui: Ui<'ui, C, S>) -> Rows<'state, 'ui, C>
where C: Context<Scalar = T>, S: NoLayout,

starts the list in ui, whose rows then come from Rows::next

Auto Trait Implementations§

§

impl<'a, T> !UnwindSafe for ScrollList<'a, T>

§

impl<'a, T> Forget for ScrollList<'a, T>

§

impl<'a, T> Freeze for ScrollList<'a, T>
where &'a mut ScrollListState<T>: Freeze, T: Freeze,

§

impl<'a, T> Move for ScrollList<'a, T>

§

impl<'a, T> RefUnwindSafe for ScrollList<'a, T>
where T: RefUnwindSafe,

§

impl<'a, T> Send for ScrollList<'a, T>
where T: Send, RawVecInner: Send,

§

impl<'a, T> Sync for ScrollList<'a, T>
where T: Sync, RawVecInner: Sync,

§

impl<'a, T> Unpin for ScrollList<'a, T>
where T: Unpin, &'a mut ScrollListState<T>: Unpin,

§

impl<'a, T> UnsafeUnpin for ScrollList<'a, T>
where &'a mut ScrollListState<T>: UnsafeUnpin, T: 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<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, 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.