Expand description
View widgets and shared data
View widgets allow data-oriented design. This is vaguely similar to the Model-View-Controller pattern or Elm’s Model-View-Update design, but with no direct link between Model and Controller:
- Model traits describe data models:
ListData
,MatrixData
- Drivers describe how to build a widget view over data and (optionally) how to handle messages from view widgets
- Controllers are special widgets which manage views over data
Three controllers are provided by this crate:
ListView
constructs a row or column of views over indexable dataMatrixView
constructs a table/sheet of views over two-dimensional indexable data
Both ListView
and MatrixView
support virtual scrolling: the number
of view widget instances is limited (approximately) to the number required
to cover the visible area, and these are re-used to enable fast scrolling
through large data sets.
Re-exports§
pub use driver::Driver;
Modules§
Structs§
- List
View - View controller for 1D indexable data (list)
- Matrix
View - View controller for 2D indexable data (matrix)
Enums§
- Selection
Mode - Selection mode used by
ListView
- Selection
Msg - Used to notify selection and deselection of
ListView
andMatrixView
children
Traits§
- DataKey
- Bounds on the key type
- List
Data - Trait for viewable data lists
- Matrix
Data - Trait for viewable data matrices
- Shared
Data - Trait for shared data