MCPcopy Create free account
hub / github.com/Aegel5/SimpleSwitcher / DebugItemPathQuery_GetResultAsPath

Function DebugItemPathQuery_GetResultAsPath

imgui_tiny_app/imgui/imgui.cpp:24134–24157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24132}
24133
24134static const char* DebugItemPathQuery_GetResultAsPath(ImGuiDebugItemPathQuery* query, bool hex_encode_non_ascii_chars)
24135{
24136 ImGuiTextBuffer* buf = &query->ResultPathBuf;
24137 buf->resize(0);
24138 for (int stack_n = 0; stack_n < query->Results.Size; stack_n++)
24139 {
24140 char level_desc[256];
24141 DebugItemPathQuery_FormatLevelInfo(query, stack_n, false, level_desc, IM_COUNTOF(level_desc));
24142 buf->append(stack_n == 0 ? "//" : "/");
24143 for (const char* p = level_desc; *p != 0; )
24144 {
24145 unsigned int c;
24146 const char* p_next = p + ImTextCharFromUtf8(&c, p, NULL);
24147 if (c == '/')
24148 buf->append("\\");
24149 if (c < 256 || !hex_encode_non_ascii_chars)
24150 buf->append(p, p_next);
24151 else for (; p < p_next; p++)
24152 buf->appendf("\\x%02x", (unsigned char)*p);
24153 p = p_next;
24154 }
24155 }
24156 return buf->c_str();
24157}
24158
24159// ID Stack Tool: Display UI
24160void 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