Skip to main content

Module tooltip

Module tooltip 

Source
Expand description

Tooltip — a wrapper widget that shows egui-style hover help.

Tooltips come in two flavours:

  • Lightweight (the default, used by dozens of call sites): text lines submitted during the widget paint pass and drawn at the end of the frame by crate::widget::App via a global queue ([render]). Fire-and-forget, no hit-testing.

  • Interactive (opt-in via Tooltip::with_interactive_content): the tip is a real floating UI surface hosting a child widget tree (labels, hyperlinks, a nested tooltip). It participates in the global-overlay hit-test so the pointer can move into it without dismissing it, and it supports one level of nesting — see [interactive]. This mirrors egui’s on_hover_ui tooltips.

§Usage

Tooltip::new(
    Box::new(Button::new("Hover me", font.clone()).on_click(|| {})),
    "This is a tooltip",
    font.clone(),
)

Modules§

controller
Central tooltip controller — the first-class, wrapper-free tooltip path.

Structs§

Tooltip
A wrapper widget that shows a text tooltip on hover.
TooltipTimings
Tunable tooltip delays, shared by every Tooltip.

Functions§

set_tooltip_timings
Install the tooltip delays used by every Tooltip.
tooltip_timings
Current tooltip delays.