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: boolMoving 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: boolThe list is a column’s whole body: its rows’ text starts where the column’s header starts its title.
transcript: boolA conversation: each row stands in the page column, the list opens at its newest row and follows it.
page_column: boolEach 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: boolThe 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: boolThe 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: DescribedRowsThe items, in order.
removed: RemovedRowsItems 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: EventA row was selected: carries the item it shows.
activate: EventA row was activated (a click, Enter, an assistive technology): carries the item it shows.
selected: EventThe selection changed: carries the items selected, in the order they stand, and none when the selection was put away.
opened: EventThe person opened a row into its item where it stands: carries the item.
closed: EventThe row standing open closed: pressed again, Escape, a press beside it, or its item left the list.
Trait Implementations§
§impl Component for VirtualListProps
impl Component for VirtualListProps
fn describe() -> Description
§fn from_source(source: &mut dyn Source) -> Result<VirtualListProps, Error>
fn from_source(source: &mut dyn Source) -> Result<VirtualListProps, Error>
source gives. Read more§impl Default for VirtualListProps
impl Default for VirtualListProps
§fn default() -> VirtualListProps
fn default() -> VirtualListProps
Auto Trait Implementations§
impl Freeze for VirtualListProps
impl !RefUnwindSafe for VirtualListProps
impl !Send for VirtualListProps
impl !Sync for VirtualListProps
impl Unpin for VirtualListProps
impl UnsafeUnpin for VirtualListProps
impl !UnwindSafe for VirtualListProps
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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)
fn as_any(&self) -> &(dyn Any + 'static)
&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)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&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 Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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)
fn as_any(&self) -> &(dyn Any + 'static)
&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)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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