Expand description
Tooltip content registry.
A central map from tooltip keys (short identifiers) to
TooltipContent — the translatable strings + optional shortcut
metadata that rich-tooltip widgets resolve at hover time.
Two entry points:
TooltipContent::new(plus.with_more/.with_shortcut_label/.for_shortcut) builds an entry at app boot.install_tooltip_registryfreezes aVec<TooltipContent>into a thread-local registry that the tooltip widget reads from.
The registry is populated once by
TeksiloAppBuilder::register_tooltips(...) before the first frame
builds and is read-only for the rest of the process lifetime.
§URL scheme
Inline links inside tooltip body text address other tooltip entries
via the :key URL prefix. A link written as [2 minutes](:autosave-details)
in a translated string becomes a hover-trigger for the tooltip
registered under the "autosave-details" key. Use
TooltipRegistry::parse_url to recognize :key URLs; every other
URL scheme (http://, mailto:, …) passes through unmodified.
Structs§
- Tooltip
Content - One tooltip content entry.
- Tooltip
Registry - Frozen, read-only registry keyed by tooltip id.
Functions§
- install_
tooltip_ registry - Install the tooltip registry for the current thread. Called once
by
TeksiloAppBuilder::register_tooltipsbefore the first frame builds. Panics in debug builds on double-install; logs and keeps the first installation in release. - with_
tooltip_ registry - Read-side helper used by the tooltip widget. Runs
fwith a borrowed reference to the installed registry. ReturnsNoneif no registry has been installed yet (early bootstrap, headless tests).