| 10243 | } |
| 10244 | |
| 10245 | void ImGui::LogFinish() |
| 10246 | { |
| 10247 | ImGuiContext& g = *GImGui; |
| 10248 | if (!g.LogEnabled) |
| 10249 | return; |
| 10250 | |
| 10251 | LogText(IM_NEWLINE); |
| 10252 | switch (g.LogType) |
| 10253 | { |
| 10254 | case ImGuiLogType_TTY: |
| 10255 | #ifndef IMGUI_DISABLE_TTY_FUNCTIONS |
| 10256 | fflush(g.LogFile); |
| 10257 | #endif |
| 10258 | break; |
| 10259 | case ImGuiLogType_File: |
| 10260 | ImFileClose(g.LogFile); |
| 10261 | break; |
| 10262 | case ImGuiLogType_Buffer: |
| 10263 | break; |
| 10264 | case ImGuiLogType_Clipboard: |
| 10265 | if (!g.LogBuffer.empty()) |
| 10266 | SetClipboardText(g.LogBuffer.begin()); |
| 10267 | break; |
| 10268 | case ImGuiLogType_None: |
| 10269 | IM_ASSERT(0); |
| 10270 | break; |
| 10271 | } |
| 10272 | |
| 10273 | g.LogEnabled = false; |
| 10274 | g.LogType = ImGuiLogType_None; |
| 10275 | g.LogFile = NULL; |
| 10276 | g.LogBuffer.clear(); |
| 10277 | } |
| 10278 | |
| 10279 | // Helper to display logging buttons |
| 10280 | // 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