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

Method DockContextAddNode

imgui_tiny_app/imgui/imgui.cpp:18027–18041  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18025}
18026
18027static ImGuiDockNode* ImGui::DockContextAddNode(ImGuiContext* ctx, ImGuiID id)
18028{
18029 // Generate an ID for the new node (the exact ID value doesn't matter as long as it is not already used) and add the first window.
18030 ImGuiContext& g = *ctx;
18031 if (id == 0)
18032 id = DockContextGenNodeID(ctx);
18033 else
18034 IM_ASSERT(DockContextFindNodeByID(ctx, id) == NULL);
18035
18036 // We don't set node->LastFrameAlive on construction. Nodes are always created at all time to reflect .ini settings!
18037 IMGUI_DEBUG_LOG_DOCKING("[docking] DockContextAddNode 0x%08X\n", id);
18038 ImGuiDockNode* node = IM_NEW(ImGuiDockNode)(id);
18039 ctx->DockContext.Nodes.SetVoidPtr(node->ID, node);
18040 return node;
18041}
18042
18043static void ImGui::DockContextRemoveNode(ImGuiContext* ctx, ImGuiDockNode* node, bool merge_sibling_into_parent_node)
18044{

Callers

nothing calls this directly

Calls 1

SetVoidPtrMethod · 0.80

Tested by

no test coverage detected