pub struct ItemIterator<'a> { /* private fields */ }Expand description
Calculates some information that is later used to detect in which index the dragged item should be placed.
ItemIterator::next should be called for each item in the list.
Implementations§
Source§impl<'a> ItemIterator<'a>
impl<'a> ItemIterator<'a>
Sourcepub fn next(
&mut self,
ui: &mut Ui,
id: Id,
idx: usize,
add_surrounding_space_automatically: bool,
content: impl FnOnce(&mut Ui, Item<'_>) -> ItemResponse,
)
pub fn next( &mut self, ui: &mut Ui, id: Id, idx: usize, add_surrounding_space_automatically: bool, content: impl FnOnce(&mut Ui, Item<'_>) -> ItemResponse, )
Draw a dnd item. This should be called for each item in the list.
If add_surrounding_space_automatically is false, you need to call
ItemIterator::space_before and ItemIterator::space_after manually.
This is useful, e.g. to add a divider between items. Check the custom ui example.
Auto Trait Implementations§
impl<'a> Freeze for ItemIterator<'a>
impl<'a> RefUnwindSafe for ItemIterator<'a>
impl<'a> Send for ItemIterator<'a>
impl<'a> Sync for ItemIterator<'a>
impl<'a> Unpin for ItemIterator<'a>
impl<'a> !UnwindSafe for ItemIterator<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more