Donner SVG Editor & Engine
SVG-native editor and embeddable SVG2 + CSS3 engine in C++20, with GPU (WebGPU) and compact CPU renderers, built for correctness, security, and performance.
Loading...
Searching...
No Matches
EditorDockLayout.h File Reference
Include dependency graph for EditorDockLayout.h:

Classes

struct  donner::editor::EditorDockNodes
 Node ids produced by BuildDefaultDockLayout. Ids of zero mean the node was not created (e.g. EditorDockNodes::rightBottom when the compositor debug panel is excluded from the layout). More...
struct  donner::editor::EditorDockLayoutParams
 Inputs controlling the default editor dock layout proportions. More...

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.

Functions

ImGuiID donner::editor::EditorDockSpaceId ()
 The editor's root DockSpace id. Hashed directly from kEditorDockSpaceName so it is stable and independent of the ImGui window stack (unlike ImGui::GetID, which dereferences the current window).
ImGuiID donner::editor::EditorCompactDockSpaceId ()
 The compact editor's root DockSpace id. Kept separate so entering compact mode cannot rewrite a customized desktop DockSpace tree.
EditorDockNodes donner::editor::BuildDefaultDockLayout (ImGuiID dockspaceId, const EditorDockLayoutParams &params)
 Build the editor's default panel layout under dockspaceId, discarding any previously built nodes.
ImGuiDockNodeFlags donner::editor::EditorDockSpaceFlags (bool locked)
 Shared dock-node flags to pass to ImGui::DockSpace() for the given lock state.

Variables

constexpr const char * donner::editor::kRenderPaneWindowName = "Render"
 Window titles for the dockable editor panels. Each string is the key DockBuilder binds to a node, so it must match the exact string passed to ImGui::Begin() when the panel is drawn.
constexpr const char * donner::editor::kLayersWindowName = "Layers"
constexpr const char * donner::editor::kInspectorWindowName = "Inspector"
constexpr const char * donner::editor::kCompositorDebugWindowName = "Compositor Debug"
constexpr const char * donner::editor::kEditorDockSpaceName = "EditorDockSpace"
 Stable string hashed into the editor's root DockSpace id.
constexpr const char * donner::editor::kEditorCompactDockSpaceName = "EditorCompactDockSpace"
 Stable string hashed into the compact editor's canvas-only DockSpace id.

Function Documentation

◆ BuildDefaultDockLayout()

EditorDockNodes donner::editor::BuildDefaultDockLayout ( ImGuiID dockspaceId,
const EditorDockLayoutParams & params )

Build the editor's default panel layout under dockspaceId, discarding any previously built nodes.

The central node hosts the canvas; the right column stacks Layers over Inspector (and Compositor Debug at the bottom when requested). The canvas node is flagged as the central node with no tab bar so it reads as a plain viewport rather than a docked tab.

Requires a live ImGui context. The bound windows do not need to have been submitted yet; DockBuilder records the binding for their next Begin().

Parameters
dockspaceIdRoot DockSpace id (see kEditorDockSpaceName).
paramsLayout proportions and panel inclusion.
Returns
Ids of the created nodes.

◆ EditorDockSpaceFlags()

ImGuiDockNodeFlags donner::editor::EditorDockSpaceFlags ( bool locked)
nodiscard

Shared dock-node flags to pass to ImGui::DockSpace() for the given lock state.

When locked, splitters, resizing, and undocking (tear-off) are all disabled so the layout cannot be accidentally torn apart; when unlocked the layout is freely rearrangeable within the main viewport (multi-viewport tear-off to OS windows stays disabled at the config-flag level).

Parameters
lockedWhether the layout is locked.