MCPcopy Create free account
hub / github.com/Wemino/MarkerPatch / DebugItemPathQuery_GetResultAsPath

Function DebugItemPathQuery_GetResultAsPath

include/imgui/imgui.cpp:18219–18242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18217}
18218
18219static const char* DebugItemPathQuery_GetResultAsPath(ImGuiDebugItemPathQuery* query, bool hex_encode_non_ascii_chars)
18220{
18221 ImGuiTextBuffer* buf = &query->ResultPathBuf;
18222 buf->resize(0);
18223 for (int stack_n = 0; stack_n < query->Results.Size; stack_n++)
18224 {
18225 char level_desc[256];
18226 DebugItemPathQuery_FormatLevelInfo(query, stack_n, false, level_desc, IM_COUNTOF(level_desc));
18227 buf->append(stack_n == 0 ? "//" : "/");
18228 for (const char* p = level_desc; *p != 0; )
18229 {
18230 unsigned int c;
18231 const char* p_next = p + ImTextCharFromUtf8(&c, p, NULL);
18232 if (c == '/')
18233 buf->append("\\");
18234 if (c < 256 || !hex_encode_non_ascii_chars)
18235 buf->append(p, p_next);
18236 else for (; p < p_next; p++)
18237 buf->appendf("\\x%02x", (unsigned char)*p);
18238 p = p_next;
18239 }
18240 }
18241 return buf->c_str();
18242}
18243
18244// ID Stack Tool: Display UI
18245void ImGui::ShowIDStackToolWindow(bool* p_open)

Callers 1

ShowIDStackToolWindowMethod · 0.85

Calls 6

ImTextCharFromUtf8Function · 0.85
appendMethod · 0.80
appendfMethod · 0.80
c_strMethod · 0.80
resizeMethod · 0.45

Tested by

no test coverage detected