Crate kas_view

Source
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:

  1. Model traits describe data models: ListData, MatrixData
  2. Drivers describe how to build a widget view over data and (optionally) how to handle messages from view widgets
  3. 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 data
  • MatrixView 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§

driver
View drivers
filter
Filters over data

Structs§

ListView
View controller for 1D indexable data (list)
MatrixView
View controller for 2D indexable data (matrix)

Enums§

SelectionMode
Selection mode used by ListView
SelectionMsg
Used to notify selection and deselection of ListView and MatrixView children

Traits§

DataKey
Bounds on the key type
ListData
Trait for viewable data lists
MatrixData
Trait for viewable data matrices
SharedData
Trait for shared data