| 10921 | } |
| 10922 | |
| 10923 | void ImGui::LogFinish() |
| 10924 | { |
| 10925 | ImGuiContext& g = *GImGui; |
| 10926 | if (!g.LogEnabled) |
| 10927 | return; |
| 10928 | |
| 10929 | LogText(IM_NEWLINE); |
| 10930 | switch (g.LogType) |
| 10931 | { |
| 10932 | case ImGuiLogType_TTY: |
| 10933 | #ifndef IMGUI_DISABLE_TTY_FUNCTIONS |
| 10934 | fflush(g.LogFile); |
| 10935 | #endif |
| 10936 | break; |
| 10937 | case ImGuiLogType_File: |
| 10938 | ImFileClose(g.LogFile); |
| 10939 | break; |
| 10940 | case ImGuiLogType_Buffer: |
| 10941 | break; |
| 10942 | case ImGuiLogType_Clipboard: |
| 10943 | if (!g.LogBuffer.empty()) |
| 10944 | SetClipboardText(g.LogBuffer.begin()); |
| 10945 | break; |
| 10946 | case ImGuiLogType_None: |
| 10947 | IM_ASSERT(0); |
| 10948 | break; |
| 10949 | } |
| 10950 | |
| 10951 | g.LogEnabled = false; |
| 10952 | g.LogType = ImGuiLogType_None; |
| 10953 | g.LogFile = NULL; |
| 10954 | g.LogBuffer.clear(); |
| 10955 | } |
| 10956 | |
| 10957 | // Helper to display logging buttons |
| 10958 | // 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