pub struct ListItem { /* private fields */ }Expand description
A dense row: see the module.
Implementations§
Source§impl ListItem
impl ListItem
Sourcepub fn icon(self, icon: impl Into<Source>) -> Self
pub fn icon(self, icon: impl Into<Source>) -> Self
An icon before the label, in the row’s text colour at the inline icon size.
Sourcepub fn trailing(self, text: impl Into<String>) -> Self
pub fn trailing(self, text: impl Into<String>) -> Self
Weak text at the right end, before the actions (a count, a type).
Sourcepub fn depth(self, depth: usize) -> Self
pub fn depth(self, depth: usize) -> Self
Its nesting level: one indent (ui.spacing().indent) per level.
Sourcepub fn guides(self, on: bool) -> Self
pub fn guides(self, on: bool) -> Self
Draws a guide down the row for each of its levels (list-guide).
Sourcepub fn disclosure(self, disclosure: Disclosure) -> Self
pub fn disclosure(self, disclosure: Disclosure) -> Self
Its arrow column (Disclosure).
Sourcepub fn collapsing(self, open: bool) -> Self
pub fn collapsing(self, open: bool) -> Self
A collapsing row, open or closed: a click on its arrow, Right or
Left say ItemResponse::toggled.
Sourcepub fn drag_handle(self, on: bool) -> Self
pub fn drag_handle(self, on: bool) -> Self
A drag handle at its left end, shown with its actions
(ItemResponse::handle).
pub fn selected(self, selected: bool) -> Self
Sourcepub fn active(self, active: bool) -> Self
pub fn active(self, active: bool) -> Self
Drawn pressed (active) though the pointer is not on it: a row
being dragged, the target of what happens elsewhere.
Sourcepub fn action(self, action: ItemAction) -> Self
pub fn action(self, action: ItemAction) -> Self
An action button at the right end (added right to left: the first is outermost).
Sourcepub fn actions(self, actions: impl IntoIterator<Item = ItemAction>) -> Self
pub fn actions(self, actions: impl IntoIterator<Item = ItemAction>) -> Self
Several actions (ListItem::action).
Sourcepub fn reveal(self, reveal: Reveal) -> Self
pub fn reveal(self, reveal: Reveal) -> Self
When the actions show (default: Reveal::Hover).
Sourcepub fn height(self, height: f32) -> Self
pub fn height(self, height: f32) -> Self
Its height (default: row_height).
Sourcepub fn id_salt(self, salt: impl AsIdSalt) -> Self
pub fn id_salt(self, salt: impl AsIdSalt) -> Self
Its id, stable when rows come and go (default: the next id of the
Ui).
Sourcepub fn role(self, role: Role) -> Self
pub fn role(self, role: Role) -> Self
Its accessible role (default: ListItem; TreeItem in a tree).
Sourcepub fn show(self, ui: &mut Ui) -> ItemResponse
pub fn show(self, ui: &mut Ui) -> ItemResponse
Draws the row across the width available.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ListItem
impl RefUnwindSafe for ListItem
impl Send for ListItem
impl Sync for ListItem
impl Unpin for ListItem
impl UnsafeUnpin for ListItem
impl UnwindSafe for ListItem
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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> DowncastSync for T
impl<T> DowncastSync for T
§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