Save current stack sizes. Called e.g. by NewFrame() and by Begin() but may be called for manual recovery.
| 10999 | |
| 11000 | // Save current stack sizes. Called e.g. by NewFrame() and by Begin() but may be called for manual recovery. |
| 11001 | void ImGui::ErrorRecoveryStoreState(ImGuiErrorRecoveryState* state_out) |
| 11002 | { |
| 11003 | ImGuiContext& g = *GImGui; |
| 11004 | state_out->SizeOfWindowStack = (short)g.CurrentWindowStack.Size; |
| 11005 | state_out->SizeOfIDStack = (short)g.CurrentWindow->IDStack.Size; |
| 11006 | state_out->SizeOfTreeStack = (short)g.CurrentWindow->DC.TreeDepth; // NOT g.TreeNodeStack.Size which is a partial stack! |
| 11007 | state_out->SizeOfColorStack = (short)g.ColorStack.Size; |
| 11008 | state_out->SizeOfStyleVarStack = (short)g.StyleVarStack.Size; |
| 11009 | state_out->SizeOfFontStack = (short)g.FontStack.Size; |
| 11010 | state_out->SizeOfFocusScopeStack = (short)g.FocusScopeStack.Size; |
| 11011 | state_out->SizeOfGroupStack = (short)g.GroupStack.Size; |
| 11012 | state_out->SizeOfItemFlagsStack = (short)g.ItemFlagsStack.Size; |
| 11013 | state_out->SizeOfBeginPopupStack = (short)g.BeginPopupStack.Size; |
| 11014 | state_out->SizeOfDisabledStack = (short)g.DisabledStackSize; |
| 11015 | } |
| 11016 | |
| 11017 | // Chosen name "Try to recover" over e.g. "Restore" to suggest this is not a 100% guaranteed recovery. |
| 11018 | // Called by e.g. EndFrame() but may be called for manual recovery. |
nothing calls this directly
no outgoing calls
no test coverage detected