Expand description
Rich-tooltip attachment helpers.
Widgets call attach_rich_tooltip (or attach_rich_tooltip_content)
from their build() to wire a hover-triggered RichTooltipWidget
onto an anchor. The helper:
- Creates a dormant
RichTooltipWidgetas a child of the current build context, - Registers it with the widget tree’s tooltip-attachment table
via [
BuildContext::attach_tooltip], so hover enter/leave + delay timing + overlay show/hide are handled by the same machinery the plainTooltipWidgetalready uses.
This is a thin convenience layer — the full attach lifecycle lives
in teksilo_core::widget_tree::overlay_impl::attach_tooltip, which
takes any content_id and doesn’t care whether it wraps plain text
or rich content. Rich tooltips drop into the existing hover plumbing
without a separate attachment path.
Enums§
- Rich
Tooltip Source - Source resolution for a rich tooltip — either a registry key (the
common path) or an inline
TooltipContententry (one-offs that don’t belong in the app-wide registry).
Functions§
- attach_
composite_ tooltip - Attach a composite tooltip — third tier, hosting an arbitrary
impl Widget + 'staticbody. Wires the same dwell-to-sticky machinery rich tooltips use, so the surface promotes to aRole::Dialogafter the user dwells forDWELL_PROMOTION. - attach_
composite_ tooltip_ boxed - Variant of
attach_composite_tooltipthat takes an already-boxed body. Used by per-widget.composite_tooltip(...)setters that storeBox<dyn Widget>so the user-supplied content can survive across the borrow boundary intobuild(). - attach_
composite_ tooltip_ boxed_ with_ placement - attach_
composite_ tooltip_ widget_ with_ placement attach_composite_tooltip_boxedwith an explicitTooltipPlacement. Attach an already-builtCompositeTooltipWidget, honouring its ownstickysetting.- attach_
plain_ tooltip - Attach a plain tooltip — first tier, a single line of text.
- attach_
plain_ tooltip_ with_ placement attach_plain_tooltipwith an explicitTooltipPlacement— what the widgets that live in a vertical list (menu items, standard items, tab headers) want, so the tip lands beside the row rather than under it.- attach_
rich_ tooltip - Attach a rich tooltip to
anchor_id. Creates aRichTooltipWidgetresolvingkeyfrom the registry and wires it into the existing tooltip-hover machinery. - attach_
rich_ tooltip_ content - Attach a rich tooltip driven by an inline
TooltipContententry. Use this for one-off tooltips that don’t live in the central registry (tests, dynamic content, per-row tips on data-driven widgets). - attach_
rich_ tooltip_ content_ with_ placement attach_rich_tooltip_contentwith an explicitTooltipPlacement.- attach_
rich_ tooltip_ source - Attach a rich tooltip from a
RichTooltipSource. Matches whether the source is a registry key or inline content and forwards to the appropriate helper. Convenient for builder methods that acceptimpl Into<RichTooltipSource>so callers can pass either a bare&str(resolved as a key) or a fully-builtTooltipContent. - attach_
rich_ tooltip_ source_ with_ placement attach_rich_tooltip_sourcewith an explicitTooltipPlacement— the placement-aware entry point used by widgets that live in a vertical list (menu items, list/tree rows, activity-rail items) and wantSide.- attach_
rich_ tooltip_ with_ placement attach_rich_tooltipwith an explicitTooltipPlacement— passSidefor anchors stacked vertically (menu items, a vertical tab strip, list/tree rows) so the tooltip opens beside the anchor.