| 14460 | } |
| 14461 | |
| 14462 | void ImGui::DebugNodeWindow(ImGuiWindow* window, const char* label) |
| 14463 | { |
| 14464 | if (window == NULL) |
| 14465 | { |
| 14466 | BulletText("%s: NULL", label); |
| 14467 | return; |
| 14468 | } |
| 14469 | |
| 14470 | ImGuiContext& g = *GImGui; |
| 14471 | const bool is_active = window->WasActive; |
| 14472 | ImGuiTreeNodeFlags tree_node_flags = (window == g.NavWindow) ? ImGuiTreeNodeFlags_Selected : ImGuiTreeNodeFlags_None; |
| 14473 | if (!is_active) { PushStyleColor(ImGuiCol_Text, GetStyleColorVec4(ImGuiCol_TextDisabled)); } |
| 14474 | const bool open = TreeNodeEx(label, tree_node_flags, "%s '%s'%s", label, window->Name, is_active ? "" : " *Inactive*"); |
| 14475 | if (!is_active) { PopStyleColor(); } |
| 14476 | if (IsItemHovered() && is_active) |
| 14477 | GetForegroundDrawList(window)->AddRect(window->Pos, window->Pos + window->Size, IM_COL32(255, 255, 0, 255)); |
| 14478 | if (!open) |
| 14479 | return; |
| 14480 | |
| 14481 | if (window->MemoryCompacted) |
| 14482 | TextDisabled("Note: some memory buffers have been compacted/freed."); |
| 14483 | |
| 14484 | ImGuiWindowFlags flags = window->Flags; |
| 14485 | DebugNodeDrawList(window, window->Viewport, window->DrawList, "DrawList"); |
| 14486 | 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); |
| 14487 | BulletText("Flags: 0x%08X (%s%s%s%s%s%s%s%s%s..)", flags, |
| 14488 | (flags & ImGuiWindowFlags_ChildWindow) ? "Child " : "", (flags & ImGuiWindowFlags_Tooltip) ? "Tooltip " : "", (flags & ImGuiWindowFlags_Popup) ? "Popup " : "", |
| 14489 | (flags & ImGuiWindowFlags_Modal) ? "Modal " : "", (flags & ImGuiWindowFlags_ChildMenu) ? "ChildMenu " : "", (flags & ImGuiWindowFlags_NoSavedSettings) ? "NoSavedSettings " : "", |
| 14490 | (flags & ImGuiWindowFlags_NoMouseInputs) ? "NoMouseInputs" : "", (flags & ImGuiWindowFlags_NoNavInputs) ? "NoNavInputs" : "", (flags & ImGuiWindowFlags_AlwaysAutoResize) ? "AlwaysAutoResize" : ""); |
| 14491 | 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" : ""); |
| 14492 | BulletText("Active: %d/%d, WriteAccessed: %d, BeginOrderWithinContext: %d", window->Active, window->WasActive, window->WriteAccessed, (window->Active || window->WasActive) ? window->BeginOrderWithinContext : -1); |
| 14493 | BulletText("Appearing: %d, Hidden: %d (CanSkip %d Cannot %d), SkipItems: %d", window->Appearing, window->Hidden, window->HiddenFramesCanSkipItems, window->HiddenFramesCannotSkipItems, window->SkipItems); |
| 14494 | for (int layer = 0; layer < ImGuiNavLayer_COUNT; layer++) |
| 14495 | { |
| 14496 | ImRect r = window->NavRectRel[layer]; |
| 14497 | if (r.Min.x >= r.Max.y && r.Min.y >= r.Max.y) |
| 14498 | BulletText("NavLastIds[%d]: 0x%08X", layer, window->NavLastIds[layer]); |
| 14499 | else |
| 14500 | 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); |
| 14501 | DebugLocateItemOnHover(window->NavLastIds[layer]); |
| 14502 | } |
| 14503 | const ImVec2* pr = window->NavPreferredScoringPosRel; |
| 14504 | for (int layer = 0; layer < ImGuiNavLayer_COUNT; layer++) |
| 14505 | 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. |
| 14506 | BulletText("NavLayersActiveMask: %X, NavLastChildNavWindow: %s", window->DC.NavLayersActiveMask, window->NavLastChildNavWindow ? window->NavLastChildNavWindow->Name : "NULL"); |
| 14507 | if (window->RootWindow != window) { DebugNodeWindow(window->RootWindow, "RootWindow"); } |
| 14508 | if (window->ParentWindow != NULL) { DebugNodeWindow(window->ParentWindow, "ParentWindow"); } |
| 14509 | if (window->DC.ChildWindows.Size > 0) { DebugNodeWindowsList(&window->DC.ChildWindows, "ChildWindows"); } |
| 14510 | if (window->ColumnsStorage.Size > 0 && TreeNode("Columns", "Columns sets (%d)", window->ColumnsStorage.Size)) |
| 14511 | { |
| 14512 | for (ImGuiOldColumns& columns : window->ColumnsStorage) |
| 14513 | DebugNodeColumns(&columns); |
| 14514 | TreePop(); |
| 14515 | } |
| 14516 | DebugNodeStorage(&window->StateStorage, "Storage"); |
| 14517 | TreePop(); |
| 14518 | } |
| 14519 |
nothing calls this directly
no test coverage detected