Trait re_ui::list_item::ListItemContent
source · pub trait ListItemContent {
// Required method
fn ui(self: Box<Self>, ui: &mut Ui, context: &ContentContext<'_>);
// Provided method
fn desired_width(&self, _ui: &Ui) -> DesiredWidth { ... }
}
Required Methods§
sourcefn ui(self: Box<Self>, ui: &mut Ui, context: &ContentContext<'_>)
fn ui(self: Box<Self>, ui: &mut Ui, context: &ContentContext<'_>)
UI for everything that is after the indent and the collapsing triangle (if any).
The content should render within the provided context.rect
.
If the content has some interactive elements, it should return its response. In particular, if the response is hovered, the list item will show a dimmer background highlight.
Provided Methods§
sourcefn desired_width(&self, _ui: &Ui) -> DesiredWidth
fn desired_width(&self, _ui: &Ui) -> DesiredWidth
The desired width of the content.