//! A widget allowing the user to display tables of information with optional sorting by category //! pub mod model; pub use model::{ Entity, Model, category::ItemCategory, category::ItemInterface, selection::{MultiSelect, SingleSelect}, }; 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( model: &Model, ) -> TableView<'_, SelectionMode, Item, Category, Message> where Message: Clone, SelectionMode: Default, Category: ItemCategory, Item: ItemInterface, Model: model::selection::Selectable, { TableView::new(model) } pub fn compact_table( model: &Model, ) -> CompactTableView<'_, SelectionMode, Item, Category, Message> where Message: Clone, SelectionMode: Default, Category: ItemCategory, Item: ItemInterface, Model: model::selection::Selectable, { CompactTableView::new(model) }