38 inline static std::vector<LogEntry> logs;
39 inline static ImGuiTextFilter filter;
40 inline static bool autoScroll =
true;
41 inline static bool isWindowActive =
false;
51 static void addLog(
const ImVec4& color,
const char* fmt, ...) IM_FMTARGS(2);
55 static bool isActive() {
return isWindowActive; }
70 static void clean() { logs.clear(); }
Built-in window that displays colour-coded log messages.
Definition log_window.h:36
static size_t getLogCount()
Returns the number of stored log entries.
Definition log_window.h:57
static void renderContent()
Renders the log contents (toolbar, filter and entries) into the current ImGui window.
void render() override
Renders the log window. Called once per frame by the UserInterface.
Definition log_window.h:53
~LogWindow() override=default
static void addLog(const ImVec4 &color, const char *fmt,...)
Appends a printf-style formatted message to the log.
static void clearLogs()
Removes all stored log entries.
Definition log_window.h:59
static bool isActive()
Returns true while the log window is open and being rendered.
Definition log_window.h:55
Abstract base class for all windows rendered by the kit.
Definition user_interface_window.h:83
Named colour constants for use with ImGui (e.g.
Definition colour_palette.h:11
A single log line: message text and its display colour.
Definition log_window.h:20
ImVec4 color
Colour used to render the line (see imgui_kit::colours).
Definition log_window.h:22
std::string message
Text of the log line.
Definition log_window.h:21
Abstract base class for user-defined windows and global window flags.