MCPcopy Create free account
hub / github.com/Aegel5/SimpleSwitcher / DockContextBuildAddWindowsToNodes

Method DockContextBuildAddWindowsToNodes

imgui_tiny_app/imgui/imgui.cpp:18211–18227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18209}
18210
18211void ImGui::DockContextBuildAddWindowsToNodes(ImGuiContext* ctx, ImGuiID root_id)
18212{
18213 // Rebind all windows to nodes (they can also lazily rebind but we'll have a visible glitch during the first frame)
18214 ImGuiContext& g = *ctx;
18215 for (ImGuiWindow* window : g.Windows)
18216 {
18217 if (window->DockId == 0 || window->LastFrameActive < g.FrameCount - 1)
18218 continue;
18219 if (window->DockNode != NULL)
18220 continue;
18221
18222 ImGuiDockNode* node = DockContextFindNodeByID(ctx, window->DockId);
18223 IM_ASSERT(node != NULL); // This should have been called after DockContextBuildNodesFromSettings()
18224 if (root_id == 0 || DockNodeGetRootNode(node)->ID == root_id)
18225 DockNodeAddWindow(node, window, true);
18226 }
18227}
18228
18229//-----------------------------------------------------------------------------
18230// Docking: ImGuiDockContext Docking/Undocking functions

Callers

nothing calls this directly

Calls 1

DockNodeGetRootNodeFunction · 0.85

Tested by

no test coverage detected