Expand description

View widgets and shared data

So called “view widgets” allow separation of data and view. This system has three parts:

  1. Models are defined by kas::model, principally SharedData. Separate models are available for ListData and MatrixData.

  2. Views are widgets constructed over shared data by a controller. The view controller is a special widget responsible for constructing and managing view widgets over data.

    Three controllers are available: SingleView, ListView and MatrixView.

    In the case of ListView and MatrixView, the controller provides additional features: enabling scrolling of content, “paging” (loading only visible content) and (optionally) allowing selection of items.

  3. Drivers are the “glue” enabling a view controller to build view widget(s) tailored to a specific data type as well as (optionally) updating this data in response to widget events.

    If the driver is not explicitly provided, driver::View is used, which provides a read-only view over several data types. Other options are available in the driver module, or Driver may be implemented directly.

Re-exports

pub use driver::Driver;

Modules

View drivers

Structs

List view controller

Matrix view controller

Single view controller

Enums

Selection errors

Selection mode used by ListView

Used to notify selection and deselection of ListView and MatrixView children