g.LogLinePosY=-FLT_MAX;// To enforce Log carriage return
if(group_data.AdvanceCursor)
if(!group_data.EmitItem)
{
window->DC.GroupStack.pop_back();
return;
}
window->DC.CurrentLineTextBaseOffset=ImMax(window->DC.PrevLineTextBaseOffset,group_data.BackupCurrentLineTextBaseOffset);// FIXME: Incorrect, we should grab the base offset from the *first line* of the group but it is hard to obtain now.
ItemSize(group_bb.GetSize(),0.0f);
ItemAdd(group_bb,0);
}
// If the current ActiveId was declared within the boundary of our group, we copy it to LastItemId so IsItemActive(), IsItemDeactivated() etc. will be functional on the entire group.
// It would be be neater if we replaced window.DC.LastItemId by e.g. 'bool LastItemIsActive', but would put a little more burden on individual widgets.
// Simple column measurement, currently used for MenuItem() only.. This is very short-sighted/throw-away code and NOT a generic helper.
@ -818,11 +818,12 @@ struct ImGuiContext
floatFontSize;// (Shortcut) == FontBaseSize * g.CurrentWindow->FontWindowScale == window->FontSize(). Text height for current window.
floatFontBaseSize;// (Shortcut) == IO.FontGlobalScale * Font->Scale * Font->FontSize. Base text height.
ImDrawListSharedDataDrawListSharedData;
doubleTime;
intFrameCount;
intFrameCountEnded;
intFrameCountRendered;
// 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;
@ -832,39 +833,45 @@ struct ImGuiContext
ImGuiWindow*CurrentWindow;// 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.
// Item/widgets state and tracking information
ImGuiIDHoveredId;// Hovered widget
boolHoveredIdAllowOverlap;
ImGuiIDHoveredIdPreviousFrame;
floatHoveredIdTimer;// Measure contiguous hovering time
floatHoveredIdNotActiveTimer;// Measure contiguous hovering time where the item has not been active
ImGuiIDActiveId;// Active widget
ImGuiIDActiveIdPreviousFrame;
ImGuiIDActiveIdIsAlive;// Active widget has been seen this frame (we can't use a bool as the ActiveId may change within the frame)
floatActiveIdTimer;
boolActiveIdIsJustActivated;// Set at the time of activation for one frame
boolActiveIdAllowOverlap;// Active widget allows another widget to steal active id (generally for overlapping widgets, but not always)
boolActiveIdHasBeenPressed;// Track whether the active id led to a press (this is to allow changing between PressOnClick and PressOnRelease without pressing twice). Used by range_select branch.
boolActiveIdHasBeenEdited;// Was the value associated to the widget Edited over the course of the Active state.
boolActiveIdPreviousFrameIsAlive;
boolActiveIdPreviousFrameHasBeenEdited;
intActiveIdAllowNavDirFlags;// Active widget allows using directional navigation (e.g. can activate a button and move away from it)
intActiveIdBlockNavInputFlags;
ImVec2ActiveIdClickOffset;// Clicked offset from upper-left corner, if applicable (currently only set by ButtonBehavior)
ImGuiWindow*ActiveIdWindow;
ImGuiWindow*ActiveIdPreviousFrameWindow;
ImGuiInputSourceActiveIdSource;// Activating with mouse or nav (gamepad/keyboard)
ImGuiIDActiveIdPreviousFrame;
boolActiveIdPreviousFrameIsAlive;
boolActiveIdPreviousFrameHasBeenEdited;
ImGuiWindow*ActiveIdPreviousFrameWindow;
ImGuiIDLastActiveId;// Store the last non-zero ActiveId, useful for animation.
floatLastActiveIdTimer;// Store the last non-zero ActiveId timer since the beginning of activation, useful for animation.
ImVec2LastValidMousePos;
ImGuiWindow*MovingWindow;// Track the window we clicked on (in order to preserve focus). The actually window that is moved is generally MovingWindow->RootWindow.
// Next window/item data
ImGuiNextWindowDataNextWindowData;// Storage for SetNextWindow** functions
boolNextTreeNodeOpenVal;// Storage for SetNextTreeNode** functions
ImGuiCondNextTreeNodeOpenCond;
// Shared stacks
ImVector<ImGuiColorMod>ColorModifiers;// Stack for PushStyleColor()/PopStyleColor()
ImVector<ImGuiStyleMod>StyleModifiers;// Stack for PushStyleVar()/PopStyleVar()
ImVector<ImFont*>FontStack;// Stack for PushFont()/PopFont()
ImVector<ImGuiPopupData>OpenPopupStack;// Which popups are open (persistent)
ImVector<ImGuiPopupData>BeginPopupStack;// Which level of BeginPopup() we are in (reset every frame)
ImGuiNextWindowDataNextWindowData;// Storage for SetNextWindow** functions
boolNextTreeNodeOpenVal;// Storage for SetNextTreeNode** functions
ImGuiCondNextTreeNodeOpenCond;
// Navigation data (for gamepad/keyboard)
ImGuiWindow*NavWindow;// Focused window for navigation. Could be called 'FocusWindow'
window->DC.MenuBarOffset.x=window->DC.CursorPos.x-window->MenuBarRect().Min.x;// Save horizontal position so next append can reuse it. This is kinda equivalent to a per-layer CursorPos.