MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / DebugNodeWindow

Method DebugNodeWindow

Source/3rdParty/imgui/imgui.cpp:17647–17713  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17645}
17646
17647void ImGui::DebugNodeWindow(ImGuiWindow* window, const char* label)
17648{
17649 if (window == NULL)
17650 {
17651 BulletText("%s: NULL", label);
17652 return;
17653 }
17654
17655 ImGuiContext& g = *GImGui;
17656 const bool is_active = window->WasActive;
17657 ImGuiTreeNodeFlags tree_node_flags = (window == g.NavWindow) ? ImGuiTreeNodeFlags_Selected : ImGuiTreeNodeFlags_None;
17658 if (!is_active) { PushStyleColor(ImGuiCol_Text, GetStyleColorVec4(ImGuiCol_TextDisabled)); }
17659 const bool open = TreeNodeEx(label, tree_node_flags, "%s '%s'%s", label, window->Name, is_active ? "" : " *Inactive*");
17660 if (!is_active) { PopStyleColor(); }
17661 if (IsItemHovered() && is_active)
17662 GetForegroundDrawList(window)->AddRect(window->Pos, window->Pos + window->Size, IM_COL32(255, 255, 0, 255));
17663 if (!open)
17664 return;
17665
17666 if (window->MemoryCompacted)
17667 TextDisabled("Note: some memory buffers have been compacted/freed.");
17668
17669 if (g.IO.ConfigDebugIsDebuggerPresent && DebugBreakButton("**DebugBreak**", "in Begin()"))
17670 g.DebugBreakInWindow = window->ID;
17671
17672 ImGuiWindowFlags flags = window->Flags;
17673 DebugNodeDrawList(window, window->Viewport, window->DrawList, "DrawList");
17674 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);
17675 BulletText("Flags: 0x%08X (%s%s%s%s%s%s%s%s%s..)", flags,
17676 (flags & ImGuiWindowFlags_ChildWindow) ? "Child " : "", (flags & ImGuiWindowFlags_Tooltip) ? "Tooltip " : "", (flags & ImGuiWindowFlags_Popup) ? "Popup " : "",
17677 (flags & ImGuiWindowFlags_Modal) ? "Modal " : "", (flags & ImGuiWindowFlags_ChildMenu) ? "ChildMenu " : "", (flags & ImGuiWindowFlags_NoSavedSettings) ? "NoSavedSettings " : "",
17678 (flags & ImGuiWindowFlags_NoMouseInputs)? "NoMouseInputs":"", (flags & ImGuiWindowFlags_NoNavInputs) ? "NoNavInputs" : "", (flags & ImGuiWindowFlags_AlwaysAutoResize) ? "AlwaysAutoResize" : "");
17679 if (flags & ImGuiWindowFlags_ChildWindow)
17680 BulletText("ChildFlags: 0x%08X (%s%s%s%s..)", window->ChildFlags,
17681 (window->ChildFlags & ImGuiChildFlags_Borders) ? "Borders " : "",
17682 (window->ChildFlags & ImGuiChildFlags_ResizeX) ? "ResizeX " : "",
17683 (window->ChildFlags & ImGuiChildFlags_ResizeY) ? "ResizeY " : "",
17684 (window->ChildFlags & ImGuiChildFlags_NavFlattened) ? "NavFlattened " : "");
17685 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" : "");
17686 BulletText("Active: %d/%d, WriteAccessed: %d, BeginOrderWithinContext: %d", window->Active, window->WasActive, window->WriteAccessed, (window->Active || window->WasActive) ? window->BeginOrderWithinContext : -1);
17687 BulletText("Appearing: %d, Hidden: %d (CanSkip %d Cannot %d), SkipItems: %d", window->Appearing, window->Hidden, window->HiddenFramesCanSkipItems, window->HiddenFramesCannotSkipItems, window->SkipItems);
17688 for (int layer = 0; layer < ImGuiNavLayer_COUNT; layer++)
17689 {
17690 ImRect r = window->NavRectRel[layer];
17691 if (r.Min.x >= r.Max.x && r.Min.y >= r.Max.y)
17692 BulletText("NavLastIds[%d]: 0x%08X", layer, window->NavLastIds[layer]);
17693 else
17694 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);
17695 DebugLocateItemOnHover(window->NavLastIds[layer]);
17696 }
17697 const ImVec2* pr = window->NavPreferredScoringPosRel;
17698 for (int layer = 0; layer < ImGuiNavLayer_COUNT; layer++)
17699 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.
17700 BulletText("NavLayersActiveMask: %X, NavLastChildNavWindow: %s", window->DC.NavLayersActiveMask, window->NavLastChildNavWindow ? window->NavLastChildNavWindow->Name : "NULL");
17701 if (window->RootWindow != window) { DebugNodeWindow(window->RootWindow, "RootWindow"); }
17702 if (window->ParentWindow != NULL) { DebugNodeWindow(window->ParentWindow, "ParentWindow"); }
17703 if (window->ParentWindowForFocusRoute != NULL) { DebugNodeWindow(window->ParentWindowForFocusRoute, "ParentWindowForFocusRoute"); }
17704 if (window->DC.ChildWindows.Size > 0) { DebugNodeWindowsList(&window->DC.ChildWindows, "ChildWindows"); }

Callers

nothing calls this directly

Calls 9

BulletTextFunction · 0.85
GetStyleColorVec4Function · 0.85
TreeNodeExFunction · 0.85
PopStyleColorFunction · 0.85
GetForegroundDrawListFunction · 0.85
TextDisabledFunction · 0.85
AddRectMethod · 0.80
PushStyleColorFunction · 0.50
TreeNodeClass · 0.50

Tested by

no test coverage detected