Skip to main content

EuvVirtualList

Struct EuvVirtualList 

Source
pub struct EuvVirtualList { /* private fields */ }
Expand description

High-performance reactive virtualized scrollable list rendering only the visible window of total_items.

Implementations§

Source§

impl EuvVirtualList

Window calculation, clamped scrolling, and reactive mounting for EuvVirtualList.

Source

pub fn viewport_height(self, height: f32) -> Self

Sets the visible scroll viewport height in logical pixels fluently.

§Arguments
  • Self - Source virtual list.
  • f32 - Viewport height in logical pixels.
§Returns
  • Self - Updated virtual list.
Source

pub fn overscan(self, overscan: usize) -> Self

Sets the overscan row count mounted above and below the viewport fluently.

§Arguments
  • Self - Source virtual list.
  • usize - Number of extra rows to mount per edge.
§Returns
  • Self - Updated virtual list.
Source

pub fn max_scroll_y(&self) -> f32

Returns the maximum valid scroll Y offset in logical pixels.

§Arguments
  • &Self - Virtual list configuration.
§Returns
  • f32 - Upper scroll bound >= 0.0.
Source

pub fn scroll_by(&self, delta_y: f32)

Advances the reactive scroll offset by delta_y, clamped to [0.0, max_scroll_y()].

§Arguments
  • &Self - Virtual list configuration.
  • f32 - Incremental vertical scroll delta in logical pixels.
Source

pub fn visible_range(&self) -> (usize, usize)

Computes the (start_index, end_index_exclusive) window of rows visible in the viewport.

§Arguments
  • &Self - Virtual list configuration.
§Returns
  • (usize, usize) - Half-open range of indices to materialize.
Source

pub fn mount_with_handle<F>(&self, row_builder: F) -> EuvVirtualListHandle
where F: FnMut(usize) -> NodeId + 'static,

Mounts a reactive clipped scrollable list returning a controller handle for O(1) stable-ID single-row patches and refreshes.

§Arguments
  • &Self - Virtual list configuration.
  • F - Zero-context row builder closure taking usize row index and returning NodeId.
§Returns
  • EuvVirtualListHandle - Mounted viewport root and targeted single-row update controller.
Source

pub fn mount_with<F>(&self, row_builder: F) -> NodeId
where F: FnMut(usize) -> NodeId + 'static,

Mounts a reactive clipped scrollable list materializing only the visible row window as scroll_y changes.

§Arguments
  • &Self - Virtual list configuration.
  • F - Zero-context row builder closure taking usize row index and returning NodeId.
§Returns
  • NodeId - Mounted reactive scroll viewport handle.
Source

pub fn mount_pooled<S, Init, Bind>( &self, create_row: Init, bind_row: Bind, ) -> NodeId
where S: 'static, Init: FnMut() -> (NodeId, S) + 'static, Bind: FnMut(&mut S, usize, &mut SceneTree) + 'static,

Mounts a zero-allocation pooled virtual list that recycles mounted row subtrees and rebinds them in place on scroll.

§Arguments
  • &Self - Virtual list configuration.
  • Init - Factory constructing one reusable row subtree (row_root, row_state) per pool slot.
  • Bind - In-place binder updating a recycled row’s row_state for a new item index inside SceneTree.
§Returns
  • NodeId - Mounted reactive scroll viewport handle.
Source§

impl EuvVirtualList

Source

pub fn get_total_items(&self) -> usize

Source

pub fn get_mut_total_items(&mut self) -> &mut usize

Source

pub fn set_total_items(&mut self, val: usize) -> &mut Self

Source

pub fn get_item_height(&self) -> f32

Source

pub fn get_mut_item_height(&mut self) -> &mut f32

Source

pub fn set_item_height(&mut self, val: f32) -> &mut Self

Source

pub fn get_viewport_height(&self) -> f32

Source

pub fn get_mut_viewport_height(&mut self) -> &mut f32

Source

pub fn set_viewport_height(&mut self, val: f32) -> &mut Self

Source

pub fn get_scroll_y(&self) -> Signal<f32>

Source

pub fn get_mut_scroll_y(&mut self) -> &mut Signal<f32>

Source

pub fn set_scroll_y(&mut self, val: Signal<f32>) -> &mut Self

Source

pub fn get_overscan(&self) -> usize

Source

pub fn get_mut_overscan(&mut self) -> &mut usize

Source

pub fn set_overscan(&mut self, val: usize) -> &mut Self

Source

pub fn get_tokens(&self) -> ThemeTokens

Source

pub fn get_mut_tokens(&mut self) -> &mut ThemeTokens

Source

pub fn set_tokens(&mut self, val: ThemeTokens) -> &mut Self

Source§

impl EuvVirtualList

Source

pub fn new( total_items: usize, item_height: f32, scroll_y: Signal<f32>, tokens: ThemeTokens, ) -> Self

Trait Implementations§

Source§

impl Clone for EuvVirtualList

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 EuvVirtualList

Source§

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

Formats the struct fields as a debug struct, skipping excluded fields.

§Arguments
  • &mut ::std::fmt::Formatter<'_> - The formatter to write the representation into.
§Returns
  • ::std::fmt::Result - Success or failure of the formatting operation.

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<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> 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> 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.