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::nameof every icon inIcon::ALL; - a Phosphor glyph’s, prefixed (
phosphor:export,phosphor:grid-four): every glyph of the regular Phosphor font, with thephosphorfeature; 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.
- Phosphor
Icon - A glyph of the Phosphor font, by its index in the font’s list (with
the
phosphorfeature; 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
phosphorfeature). - phosphor_
names - Every Phosphor glyph’s name, prefixed, in the font’s order; empty
without the
phosphorfeature. - record
- Records an icon drawn this pass beside
labelonsurface, so agents see it indrawnfrom the next pass. - resolve
- The icon of a name, as
lookup, reporting a name that does not resolve: logged once, and listed byunknownwithsurface(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 mostlimit. - unknown
- The names asked of
resolvethat did not resolve, by name.