MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / LogFinish

Method LogFinish

extern/imgui/imgui.cpp:12962–12994  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12960}
12961
12962void ImGui::LogFinish()
12963{
12964 ImGuiContext& g = *GImGui;
12965 if (!g.LogEnabled)
12966 return;
12967
12968 LogText(IM_NEWLINE);
12969 switch (g.LogType)
12970 {
12971 case ImGuiLogType_TTY:
12972#ifndef IMGUI_DISABLE_TTY_FUNCTIONS
12973 fflush(g.LogFile);
12974#endif
12975 break;
12976 case ImGuiLogType_File:
12977 ImFileClose(g.LogFile);
12978 break;
12979 case ImGuiLogType_Buffer:
12980 break;
12981 case ImGuiLogType_Clipboard:
12982 if (!g.LogBuffer.empty())
12983 SetClipboardText(g.LogBuffer.begin());
12984 break;
12985 case ImGuiLogType_None:
12986 IM_ASSERT(0);
12987 break;
12988 }
12989
12990 g.LogEnabled = false;
12991 g.LogType = ImGuiLogType_None;
12992 g.LogFile = NULL;
12993 g.LogBuffer.clear();
12994}
12995
12996// Helper to display logging buttons
12997// FIXME-OBSOLETE: We should probably obsolete this and let the user have their own helper (this is one of the oldest function alive!)

Callers

nothing calls this directly

Calls 4

ImFileCloseFunction · 0.70
emptyMethod · 0.45
beginMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected