diff options
| author | hachem <im@hachem.wtf> | 2026-08-23 21:55:36 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-08-23 21:55:36 +0200 |
| commit | 5ea6c14c0e14bacee766ce1280ab2c71564e05ec (patch) | |
| tree | 34620051e8eaf65db4ff9cd40ffd982a03e1ccc8 /src/ui/workspace.h | |
| parent | 8742482311b86bb705d93336805ab26881e96070 (diff) | |
[feat]: implement ui layer arch
Diffstat (limited to 'src/ui/workspace.h')
| -rw-r--r-- | src/ui/workspace.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/ui/workspace.h b/src/ui/workspace.h new file mode 100644 index 0000000..134d517 --- /dev/null +++ b/src/ui/workspace.h @@ -0,0 +1,29 @@ +#pragma once + +#include "rendering/view.h" +#include <string> + +namespace Donut +{ + class Scene; + + // What a workspace gets each frame to build its panels. `scene` is mutable — + // workspaces edit the document through it. + struct UIContext + { + Scene& scene; + std::string device_name; + }; + + // A Dorico-style workspace: one tab that owns its side panels and declares + // which viewport View it shows. Switching tabs switches both. Concrete + // workspaces (Setup / Scene / Simulation / Export) live in ui_layer.cpp. + class Workspace + { + public: + virtual ~Workspace() = default; + virtual auto name() const -> const char* = 0; + virtual auto view() const -> View = 0; + virtual auto on_ui(const UIContext& ctx) -> void = 0; + }; +} |
