| 2743 | } |
| 2744 | |
| 2745 | void ImGuiListClipper::Begin(int items_count, float items_height) |
| 2746 | { |
| 2747 | ImGuiContext& g = *GImGui; |
| 2748 | ImGuiWindow* window = g.CurrentWindow; |
| 2749 | IMGUI_DEBUG_LOG_CLIPPER("Clipper: Begin(%d,%.2f) in '%s'\n", items_count, items_height, window->Name); |
| 2750 | |
| 2751 | if (ImGuiTable* table = g.CurrentTable) |
| 2752 | if (table->IsInsideRow) |
| 2753 | ImGui::TableEndRow(table); |
| 2754 | |
| 2755 | StartPosY = window->DC.CursorPos.y; |
| 2756 | ItemsHeight = items_height; |
| 2757 | ItemsCount = items_count; |
| 2758 | DisplayStart = -1; |
| 2759 | DisplayEnd = 0; |
| 2760 | |
| 2761 | // Acquire temporary buffer |
| 2762 | if (++g.ClipperTempDataStacked > g.ClipperTempData.Size) |
| 2763 | g.ClipperTempData.resize(g.ClipperTempDataStacked, ImGuiListClipperData()); |
| 2764 | ImGuiListClipperData* data = &g.ClipperTempData[g.ClipperTempDataStacked - 1]; |
| 2765 | data->Reset(this); |
| 2766 | data->LossynessOffset = window->DC.CursorStartPosLossyness.y; |
| 2767 | TempData = data; |
| 2768 | } |
| 2769 | |
| 2770 | void ImGuiListClipper::End() |
| 2771 | { |
no test coverage detected