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

Method ShowDebugLogWindow

Source/3rdParty/imgui/imgui.cpp:17833–17901  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17831}
17832
17833void ImGui::ShowDebugLogWindow(bool* p_open)
17834{
17835 ImGuiContext& g = *GImGui;
17836 if ((g.NextWindowData.HasFlags & ImGuiNextWindowDataFlags_HasSize) == 0)
17837 SetNextWindowSize(ImVec2(0.0f, GetFontSize() * 12.0f), ImGuiCond_FirstUseEver);
17838 if (!Begin("Dear ImGui Debug Log", p_open) || GetCurrentWindow()->BeginCount > 1)
17839 {
17840 End();
17841 return;
17842 }
17843
17844 ImGuiDebugLogFlags all_enable_flags = ImGuiDebugLogFlags_EventMask_ & ~ImGuiDebugLogFlags_EventInputRouting;
17845 CheckboxFlags("All", &g.DebugLogFlags, all_enable_flags);
17846 SetItemTooltip("(except InputRouting which is spammy)");
17847
17848 ShowDebugLogFlag("Errors", ImGuiDebugLogFlags_EventError);
17849 ShowDebugLogFlag("ActiveId", ImGuiDebugLogFlags_EventActiveId);
17850 ShowDebugLogFlag("Clipper", ImGuiDebugLogFlags_EventClipper);
17851 ShowDebugLogFlag("Focus", ImGuiDebugLogFlags_EventFocus);
17852 ShowDebugLogFlag("IO", ImGuiDebugLogFlags_EventIO);
17853 ShowDebugLogFlag("Font", ImGuiDebugLogFlags_EventFont);
17854 ShowDebugLogFlag("Nav", ImGuiDebugLogFlags_EventNav);
17855 ShowDebugLogFlag("Popup", ImGuiDebugLogFlags_EventPopup);
17856 ShowDebugLogFlag("Selection", ImGuiDebugLogFlags_EventSelection);
17857 ShowDebugLogFlag("InputRouting", ImGuiDebugLogFlags_EventInputRouting);
17858
17859 if (SmallButton("Clear"))
17860 {
17861 g.DebugLogBuf.clear();
17862 g.DebugLogIndex.clear();
17863 g.DebugLogSkippedErrors = 0;
17864 }
17865 SameLine();
17866 if (SmallButton("Copy"))
17867 SetClipboardText(g.DebugLogBuf.c_str());
17868 SameLine();
17869 if (SmallButton("Configure Outputs.."))
17870 OpenPopup("Outputs");
17871 if (BeginPopup("Outputs"))
17872 {
17873 CheckboxFlags("OutputToTTY", &g.DebugLogFlags, ImGuiDebugLogFlags_OutputToTTY);
17874 CheckboxFlags("OutputToDebugger", &g.DebugLogFlags, ImGuiDebugLogFlags_OutputToDebugger);
17875#ifndef IMGUI_ENABLE_TEST_ENGINE
17876 BeginDisabled();
17877#endif
17878 CheckboxFlags("OutputToTestEngine", &g.DebugLogFlags, ImGuiDebugLogFlags_OutputToTestEngine);
17879#ifndef IMGUI_ENABLE_TEST_ENGINE
17880 EndDisabled();
17881#endif
17882 EndPopup();
17883 }
17884
17885 BeginChild("##log", ImVec2(0.0f, 0.0f), ImGuiChildFlags_Borders, ImGuiWindowFlags_AlwaysVerticalScrollbar | ImGuiWindowFlags_AlwaysHorizontalScrollbar);
17886
17887 const ImGuiDebugLogFlags backup_log_flags = g.DebugLogFlags;
17888 g.DebugLogFlags &= ~ImGuiDebugLogFlags_EventClipper;
17889
17890 ImGuiListClipper clipper;

Callers

nothing calls this directly

Calls 15

SetNextWindowSizeFunction · 0.85
ImVec2Function · 0.85
GetCurrentWindowFunction · 0.85
EndFunction · 0.85
ShowDebugLogFlagFunction · 0.85
SmallButtonFunction · 0.85
OpenPopupFunction · 0.85
BeginPopupFunction · 0.85
BeginChildFunction · 0.85
get_line_beginMethod · 0.80
get_line_endMethod · 0.80
clearMethod · 0.65

Tested by

no test coverage detected