aboutsummaryrefslogtreecommitdiff
path: root/src/ui/ui_layer.h
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-08-23 21:55:36 +0200
committerhachem <im@hachem.wtf>2026-08-23 21:55:36 +0200
commit5ea6c14c0e14bacee766ce1280ab2c71564e05ec (patch)
tree34620051e8eaf65db4ff9cd40ffd982a03e1ccc8 /src/ui/ui_layer.h
parent8742482311b86bb705d93336805ab26881e96070 (diff)
[feat]: implement ui layer arch
Diffstat (limited to 'src/ui/ui_layer.h')
-rw-r--r--src/ui/ui_layer.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/ui/ui_layer.h b/src/ui/ui_layer.h
new file mode 100644
index 0000000..67c9d8f
--- /dev/null
+++ b/src/ui/ui_layer.h
@@ -0,0 +1,27 @@
+#pragma once
+
+#include "workspace.h"
+#include "rendering/view.h"
+#include "core/memory.h"
+
+#include <vector>
+
+namespace Donut
+{
+ // The Dorico-style tab strip. Owns the workspaces (Setup / Scene / Simulation
+ // / Export); each frame it draws the dock space, the shared header, the tab
+ // bar, and delegates the active tab's panels. Returns the active workspace's
+ // View so the Application knows what the RenderPath should draw.
+ class UILayer
+ {
+ public:
+ UILayer();
+ auto draw(const UIContext& ctx) -> View;
+
+ private:
+ std::vector<Scope<Workspace>> m_workspaces;
+ int m_active = 0;
+ int m_landing = 0; // tab selected on the first frame
+ bool m_landed = false;
+ };
+}