use crate::EditorError; pub type PanelId = usize; struct LayoutRoot { hovered_panel: PanelId, root: PanelGroup, } impl LayoutRoot { // add panel / panel group // delete panel / panel group // move panel / panel group // get_serialized_layout() } struct PanelGroup { contents: Vec, layout_direction: LayoutDirection, } enum Contents { PanelArea(PanelArea), Group(PanelGroup), } struct PanelArea { panels: Vec, active: PanelId, } enum LayoutDirection { Horizontal, Vertical, }