Helper to display logging buttons FIXME-OBSOLETE: We should probably obsolete this and let the user have their own helper (this is one of the oldest function alive!)
| 15357 | // Helper to display logging buttons |
| 15358 | // FIXME-OBSOLETE: We should probably obsolete this and let the user have their own helper (this is one of the oldest function alive!) |
| 15359 | void ImGui::LogButtons() |
| 15360 | { |
| 15361 | ImGuiContext& g = *GImGui; |
| 15362 | |
| 15363 | PushID("LogButtons"); |
| 15364 | #ifndef IMGUI_DISABLE_TTY_FUNCTIONS |
| 15365 | const bool log_to_tty = Button("Log To TTY"); SameLine(); |
| 15366 | #else |
| 15367 | const bool log_to_tty = false; |
| 15368 | #endif |
| 15369 | const bool log_to_file = Button("Log To File"); SameLine(); |
| 15370 | const bool log_to_clipboard = Button("Log To Clipboard"); SameLine(); |
| 15371 | PushItemFlag(ImGuiItemFlags_NoTabStop, true); |
| 15372 | SetNextItemWidth(CalcTextSize("999").x); |
| 15373 | SliderInt("Default Depth", &g.LogDepthToExpandDefault, 0, 9, NULL); |
| 15374 | PopItemFlag(); |
| 15375 | PopID(); |
| 15376 | |
| 15377 | // Start logging at the end of the function so that the buttons don't appear in the log |
| 15378 | if (log_to_tty) |
| 15379 | LogToTTY(); |
| 15380 | if (log_to_file) |
| 15381 | LogToFile(); |
| 15382 | if (log_to_clipboard) |
| 15383 | LogToClipboard(); |
| 15384 | } |
| 15385 | |
| 15386 | //----------------------------------------------------------------------------- |
| 15387 | // [SECTION] SETTINGS |
nothing calls this directly
no outgoing calls
no test coverage detected