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.
Trait Implementations§
Source§impl Clone for NodeContent
impl Clone for NodeContent
Source§fn clone(&self) -> NodeContent
fn clone(&self) -> NodeContent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for NodeContent
Source§impl Debug for NodeContent
impl Debug for NodeContent
Source§impl PartialEq for NodeContent
impl PartialEq for NodeContent
impl StructuralPartialEq for NodeContent
Auto Trait Implementations§
impl Freeze for NodeContent
impl RefUnwindSafe for NodeContent
impl Send for NodeContent
impl Sync for NodeContent
impl Unpin for NodeContent
impl UnsafeUnpin for NodeContent
impl UnwindSafe for NodeContent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.