Skip to main content

Module registry

Module registry 

Source
Expand description

The icon vocabulary: every name an icon can be declared by, resolved once, and the names that did not resolve.

A name is one of three kinds:

  • egui-pop’s, bare and in kebab case (settings, chevron-right): Icon::name of every icon in Icon::ALL;
  • a Phosphor glyph’s, prefixed (phosphor:export, phosphor:grid-four): every glyph of the regular Phosphor font, with the phosphor feature; without it these names do not resolve;
  • an application’s or a plugin’s, registered as an SVG (crate::icon_set::register); a plugin’s are prefixed by its id (my-plugin:mask-circle, crate::icon_set::register_for).

lookup resolves a name, once: the answer is kept, and forgotten only when a registration changes what the name means. resolve does the same and reports a name that does not resolve: a warning in the log the first time, and a line in unknown that the debug bridge’s icons collector shows (ADR 0003: never a silent no-op). A surface that cannot draw the icon of an unknown name draws a neutral placeholder (PLACEHOLDER, or the title’s first letter where there is one).

What a surface drew by name can be recorded each pass (record), so agents read which icon a row or a field shows without pixels (drawn).

Structs§

Drawn
An icon a surface drew, as agents read it.
PhosphorIcon
A glyph of the Phosphor font, by its index in the font’s list (with the phosphor feature; without it, none exists).
Unknown
A name that did not resolve, and who asked for it.

Enums§

IconRef
An icon given by value or by name: what a widget taking an icon accepts (Icon::Search, "search", "phosphor:export").

Constants§

PHOSPHOR_PREFIX
The prefix of the Phosphor glyphs’ names (phosphor:export).
PLACEHOLDER
What a surface without a title draws for a name that does not resolve: a hollow ring, so the place is visibly taken.

Functions§

builtin_names
egui-pop’s own names, in Icon::ALL’s order.
drawn
The icons recorded in the last complete pass.
hint
Why a name may not resolve, for the warning.
is_known
Whether a name resolves.
lookup
The icon of a name, silently: egui-pop’s names, then the Phosphor glyphs’ (phosphor:<name>), then the registered ones. Each name is looked up once; the answer is kept.
phosphor_available
Whether the Phosphor names resolve (the phosphor feature).
phosphor_names
Every Phosphor glyph’s name, prefixed, in the font’s order; empty without the phosphor feature.
record
Records an icon drawn this pass beside label on surface, so agents see it in drawn from the next pass.
resolve
The icon of a name, as lookup, reporting a name that does not resolve: logged once, and listed by unknown with surface (what declared or drew it: indicator, menu list item, panel egui_pop.jobs).
search
Names of the vocabulary containing query (egui-pop’s, the registered ones, the Phosphor glyphs’), at most limit.
unknown
The names asked of resolve that did not resolve, by name.