Window creation settings and host UI configuration. More...
#include "donner/editor/gui/EditorWindow.h"
Public Attributes | |
| std::string | title = "Donner SVG Editor" |
| Native window title. | |
| int | initialWidth = 1280 |
| Requested initial window width. | |
| int | initialHeight = 720 |
| Requested initial window height. | |
| bool | visible = true |
| Whether the native desktop window should be shown. Hidden windows still create a real OpenGL context and are useful for framebuffer replay tests. They are additionally created undecorated: a titled window's frame is constrained to the display it lands on, and a silently shrunk replay window changes the editor's layout. See the constructor for details. | |
| bool | offscreen = false |
| Request an offscreen framebuffer-readback replay surface. Linux uses GLFW's windowless "null" platform (OSMesa software GL), even when a display is available. macOS keeps a native GPU-backed Cocoa context and relies on visible = false for hidden replay windows. | |
| bool | forceOffscreenRenderTarget = false |
| Force the WebGPU frame path to render into an offscreen texture instead of a presentable window surface, on every platform. | |
| double | offscreenContentScale = 1.0 |
| Content/display scale an offscreen window emulates. Replay sets this to the recorded scale so framebuffer readback reproduces the pixel geometry of captures taken on a HiDPI machine, and editor tests set it so they render at a chosen scale on every host. The emulated scale wins over the host display's own scale, including 1.0 on a HiDPI display: the framebuffer, the UI scale, windowSize, and contentScale all follow it. Ignored when offscreen is false. | |
| float | clearColor [4] = {0.11f, 0.11f, 0.13f, 1.0f} |
| Background clear color (RGBA, 0..1). Matches the viewport surround when the document doesn't fill the whole window. | |
| bool | enableFramebufferReadback = false |
| Enable framebuffer CPU readback from endFrameAndReadPixels. Intended for replay tests; disabled by default so production WGPU editor frames cannot read back by accident. | |
| std::string | imguiIniPath |
| Absolute path to the ImGui settings (.ini) file used to persist the dock layout and window state across sessions. Empty (the default) keeps ImGui settings in-memory only, so tests and replay stay hermetic; the desktop app sets a scoped per-user path. A missing or corrupt file falls back to the editor's default locked layout. | |
Window creation settings and host UI configuration.
| float donner::editor::gui::EditorWindowOptions::clearColor[4] = {0.11f, 0.11f, 0.13f, 1.0f} |
Background clear color (RGBA, 0..1). Matches the viewport surround when the document doesn't fill the whole window.
| bool donner::editor::gui::EditorWindowOptions::enableFramebufferReadback = false |
Enable framebuffer CPU readback from endFrameAndReadPixels. Intended for replay tests; disabled by default so production WGPU editor frames cannot read back by accident.
| bool donner::editor::gui::EditorWindowOptions::forceOffscreenRenderTarget = false |
Force the WebGPU frame path to render into an offscreen texture instead of a presentable window surface, on every platform.
Linux replay reaches that arm implicitly through GLFW's windowless "null" platform, so on macOS - which always builds a real (possibly hidden) Cocoa surface - the offscreen arm is otherwise unreachable and untestable. This flag makes it reachable anywhere a WebGPU device exists, so a single test can cover the offscreen target creation, resize, and readback path on both the Linux and macOS lanes. No effect in non-WebGPU (OpenGL) builds.
| std::string donner::editor::gui::EditorWindowOptions::imguiIniPath |
Absolute path to the ImGui settings (.ini) file used to persist the dock layout and window state across sessions. Empty (the default) keeps ImGui settings in-memory only, so tests and replay stay hermetic; the desktop app sets a scoped per-user path. A missing or corrupt file falls back to the editor's default locked layout.
| int donner::editor::gui::EditorWindowOptions::initialHeight = 720 |
Requested initial window height.
| int donner::editor::gui::EditorWindowOptions::initialWidth = 1280 |
Requested initial window width.
| bool donner::editor::gui::EditorWindowOptions::offscreen = false |
Request an offscreen framebuffer-readback replay surface. Linux uses GLFW's windowless "null" platform (OSMesa software GL), even when a display is available. macOS keeps a native GPU-backed Cocoa context and relies on visible = false for hidden replay windows.
| double donner::editor::gui::EditorWindowOptions::offscreenContentScale = 1.0 |
Content/display scale an offscreen window emulates. Replay sets this to the recorded scale so framebuffer readback reproduces the pixel geometry of captures taken on a HiDPI machine, and editor tests set it so they render at a chosen scale on every host. The emulated scale wins over the host display's own scale, including 1.0 on a HiDPI display: the framebuffer, the UI scale, windowSize, and contentScale all follow it. Ignored when offscreen is false.
| std::string donner::editor::gui::EditorWindowOptions::title = "Donner SVG Editor" |
Native window title.
| bool donner::editor::gui::EditorWindowOptions::visible = true |
Whether the native desktop window should be shown. Hidden windows still create a real OpenGL context and are useful for framebuffer replay tests. They are additionally created undecorated: a titled window's frame is constrained to the display it lands on, and a silently shrunk replay window changes the editor's layout. See the constructor for details.