ZenitUI
Retained-mode C++20 UI framework
Loading...
Searching...
No Matches
Debug.hpp File Reference

Debug-only inspection helpers (tree dump, style dump, theme dump). More...

#include "Layout.hpp"
#include "Theme.hpp"
#include "Unit.hpp"
#include "CoreTypes.hpp"
#include <iostream>

Go to the source code of this file.

Functions

void ZenitUI::Debug::dumpStyle (const Layout &, std::ostream &=std::cerr)
void ZenitUI::Debug::dumpTree (const Layout &, std::ostream &=std::cerr, int=-1, int=0)
void ZenitUI::Debug::dumpTheme (const Theme &, std::ostream &=std::cerr)
void ZenitUI::Debug::dumpParts (const Layout &, std::ostream &=std::cerr)
std::string ZenitUI::Debug::renderStatsToString (const RenderStats &)
void ZenitUI::Debug::dumpRenderStats (const RenderStats &, std::ostream &=std::cerr)
void ZenitUI::Debug::dumpRenderStats (const UIContext &, std::ostream &=std::cerr)

Detailed Description

Debug-only inspection helpers (tree dump, style dump, theme dump).

When ZENITUI_DEBUG is defined, this header provides real implementations of the dump functions. When it is not defined, the same symbols exist but are no-ops, so calling code does not need #ifdefs.

Typical use:

#include "Debug.hpp"
// In a key handler:
ZenitUI::Debug::dumpTree(root);
ZenitUI::Debug::dumpStyle(*someNode);
ZenitUI::Debug::dumpTheme();
Debug-only inspection helpers (tree dump, style dump, theme dump).

Output goes to a std::ostream (default std::cerr), so it can be redirected to a file or captured by a test.