Built-in window that displays colour-coded log messages.
More...
#include <log_window.h>
|
| static void | addLog (const ImVec4 &color, const char *fmt,...) |
| | Appends a printf-style formatted message to the log.
|
| |
| static bool | isActive () |
| | Returns true while the log window is open and being rendered.
|
| |
| static size_t | getLogCount () |
| | Returns the number of stored log entries.
|
| |
| static void | clearLogs () |
| | Removes all stored log entries.
|
| |
| static void | renderContent () |
| | Renders the log contents (toolbar, filter and entries) into the current ImGui window.
|
| |
Built-in window that displays colour-coded log messages.
The log storage is static and shared: call addLog() from anywhere in the application, before or after a LogWindow instance exists. The window provides a text filter and an auto-scroll option.
Register it with UserInterface::addWindow<LogWindow>(), or embed the log UI inside your own window with renderContent().
◆ LogWindow()
| imgui_kit::LogWindow::LogWindow |
( |
| ) |
|
◆ ~LogWindow()
| imgui_kit::LogWindow::~LogWindow |
( |
| ) |
|
|
overridedefault |
◆ addLog()
| static void imgui_kit::LogWindow::addLog |
( |
const ImVec4 & |
color, |
|
|
const char * |
fmt, |
|
|
|
... |
|
) |
| |
|
static |
Appends a printf-style formatted message to the log.
- Parameters
-
| color | Colour used to render the message (see imgui_kit::colours). |
| fmt | printf-style format string. |
| ... | Format arguments. |
◆ clearLogs()
| static void imgui_kit::LogWindow::clearLogs |
( |
| ) |
|
|
inlinestatic |
Removes all stored log entries.
◆ getLogCount()
| static size_t imgui_kit::LogWindow::getLogCount |
( |
| ) |
|
|
inlinestatic |
Returns the number of stored log entries.
◆ isActive()
| static bool imgui_kit::LogWindow::isActive |
( |
| ) |
|
|
inlinestatic |
Returns true while the log window is open and being rendered.
◆ render()
| void imgui_kit::LogWindow::render |
( |
| ) |
|
|
inlineoverridevirtual |
◆ renderContent()
| static void imgui_kit::LogWindow::renderContent |
( |
| ) |
|
|
static |
Renders the log contents (toolbar, filter and entries) into the current ImGui window.
Use this to embed the log UI inside a custom window instead of registering a standalone LogWindow.
The documentation for this class was generated from the following file: