| 13725 | } |
| 13726 | |
| 13727 | void ImGui::LogFinish() |
| 13728 | { |
| 13729 | ImGuiContext& g = *GImGui; |
| 13730 | if (!g.LogEnabled) |
| 13731 | return; |
| 13732 | |
| 13733 | LogText(IM_NEWLINE); |
| 13734 | switch (g.LogType) |
| 13735 | { |
| 13736 | case ImGuiLogType_TTY: |
| 13737 | #ifndef IMGUI_DISABLE_TTY_FUNCTIONS |
| 13738 | fflush(g.LogFile); |
| 13739 | #endif |
| 13740 | break; |
| 13741 | case ImGuiLogType_File: |
| 13742 | ImFileClose(g.LogFile); |
| 13743 | break; |
| 13744 | case ImGuiLogType_Buffer: |
| 13745 | break; |
| 13746 | case ImGuiLogType_Clipboard: |
| 13747 | if (!g.LogBuffer.empty()) |
| 13748 | SetClipboardText(g.LogBuffer.begin()); |
| 13749 | break; |
| 13750 | case ImGuiLogType_None: |
| 13751 | IM_ASSERT(0); |
| 13752 | break; |
| 13753 | } |
| 13754 | |
| 13755 | g.LogEnabled = g.ItemUnclipByLog = false; |
| 13756 | g.LogType = ImGuiLogType_None; |
| 13757 | g.LogFile = NULL; |
| 13758 | g.LogBuffer.clear(); |
| 13759 | } |
| 13760 | |
| 13761 | // Helper to display logging buttons |
| 13762 | // 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