1use egui_pop_model::mount::{ClaimKey, Mountable};
6
7pub const TREE: &str = "tree";
9pub const TABLE: &str = "table";
11pub const LIBRARY_GRID: &str = "library-grid";
13pub const FILMSTRIP: &str = "filmstrip";
15pub const COMPARE: &str = "compare";
17
18pub fn tree() -> Mountable {
20 Mountable::new(TREE, "Tree")
21 .crate_name("egui-pop-views")
22 .claims(&[ClaimKey::Enter, ClaimKey::Space])
23 .drag()
24 .bounded_workers()
25 .fills()
26 .popups()
27 .role("tree")
28}
29
30pub fn table() -> Mountable {
32 Mountable::new(TABLE, "Table, list")
33 .crate_name("egui-pop-views")
34 .claims(&[ClaimKey::Enter, ClaimKey::Space])
35 .drag()
36 .fills()
37 .popups()
38 .role("grid")
39}
40
41pub fn library_grid() -> Mountable {
44 Mountable::new(LIBRARY_GRID, "Library grid")
45 .crate_name("egui-pop-views")
46 .claims(&[ClaimKey::Space])
47 .keymap()
48 .drag()
49 .wheel()
50 .bounded_workers()
51 .fills()
52 .role("grid")
53}
54
55pub fn filmstrip() -> Mountable {
57 Mountable::new(FILMSTRIP, "Filmstrip")
58 .crate_name("egui-pop-views")
59 .claims(&[ClaimKey::Space])
60 .keymap()
61 .drag()
62 .wheel()
63 .bounded_workers()
64 .min(120.0, 120.0)
65 .fills()
66 .role("grid")
67}
68
69pub fn compare() -> Mountable {
71 Mountable::new(COMPARE, "Compare view")
72 .crate_name("egui-pop-views")
73 .keyboard(egui_pop_model::mount::Keyboard::None)
74 .drag()
75 .wheel()
76 .bounded_workers()
77 .min(0.0, 80.0)
78 .fills()
79 .role("image")
80}
81
82pub fn components() -> Vec<Mountable> {
84 vec![library_grid(), filmstrip(), compare(), tree(), table()]
85}