pub struct Nodes {
pub in_use: usize,
/* private fields */
}Expand description
The node arena.
Fields§
§in_use: usizeNumber of nodes in use.
Implementations§
Source§impl Nodes
impl Nodes
Sourcepub fn box_data_mut(&mut self, p: NodeRef) -> Option<&mut BoxData>
pub fn box_data_mut(&mut self, p: NodeRef) -> Option<&mut BoxData>
The box data of an hlist/vlist node, mutably.
Sourcepub fn flush_list(&mut self, p: NodeRef)
pub fn flush_list(&mut self, p: NodeRef)
Frees a whole node list, including sublists (flush_node_list).
Sourcepub fn copy_list(&mut self, p: NodeRef) -> NodeRef
pub fn copy_list(&mut self, p: NodeRef) -> NodeRef
Copies a whole node list, including sublists (copy_node_list).
Sourcepub fn copy_node(&mut self, p: NodeRef) -> NodeRef
pub fn copy_node(&mut self, p: NodeRef) -> NodeRef
Copies one node with its sublists; the copy’s links are null.
Sourcepub fn new_null_box(&mut self, hlist: bool) -> NodeRef
pub fn new_null_box(&mut self, hlist: bool) -> NodeRef
A new empty box of the given type (new_null_box).
Sourcepub fn new_penalty(&mut self, m: i32, subtype: u16) -> NodeRef
pub fn new_penalty(&mut self, m: i32, subtype: u16) -> NodeRef
A new penalty node.
Sourcepub fn new_rule(&mut self, width: i32, height: i32, depth: i32) -> NodeRef
pub fn new_rule(&mut self, width: i32, height: i32, depth: i32) -> NodeRef
A new rule node with the given dimensions.
Sourcepub fn new_disc(&mut self, subtype: u16, penalty: i32) -> NodeRef
pub fn new_disc(&mut self, subtype: u16, penalty: i32) -> NodeRef
A new empty discretionary node.
Sourcepub fn set_subtype(&mut self, p: NodeRef, s: u16)
pub fn set_subtype(&mut self, p: NodeRef, s: u16)
Sets the subtype of p.
Sourcepub fn glyph_mut(&mut self, p: NodeRef) -> Option<&mut GlyphData>
pub fn glyph_mut(&mut self, p: NodeRef) -> Option<&mut GlyphData>
The glyph data of a glyph node, mutably.
Sourcepub fn width(&self, p: NodeRef) -> i32
pub fn width(&self, p: NodeRef) -> i32
The width of a node that has one (boxes, rules, glue, kerns, math, margin kerns, unset nodes); zero otherwise. Glyph widths need the font and are not handled here.
Sourcepub fn disc_lists(&self, p: NodeRef) -> (NodeRef, NodeRef, NodeRef)
pub fn disc_lists(&self, p: NodeRef) -> (NodeRef, NodeRef, NodeRef)
The (pre, post, replace) lists of a discretionary.
Sourcepub fn set_disc_lists(&mut self, p: NodeRef, l: (NodeRef, NodeRef, NodeRef))
pub fn set_disc_lists(&mut self, p: NodeRef, l: (NodeRef, NodeRef, NodeRef))
Sets the lists of a discretionary.
Sourcepub fn list_ptr(&self, p: NodeRef) -> NodeRef
pub fn list_ptr(&self, p: NodeRef) -> NodeRef
The list of a box, unset node, insertion or adjust node.
Sourcepub fn set_list_ptr(&mut self, p: NodeRef, l: NodeRef)
pub fn set_list_ptr(&mut self, p: NodeRef, l: NodeRef)
Sets the list of a box, unset node, insertion or adjust node.
Sourcepub fn noad(&self, p: NodeRef) -> Option<&NoadData>
pub fn noad(&self, p: NodeRef) -> Option<&NoadData>
The noad fields of a noad, radical or accent node.
Sourcepub fn noad_mut(&mut self, p: NodeRef) -> Option<&mut NoadData>
pub fn noad_mut(&mut self, p: NodeRef) -> Option<&mut NoadData>
The noad fields of a noad, radical or accent node, mutably.
Sourcepub fn list_ptr_kernel(&self, p: NodeRef) -> NodeRef
pub fn list_ptr_kernel(&self, p: NodeRef) -> NodeRef
The list of a sub_box or sub_mlist kernel (null otherwise).
Sourcepub fn set_kernel_list(&mut self, p: NodeRef, l: NodeRef)
pub fn set_kernel_list(&mut self, p: NodeRef, l: NodeRef)
Sets the list of a sub_box or sub_mlist kernel.
Sourcepub fn scripts_allowed(&self, p: NodeRef) -> bool
pub fn scripts_allowed(&self, p: NodeRef) -> bool
Whether p is a noad that can carry scripts (scripts_allowed).