Skip to content

Commit 6180293

Browse files
committed
Add data-models stub
1 parent 6e27899 commit 6180293

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
- [Sync-counter: Adapt'ing AppData](sync-counter.md)
77
- [Calculator: make_widget and grid](calculator.md)
88
- [Custom widgets](custom-widget.md)
9+
- [Data models](data-models.md)

src/data-models.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Sync-counter: data models
2+
3+
*Topics: data models and view widgets*
4+
5+
TODO:
6+
7+
- [`ListView`] and [`ListData`]
8+
- [`Driver`], including predefined impls
9+
- [`Filter`] and [`UnsafeFilteredList`]. This rather messy to use (improvable?). The latter should eventually be replaced with a safe variant.
10+
- [`MatrixView`] and [`MatrixData`]. (Will possibly gain support for row/column labels and be renamed `TableView`.)
11+
12+
For now, see the examples:
13+
14+
- [`examples/ldata-list-view.rs`](https://github.com/kas-gui/kas/blob/master/examples/data-list-view.rs) uses [`ListView`] with custom [`ListData`] and [`Driver`]
15+
- [`examples/gallery.rs`](https://github.com/kas-gui/kas/blob/master/examples/gallery.rs#L338)'s `filter_list` uses [`UnsafeFilteredList`] with a custom [`Driver`]. Less code but possibly more complex.
16+
- [`examples/times-tables.rs`](https://github.com/kas-gui/kas/blob/master/examples/times-tables.rs) uses [`MatrixView`] with custom [`MatrixData`] and [`driver::NavView`]. Probably the easiest example.
17+
18+
[`ListView`]: https://docs.rs/kas/latest/kas/view/struct.ListView.html
19+
[`ListData`]: https://docs.rs/kas/latest/kas/view/trait.ListData.html
20+
[`Driver`]: https://docs.rs/kas/latest/kas/view/trait.Driver.html
21+
[`driver::NavView`]: https://docs.rs/kas/latest/kas/view/driver/struct.NavView.html
22+
[`Filter`]: https://docs.rs/kas/latest/kas/view/filter/trait.Filter.html
23+
[`UnsafeFilteredList`]: https://docs.rs/kas/latest/kas/view/filter/struct.UnsafeFilteredList.html
24+
[`MatrixView`]: https://docs.rs/kas/latest/kas/view/struct.MatrixView.html
25+
[`MatrixData`]: https://docs.rs/kas/latest/kas/view/trait.MatrixData.html

0 commit comments

Comments
 (0)