Clipper: always pulls current context on ImGuiListClipper::Begin(). (#9324, #5856)

Marked Ctx as internal in the comments.
This commit is contained in:
ocornut
2026-03-30 12:53:30 +02:00
parent bd3c925680
commit 97075fae4b
3 changed files with 5 additions and 4 deletions

View File

@@ -2856,16 +2856,16 @@ enum ImGuiListClipperFlags_
// - The clipper also handles various subtleties related to keyboard/gamepad navigation, wrapping etc.
struct ImGuiListClipper
{
ImGuiContext* Ctx; // Parent UI context
int DisplayStart; // First item to display, updated by each call to Step()
int DisplayEnd; // End of items to display (exclusive)
int UserIndex; // Helper storage for user convenience/code. Optional, and otherwise unused if you don't use it.
int ItemsCount; // [Internal] Number of items
float ItemsHeight; // [Internal] Height of item after a first step and item submission can calculate it
ImGuiListClipperFlags Flags; // [Internal] Flags, currently not yet well exposed.
double StartPosY; // [Internal] Cursor position at the time of Begin() or after table frozen rows are all processed
double StartSeekOffsetY; // [Internal] Account for frozen rows in a table and initial loss of precision in very large windows.
ImGuiContext* Ctx; // [Internal] Parent UI context
void* TempData; // [Internal] Internal data
ImGuiListClipperFlags Flags; // [Internal] Flags, currently not yet well exposed.
// items_count: Use INT_MAX if you don't know how many items you have (in which case the cursor won't be advanced in the final step, and you can call SeekCursorForItem() manually if you need)
// items_height: Use -1.0f to be calculated automatically on first step. Otherwise pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetFrameHeightWithSpacing().