| 2830 | } |
| 2831 | |
| 2832 | void ImGuiListClipper::End() |
| 2833 | { |
| 2834 | if (ImGuiListClipperData* data = (ImGuiListClipperData*)TempData) |
| 2835 | { |
| 2836 | // In theory here we should assert that we are already at the right position, but it seems saner to just seek at the end and not assert/crash the user. |
| 2837 | ImGuiContext& g = *Ctx; |
| 2838 | IMGUI_DEBUG_LOG_CLIPPER("Clipper: End() in '%s'\n", g.CurrentWindow->Name); |
| 2839 | if (ItemsCount >= 0 && ItemsCount < INT_MAX && DisplayStart >= 0) |
| 2840 | ImGuiListClipper_SeekCursorForItem(this, ItemsCount); |
| 2841 | |
| 2842 | // Restore temporary buffer and fix back pointers which may be invalidated when nesting |
| 2843 | IM_ASSERT(data->ListClipper == this); |
| 2844 | data->StepNo = data->Ranges.Size; |
| 2845 | if (--g.ClipperTempDataStacked > 0) |
| 2846 | { |
| 2847 | data = &g.ClipperTempData[g.ClipperTempDataStacked - 1]; |
| 2848 | data->ListClipper->TempData = data; |
| 2849 | } |
| 2850 | TempData = NULL; |
| 2851 | } |
| 2852 | ItemsCount = -1; |
| 2853 | } |
| 2854 | |
| 2855 | void ImGuiListClipper::IncludeItemsByIndex(int item_begin, int item_end) |
| 2856 | { |
nothing calls this directly
no test coverage detected