| 11970 | } |
| 11971 | |
| 11972 | void ImGui::LogFinish() |
| 11973 | { |
| 11974 | ImGuiContext& g = *GImGui; |
| 11975 | if (!g.LogEnabled) |
| 11976 | return; |
| 11977 | |
| 11978 | LogText(IM_NEWLINE); |
| 11979 | switch (g.LogType) |
| 11980 | { |
| 11981 | case ImGuiLogType_TTY: |
| 11982 | #ifndef IMGUI_DISABLE_TTY_FUNCTIONS |
| 11983 | fflush(g.LogFile); |
| 11984 | #endif |
| 11985 | break; |
| 11986 | case ImGuiLogType_File: |
| 11987 | ImFileClose(g.LogFile); |
| 11988 | break; |
| 11989 | case ImGuiLogType_Buffer: |
| 11990 | break; |
| 11991 | case ImGuiLogType_Clipboard: |
| 11992 | if (!g.LogBuffer.empty()) |
| 11993 | SetClipboardText(g.LogBuffer.begin()); |
| 11994 | break; |
| 11995 | case ImGuiLogType_None: |
| 11996 | IM_ASSERT(0); |
| 11997 | break; |
| 11998 | } |
| 11999 | |
| 12000 | g.LogEnabled = false; |
| 12001 | g.LogType = ImGuiLogType_None; |
| 12002 | g.LogFile = NULL; |
| 12003 | g.LogBuffer.clear(); |
| 12004 | } |
| 12005 | |
| 12006 | // Helper to display logging buttons |
| 12007 | // FIXME-OBSOLETE: We should probably obsolete this and let the user have their own helper (this is one of the oldest function alive!) |
nothing calls this directly
no test coverage detected