pub struct ListView<'a> { /* private fields */ }Expand description
The list widget.
Need (data): a long list, virtualised.
Implementations§
Source§impl<'a> ListView<'a>
impl<'a> ListView<'a>
Sourcepub fn drag_out(self, on: bool) -> Self
pub fn drag_out(self, on: bool) -> Self
A drag that starts on a row carries rows out (off by default):
the list signals Signal::DragOut as it starts, for the
application to set its payload (egui::DragAndDrop::set_payload)
and its drop targets to take it; while it lasts the cursor shows a
carry and the pointer how many rows go.
pub fn mode(self, mode: Mode) -> Self
Sourcepub fn row_height(self, height: f32) -> Self
pub fn row_height(self, height: f32) -> Self
Each row’s height (default: the theme’s interactive height).
Binds the list to the application-wide selection
(egui_pop_api::selection, the service under SELECTION): its
rows (ListRows::item) show selected and hovered when they are
so anywhere, and what it selects (still through list.select)
goes there: a plain click or move replaces the whole selection,
Ctrl changes only the list’s items. The list is then in the
selection’s focus surface, where Alt+Left and Alt+Right walk its
history.
pub fn show<K: Key>( self, ui: &mut Ui, state: &mut ListState<K>, rows: &mut dyn ListRows<K>, ) -> ListOutput<K>
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ListView<'a>
impl<'a> !RefUnwindSafe for ListView<'a>
impl<'a> !Send for ListView<'a>
impl<'a> !Sync for ListView<'a>
impl<'a> Unpin for ListView<'a>
impl<'a> UnsafeUnpin for ListView<'a>
impl<'a> !UnwindSafe for ListView<'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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more