| 3394 | } |
| 3395 | |
| 3396 | bool ImGuiListClipper::Step() |
| 3397 | { |
| 3398 | ImGuiContext& g = *Ctx; |
| 3399 | bool need_items_height = (ItemsHeight <= 0.0f); |
| 3400 | bool ret = ImGuiListClipper_StepInternal(this); |
| 3401 | if (ret && (DisplayStart >= DisplayEnd)) |
| 3402 | ret = false; |
| 3403 | if (g.CurrentTable && g.CurrentTable->IsUnfrozenRows == false) |
| 3404 | IMGUI_DEBUG_LOG_CLIPPER("Clipper: Step(): inside frozen table row.\n"); |
| 3405 | if (need_items_height && ItemsHeight > 0.0f) |
| 3406 | IMGUI_DEBUG_LOG_CLIPPER("Clipper: Step(): computed ItemsHeight: %.2f.\n", ItemsHeight); |
| 3407 | if (ret) |
| 3408 | { |
| 3409 | IMGUI_DEBUG_LOG_CLIPPER("Clipper: Step(): display %d to %d.\n", DisplayStart, DisplayEnd); |
| 3410 | } |
| 3411 | else |
| 3412 | { |
| 3413 | IMGUI_DEBUG_LOG_CLIPPER("Clipper: Step(): End.\n"); |
| 3414 | End(); |
| 3415 | } |
| 3416 | return ret; |
| 3417 | } |
| 3418 | |
| 3419 | // Generic helper, equivalent to old ImGui::CalcListClipping() but statelesss |
| 3420 | void ImGui::CalcClipRectVisibleItemsY(const ImRect& clip_rect, const ImVec2& pos, float items_height, int* out_visible_start, int* out_visible_end) |
no test coverage detected