|
@@ -575,7 +575,7 @@ struct ImGuiGroupData
|
|
float BackupCurrentLineTextBaseOffset;
|
|
float BackupCurrentLineTextBaseOffset;
|
|
ImGuiID BackupActiveIdIsAlive;
|
|
ImGuiID BackupActiveIdIsAlive;
|
|
bool BackupActiveIdPreviousFrameIsAlive;
|
|
bool BackupActiveIdPreviousFrameIsAlive;
|
|
- bool AdvanceCursor;
|
|
|
|
|
|
+ bool EmitItem;
|
|
};
|
|
};
|
|
|
|
|
|
// Simple column measurement, currently used for MenuItem() only.. This is very short-sighted/throw-away code and NOT a generic helper.
|
|
// 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
|
|
float FontSize; // (Shortcut) == FontBaseSize * g.CurrentWindow->FontWindowScale == window->FontSize(). Text height for current window.
|
|
float FontSize; // (Shortcut) == FontBaseSize * g.CurrentWindow->FontWindowScale == window->FontSize(). Text height for current window.
|
|
float FontBaseSize; // (Shortcut) == IO.FontGlobalScale * Font->Scale * Font->FontSize. Base text height.
|
|
float FontBaseSize; // (Shortcut) == IO.FontGlobalScale * Font->Scale * Font->FontSize. Base text height.
|
|
ImDrawListSharedData DrawListSharedData;
|
|
ImDrawListSharedData DrawListSharedData;
|
|
-
|
|
|
|
double Time;
|
|
double Time;
|
|
int FrameCount;
|
|
int FrameCount;
|
|
int FrameCountEnded;
|
|
int FrameCountEnded;
|
|
int FrameCountRendered;
|
|
int FrameCountRendered;
|
|
|
|
+
|
|
|
|
+ // Windows state
|
|
ImVector<ImGuiWindow*> Windows; // Windows, sorted in display order, back to front
|
|
ImVector<ImGuiWindow*> Windows; // Windows, sorted in display order, back to front
|
|
ImVector<ImGuiWindow*> WindowsFocusOrder; // Windows, sorted in focus order, back to front
|
|
ImVector<ImGuiWindow*> WindowsFocusOrder; // Windows, sorted in focus order, back to front
|
|
ImVector<ImGuiWindow*> WindowsSortBuffer;
|
|
ImVector<ImGuiWindow*> WindowsSortBuffer;
|
|
@@ -832,39 +833,45 @@ struct ImGuiContext
|
|
ImGuiWindow* CurrentWindow; // Being drawn into
|
|
ImGuiWindow* CurrentWindow; // Being drawn into
|
|
ImGuiWindow* HoveredWindow; // Will catch mouse inputs
|
|
ImGuiWindow* HoveredWindow; // Will catch mouse inputs
|
|
ImGuiWindow* HoveredRootWindow; // Will catch mouse inputs (for focus/move only)
|
|
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
|
|
ImGuiID HoveredId; // Hovered widget
|
|
ImGuiID HoveredId; // Hovered widget
|
|
bool HoveredIdAllowOverlap;
|
|
bool HoveredIdAllowOverlap;
|
|
ImGuiID HoveredIdPreviousFrame;
|
|
ImGuiID HoveredIdPreviousFrame;
|
|
float HoveredIdTimer; // Measure contiguous hovering time
|
|
float HoveredIdTimer; // Measure contiguous hovering time
|
|
float HoveredIdNotActiveTimer; // Measure contiguous hovering time where the item has not been active
|
|
float HoveredIdNotActiveTimer; // Measure contiguous hovering time where the item has not been active
|
|
ImGuiID ActiveId; // Active widget
|
|
ImGuiID ActiveId; // Active widget
|
|
- ImGuiID ActiveIdPreviousFrame;
|
|
|
|
ImGuiID ActiveIdIsAlive; // Active widget has been seen this frame (we can't use a bool as the ActiveId may change within the frame)
|
|
ImGuiID ActiveIdIsAlive; // Active widget has been seen this frame (we can't use a bool as the ActiveId may change within the frame)
|
|
float ActiveIdTimer;
|
|
float ActiveIdTimer;
|
|
bool ActiveIdIsJustActivated; // Set at the time of activation for one frame
|
|
bool ActiveIdIsJustActivated; // Set at the time of activation for one frame
|
|
bool ActiveIdAllowOverlap; // Active widget allows another widget to steal active id (generally for overlapping widgets, but not always)
|
|
bool ActiveIdAllowOverlap; // Active widget allows another widget to steal active id (generally for overlapping widgets, but not always)
|
|
bool ActiveIdHasBeenPressed; // 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.
|
|
bool ActiveIdHasBeenPressed; // 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.
|
|
bool ActiveIdHasBeenEdited; // Was the value associated to the widget Edited over the course of the Active state.
|
|
bool ActiveIdHasBeenEdited; // Was the value associated to the widget Edited over the course of the Active state.
|
|
- bool ActiveIdPreviousFrameIsAlive;
|
|
|
|
- bool ActiveIdPreviousFrameHasBeenEdited;
|
|
|
|
int ActiveIdAllowNavDirFlags; // Active widget allows using directional navigation (e.g. can activate a button and move away from it)
|
|
int ActiveIdAllowNavDirFlags; // Active widget allows using directional navigation (e.g. can activate a button and move away from it)
|
|
int ActiveIdBlockNavInputFlags;
|
|
int ActiveIdBlockNavInputFlags;
|
|
ImVec2 ActiveIdClickOffset; // Clicked offset from upper-left corner, if applicable (currently only set by ButtonBehavior)
|
|
ImVec2 ActiveIdClickOffset; // Clicked offset from upper-left corner, if applicable (currently only set by ButtonBehavior)
|
|
ImGuiWindow* ActiveIdWindow;
|
|
ImGuiWindow* ActiveIdWindow;
|
|
- ImGuiWindow* ActiveIdPreviousFrameWindow;
|
|
|
|
ImGuiInputSource ActiveIdSource; // Activating with mouse or nav (gamepad/keyboard)
|
|
ImGuiInputSource ActiveIdSource; // Activating with mouse or nav (gamepad/keyboard)
|
|
|
|
+ ImGuiID ActiveIdPreviousFrame;
|
|
|
|
+ bool ActiveIdPreviousFrameIsAlive;
|
|
|
|
+ bool ActiveIdPreviousFrameHasBeenEdited;
|
|
|
|
+ ImGuiWindow* ActiveIdPreviousFrameWindow;
|
|
|
|
+
|
|
ImGuiID LastActiveId; // Store the last non-zero ActiveId, useful for animation.
|
|
ImGuiID LastActiveId; // Store the last non-zero ActiveId, useful for animation.
|
|
float LastActiveIdTimer; // Store the last non-zero ActiveId timer since the beginning of activation, useful for animation.
|
|
float LastActiveIdTimer; // Store the last non-zero ActiveId timer since the beginning of activation, useful for animation.
|
|
- ImVec2 LastValidMousePos;
|
|
|
|
- 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
|
|
|
|
+ ImGuiNextWindowData NextWindowData; // Storage for SetNextWindow** functions
|
|
|
|
+ bool NextTreeNodeOpenVal; // Storage for SetNextTreeNode** functions
|
|
|
|
+ ImGuiCond NextTreeNodeOpenCond;
|
|
|
|
+
|
|
|
|
+ // Shared stacks
|
|
ImVector<ImGuiColorMod> ColorModifiers; // Stack for PushStyleColor()/PopStyleColor()
|
|
ImVector<ImGuiColorMod> ColorModifiers; // Stack for PushStyleColor()/PopStyleColor()
|
|
ImVector<ImGuiStyleMod> StyleModifiers; // Stack for PushStyleVar()/PopStyleVar()
|
|
ImVector<ImGuiStyleMod> StyleModifiers; // Stack for PushStyleVar()/PopStyleVar()
|
|
ImVector<ImFont*> FontStack; // Stack for PushFont()/PopFont()
|
|
ImVector<ImFont*> FontStack; // Stack for PushFont()/PopFont()
|
|
ImVector<ImGuiPopupData>OpenPopupStack; // Which popups are open (persistent)
|
|
ImVector<ImGuiPopupData>OpenPopupStack; // Which popups are open (persistent)
|
|
ImVector<ImGuiPopupData>BeginPopupStack; // Which level of BeginPopup() we are in (reset every frame)
|
|
ImVector<ImGuiPopupData>BeginPopupStack; // Which level of BeginPopup() we are in (reset every frame)
|
|
- ImGuiNextWindowData NextWindowData; // Storage for SetNextWindow** functions
|
|
|
|
- bool NextTreeNodeOpenVal; // Storage for SetNextTreeNode** functions
|
|
|
|
- ImGuiCond NextTreeNodeOpenCond;
|
|
|
|
|
|
|
|
// Navigation data (for gamepad/keyboard)
|
|
// Navigation data (for gamepad/keyboard)
|
|
ImGuiWindow* NavWindow; // Focused window for navigation. Could be called 'FocusWindow'
|
|
ImGuiWindow* NavWindow; // Focused window for navigation. Could be called 'FocusWindow'
|
|
@@ -948,6 +955,7 @@ struct ImGuiContext
|
|
ImVector<ImGuiTabBarSortItem> TabSortByWidthBuffer;
|
|
ImVector<ImGuiTabBarSortItem> TabSortByWidthBuffer;
|
|
|
|
|
|
// Widget state
|
|
// Widget state
|
|
|
|
+ ImVec2 LastValidMousePos;
|
|
ImGuiInputTextState InputTextState;
|
|
ImGuiInputTextState InputTextState;
|
|
ImFont InputTextPasswordFont;
|
|
ImFont InputTextPasswordFont;
|
|
ImGuiID TempInputTextId; // Temporary text input when CTRL+clicking on a slider, etc.
|
|
ImGuiID TempInputTextId; // Temporary text input when CTRL+clicking on a slider, etc.
|
|
@@ -1003,37 +1011,41 @@ struct ImGuiContext
|
|
FontSize = FontBaseSize = 0.0f;
|
|
FontSize = FontBaseSize = 0.0f;
|
|
FontAtlasOwnedByContext = shared_font_atlas ? false : true;
|
|
FontAtlasOwnedByContext = shared_font_atlas ? false : true;
|
|
IO.Fonts = shared_font_atlas ? shared_font_atlas : IM_NEW(ImFontAtlas)();
|
|
IO.Fonts = shared_font_atlas ? shared_font_atlas : IM_NEW(ImFontAtlas)();
|
|
-
|
|
|
|
Time = 0.0f;
|
|
Time = 0.0f;
|
|
FrameCount = 0;
|
|
FrameCount = 0;
|
|
FrameCountEnded = FrameCountRendered = -1;
|
|
FrameCountEnded = FrameCountRendered = -1;
|
|
|
|
+
|
|
WindowsActiveCount = 0;
|
|
WindowsActiveCount = 0;
|
|
CurrentWindow = NULL;
|
|
CurrentWindow = NULL;
|
|
HoveredWindow = NULL;
|
|
HoveredWindow = NULL;
|
|
HoveredRootWindow = NULL;
|
|
HoveredRootWindow = NULL;
|
|
|
|
+ MovingWindow = NULL;
|
|
|
|
+
|
|
HoveredId = 0;
|
|
HoveredId = 0;
|
|
HoveredIdAllowOverlap = false;
|
|
HoveredIdAllowOverlap = false;
|
|
HoveredIdPreviousFrame = 0;
|
|
HoveredIdPreviousFrame = 0;
|
|
HoveredIdTimer = HoveredIdNotActiveTimer = 0.0f;
|
|
HoveredIdTimer = HoveredIdNotActiveTimer = 0.0f;
|
|
ActiveId = 0;
|
|
ActiveId = 0;
|
|
- ActiveIdPreviousFrame = 0;
|
|
|
|
ActiveIdIsAlive = 0;
|
|
ActiveIdIsAlive = 0;
|
|
ActiveIdTimer = 0.0f;
|
|
ActiveIdTimer = 0.0f;
|
|
ActiveIdIsJustActivated = false;
|
|
ActiveIdIsJustActivated = false;
|
|
ActiveIdAllowOverlap = false;
|
|
ActiveIdAllowOverlap = false;
|
|
ActiveIdHasBeenPressed = false;
|
|
ActiveIdHasBeenPressed = false;
|
|
ActiveIdHasBeenEdited = false;
|
|
ActiveIdHasBeenEdited = false;
|
|
- ActiveIdPreviousFrameIsAlive = false;
|
|
|
|
- ActiveIdPreviousFrameHasBeenEdited = false;
|
|
|
|
ActiveIdAllowNavDirFlags = 0x00;
|
|
ActiveIdAllowNavDirFlags = 0x00;
|
|
ActiveIdBlockNavInputFlags = 0x00;
|
|
ActiveIdBlockNavInputFlags = 0x00;
|
|
ActiveIdClickOffset = ImVec2(-1,-1);
|
|
ActiveIdClickOffset = ImVec2(-1,-1);
|
|
- ActiveIdWindow = ActiveIdPreviousFrameWindow = NULL;
|
|
|
|
|
|
+ ActiveIdWindow = NULL;
|
|
ActiveIdSource = ImGuiInputSource_None;
|
|
ActiveIdSource = ImGuiInputSource_None;
|
|
|
|
+
|
|
|
|
+ ActiveIdPreviousFrame = 0;
|
|
|
|
+ ActiveIdPreviousFrameIsAlive = false;
|
|
|
|
+ ActiveIdPreviousFrameHasBeenEdited = false;
|
|
|
|
+ ActiveIdPreviousFrameWindow = NULL;
|
|
|
|
+
|
|
LastActiveId = 0;
|
|
LastActiveId = 0;
|
|
LastActiveIdTimer = 0.0f;
|
|
LastActiveIdTimer = 0.0f;
|
|
- LastValidMousePos = ImVec2(0.0f, 0.0f);
|
|
|
|
- MovingWindow = NULL;
|
|
|
|
|
|
+
|
|
NextTreeNodeOpenVal = false;
|
|
NextTreeNodeOpenVal = false;
|
|
NextTreeNodeOpenCond = 0;
|
|
NextTreeNodeOpenCond = 0;
|
|
|
|
|
|
@@ -1087,6 +1099,7 @@ struct ImGuiContext
|
|
|
|
|
|
CurrentTabBar = NULL;
|
|
CurrentTabBar = NULL;
|
|
|
|
|
|
|
|
+ LastValidMousePos = ImVec2(0.0f, 0.0f);
|
|
TempInputTextId = 0;
|
|
TempInputTextId = 0;
|
|
ColorEditOptions = ImGuiColorEditFlags__OptionsDefault;
|
|
ColorEditOptions = ImGuiColorEditFlags__OptionsDefault;
|
|
DragCurrentAccumDirty = false;
|
|
DragCurrentAccumDirty = false;
|