From 90ff03c2fdffc09ddb26bdc7e32c3968a6d274fb Mon Sep 17 00:00:00 2001 From: hachem Date: Sun, 23 Aug 2026 22:39:47 +0200 Subject: [feat]: wire in scene into the simulation engine --- src/ui/workspace.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/ui/workspace.h') diff --git a/src/ui/workspace.h b/src/ui/workspace.h index 134d517..804d5a8 100644 --- a/src/ui/workspace.h +++ b/src/ui/workspace.h @@ -7,12 +7,26 @@ namespace Donut { class Scene; + // App-level actions a workspace can request (window/device changes it can't do + // itself). The Application implements this — it owns the window and device. + struct AppActions + { + virtual ~AppActions() = default; + virtual auto set_resolution(int w, int h) -> void = 0; + virtual auto set_fullscreen(bool on) -> void = 0; + virtual auto set_vsync(bool on) -> void = 0; + virtual auto set_ui_scale(float scale) -> void = 0; + virtual auto get_window_size(int& w, int& h) const -> void = 0; + virtual auto is_fullscreen() const -> bool = 0; + }; + // What a workspace gets each frame to build its panels. `scene` is mutable — - // workspaces edit the document through it. + // workspaces edit the document through it; `actions` performs app-level changes. struct UIContext { Scene& scene; std::string device_name; + AppActions& actions; }; // A Dorico-style workspace: one tab that owns its side panels and declares -- cgit v1.3