fret_ui/tree/layers/
types.rs1use super::super::*;
2
3slotmap::new_key_type! {
4 pub struct UiLayerId;
5}
6
7#[derive(Debug, Clone, Copy, PartialEq, Eq)]
13pub struct OverlayRootOptions {
14 pub blocks_underlay_input: bool,
19 pub hit_testable: bool,
21}
22
23impl OverlayRootOptions {
24 pub const fn new(blocks_underlay_input: bool) -> Self {
25 Self {
26 blocks_underlay_input,
27 hit_testable: true,
28 }
29 }
30}
31
32impl Default for OverlayRootOptions {
33 fn default() -> Self {
34 Self::new(false)
35 }
36}
37
38#[derive(Debug, Clone)]
39pub(in crate::tree) struct UiLayer {
40 pub(in crate::tree) root: NodeId,
41 pub(in crate::tree) visible: bool,
42 pub(in crate::tree) blocks_underlay_input: bool,
43 pub(in crate::tree) blocks_underlay_focus: bool,
44 pub(in crate::tree) hit_testable: bool,
45 pub(in crate::tree) pointer_occlusion: PointerOcclusion,
46 pub(in crate::tree) wants_pointer_down_outside_events: bool,
47 pub(in crate::tree) consume_pointer_down_outside_events: bool,
48 pub(in crate::tree) pointer_down_outside_branches: Vec<NodeId>,
49 pub(in crate::tree) scroll_dismiss_elements: Vec<crate::GlobalElementId>,
52 pub(in crate::tree) wants_pointer_move_events: bool,
53 pub(in crate::tree) wants_timer_events: bool,
54}