pub struct SelectionBasicStorage { /* private fields */ }
Expand description
Simple multi-selection storage facility.
By default it stores the indices in a collection.
Use the with_callback_id()
function to do something different.
Implementations§
Source§impl SelectionBasicStorage
impl SelectionBasicStorage
Sourcepub fn with_callback_id<'a>(
&'a mut self,
f: impl FnMut(usize) -> ImGuiID + 'a,
) -> SelectionBasicStorageWithCallback<'a>
pub fn with_callback_id<'a>( &'a mut self, f: impl FnMut(usize) -> ImGuiID + 'a, ) -> SelectionBasicStorageWithCallback<'a>
Decorates this storage with a map function.
The callback maps an index into an ID. This allows to re-sort the list without messing with the selection.
pub fn set_preserve_order(&mut self, preserve_order: bool)
pub fn contains(&self, id: ImGuiID) -> bool
pub fn clear(&mut self)
pub fn set_item_selected(&mut self, id: ImGuiID, selected: bool)
pub fn swap(&mut self, other: &mut SelectionBasicStorage)
pub fn iter(&self) -> SelectionBasicStorageIter<'_> ⓘ
Trait Implementations§
Source§impl Default for SelectionBasicStorage
impl Default for SelectionBasicStorage
Source§impl<'a> IntoIterator for &'a SelectionBasicStorage
impl<'a> IntoIterator for &'a SelectionBasicStorage
Source§impl MultiSelectStorage for SelectionBasicStorage
impl MultiSelectStorage for SelectionBasicStorage
fn size(&self) -> Option<usize>
fn apply_requests(&mut self, ms: &mut MultiSelect)
Auto Trait Implementations§
impl Freeze for SelectionBasicStorage
impl !RefUnwindSafe for SelectionBasicStorage
impl !Send for SelectionBasicStorage
impl !Sync for SelectionBasicStorage
impl Unpin for SelectionBasicStorage
impl UnwindSafe for SelectionBasicStorage
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