// clipper.Begin(1000); // We have 1000 elements, evenly spaced.
// clipper.ForceDisplay(42); // Optional, force element with given index to be displayed (use f.e. if you need to update a tooltip for a drag&drop source)
// while (clipper.Step())
// for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++)
// ImGui::Text("line number %d", i);
@ -2195,6 +2196,12 @@ struct ImGuiListClipper
// [Internal]
intItemsCount;
intRangeStart[4];// 1 for the user, rest for internal use
intRangeEnd[4];
intRangeCount;
intYRangeMin[1];
intYRangeMax[1];
intYRangeCount;
intStepNo;
intItemsFrozen;
floatItemsHeight;
@ -2207,6 +2214,9 @@ struct ImGuiListClipper
// items_height: Use -1.0f to be calculated automatically on first step. Otherwise pass in the distance between your items, typically GetTextLineHeightWithSpacing() or GetFrameHeightWithSpacing().
IMGUI_APIvoidBegin(intitems_count,floatitems_height=-1.0f);// Automatically called by constructor if you passed 'items_count' or by Step() in Step 1.
IMGUI_APIvoidEnd();// Automatically called on the last call of Step() that returns false.
IMGUI_APIvoidForceDisplayRange(intitem_start,intitem_end);// Optionally call before the first call to Step() if you need a range of items to be displayed regardless of visibility.
inlinevoidForceDisplay(intitem_start,intitem_count=1){ForceDisplayRange(item_start,item_start+item_count);}// Like ForceDisplayRange, but with a number instead of an end index.
IMGUI_APIvoidForceDisplayYRange(floaty_min,floaty_max);// Like ForceDisplayRange, but with y coordinates instead of item indices.
IMGUI_APIboolStep();// Call until it returns false. The DisplayStart/DisplayEnd fields will be set and you can process/draw those items.