pub struct ButtonContent<'a> { /* private fields */ }Expand description
Clickable button content for list items
Use this when you need an actionable button row in a list, such as “Add new item”, “Clear all”, or action buttons.
§Example
use egui_charts::icons::icons;
use egui_charts::ui_kit::list_item::{ButtonContent, ListItem};
let response = ListItem::new()
.show(ui, ButtonContent::new(&icons::PLUS, "Add Item"));
if response.clicked() {
// add the item
}Implementations§
Trait Implementations§
Source§impl<'a> ListItemContent for ButtonContent<'a>
impl<'a> ListItemContent for ButtonContent<'a>
Source§fn ui(self, ui: &mut Ui, context: &ContentContext<'_>) -> Response
fn ui(self, ui: &mut Ui, context: &ContentContext<'_>) -> Response
Paint the content inside
context.rect and return the row response.Source§fn interactive(&self) -> bool
fn interactive(&self) -> bool
Whether the row reacts to the pointer. Disabled content returns
false.Auto Trait Implementations§
impl<'a> Freeze for ButtonContent<'a>
impl<'a> RefUnwindSafe for ButtonContent<'a>
impl<'a> Send for ButtonContent<'a>
impl<'a> Sync for ButtonContent<'a>
impl<'a> Unpin for ButtonContent<'a>
impl<'a> UnsafeUnpin for ButtonContent<'a>
impl<'a> UnwindSafe for ButtonContent<'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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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