pub struct Nodes {
pub in_use: usize,
pub props: Properties,
pub sync: Option<Box<SyncFields>>,
pub double_free: Option<(u8, u32)>,
pub par_temp: NodeRef,
pub lua_refs: LuaRefs,
/* private fields */
}Expand description
The node arena.
Fields§
§in_use: usizeNumber of nodes in use.
props: PropertiesLua node properties.
sync: Option<Box<SyncFields>>SyncTeX fields of the nodes, while SyncTeX is on (see
SyncFields).
double_free: Option<(u8, u32)>The first node freed twice, with its type before the first free:
a fatal error in LuaTeX, reported by the engine (see
Engine::check_double_free).
par_temp: NodeRefThe temporary head of a paragraph during its node processing callbacks: LuaTeX’s is not a node that can be freed.
lua_refs: LuaRefsThe numbers of the Lua values nodes keep by reference.
Implementations§
Source§impl Nodes
impl Nodes
Sourcepub fn enable_sync(&mut self)
pub fn enable_sync(&mut self)
Starts keeping SyncTeX fields (for nodes made from now on).
Sourcepub fn sync_fields(&self, p: NodeRef) -> (u32, i32)
pub fn sync_fields(&self, p: NodeRef) -> (u32, i32)
The SyncTeX tag and line of p, (0, 0) if it has none.
Sourcepub fn set_sync_fields(&mut self, p: NodeRef, f: (u32, i32))
pub fn set_sync_fields(&mut self, p: NodeRef, f: (u32, i32))
Sets the SyncTeX tag and line of p (when SyncTeX is on).
Sourcepub fn sync_as_copied(&mut self, p: NodeRef)
pub fn sync_as_copied(&mut self, p: NodeRef)
Sets the SyncTeX fields of p, a node just made by font
processing that LuaTeX’s Lua code makes by copying (kerns from
OpenType positioning): the current tag and line.
Sourcepub fn lua_ref_of(&mut self, p: NodeRef) -> Option<i32>
pub fn lua_ref_of(&mut self, p: NodeRef) -> Option<i32>
The reference number of the Lua value node p keeps, if any.
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 bounded_tail(&self, p: NodeRef) -> Option<NodeRef>
pub fn bounded_tail(&self, p: NodeRef) -> Option<NodeRef>
The last node of the list starting at p, or None if the list
is circular (Lua code can link nodes into a loop).
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).