Files
Graphite/packages/graphite-editor/src/layout/mod.rs
2021-03-21 19:32:56 +01:00

35 lines
514 B
Rust

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<Contents>,
layout_direction: LayoutDirection,
}
enum Contents {
PanelArea(PanelArea),
Group(PanelGroup),
}
struct PanelArea {
panels: Vec<PanelId>,
active: PanelId,
}
enum LayoutDirection {
Horizontal,
Vertical,
}