| 24132 | } |
| 24133 | |
| 24134 | static 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 |
| 24160 | void ImGui::ShowIDStackToolWindow(bool* p_open) |
no test coverage detected