// 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;
short*p_backup=&window->DC.StackSizesBackup[0];
{intcurrent=window->IDStack.Size;if(write)*p_backup=(short)current;elseIM_ASSERT(*p_backup==current&&"PushID/PopID or TreeNode/TreePop Mismatch!");p_backup++;}// Too few or too many PopID()/TreePop()
{intcurrent=window->DC.GroupStack.Size;if(write)*p_backup=(short)current;elseIM_ASSERT(*p_backup==current&&"BeginGroup/EndGroup Mismatch!");p_backup++;}// Too few or too many EndGroup()
{intcurrent=g.BeginPopupStack.Size;if(write)*p_backup=(short)current;elseIM_ASSERT(*p_backup==current&&"BeginMenu/EndMenu or BeginPopup/EndPopup Mismatch");p_backup++;}// Too few or too many EndMenu()/EndPopup()
// For color, style and font stacks there is an incentive to use Push/Begin/Pop/.../End patterns, so we relax our checks a little to allow them.
{intcurrent=g.ColorModifiers.Size;if(write)*p_backup=(short)current;elseIM_ASSERT(*p_backup>=current&&"PushStyleColor/PopStyleColor Mismatch!");p_backup++;}// Too few or too many PopStyleColor()
{intcurrent=g.StyleModifiers.Size;if(write)*p_backup=(short)current;elseIM_ASSERT(*p_backup>=current&&"PushStyleVar/PopStyleVar Mismatch!");p_backup++;}// Too few or too many PopStyleVar()
{intcurrent=g.FontStack.Size;if(write)*p_backup=(short)current;elseIM_ASSERT(*p_backup>=current&&"PushFont/PopFont Mismatch!");p_backup++;}// Too few or too many PopFont()
// 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)
{intn=window->IDStack.Size;if(write)*p=(short)n;elseIM_ASSERT(*p==n&&"PushID/PopID or TreeNode/TreePop Mismatch!");p++;}// Too few or too many PopID()/TreePop()
{intn=window->DC.GroupStack.Size;if(write)*p=(short)n;elseIM_ASSERT(*p==n&&"BeginGroup/EndGroup Mismatch!");p++;}// Too few or too many EndGroup()
// Global stacks
// For color, style and font stacks there is an incentive to use Push/Begin/Pop/.../End patterns, so we relax our checks a little to allow them.
{intn=g.BeginPopupStack.Size;if(write)*p=(short)n;elseIM_ASSERT(*p==n&&"BeginMenu/EndMenu or BeginPopup/EndPopup Mismatch!");p++;}// Too few or too many EndMenu()/EndPopup()
{intn=g.ColorModifiers.Size;if(write)*p=(short)n;elseIM_ASSERT(*p>=n&&"PushStyleColor/PopStyleColor Mismatch!");p++;}// Too few or too many PopStyleColor()
{intn=g.StyleModifiers.Size;if(write)*p=(short)n;elseIM_ASSERT(*p>=n&&"PushStyleVar/PopStyleVar Mismatch!");p++;}// Too few or too many PopStyleVar()
{intn=g.FontStack.Size;if(write)*p=(short)n;elseIM_ASSERT(*p>=n&&"PushFont/PopFont Mismatch!");p++;}// Too few or too many PopFont()
boolWithinFrameScope;// Set by NewFrame(), cleared by EndFrame()
boolWithinFrameScopeWithImplicitWindow;// Set by NewFrame(), cleared by EndFrame() when the implicit debug window has been pushed
boolWithinEndChild;// Set within EndChild()
// Windows state
ImVector<ImGuiWindow*>Windows;// Windows, sorted in display order, back to front
ImVector<ImGuiWindow*>WindowsFocusOrder;// Windows, sorted in focus order, back to front
ImVector<ImGuiWindow*>WindowsSortBuffer;
ImVector<ImGuiWindow*>CurrentWindowStack;
ImGuiStorageWindowsById;
intWindowsActiveCount;
ImGuiWindow*CurrentWindow;// Being drawn into
ImGuiStorageWindowsById;// Map window's ImGuiID to ImGuiWindow*
intWindowsActiveCount;// Number of unique windows submitted by frame
ImGuiWindow*CurrentWindow;// Window being drawn into
ImGuiWindow*HoveredWindow;// Will catch mouse inputs
ImGuiWindow*HoveredRootWindow;// Will catch mouse inputs (for focus/move only)
ImGuiWindow*MovingWindow;// Track the window we clicked on (in order to preserve focus). The actually window that is moved is generally MovingWindow->RootWindow.
ImGuiWindow*WheelingWindow;
ImGuiWindow*WheelingWindow;// Track the window we started mouse-wheeling on. Until a timer elapse or mouse has moved, generally keep scrolling the same window even if during the course of scrolling the mouse ends up hovering a child window.
ImVec2WheelingWindowRefMousePos;
floatWheelingWindowTimer;
@ -1057,9 +1058,9 @@ struct ImGuiContext
ImFontInputTextPasswordFont;
ImGuiIDTempInputTextId;// Temporary text input when CTRL+clicking on a slider, etc.
ImGuiColorEditFlagsColorEditOptions;// Store user options for color edit widgets
floatColorEditLastHue;
floatColorEditLastHue;// Backup of last Hue associated to LastColor[3], so we can restore Hue in lossy RGB<>HSV round trips
floatColorEditLastColor[3];
ImVec4ColorPickerRef;
ImVec4ColorPickerRef;// Initial/reference color at the time of opening the color picker.
boolDragCurrentAccumDirty;
floatDragCurrentAccum;// Accumulator for dragging modification. Always high-precision, not rounded by end-user precision settings
floatDragSpeedDefaultRatio;// If speed == 0.0f, uses (max-min) * DragSpeedDefaultRatio
@ -1082,7 +1083,7 @@ struct ImGuiContext
ImVector<ImGuiSettingsHandler>SettingsHandlers;// List of .ini settings handlers