pub enum NodeContent {
Container,
Text(TextId),
Edit(Key),
Image(ImageId, ImageOpts),
Line(LineId),
Cells(CellsId),
Fragment(FragmentDrawId),
Polygon(FragmentDrawId),
Path(PathId),
}Variants§
Container
Text(TextId)
Edit(Key)
Editable text; retained state lives in the core’s EditStore.
Image(ImageId, ImageOpts)
A host-registered image (see Resources), drawn from the atlas or
from a texture of its own as the entry’s backing says, met by its
box as opts say.
Line(LineId)
A stroke through a run of points: one segment quad per straight
piece (see crate::line). The node is a float sized to the
stroke’s bounding box, so it takes no room, and its bg is the
stroke colour. In its parent’s box space it paints in the parent’s
layer at its place in the tree (NodeContent::drawn_in_parent).
Cells(CellsId)
A cell grid (see crate::cells): a terminal’s screen as one node.
Fragment(FragmentDrawId)
A box a registered WGSL function paints (see crate::fragment).
The handle and the sixteen parameters live in the frame’s
FragmentList; the node carries only where.
Polygon(FragmentDrawId)
A filled polygon: a float sized to its own
bounding box like a line, painted by the stock polygon fragment
whose draw sits in the frame’s FragmentList like any fragment’s,
its bg the fill. No hit region, no access row.
Path(PathId)
A filled and/or stroked outline of any shape (see crate::path):
a float sized to its own bounding box like a line, its ops in the
frame’s PathStore, drawn as glyph-mask quads from the atlas. Its
bg is the fill, its border width and colour the stroke.
Implementations§
Source§impl NodeContent
impl NodeContent
Sourcepub fn drawn_in_parent(self) -> bool
pub fn drawn_in_parent(self) -> bool
Whether this is a shape the core floats for its own reasons — a
line, polygon or path, a float only so it takes no room in a
row or column (ADR 0010 decision 5). Such a node is its parent’s
content as a child is: the parent’s clip holds it (F78), and it
paints in the parent’s layer at its place in the tree rather than
opening a layer of its own (F123) — a glyph drawn into a title bar
is not over a toast that opened before the bar did.