MCPcopy Create free account
hub / github.com/Wemino/EchoPatch / DebugNodeWindow

Method DebugNodeWindow

include/imgui/imgui.cpp:17601–17667  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17599}
17600
17601void ImGui::DebugNodeWindow(ImGuiWindow* window, const char* label)
17602{
17603 if (window == NULL)
17604 {
17605 BulletText("%s: NULL", label);
17606 return;
17607 }
17608
17609 ImGuiContext& g = *GImGui;
17610 const bool is_active = window->WasActive;
17611 ImGuiTreeNodeFlags tree_node_flags = (window == g.NavWindow) ? ImGuiTreeNodeFlags_Selected : ImGuiTreeNodeFlags_None;
17612 if (!is_active) { PushStyleColor(ImGuiCol_Text, GetStyleColorVec4(ImGuiCol_TextDisabled)); }
17613 const bool open = TreeNodeEx(label, tree_node_flags, "%s '%s'%s", label, window->Name, is_active ? "" : " *Inactive*");
17614 if (!is_active) { PopStyleColor(); }
17615 if (IsItemHovered() && is_active)
17616 GetForegroundDrawList(window)->AddRect(window->Pos, window->Pos + window->Size, IM_COL32(255, 255, 0, 255));
17617 if (!open)
17618 return;
17619
17620 if (window->MemoryCompacted)
17621 TextDisabled("Note: some memory buffers have been compacted/freed.");
17622
17623 if (g.IO.ConfigDebugIsDebuggerPresent && DebugBreakButton("**DebugBreak**", "in Begin()"))
17624 g.DebugBreakInWindow = window->ID;
17625
17626 ImGuiWindowFlags flags = window->Flags;
17627 DebugNodeDrawList(window, window->Viewport, window->DrawList, "DrawList");
17628 BulletText("Pos: (%.1f,%.1f), Size: (%.1f,%.1f), ContentSize (%.1f,%.1f) Ideal (%.1f,%.1f)", window->Pos.x, window->Pos.y, window->Size.x, window->Size.y, window->ContentSize.x, window->ContentSize.y, window->ContentSizeIdeal.x, window->ContentSizeIdeal.y);
17629 BulletText("Flags: 0x%08X (%s%s%s%s%s%s%s%s%s..)", flags,
17630 (flags & ImGuiWindowFlags_ChildWindow) ? "Child " : "", (flags & ImGuiWindowFlags_Tooltip) ? "Tooltip " : "", (flags & ImGuiWindowFlags_Popup) ? "Popup " : "",
17631 (flags & ImGuiWindowFlags_Modal) ? "Modal " : "", (flags & ImGuiWindowFlags_ChildMenu) ? "ChildMenu " : "", (flags & ImGuiWindowFlags_NoSavedSettings) ? "NoSavedSettings " : "",
17632 (flags & ImGuiWindowFlags_NoMouseInputs)? "NoMouseInputs":"", (flags & ImGuiWindowFlags_NoNavInputs) ? "NoNavInputs" : "", (flags & ImGuiWindowFlags_AlwaysAutoResize) ? "AlwaysAutoResize" : "");
17633 if (flags & ImGuiWindowFlags_ChildWindow)
17634 BulletText("ChildFlags: 0x%08X (%s%s%s%s..)", window->ChildFlags,
17635 (window->ChildFlags & ImGuiChildFlags_Borders) ? "Borders " : "",
17636 (window->ChildFlags & ImGuiChildFlags_ResizeX) ? "ResizeX " : "",
17637 (window->ChildFlags & ImGuiChildFlags_ResizeY) ? "ResizeY " : "",
17638 (window->ChildFlags & ImGuiChildFlags_NavFlattened) ? "NavFlattened " : "");
17639 BulletText("Scroll: (%.2f/%.2f,%.2f/%.2f) Scrollbar:%s%s", window->Scroll.x, window->ScrollMax.x, window->Scroll.y, window->ScrollMax.y, window->ScrollbarX ? "X" : "", window->ScrollbarY ? "Y" : "");
17640 BulletText("Active: %d/%d, WriteAccessed: %d, BeginOrderWithinContext: %d", window->Active, window->WasActive, window->WriteAccessed, (window->Active || window->WasActive) ? window->BeginOrderWithinContext : -1);
17641 BulletText("Appearing: %d, Hidden: %d (CanSkip %d Cannot %d), SkipItems: %d", window->Appearing, window->Hidden, window->HiddenFramesCanSkipItems, window->HiddenFramesCannotSkipItems, window->SkipItems);
17642 for (int layer = 0; layer < ImGuiNavLayer_COUNT; layer++)
17643 {
17644 ImRect r = window->NavRectRel[layer];
17645 if (r.Min.x >= r.Max.x && r.Min.y >= r.Max.y)
17646 BulletText("NavLastIds[%d]: 0x%08X", layer, window->NavLastIds[layer]);
17647 else
17648 BulletText("NavLastIds[%d]: 0x%08X at +(%.1f,%.1f)(%.1f,%.1f)", layer, window->NavLastIds[layer], r.Min.x, r.Min.y, r.Max.x, r.Max.y);
17649 DebugLocateItemOnHover(window->NavLastIds[layer]);
17650 }
17651 const ImVec2* pr = window->NavPreferredScoringPosRel;
17652 for (int layer = 0; layer < ImGuiNavLayer_COUNT; layer++)
17653 BulletText("NavPreferredScoringPosRel[%d] = (%.1f,%.1f)", layer, (pr[layer].x == FLT_MAX ? -99999.0f : pr[layer].x), (pr[layer].y == FLT_MAX ? -99999.0f : pr[layer].y)); // Display as 99999.0f so it looks neater.
17654 BulletText("NavLayersActiveMask: %X, NavLastChildNavWindow: %s", window->DC.NavLayersActiveMask, window->NavLastChildNavWindow ? window->NavLastChildNavWindow->Name : "NULL");
17655 if (window->RootWindow != window) { DebugNodeWindow(window->RootWindow, "RootWindow"); }
17656 if (window->ParentWindow != NULL) { DebugNodeWindow(window->ParentWindow, "ParentWindow"); }
17657 if (window->ParentWindowForFocusRoute != NULL) { DebugNodeWindow(window->ParentWindowForFocusRoute, "ParentWindowForFocusRoute"); }
17658 if (window->DC.ChildWindows.Size > 0) { DebugNodeWindowsList(&window->DC.ChildWindows, "ChildWindows"); }

Callers

nothing calls this directly

Calls 2

GetForegroundDrawListFunction · 0.85
AddRectMethod · 0.80

Tested by

no test coverage detected