Struct ListRowProps
pub struct ListRowProps {Show 22 fields
pub key: String,
pub title: String,
pub prefix: Option<String>,
pub item: Option<ResourceId>,
pub secondary: Option<String>,
pub note: Option<String>,
pub meta: Option<String>,
pub meta_tone: Tone,
pub value: Option<String>,
pub badge: Option<String>,
pub mark: Option<Icon>,
pub tone: Tone,
pub icon: Option<Icon>,
pub selected: bool,
pub avatar: Option<AvatarProps>,
pub trailing: Option<Box<dyn Widget>>,
pub checkbox: Option<Bound<bool>>,
pub check: Event,
pub motion: Option<Feel>,
pub dense: bool,
pub activate: Event,
pub quiet: bool,
}Expand description
A row of a list: what an item is, in one line, with the start of its content under it and a quiet fact on its trailing edge. Pressing it activates it: a list opens what it shows.
Fields§
§key: StringThe row’s stable key: selection, focus and motion follow it.
title: StringWhat the item is: its title. A row that names none shows its item’s.
prefix: Option<String>A quiet word before the title, on the same line and in the weaker ink: where an item came from, what it answers. The title shares its line, so a row that says one takes the room left after it.
item: Option<ResourceId>The resource the row shows, which activating the row opens.
secondary: Option<String>The line under the title: the start of the item’s content, the last message.
note: Option<String>A line of the row’s own under its text: what waits on the item and is not its content, as a proposal about it reads (“Suggested: move this to the end”). One line, elided; empty shows nothing.
meta: Option<String>When it happened or is due: the first fact of the row’s facts column.
meta_tone: ToneThe tone the trailing fact reads in, where the item it states has one: a day gone by is overdue. The UI host reads it off the day itself, as the one presenter gives it.
value: Option<String>The item’s figure among its facts, as a setting shows it.
badge: Option<String>A short code in the leading column: a method, a kind.
mark: Option<Icon>A mark on the row’s edge, after every other fact: pinned, starred, an item’s priority.
tone: ToneThe tone the mark and the row’s checkbox ring read in: the item’s priority, a theme
role rather than a colour. Neutral draws them as the row’s quiet ink.
icon: Option<Icon>A glyph in the leading column: what kind of item it is.
selected: boolWhether the row is selected in its list.
avatar: Option<AvatarProps>Who the item is: their face among its facts, between when it is due and how far it has got.
trailing: Option<Box<dyn Widget>>A control on the trailing edge, which moves under the text when the row is narrow.
checkbox: Option<Bound<bool>>A checkbox in the leading column, bound to whether the item is done. A press on it asks
the row’s check, when it names one, instead of changing what it is bound to.
check: EventThe checkbox was pressed: what a check is, in the app’s words. A task and every step
under it are done in one thing to undo; with no check, a press changes the bound value.
motion: Option<Feel>The pace the row’s own motion plays at: its mark coming and going, and the row arriving, leaving and changing places in its list. Unset, the theme’s.
dense: boolThe row stands dense: one quiet line at the caption’s size with the small glyph, as tall as that line and its inset, for a reference under content rather than a list of items.
activate: EventThe row was activated (a click, Enter, an assistive technology): open what it shows.
quiet: boolThe row reads as subordinate to the rows around it: its title in the weaker ink, as an outline’s quieter branch does.
Implementations§
§impl ListRowProps
impl ListRowProps
pub fn reusable(&self) -> Option<ListRowProps>
pub fn reusable(&self) -> Option<ListRowProps>
The props again, for a list that builds the row anew each time it scrolls into view:
None for a row with a trailing control, which is built once.
Trait Implementations§
§impl Component for ListRowProps
impl Component for ListRowProps
fn describe() -> Description
§fn from_source(source: &mut dyn Source) -> Result<ListRowProps, Error>
fn from_source(source: &mut dyn Source) -> Result<ListRowProps, Error>
source gives. Read more§impl Default for ListRowProps
impl Default for ListRowProps
§fn default() -> ListRowProps
fn default() -> ListRowProps
Auto Trait Implementations§
impl Freeze for ListRowProps
impl !RefUnwindSafe for ListRowProps
impl !Send for ListRowProps
impl !Sync for ListRowProps
impl Unpin for ListRowProps
impl UnsafeUnpin for ListRowProps
impl !UnwindSafe for ListRowProps
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