mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-10-02 20:48:12 +08:00
Add graphite-editor library skeleton (#34)
This commit is contained in:
committed by
Keavon Chambers
parent
17a1043d07
commit
1b8c71d2b3
@@ -0,0 +1,34 @@
|
||||
use crate::EditorError;
|
||||
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,
|
||||
}
|
||||
Reference in New Issue
Block a user