//! A widget allowing the user to display tables of information with optional sorting by category //! pub mod model; pub use model::{ category::ItemCategory, category::ItemInterface, selection::{MultiSelect, SingleSelect}, Entity, Model, }; pub mod widget; pub use widget::compact::CompactTableView; pub use widget::standard::TableView; pub type SingleSelectTableView<'a, Item, Category, Message> = TableView<'a, SingleSelect, Item, Category, Message>; pub type SingleSelectModel = Model; pub type MultiSelectTableView<'a, Item, Category, Message> = TableView<'a, MultiSelect, Item, Category, Message>; pub type MultiSelectModel = Model; pub fn table<'a, SelectionMode, Item, Category, Message>( model: &'a Model, ) -> TableView<'a, SelectionMode, Item, Category, Message> where Message: Clone, SelectionMode: Default, Category: ItemCategory, Item: ItemInterface, Model: model::selection::Selectable, { TableView::new(model) } pub fn compact_table<'a, SelectionMode, Item, Category, Message>( model: &'a Model, ) -> CompactTableView<'a, SelectionMode, Item, Category, Message> where Message: Clone, SelectionMode: Default, Category: ItemCategory, Item: ItemInterface, Model: model::selection::Selectable, { CompactTableView::new(model) }