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!)
| 15402 | // Helper to display logging buttons |
| 15403 | // FIXME-OBSOLETE: We should probably obsolete this and let the user have their own helper (this is one of the oldest function alive!) |
| 15404 | void ImGui::LogButtons() |
| 15405 | { |
| 15406 | ImGuiContext& g = *GImGui; |
| 15407 | |
| 15408 | PushID("LogButtons"); |
| 15409 | #ifndef IMGUI_DISABLE_TTY_FUNCTIONS |
| 15410 | const bool log_to_tty = Button("Log To TTY"); SameLine(); |
| 15411 | #else |
| 15412 | const bool log_to_tty = false; |
| 15413 | #endif |
| 15414 | const bool log_to_file = Button("Log To File"); SameLine(); |
| 15415 | const bool log_to_clipboard = Button("Log To Clipboard"); SameLine(); |
| 15416 | PushItemFlag(ImGuiItemFlags_NoTabStop, true); |
| 15417 | SetNextItemWidth(CalcTextSize("999").x); |
| 15418 | SliderInt("Default Depth", &g.LogDepthToExpandDefault, 0, 9, NULL); |
| 15419 | PopItemFlag(); |
| 15420 | PopID(); |
| 15421 | |
| 15422 | // Start logging at the end of the function so that the buttons don't appear in the log |
| 15423 | if (log_to_tty) |
| 15424 | LogToTTY(); |
| 15425 | if (log_to_file) |
| 15426 | LogToFile(); |
| 15427 | if (log_to_clipboard) |
| 15428 | LogToClipboard(); |
| 15429 | } |
| 15430 | |
| 15431 | //----------------------------------------------------------------------------- |
| 15432 | // [SECTION] SETTINGS |
nothing calls this directly
no test coverage detected