// NOT checking: DC.ItemWidth, DC.AllowKeyboardFocus, DC.ButtonRepeat, DC.TextWrapPos (per window) to allow user to conveniently push once and not pop (they are cleared on Begin)
// NOT checking: DC.ItemWidth, DC.AllowKeyboardFocus, DC.ButtonRepeat, DC.TextWrapPos (per window) to allow user to conveniently push once and not pop (they are cleared on Begin)
ImGuiContext&g=*GImGui;
ImGuiContext&g=*GImGui;
int*p_backup=&window->DC.StackSizesBackup[0];
int*p_backup=&window->DC.StackSizesBackup[0];
{intcurrent=window->IDStack.Size;if(write)*p_backup=current;elseIM_ASSERT(*p_backup==current);p_backup++;}// User forgot PopID()
{intcurrent=window->IDStack.Size;if(write)*p_backup=current;elseIM_ASSERT(*p_backup==current&&"PushID/PopID Mismatch!");p_backup++;}// User forgot PopID()
{intcurrent=window->DC.GroupStack.Size;if(write)*p_backup=current;elseIM_ASSERT(*p_backup==current);p_backup++;}// User forgot EndGroup()
{intcurrent=window->DC.GroupStack.Size;if(write)*p_backup=current;elseIM_ASSERT(*p_backup==current&&"BeginGroup/EndGroup Mismatch!");p_backup++;}// User forgot EndGroup()
{intcurrent=g.CurrentPopupStack.Size;if(write)*p_backup=current;elseIM_ASSERT(*p_backup==current);p_backup++;}// User forgot EndPopup()/EndMenu()
{intcurrent=g.CurrentPopupStack.Size;if(write)*p_backup=current;elseIM_ASSERT(*p_backup==current&&"BeginMenu/EndMenu or BeginPopup/EndPopup Mismatch");p_backup++;}// User forgot EndPopup()/EndMenu()
{intcurrent=g.ColorModifiers.Size;if(write)*p_backup=current;elseIM_ASSERT(*p_backup==current);p_backup++;}// User forgot PopStyleColor()
{intcurrent=g.ColorModifiers.Size;if(write)*p_backup=current;elseIM_ASSERT(*p_backup==current&&"PushStyleColor/PopStyleColor Mismatch!");p_backup++;}// User forgot PopStyleColor()
{intcurrent=g.StyleModifiers.Size;if(write)*p_backup=current;elseIM_ASSERT(*p_backup==current);p_backup++;}// User forgot PopStyleVar()
{intcurrent=g.StyleModifiers.Size;if(write)*p_backup=current;elseIM_ASSERT(*p_backup==current&&"PushStyleVar/PopStyleVar Mismatch!");p_backup++;}// User forgot PopStyleVar()
{intcurrent=g.FontStack.Size;if(write)*p_backup=current;elseIM_ASSERT(*p_backup==current);p_backup++;}// User forgot PopFont()
{intcurrent=g.FontStack.Size;if(write)*p_backup=current;elseIM_ASSERT(*p_backup==current&&"PushFont/PopFont Mismatch!");p_backup++;}// User forgot PopFont()