pub struct UnknownCountListClipperToken<'ui> { /* private fields */ }Expand description
Active unknown-count list clipper.
Call Self::finish with the discovered item count so Dear ImGui can restore the final cursor
position and scrollbar extent. Nested clippers follow the same LIFO and UI-scope rules as
ListClipperToken.
Implementations§
Source§impl UnknownCountListClipperToken<'_>
impl UnknownCountListClipperToken<'_>
Sourcepub fn include_item_by_index(&mut self, item_index: usize)
pub fn include_item_by_index(&mut self, item_index: usize)
Keep one index from being clipped. Call this before Self::next_range.
Sourcepub fn include_items_by_index(&mut self, items: Range<usize>)
pub fn include_items_by_index(&mut self, items: Range<usize>)
Keep a half-open index range from being clipped. Call this before Self::next_range.
Sourcepub fn next_range(&mut self) -> Option<Range<usize>>
pub fn next_range(&mut self) -> Option<Range<usize>>
Advance to the next range that may contain visible items.
Once exhausted, this method remains fused and returns None without entering FFI again.
Sourcepub fn finish(self, final_items_count: usize)
pub fn finish(self, final_items_count: usize)
Finalize the list with its discovered item count.
Automatic height requires one submitted measurement item followed by another
Self::next_range call before finishing a non-empty list. Finalization seeks directly;
it never drains unsubmitted ranges, which is important inside frozen table rows.