Skip to main content

VirtualListProps

Struct VirtualListProps 

pub struct VirtualListProps {
Show 22 fields pub name: Option<String>, pub selection_follows_focus: bool, pub in_column: bool, pub transcript: bool, pub page_column: bool, pub tail_title: Option<String>, pub tree: bool, pub ungrouped_title: Option<String>, pub multi_select: bool, pub unread: Option<ResourceId>, pub rows: DescribedRows, pub removed: RemovedRows, pub selection: Option<Vec<String>>, pub chosen: Option<Vec<ResourceId>>, pub scroll: Option<f64>, pub open: Option<ResourceId>, pub motion: Option<Feel>, pub select: Event, pub activate: Event, pub selected: Event, pub opened: Event, pub closed: Event,
}
Expand description

A long list of rows that costs only the rows on screen: each is built when it scrolls into view. Selection follows the person’s choice and is reported with the item it shows; the list is one focus stop.

Fields§

§name: Option<String>

What the list is, for assistive technology.

§selection_follows_focus: bool

Moving through the rows with the keyboard selects them, as a list whose selection shows beside it does; a click or a tap on a row then activates it, as choosing an entry of an overview does.

§in_column: bool

The list is a column’s whole body: its rows’ text starts where the column’s header starts its title.

§transcript: bool

A conversation: each row stands in the page column, the list opens at its newest row and follows it.

§page_column: bool

Each row stands in the page column, at the readable measure every page sets its blocks on, a section’s gap under the row before it. A list read from its first row to its last (a conversation’s messages, a document’s replies) keeps the measure without following its end as a transcript does.

§tail_title: Option<String>

The title over the list’s tail group: the rows whose item says it is one of those done with (ListItemProps::tail) stand after every group, under it, closed until the person opens them. None leaves those rows among the others.

§tree: bool

The rows stand as a tree: each indented under the row of the item it names as its parent (ListItemProps::parent), with a disclosure on the rows that have subtasks, folding them away. The list works the tree out of the items as it builds their rows.

§ungrouped_title: Option<String>

The title over the group of rows whose item names no group: a list grouped by a thing some items lack (a day, a place) heads those rows with it, never folding them under the last group that names one. The rows keep the order their list gives. None leaves them among the others.

§multi_select: bool

The list holds more than one selected row: a click with ctrl (or cmd) adds or takes away the row it lands on, one with shift takes the range from the last row chosen, and Escape puts the selection away. Without it a click chooses the one row the window shows.

§unread: Option<ResourceId>

The item a conversation’s reader had not seen when they opened it (first_unseen(c)): the “New messages” divider stands over the row that shows it, and while that is above the view a pill at the foot offers to take the reader back to it. None draws neither. The list works out the row as it builds, so the same list keeps its rows and only the two the divider moved between build again.

§rows: DescribedRows

The items, in order.

§removed: RemovedRows

Items someone else removed that the person has not seen go: each a row after the items, its title struck through. The UI host places them.

§selection: Option<Vec<String>>

The selected rows, by key.

§chosen: Option<Vec<ResourceId>>

The items selected, in the order they stand: the selection a host keeps for its person, given back so a list built again shows it as they left it.

§scroll: Option<f64>

How far the list is scrolled, in logical pixels.

§open: Option<ResourceId>

The item standing open into its document where it stands in the list: its row grows to hold what the item’s row gives as its detail, and Escape or a press beside it closes it. A host keeps which item is open and gives it back, so a list it builds again shows the item as the person left it.

§motion: Option<Feel>

The pace its rows arrive, leave and change places at, and the rows it builds move at when they say nothing themselves: the theme’s unless it says otherwise.

§select: Event

A row was selected: carries the item it shows.

§activate: Event

A row was activated (a click, Enter, an assistive technology): carries the item it shows.

§selected: Event

The selection changed: carries the items selected, in the order they stand, and none when the selection was put away.

§opened: Event

The person opened a row into its item where it stands: carries the item.

§closed: Event

The row standing open closed: pressed again, Escape, a press beside it, or its item left the list.

Trait Implementations§

§

impl Component for VirtualListProps

§

const NAME: &'static str = "VirtualList"

The component’s name, as code calls it.
§

fn describe() -> Description

§

fn from_source(source: &mut dyn Source) -> Result<VirtualListProps, Error>

The props source gives. Read more
§

impl Default for VirtualListProps

§

fn default() -> VirtualListProps

Returns the “default value” for a type. Read more

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
§

impl<T> AsAny for T
where T: 'static,

§

fn as_any(&self) -> &(dyn Any + 'static)

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
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> NoneValue for T
where T: Default,

§

type NoneType = T

§

fn null_value() -> T

The none-equivalent value.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T, S> SimdFrom<T, S> for T
where S: Simd,

§

fn simd_from(_simd: S, value: T) -> T

§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

§

fn simd_into(self, simd: S) -> T

Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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

impl<T> Upcast<T> for T

§

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

§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,