MCPcopy Create free account
hub / github.com/Wemino/MarkerPatch / ErrorRecoveryStoreState

Method ErrorRecoveryStoreState

include/imgui/imgui.cpp:11001–11015  ·  view source on GitHub ↗

Save current stack sizes. Called e.g. by NewFrame() and by Begin() but may be called for manual recovery.

Source from the content-addressed store, hash-verified

10999
11000// Save current stack sizes. Called e.g. by NewFrame() and by Begin() but may be called for manual recovery.
11001void 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.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected