Skip to main content

UnknownCountListClipperToken

Struct UnknownCountListClipperToken 

Source
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<'_>

Source

pub fn include_item_by_index(&mut self, item_index: usize)

Keep one index from being clipped. Call this before Self::next_range.

Source

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.

Source

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.

Source

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.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.