pub trait MaterialElementExt: Sized + IntoElement {
// Provided methods
fn badge_dot(self) -> Badge { ... }
fn badge_label(self, text: impl Into<SharedString>) -> Badge { ... }
fn badge_count(self, count: usize, maximum: usize) -> Badge { ... }
fn tooltip(
self,
id: impl Into<ElementId>,
text: impl Into<SharedString>,
) -> Tooltip { ... }
fn context_menu(
self,
id: impl Into<ElementId>,
items: impl IntoIterator<Item = MenuItem>,
) -> Menu { ... }
}Expand description
Fluent postfix composition helpers for attaching Material badges, tooltips, and context menus to any GPUI element.
Provided Methods§
Sourcefn badge_label(self, text: impl Into<SharedString>) -> Badge
fn badge_label(self, text: impl Into<SharedString>) -> Badge
Anchors a text Badge to this element’s upper trailing edge.
Sourcefn badge_count(self, count: usize, maximum: usize) -> Badge
fn badge_count(self, count: usize, maximum: usize) -> Badge
Anchors a capped numeric Badge to this element’s upper trailing edge.
Sourcefn tooltip(
self,
id: impl Into<ElementId>,
text: impl Into<SharedString>,
) -> Tooltip
fn tooltip( self, id: impl Into<ElementId>, text: impl Into<SharedString>, ) -> Tooltip
Wraps this element as the trigger of a plain Tooltip.
Wraps this element as the trigger of a secondary-click context Menu.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".