From 5ea6c14c0e14bacee766ce1280ab2c71564e05ec Mon Sep 17 00:00:00 2001 From: hachem Date: Sun, 23 Aug 2026 21:55:36 +0200 Subject: [feat]: implement ui layer arch --- src/ui/ui_layer.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/ui/ui_layer.h (limited to 'src/ui/ui_layer.h') 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 + +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> m_workspaces; + int m_active = 0; + int m_landing = 0; // tab selected on the first frame + bool m_landed = false; + }; +} -- cgit v1.3