[DEBUG] Display contents of ImDockNode
| 23077 | |
| 23078 | // [DEBUG] Display contents of ImDockNode |
| 23079 | void ImGui::DebugNodeDockNode(ImGuiDockNode* node, const char* label) |
| 23080 | { |
| 23081 | ImGuiContext& g = *GImGui; |
| 23082 | const bool is_alive = (g.FrameCount - node->LastFrameAlive < 2); // Submitted with ImGuiDockNodeFlags_KeepAliveOnly |
| 23083 | const bool is_active = (g.FrameCount - node->LastFrameActive < 2); // Submitted |
| 23084 | if (!is_alive) { PushStyleColor(ImGuiCol_Text, GetStyleColorVec4(ImGuiCol_TextDisabled)); } |
| 23085 | bool open; |
| 23086 | ImGuiTreeNodeFlags tree_node_flags = node->IsFocused ? ImGuiTreeNodeFlags_Selected : ImGuiTreeNodeFlags_None; |
| 23087 | if (node->Windows.Size > 0) |
| 23088 | open = TreeNodeEx((void*)(intptr_t)node->ID, tree_node_flags, "%s 0x%04X%s: %d windows (vis: '%s')", label, node->ID, node->IsVisible ? "" : " (hidden)", node->Windows.Size, node->VisibleWindow ? node->VisibleWindow->Name : "NULL"); |
| 23089 | else |
| 23090 | open = TreeNodeEx((void*)(intptr_t)node->ID, tree_node_flags, "%s 0x%04X%s: %s (vis: '%s')", label, node->ID, node->IsVisible ? "" : " (hidden)", (node->SplitAxis == ImGuiAxis_X) ? "horizontal split" : (node->SplitAxis == ImGuiAxis_Y) ? "vertical split" : "empty", node->VisibleWindow ? node->VisibleWindow->Name : "NULL"); |
| 23091 | if (!is_alive) { PopStyleColor(); } |
| 23092 | if (is_active && IsItemHovered()) |
| 23093 | if (ImGuiWindow* window = node->HostWindow ? node->HostWindow : node->VisibleWindow) |
| 23094 | GetForegroundDrawList(window)->AddRect(node->Pos, node->Pos + node->Size, IM_COL32(255, 255, 0, 255)); |
| 23095 | if (open) |
| 23096 | { |
| 23097 | IM_ASSERT(node->ChildNodes[0] == NULL || node->ChildNodes[0]->ParentNode == node); |
| 23098 | IM_ASSERT(node->ChildNodes[1] == NULL || node->ChildNodes[1]->ParentNode == node); |
| 23099 | BulletText("Pos (%.0f,%.0f), Size (%.0f, %.0f) Ref (%.0f, %.0f)", |
| 23100 | node->Pos.x, node->Pos.y, node->Size.x, node->Size.y, node->SizeRef.x, node->SizeRef.y); |
| 23101 | DebugNodeWindow(node->HostWindow, "HostWindow"); |
| 23102 | DebugNodeWindow(node->VisibleWindow, "VisibleWindow"); |
| 23103 | BulletText("SelectedTabID: 0x%08X, LastFocusedNodeID: 0x%08X", node->SelectedTabId, node->LastFocusedNodeId); |
| 23104 | BulletText("Misc:%s%s%s%s%s%s%s", |
| 23105 | node->IsDockSpace() ? " IsDockSpace" : "", |
| 23106 | node->IsCentralNode() ? " IsCentralNode" : "", |
| 23107 | is_alive ? " IsAlive" : "", is_active ? " IsActive" : "", node->IsFocused ? " IsFocused" : "", |
| 23108 | node->WantLockSizeOnce ? " WantLockSizeOnce" : "", |
| 23109 | node->HasCentralNodeChild ? " HasCentralNodeChild" : ""); |
| 23110 | if (TreeNode("flags", "Flags Merged: 0x%04X, Local: 0x%04X, InWindows: 0x%04X, Shared: 0x%04X", node->MergedFlags, node->LocalFlags, node->LocalFlagsInWindows, node->SharedFlags)) |
| 23111 | { |
| 23112 | if (BeginTable("flags", 4)) |
| 23113 | { |
| 23114 | TableNextColumn(); DebugNodeDockNodeFlags(&node->MergedFlags, "MergedFlags", false); |
| 23115 | TableNextColumn(); DebugNodeDockNodeFlags(&node->LocalFlags, "LocalFlags", true); |
| 23116 | TableNextColumn(); DebugNodeDockNodeFlags(&node->LocalFlagsInWindows, "LocalFlagsInWindows", false); |
| 23117 | TableNextColumn(); DebugNodeDockNodeFlags(&node->SharedFlags, "SharedFlags", true); |
| 23118 | EndTable(); |
| 23119 | } |
| 23120 | TreePop(); |
| 23121 | } |
| 23122 | if (node->ParentNode) |
| 23123 | DebugNodeDockNode(node->ParentNode, "ParentNode"); |
| 23124 | if (node->ChildNodes[0]) |
| 23125 | DebugNodeDockNode(node->ChildNodes[0], "Child[0]"); |
| 23126 | if (node->ChildNodes[1]) |
| 23127 | DebugNodeDockNode(node->ChildNodes[1], "Child[1]"); |
| 23128 | if (node->TabBar) |
| 23129 | DebugNodeTabBar(node->TabBar, "TabBar"); |
| 23130 | DebugNodeWindowsList(&node->Windows, "Windows"); |
| 23131 | |
| 23132 | TreePop(); |
| 23133 | } |
| 23134 | } |
| 23135 | |
| 23136 | // [DEBUG] Display contents of ImDrawList |
nothing calls this directly
no test coverage detected