|
@@ -1,4 +1,4 @@
|
|
|
-// dear imgui, v1.92.1 WIP
|
|
|
+// dear imgui, v1.92.1
|
|
|
// (internal structures/api)
|
|
|
|
|
|
// You may use this file to debug, understand or extend Dear ImGui features but we don't provide any guarantee of forward compatibility.
|
|
@@ -987,6 +987,7 @@ enum ImGuiItemStatusFlags_
|
|
|
ImGuiItemStatusFlags_Visible = 1 << 8, // [WIP] Set when item is overlapping the current clipping rectangle (Used internally. Please don't use yet: API/system will change as we refactor Itemadd()).
|
|
|
ImGuiItemStatusFlags_HasClipRect = 1 << 9, // g.LastItemData.ClipRect is valid.
|
|
|
ImGuiItemStatusFlags_HasShortcut = 1 << 10, // g.LastItemData.Shortcut valid. Set by SetNextItemShortcut() -> ItemAdd().
|
|
|
+ //ImGuiItemStatusFlags_FocusedByTabbing = 1 << 8, // Removed IN 1.90.1 (Dec 2023). The trigger is part of g.NavActivateId. See commit 54c1bdeceb.
|
|
|
|
|
|
// Additional status + semantic for ImGuiTestEngine
|
|
|
#ifdef IMGUI_ENABLE_TEST_ENGINE
|
|
@@ -1039,6 +1040,7 @@ enum ImGuiButtonFlagsPrivate_
|
|
|
ImGuiButtonFlags_NoFocus = 1 << 22, // [EXPERIMENTAL: Not very well specced]. Don't focus parent window when clicking.
|
|
|
ImGuiButtonFlags_PressedOnMask_ = ImGuiButtonFlags_PressedOnClick | ImGuiButtonFlags_PressedOnClickRelease | ImGuiButtonFlags_PressedOnClickReleaseAnywhere | ImGuiButtonFlags_PressedOnRelease | ImGuiButtonFlags_PressedOnDoubleClick | ImGuiButtonFlags_PressedOnDragDropHold,
|
|
|
ImGuiButtonFlags_PressedOnDefault_ = ImGuiButtonFlags_PressedOnClickRelease,
|
|
|
+ //ImGuiButtonFlags_NoKeyModifiers = ImGuiButtonFlags_NoKeyModsAllowed, // Renamed in 1.91.4
|
|
|
};
|
|
|
|
|
|
// Extend ImGuiComboFlags_
|
|
@@ -1700,6 +1702,7 @@ enum ImGuiNavRenderCursorFlags_
|
|
|
ImGuiNavHighlightFlags_Compact = ImGuiNavRenderCursorFlags_Compact, // Renamed in 1.91.4
|
|
|
ImGuiNavHighlightFlags_AlwaysDraw = ImGuiNavRenderCursorFlags_AlwaysDraw, // Renamed in 1.91.4
|
|
|
ImGuiNavHighlightFlags_NoRounding = ImGuiNavRenderCursorFlags_NoRounding, // Renamed in 1.91.4
|
|
|
+ //ImGuiNavHighlightFlags_TypeThin = ImGuiNavRenderCursorFlags_Compact, // Renamed in 1.90.2
|
|
|
#endif
|
|
|
};
|
|
|
|
|
@@ -2385,7 +2388,7 @@ struct ImGuiContext
|
|
|
ImVec2 WheelingAxisAvg;
|
|
|
|
|
|
// Item/widgets state and tracking information
|
|
|
- ImGuiID DebugDrawIdConflicts; // Set when we detect multiple items with the same identifier
|
|
|
+ ImGuiID DebugDrawIdConflictsId; // Set when we detect multiple items with the same identifier
|
|
|
ImGuiID DebugHookIdInfo; // Will call core hooks: DebugHookIdInfo() from GetID functions, used by ID Stack Tool [next HoveredId/ActiveId to not pull in an extra cache-line]
|
|
|
ImGuiID HoveredId; // Hovered widget, filled during the frame
|
|
|
ImGuiID HoveredIdPreviousFrame;
|
|
@@ -2474,18 +2477,19 @@ struct ImGuiContext
|
|
|
ImGuiWindow* NavWindow; // Focused window for navigation. Could be called 'FocusedWindow'
|
|
|
ImGuiID NavFocusScopeId; // Focused focus scope (e.g. selection code often wants to "clear other items" when landing on an item of the same scope)
|
|
|
ImGuiNavLayer NavLayer; // Focused layer (main scrolling layer, or menu/title bar layer)
|
|
|
- ImGuiID NavActivateId; // ~~ (g.ActiveId == 0) && (IsKeyPressed(ImGuiKey_Space) || IsKeyDown(ImGuiKey_Enter) || IsKeyPressed(ImGuiKey_NavGamepadActivate)) ? NavId : 0, also set when calling ActivateItem()
|
|
|
+ ImGuiID NavActivateId; // ~~ (g.ActiveId == 0) && (IsKeyPressed(ImGuiKey_Space) || IsKeyDown(ImGuiKey_Enter) || IsKeyPressed(ImGuiKey_NavGamepadActivate)) ? NavId : 0, also set when calling ActivateItemByID()
|
|
|
ImGuiID NavActivateDownId; // ~~ IsKeyDown(ImGuiKey_Space) || IsKeyDown(ImGuiKey_Enter) || IsKeyDown(ImGuiKey_NavGamepadActivate) ? NavId : 0
|
|
|
ImGuiID NavActivatePressedId; // ~~ IsKeyPressed(ImGuiKey_Space) || IsKeyPressed(ImGuiKey_Enter) || IsKeyPressed(ImGuiKey_NavGamepadActivate) ? NavId : 0 (no repeat)
|
|
|
ImGuiActivateFlags NavActivateFlags;
|
|
|
ImVector<ImGuiFocusScopeData> NavFocusRoute; // Reversed copy focus scope stack for NavId (should contains NavFocusScopeId). This essentially follow the window->ParentWindowForFocusRoute chain.
|
|
|
ImGuiID NavHighlightActivatedId;
|
|
|
float NavHighlightActivatedTimer;
|
|
|
- ImGuiID NavNextActivateId; // Set by ActivateItem(), queued until next frame.
|
|
|
+ ImGuiID NavNextActivateId; // Set by ActivateItemByID(), queued until next frame.
|
|
|
ImGuiActivateFlags NavNextActivateFlags;
|
|
|
ImGuiInputSource NavInputSource; // Keyboard or Gamepad mode? THIS CAN ONLY BE ImGuiInputSource_Keyboard or ImGuiInputSource_Mouse
|
|
|
ImGuiSelectionUserData NavLastValidSelectionUserData; // Last valid data passed to SetNextItemSelectionUser(), or -1. For current window. Not reset when focusing an item that doesn't have selection data.
|
|
|
ImS8 NavCursorHideFrames;
|
|
|
+ //ImGuiID NavActivateInputId; // Removed in 1.89.4 (July 2023). This is now part of g.NavActivateId and sets g.NavActivateFlags |= ImGuiActivateFlags_PreferInput. See commit c9a53aa74, issue #5606.
|
|
|
|
|
|
// Navigation: Init & Move Requests
|
|
|
bool NavAnyRequest; // ~~ NavMoveRequest || NavInitRequest this is to perform early out in ItemAdd()
|
|
@@ -2699,6 +2703,10 @@ struct ImGuiContext
|
|
|
ImGuiIDStackTool DebugIDStackTool;
|
|
|
ImGuiDebugAllocInfo DebugAllocInfo;
|
|
|
ImGuiDockNode* DebugHoveredDockNode; // Hovered dock node.
|
|
|
+#if defined(IMGUI_DEBUG_HIGHLIGHT_ALL_ID_CONFLICTS) && !defined(IMGUI_DISABLE_DEBUG_TOOLS)
|
|
|
+ ImGuiStorage DebugDrawIdConflictsAliveCount;
|
|
|
+ ImGuiStorage DebugDrawIdConflictsHighlightSet;
|
|
|
+#endif
|
|
|
|
|
|
// Misc
|
|
|
float FramerateSecPerFrame[60]; // Calculate estimate of framerate for user over the last 60 frames..
|
|
@@ -2707,7 +2715,7 @@ struct ImGuiContext
|
|
|
float FramerateSecPerFrameAccum;
|
|
|
int WantCaptureMouseNextFrame; // Explicit capture override via SetNextFrameWantCaptureMouse()/SetNextFrameWantCaptureKeyboard(). Default to -1.
|
|
|
int WantCaptureKeyboardNextFrame; // "
|
|
|
- int WantTextInputNextFrame; // Copied in EndFrame() from g.PlatformImeData.WanttextInput. Needs to be set for some backends (SDL3) to emit character inputs.
|
|
|
+ int WantTextInputNextFrame; // Copied in EndFrame() from g.PlatformImeData.WantTextInput. Needs to be set for some backends (SDL3) to emit character inputs.
|
|
|
ImVector<char> TempBuffer; // Temporary text buffer
|
|
|
char TempKeychordName[64];
|
|
|
|
|
@@ -3518,7 +3526,7 @@ namespace ImGui
|
|
|
// This should be part of a larger set of API: FocusItem(offset = -1), FocusItemByID(id), ActivateItem(offset = -1), ActivateItemByID(id) etc. which are
|
|
|
// much harder to design and implement than expected. I have a couple of private branches on this matter but it's not simple. For now implementing the easy ones.
|
|
|
IMGUI_API void FocusItem(); // Focus last item (no selection/activation).
|
|
|
- IMGUI_API void ActivateItemByID(ImGuiID id); // Activate an item by ID (button, checkbox, tree node etc.). Activation is queued and processed on the next frame when the item is encountered again.
|
|
|
+ IMGUI_API void ActivateItemByID(ImGuiID id); // Activate an item by ID (button, checkbox, tree node etc.). Activation is queued and processed on the next frame when the item is encountered again. Was called 'ActivateItem()' before 1.89.7.
|
|
|
|
|
|
// Inputs
|
|
|
// FIXME: Eventually we should aim to move e.g. IsActiveIdUsingKey() into IsKeyXXX functions.
|
|
@@ -3961,6 +3969,7 @@ namespace ImGui
|
|
|
//inline bool TreeNodeBehaviorIsOpen(ImGuiID id, ImGuiTreeNodeFlags flags = 0) { return TreeNodeUpdateNextOpen(id, flags); } // Renamed in 1.89
|
|
|
//inline bool IsKeyPressedMap(ImGuiKey key, bool repeat = true) { IM_ASSERT(IsNamedKey(key)); return IsKeyPressed(key, repeat); } // Removed in 1.87: Mapping from named key is always identity!
|
|
|
|
|
|
+ // Refactored focus/nav/tabbing system in 1.82 and 1.84. If you have old/custom copy-and-pasted widgets which used FocusableItemRegister():
|
|
|
// Refactored focus/nav/tabbing system in 1.82 and 1.84. If you have old/custom copy-and-pasted widgets which used FocusableItemRegister():
|
|
|
// (Old) IMGUI_VERSION_NUM < 18209: using 'ItemAdd(....)' and 'bool tab_focused = FocusableItemRegister(...)'
|
|
|
// (Old) IMGUI_VERSION_NUM >= 18209: using 'ItemAdd(..., ImGuiItemAddFlags_Focusable)' and 'bool tab_focused = (g.LastItemData.StatusFlags & ImGuiItemStatusFlags_Focused) != 0'
|