You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: imgui.h
+1-1
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ Index of this file:
64
64
// Version
65
65
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals. Work in progress versions typically starts at XYY99 then bounce up to XYY00, XYY01 etc. when release tagging happens)
typedefint ImGuiNextWindowDataFlags; // -> enum ImGuiNextWindowDataFlags_// Flags: for SetNextWindowXXX() functions
155
+
typedefint ImGuiScrollFlags; // -> enum ImGuiScrollFlags_ // Flags: for ScrollToItem() and navigation requests
155
156
typedefint ImGuiSeparatorFlags; // -> enum ImGuiSeparatorFlags_ // Flags: for SeparatorEx()
156
157
typedefint ImGuiTextFlags; // -> enum ImGuiTextFlags_ // Flags: for TextEx()
157
158
typedefint ImGuiTooltipFlags; // -> enum ImGuiTooltipFlags_ // Flags: for BeginTooltipEx()
@@ -1175,6 +1176,21 @@ enum ImGuiActivateFlags_
1175
1176
ImGuiActivateFlags_TryToPreserveState = 1 << 2// Request widget to preserve state if it can (e.g. InputText will try to preserve cursor/selection)
1176
1177
};
1177
1178
1179
+
// Early work-in-progress API for ScrollToItem()
1180
+
enum ImGuiScrollFlags_
1181
+
{
1182
+
ImGuiScrollFlags_None = 0,
1183
+
ImGuiScrollFlags_KeepVisibleEdgeX = 1 << 0, // If item is not visible: scroll as little as possible on X axis to bring item back into view [default for X axis]
1184
+
ImGuiScrollFlags_KeepVisibleEdgeY = 1 << 1, // If item is not visible: scroll as little as possible on Y axis to bring item back into view [default for Y axis for windows that are already visible]
1185
+
ImGuiScrollFlags_KeepVisibleCenterX = 1 << 2, // If item is not visible: scroll to make the item centered on X axis [rarely used]
1186
+
ImGuiScrollFlags_KeepVisibleCenterY = 1 << 3, // If item is not visible: scroll to make the item centered on Y axis
1187
+
ImGuiScrollFlags_AlwaysCenterX = 1 << 4, // Always center the result item on X axis [rarely used]
1188
+
ImGuiScrollFlags_AlwaysCenterY = 1 << 5, // Always center the result item on Y axis [default for Y axis for appearing window)
1189
+
ImGuiScrollFlags_NoScrollParent = 1 << 6, // Disable forwarding scrolling to parent window if required to keep item/rect visible (only scroll window the function was applied to).
ImGuiNavMoveFlags_WrapY = 1 << 3, // This is not super useful but provided for completeness
1202
1218
ImGuiNavMoveFlags_AllowCurrentNavId = 1 << 4, // Allow scoring and considering the current NavId as a move target candidate. This is used when the move source is offset (e.g. pressing PageDown actually needs to send a Up move request, if we are pressing PageDown from the bottom-most item we need to stay in place)
1203
1219
ImGuiNavMoveFlags_AlsoScoreVisibleSet = 1 << 5, // Store alternate result in NavMoveResultLocalVisible that only comprise elements that are already fully visible (used by PageUp/PageDown)
1204
-
ImGuiNavMoveFlags_ScrollToEdge= 1 << 6,
1220
+
ImGuiNavMoveFlags_ScrollToEdgeY = 1 << 6,// Force scrolling to min/max (used by Home/End) // FIXME-NAV: Aim to remove or reword, probably unnecessary
1205
1221
ImGuiNavMoveFlags_Forwarded = 1 << 7,
1206
1222
ImGuiNavMoveFlags_DebugNoResult = 1 << 8
1207
1223
};
@@ -1536,6 +1552,7 @@ struct ImGuiContext
1536
1552
bool NavMoveScoringItems; // Move request submitted, still scoring incoming items
1537
1553
bool NavMoveForwardToNextFrame;
1538
1554
ImGuiNavMoveFlags NavMoveFlags;
1555
+
ImGuiScrollFlags NavMoveScrollFlags;
1539
1556
ImGuiKeyModFlags NavMoveKeyMods;
1540
1557
ImGuiDir NavMoveDir; // Direction of the move request (left/right/up/down)
inline ImGuiID GetItemID() { ImGuiContext& g = *GImGui; return g.LastItemData.ID; } // Get ID of last item (~~ often same ImGui::GetID(label) beforehand)
0 commit comments