Expand description
Tooltip system — hover-triggered overlays with configurable delay.
Three tiers, increasing in expressive power:
TooltipWidget— single line of localized text in a themed rounded rect. Attached via the per-widget.tooltip(...)setter.RichTooltipWidget—TooltipContent-driven (body + optional long-form “more” disclosure + shortcut chip), inline-markup body so[label](:key)cascade links resolve againstTooltipRegistry. Attached via.rich_tooltip(key)/.rich_tooltip_content(content). On dwell it flips its AT role toRole::Dialogand advertises aFocusaction — keyboard focus is not auto-transferred; the user Tabs in (the correct non-modal-panel a11y pattern).composite::CompositeTooltipWidget— hosts an arbitraryimpl Widget + 'staticbody inside the same chrome with a larger surface budget. Crusader Kings 3-style: tabbed sections, charts, progress bars, conditional rows. Attached via.composite_tooltip(content). “Primary-only” by construction — has no inline-markup body and no registry key, so it cannot be the target of a[label](:key)cascade. Child widgets inside the body keep their own tooltip setters and cascade normally.
All three tiers share the same overlay machinery, hover/focus
tracking, and dwell-promotion timer in teksilo-core. The per-widget
setters (.tooltip / .rich_tooltip / .composite_tooltip) are
mutually exclusive (last-one-wins): each setter clears the others.
§Example — plain tooltip
let _tip = TooltipWidget::new(lit!("Save the current file"));Re-exports§
pub use attach::RichTooltipSource;pub use attach::attach_composite_tooltip;pub use attach::attach_composite_tooltip_boxed;pub use attach::attach_composite_tooltip_boxed_with_placement;pub use attach::attach_composite_tooltip_widget_with_placement;pub use attach::attach_plain_tooltip;pub use attach::attach_plain_tooltip_with_placement;pub use attach::attach_rich_tooltip;pub use attach::attach_rich_tooltip_content;pub use attach::attach_rich_tooltip_content_with_placement;pub use attach::attach_rich_tooltip_source;pub use attach::attach_rich_tooltip_source_with_placement;pub use attach::attach_rich_tooltip_with_placement;pub use composite::CompositeTooltipWidget;pub use registry::TooltipContent;pub use registry::TooltipRegistry;pub use registry::install_tooltip_registry;pub use registry::with_tooltip_registry;pub use rich::RichTooltipWidget;
Modules§
- attach
- Rich-tooltip attachment helpers.
- composite
CompositeTooltipWidget— third-tier tooltip that hosts an arbitrary widget tree as its body.- registry
- Tooltip content registry.
- rich
RichTooltipWidget— rich tooltip content surface.
Structs§
- Tooltip
Widget - A tooltip content widget — a themed rounded rect with text.
Enums§
- Tooltip
Placement - Where a tooltip opens relative to its anchor — re-exported from
teksilo-coreso widgets can requestSideplacement in a vertical list without naming the core path. Placement preference for a tooltip relative to its anchor. Resolved to a concrete [OverlayPlacement] at show time (seeWidgetTree::tooltip_overlay_placement).