Skip to main content

euv_core/layout/soa/
enum.rs

1/// Compact `Send + Sync` node semantic kind tag mirrored inside `SceneLayoutSoa`.
2#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
3pub enum SoaNodeKindTag {
4    /// Generic box/flex/grid container (`NodeKind::View`).
5    #[default]
6    Container,
7    /// Measured text leaf (`NodeKind::Text`).
8    Text,
9    /// Intrinsic-sized image leaf (`NodeKind::Image`).
10    Image,
11    /// Interactive text input leaf (`NodeKind::Input`).
12    Input,
13    /// Custom vector/2D canvas container (`NodeKind::Canvas`).
14    Canvas,
15    /// Top-layer portal overlay (`NodeKind::Portal`).
16    Portal,
17    /// Scrollable viewport container (`NodeKind::ScrollView`).
18    ScrollView,
19    /// Transparent layout fragment (`NodeKind::Fragment`).
20    Fragment,
21}
22
23/// Synchronization strategy executed during the most recent `SceneLayoutSoa::sync_from_tree`.
24#[derive(Clone, Copy, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
25pub enum SoaSyncMode {
26    /// No topology or scene mutation occurred; existing SoA buffers remained valid.
27    #[default]
28    SkippedClean,
29    /// Topology stayed unchanged; only dirty node style/text/visual slots updated with tight `DirtyBufferSpan`s.
30    Incremental,
31    /// Tree topology changed; `FlatBfsTopology` and flat GPU arrays rebuilt from `SceneTree`.
32    FullRebuild,
33}