aboutsummaryrefslogtreecommitdiff
path: root/src/ui/ui_layer.h
diff options
context:
space:
mode:
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;
+ };
+}