mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-16 23:08:05 +08:00
35 lines
514 B
Rust
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,
|
|
}
|