Skip to main content

TooltipExt

Trait TooltipExt 

Source
pub trait TooltipExt: Sized {
    // Required methods
    fn tip(self, text: impl Into<WidgetText>) -> Self;
    fn disabled_tip(self, text: impl Into<WidgetText>) -> Self;
    fn tip_ui(self, add: impl FnOnce(&mut Ui)) -> Self;
}
Expand description

Kit tooltips on a widget’s response.

Required Methods§

Source

fn tip(self, text: impl Into<WidgetText>) -> Self

Shows text in the kit’s tooltip while the widget is hovered and enabled, as [Response::on_hover_text] does with egui’s.

Need (help): a tooltip.

Source

fn disabled_tip(self, text: impl Into<WidgetText>) -> Self

Shows text in the kit’s tooltip while the widget is hovered and disabled (the reason it is), as [Response::on_disabled_hover_text].

Need (help): why a control is disabled.

Source

fn tip_ui(self, add: impl FnOnce(&mut Ui)) -> Self

Shows add in the kit’s tooltip while the widget is hovered and enabled, as [Response::on_hover_ui].

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl TooltipExt for Response

Source§

fn tip(self, text: impl Into<WidgetText>) -> Self

Source§

fn disabled_tip(self, text: impl Into<WidgetText>) -> Self

Source§

fn tip_ui(self, add: impl FnOnce(&mut Ui)) -> Self

Implementors§