| 3536 | } |
| 3537 | |
| 3538 | bool ImGuiListClipper::Step() |
| 3539 | { |
| 3540 | ImGuiContext& g = *Ctx; |
| 3541 | bool need_items_height = (ItemsHeight <= 0.0f); |
| 3542 | bool ret = ImGuiListClipper_StepInternal(this); |
| 3543 | if (ret && (DisplayStart >= DisplayEnd)) |
| 3544 | ret = false; |
| 3545 | if (g.CurrentTable && g.CurrentTable->IsUnfrozenRows == false) |
| 3546 | IMGUI_DEBUG_LOG_CLIPPER("Clipper: Step(): inside frozen table row.\n"); |
| 3547 | if (need_items_height && ItemsHeight > 0.0f) |
| 3548 | IMGUI_DEBUG_LOG_CLIPPER("Clipper: Step(): computed ItemsHeight: %.2f.\n", ItemsHeight); |
| 3549 | if (ret) |
| 3550 | { |
| 3551 | IMGUI_DEBUG_LOG_CLIPPER("Clipper: Step(): display %d to %d.\n", DisplayStart, DisplayEnd); |
| 3552 | } |
| 3553 | else |
| 3554 | { |
| 3555 | IMGUI_DEBUG_LOG_CLIPPER("Clipper: Step(): End.\n"); |
| 3556 | End(); |
| 3557 | } |
| 3558 | return ret; |
| 3559 | } |
| 3560 | |
| 3561 | // Generic helper, equivalent to old ImGui::CalcListClipping() but stateless |
| 3562 | 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