| 14778 | } |
| 14779 | |
| 14780 | void ImGui::DebugNodeWindow(ImGuiWindow* window, const char* label) |
| 14781 | { |
| 14782 | if (window == NULL) |
| 14783 | { |
| 14784 | BulletText("%s: NULL", label); |
| 14785 | return; |
| 14786 | } |
| 14787 | |
| 14788 | ImGuiContext& g = *GImGui; |
| 14789 | const bool is_active = window->WasActive; |
| 14790 | ImGuiTreeNodeFlags tree_node_flags = (window == g.NavWindow) ? ImGuiTreeNodeFlags_Selected : ImGuiTreeNodeFlags_None; |
| 14791 | if (!is_active) { PushStyleColor(ImGuiCol_Text, GetStyleColorVec4(ImGuiCol_TextDisabled)); } |
| 14792 | const bool open = TreeNodeEx(label, tree_node_flags, "%s '%s'%s", label, window->Name, is_active ? "" : " *Inactive*"); |
| 14793 | if (!is_active) { PopStyleColor(); } |
| 14794 | if (IsItemHovered() && is_active) |
| 14795 | GetForegroundDrawList(window)->AddRect(window->Pos, window->Pos + window->Size, IM_COL32(255, 255, 0, 255)); |
| 14796 | if (!open) |
| 14797 | return; |
| 14798 | |
| 14799 | if (window->MemoryCompacted) |
| 14800 | TextDisabled("Note: some memory buffers have been compacted/freed."); |
| 14801 | |
| 14802 | ImGuiWindowFlags flags = window->Flags; |
| 14803 | DebugNodeDrawList(window, window->Viewport, window->DrawList, "DrawList"); |
| 14804 | 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); |
| 14805 | BulletText("Flags: 0x%08X (%s%s%s%s%s%s%s%s%s..)", flags, |
| 14806 | (flags & ImGuiWindowFlags_ChildWindow) ? "Child " : "", (flags & ImGuiWindowFlags_Tooltip) ? "Tooltip " : "", (flags & ImGuiWindowFlags_Popup) ? "Popup " : "", |
| 14807 | (flags & ImGuiWindowFlags_Modal) ? "Modal " : "", (flags & ImGuiWindowFlags_ChildMenu) ? "ChildMenu " : "", (flags & ImGuiWindowFlags_NoSavedSettings) ? "NoSavedSettings " : "", |
| 14808 | (flags & ImGuiWindowFlags_NoMouseInputs)? "NoMouseInputs":"", (flags & ImGuiWindowFlags_NoNavInputs) ? "NoNavInputs" : "", (flags & ImGuiWindowFlags_AlwaysAutoResize) ? "AlwaysAutoResize" : ""); |
| 14809 | 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" : ""); |
| 14810 | BulletText("Active: %d/%d, WriteAccessed: %d, BeginOrderWithinContext: %d", window->Active, window->WasActive, window->WriteAccessed, (window->Active || window->WasActive) ? window->BeginOrderWithinContext : -1); |
| 14811 | BulletText("Appearing: %d, Hidden: %d (CanSkip %d Cannot %d), SkipItems: %d", window->Appearing, window->Hidden, window->HiddenFramesCanSkipItems, window->HiddenFramesCannotSkipItems, window->SkipItems); |
| 14812 | for (int layer = 0; layer < ImGuiNavLayer_COUNT; layer++) |
| 14813 | { |
| 14814 | ImRect r = window->NavRectRel[layer]; |
| 14815 | if (r.Min.x >= r.Max.y && r.Min.y >= r.Max.y) |
| 14816 | BulletText("NavLastIds[%d]: 0x%08X", layer, window->NavLastIds[layer]); |
| 14817 | else |
| 14818 | 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); |
| 14819 | DebugLocateItemOnHover(window->NavLastIds[layer]); |
| 14820 | } |
| 14821 | const ImVec2* pr = window->NavPreferredScoringPosRel; |
| 14822 | for (int layer = 0; layer < ImGuiNavLayer_COUNT; layer++) |
| 14823 | 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. |
| 14824 | BulletText("NavLayersActiveMask: %X, NavLastChildNavWindow: %s", window->DC.NavLayersActiveMask, window->NavLastChildNavWindow ? window->NavLastChildNavWindow->Name : "NULL"); |
| 14825 | if (window->RootWindow != window) { DebugNodeWindow(window->RootWindow, "RootWindow"); } |
| 14826 | if (window->ParentWindow != NULL) { DebugNodeWindow(window->ParentWindow, "ParentWindow"); } |
| 14827 | if (window->DC.ChildWindows.Size > 0) { DebugNodeWindowsList(&window->DC.ChildWindows, "ChildWindows"); } |
| 14828 | if (window->ColumnsStorage.Size > 0 && TreeNode("Columns", "Columns sets (%d)", window->ColumnsStorage.Size)) |
| 14829 | { |
| 14830 | for (ImGuiOldColumns& columns : window->ColumnsStorage) |
| 14831 | DebugNodeColumns(&columns); |
| 14832 | TreePop(); |
| 14833 | } |
| 14834 | DebugNodeStorage(&window->StateStorage, "Storage"); |
| 14835 | TreePop(); |
| 14836 | } |
| 14837 |
nothing calls this directly
no test coverage detected