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::Appvia 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’son_hover_uitooltips.
§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.
- Tooltip
Timings - Tunable tooltip delays, shared by every
Tooltip.
Functions§
- set_
tooltip_ timings - Install the tooltip delays used by every
Tooltip. - tooltip_
timings - Current tooltip delays.