Donner SVG 0.8.0-pre
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::editor::gui::EditorWindowOptions Struct Reference

Public Attributes

std::string title = "Donner SVG Editor"
int initialWidth = 1280
int initialHeight = 720
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 to emulate for hidden replay windows. Replay sets this to the recorded scale so framebuffer readback reproduces the pixel geometry of captures taken on a HiDPI machine.
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.

Member Data Documentation

◆ clearColor

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.

◆ enableFramebufferReadback

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.

◆ forceOffscreenRenderTarget

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.

◆ imguiIniPath

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.

◆ initialHeight

int donner::editor::gui::EditorWindowOptions::initialHeight = 720

◆ initialWidth

int donner::editor::gui::EditorWindowOptions::initialWidth = 1280

◆ offscreen

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.

◆ offscreenContentScale

double donner::editor::gui::EditorWindowOptions::offscreenContentScale = 1.0

Content/display scale to emulate for hidden replay windows. Replay sets this to the recorded scale so framebuffer readback reproduces the pixel geometry of captures taken on a HiDPI machine.

◆ title

std::string donner::editor::gui::EditorWindowOptions::title = "Donner SVG Editor"

◆ visible

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.


The documentation for this struct was generated from the following file: