Must be called before End()/EndChild()
| 8028 | |
| 8029 | // Must be called before End()/EndChild() |
| 8030 | void ImGui::ErrorCheckEndWindowRecover(ImGuiErrorLogCallback log_callback, void* user_data) |
| 8031 | { |
| 8032 | ImGuiContext& g = *GImGui; |
| 8033 | while (g.CurrentTable && (g.CurrentTable->OuterWindow == g.CurrentWindow || g.CurrentTable->InnerWindow == g.CurrentWindow)) |
| 8034 | { |
| 8035 | if (log_callback) log_callback(user_data, "Recovered from missing EndTable() in '%s'", g.CurrentTable->OuterWindow->Name); |
| 8036 | EndTable(); |
| 8037 | } |
| 8038 | |
| 8039 | ImGuiWindow* window = g.CurrentWindow; |
| 8040 | ImGuiStackSizes* stack_sizes = &g.CurrentWindowStack.back().StackSizesOnBegin; |
| 8041 | IM_ASSERT(window != NULL); |
| 8042 | while (g.CurrentTabBar != NULL) //-V1044 |
| 8043 | { |
| 8044 | if (log_callback) log_callback(user_data, "Recovered from missing EndTabBar() in '%s'", window->Name); |
| 8045 | EndTabBar(); |
| 8046 | } |
| 8047 | while (window->DC.TreeDepth > 0) |
| 8048 | { |
| 8049 | if (log_callback) log_callback(user_data, "Recovered from missing TreePop() in '%s'", window->Name); |
| 8050 | TreePop(); |
| 8051 | } |
| 8052 | while (g.GroupStack.Size > stack_sizes->SizeOfGroupStack) //-V1044 |
| 8053 | { |
| 8054 | if (log_callback) log_callback(user_data, "Recovered from missing EndGroup() in '%s'", window->Name); |
| 8055 | EndGroup(); |
| 8056 | } |
| 8057 | while (window->IDStack.Size > 1) |
| 8058 | { |
| 8059 | if (log_callback) log_callback(user_data, "Recovered from missing PopID() in '%s'", window->Name); |
| 8060 | PopID(); |
| 8061 | } |
| 8062 | while (g.DisabledStackSize > stack_sizes->SizeOfDisabledStack) //-V1044 |
| 8063 | { |
| 8064 | if (log_callback) log_callback(user_data, "Recovered from missing EndDisabled() in '%s'", window->Name); |
| 8065 | EndDisabled(); |
| 8066 | } |
| 8067 | while (g.ColorStack.Size > stack_sizes->SizeOfColorStack) |
| 8068 | { |
| 8069 | if (log_callback) log_callback(user_data, "Recovered from missing PopStyleColor() in '%s' for ImGuiCol_%s", window->Name, GetStyleColorName(g.ColorStack.back().Col)); |
| 8070 | PopStyleColor(); |
| 8071 | } |
| 8072 | while (g.ItemFlagsStack.Size > stack_sizes->SizeOfItemFlagsStack) //-V1044 |
| 8073 | { |
| 8074 | if (log_callback) log_callback(user_data, "Recovered from missing PopItemFlag() in '%s'", window->Name); |
| 8075 | PopItemFlag(); |
| 8076 | } |
| 8077 | while (g.StyleVarStack.Size > stack_sizes->SizeOfStyleVarStack) //-V1044 |
| 8078 | { |
| 8079 | if (log_callback) log_callback(user_data, "Recovered from missing PopStyleVar() in '%s'", window->Name); |
| 8080 | PopStyleVar(); |
| 8081 | } |
| 8082 | while (g.FocusScopeStack.Size > stack_sizes->SizeOfFocusScopeStack) //-V1044 |
| 8083 | { |
| 8084 | if (log_callback) log_callback(user_data, "Recovered from missing PopFocusScope() in '%s'", window->Name); |
| 8085 | PopFocusScope(); |
| 8086 | } |
| 8087 | } |
nothing calls this directly
no outgoing calls
no test coverage detected