Skip to main content

attach_rich_tooltip

Function attach_rich_tooltip 

Source
pub fn attach_rich_tooltip(
    ctx: &mut BuildContext<'_>,
    anchor_id: WidgetId,
    key: impl Into<String>,
    delay: Duration,
) -> WidgetId
Expand description

Attach a rich tooltip to anchor_id. Creates a RichTooltipWidget resolving key from the registry and wires it into the existing tooltip-hover machinery.

Typical use inside a widget’s build():

let root = ctx.add(/* visible subtree */);
let delay = ctx.theme().motion.tooltip_delay;
attach_rich_tooltip(ctx, root, "save-as-details", delay);