pub struct ContentContext<'a> {
pub rect: Rect,
pub bg_color: Color32,
pub selected: bool,
pub hovered: bool,
pub list_item: &'a ListItem,
pub response: &'a Response,
pub visuals: ListVisuals,
}Expand description
Context provided to ListItemContent implementations when rendering
Fields§
§rect: RectThe row rect inset by the content padding. Content paints inside it and does not allocate space of its own: the row is already allocated.
bg_color: Color32Background color of the list item (computed from visuals)
selected: boolWhether the list item is selected
hovered: boolWhether the list item is hovered
list_item: &'a ListItemReference to the list item for accessing configuration
response: &'a ResponseReference to the response for the list item
visuals: ListVisualsVisual state with color computation methods
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ContentContext<'a>
impl<'a> !UnwindSafe for ContentContext<'a>
impl<'a> Freeze for ContentContext<'a>
impl<'a> Send for ContentContext<'a>
impl<'a> Sync for ContentContext<'a>
impl<'a> Unpin for ContentContext<'a>
impl<'a> UnsafeUnpin for ContentContext<'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