Save current stack sizes. Called e.g. by NewFrame() and by Begin() but may be called for manual recovery.
| 10923 | |
| 10924 | // Save current stack sizes. Called e.g. by NewFrame() and by Begin() but may be called for manual recovery. |
| 10925 | void ImGui::ErrorRecoveryStoreState(ImGuiErrorRecoveryState* state_out) |
| 10926 | { |
| 10927 | ImGuiContext& g = *GImGui; |
| 10928 | state_out->SizeOfWindowStack = (short)g.CurrentWindowStack.Size; |
| 10929 | state_out->SizeOfIDStack = (short)g.CurrentWindow->IDStack.Size; |
| 10930 | state_out->SizeOfTreeStack = (short)g.CurrentWindow->DC.TreeDepth; // NOT g.TreeNodeStack.Size which is a partial stack! |
| 10931 | state_out->SizeOfColorStack = (short)g.ColorStack.Size; |
| 10932 | state_out->SizeOfStyleVarStack = (short)g.StyleVarStack.Size; |
| 10933 | state_out->SizeOfFontStack = (short)g.FontStack.Size; |
| 10934 | state_out->SizeOfFocusScopeStack = (short)g.FocusScopeStack.Size; |
| 10935 | state_out->SizeOfGroupStack = (short)g.GroupStack.Size; |
| 10936 | state_out->SizeOfItemFlagsStack = (short)g.ItemFlagsStack.Size; |
| 10937 | state_out->SizeOfBeginPopupStack = (short)g.BeginPopupStack.Size; |
| 10938 | state_out->SizeOfDisabledStack = (short)g.DisabledStackSize; |
| 10939 | } |
| 10940 | |
| 10941 | // Chosen name "Try to recover" over e.g. "Restore" to suggest this is not a 100% guaranteed recovery. |
| 10942 | // Called by e.g. EndFrame() but may be called for manual recovery. |
nothing calls this directly
no outgoing calls
no test coverage detected