Save current stack sizes. Called e.g. by NewFrame() and by Begin() but may be called for manual recovery.
| 11627 | |
| 11628 | // Save current stack sizes. Called e.g. by NewFrame() and by Begin() but may be called for manual recovery. |
| 11629 | void ImGui::ErrorRecoveryStoreState(ImGuiErrorRecoveryState* state_out) |
| 11630 | { |
| 11631 | ImGuiContext& g = *GImGui; |
| 11632 | state_out->SizeOfWindowStack = (short)g.CurrentWindowStack.Size; |
| 11633 | state_out->SizeOfIDStack = (short)g.CurrentWindow->IDStack.Size; |
| 11634 | state_out->SizeOfTreeStack = (short)g.CurrentWindow->DC.TreeDepth; // NOT g.TreeNodeStack.Size which is a partial stack! |
| 11635 | state_out->SizeOfColorStack = (short)g.ColorStack.Size; |
| 11636 | state_out->SizeOfStyleVarStack = (short)g.StyleVarStack.Size; |
| 11637 | state_out->SizeOfFontStack = (short)g.FontStack.Size; |
| 11638 | state_out->SizeOfFocusScopeStack = (short)g.FocusScopeStack.Size; |
| 11639 | state_out->SizeOfGroupStack = (short)g.GroupStack.Size; |
| 11640 | state_out->SizeOfItemFlagsStack = (short)g.ItemFlagsStack.Size; |
| 11641 | state_out->SizeOfBeginPopupStack = (short)g.BeginPopupStack.Size; |
| 11642 | state_out->SizeOfDisabledStack = (short)g.DisabledStackSize; |
| 11643 | } |
| 11644 | |
| 11645 | // Chosen name "Try to recover" over e.g. "Restore" to suggest this is not a 100% guaranteed recovery. |
| 11646 | // Called by e.g. EndFrame() but may be called for manual recovery. |
nothing calls this directly
no outgoing calls
no test coverage detected