Struct DataTableProps
pub struct DataTableProps {
pub name: Option<String>,
pub fill: bool,
pub roomy: bool,
pub selectable: bool,
pub columns: Vec<DataTableColumnProps>,
pub rows: Vec<DataTableRowProps>,
pub selection: Option<Vec<ResourceId>>,
pub select: Event,
pub activate: Event,
}Expand description
A table of resources as columns and rows: the attributes of a device, the songs in a library, the rules of a firewall. Each row is the resource it stands for and says what its columns read in it; pressing a header sorts by that column, and selecting or activating a row reports the row’s resource.
Fields§
§name: Option<String>What the table is, for assistive technology.
fill: boolThe table takes the height its parent gives it and scrolls inside itself, rather than being as tall as its rows inside another scroll.
roomy: boolRows a finger’s target tall, rather than a pointer target and a step.
selectable: boolWhether pressing a row picks it.
columns: Vec<DataTableColumnProps>The columns, in order.
rows: Vec<DataTableRowProps>The rows, in order.
selection: Option<Vec<ResourceId>>The selected rows, by the resource each stands for.
select: EventA row was selected: carries the resource it shows.
activate: EventA row was activated (a double click, Enter, an assistive technology): carries the resource it shows.
Trait Implementations§
§impl Component for DataTableProps
impl Component for DataTableProps
fn describe() -> Description
§fn from_source(source: &mut dyn Source) -> Result<DataTableProps, Error>
fn from_source(source: &mut dyn Source) -> Result<DataTableProps, Error>
source gives. Read more§impl Default for DataTableProps
impl Default for DataTableProps
§fn default() -> DataTableProps
fn default() -> DataTableProps
Auto Trait Implementations§
impl Freeze for DataTableProps
impl !RefUnwindSafe for DataTableProps
impl !Send for DataTableProps
impl !Sync for DataTableProps
impl Unpin for DataTableProps
impl UnsafeUnpin for DataTableProps
impl !UnwindSafe for DataTableProps
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