| 12797 | } |
| 12798 | |
| 12799 | void ImGui::LogFinish() |
| 12800 | { |
| 12801 | ImGuiContext& g = *GImGui; |
| 12802 | if (!g.LogEnabled) |
| 12803 | return; |
| 12804 | |
| 12805 | LogText(IM_NEWLINE); |
| 12806 | switch (g.LogType) |
| 12807 | { |
| 12808 | case ImGuiLogType_TTY: |
| 12809 | #ifndef IMGUI_DISABLE_TTY_FUNCTIONS |
| 12810 | fflush(g.LogFile); |
| 12811 | #endif |
| 12812 | break; |
| 12813 | case ImGuiLogType_File: |
| 12814 | ImFileClose(g.LogFile); |
| 12815 | break; |
| 12816 | case ImGuiLogType_Buffer: |
| 12817 | break; |
| 12818 | case ImGuiLogType_Clipboard: |
| 12819 | if (!g.LogBuffer.empty()) |
| 12820 | SetClipboardText(g.LogBuffer.begin()); |
| 12821 | break; |
| 12822 | case ImGuiLogType_None: |
| 12823 | IM_ASSERT(0); |
| 12824 | break; |
| 12825 | } |
| 12826 | |
| 12827 | g.LogEnabled = false; |
| 12828 | g.LogType = ImGuiLogType_None; |
| 12829 | g.LogFile = NULL; |
| 12830 | g.LogBuffer.clear(); |
| 12831 | } |
| 12832 | |
| 12833 | // Helper to display logging buttons |
| 12834 | // 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