pub struct LayoutEngine<'a> { /* private fields */ }Expand description
The layout engine.
Implementations§
Source§impl<'a> LayoutEngine<'a>
impl<'a> LayoutEngine<'a>
Sourcepub fn layout_with_profile(
&self,
root: FormNodeId,
) -> Result<(LayoutDom, LayoutProfile)>
pub fn layout_with_profile( &self, root: FormNodeId, ) -> Result<(LayoutDom, LayoutProfile)>
Perform layout and collect pagination diagnostics for each emitted page.
Sourcepub fn layout(&self, root: FormNodeId) -> Result<LayoutDom>
pub fn layout(&self, root: FormNodeId) -> Result<LayoutDom>
Perform layout on the entire form tree starting from the root node.
XFA Spec 3.3 §8.6 — The Layout Algorithm (p288): content-driven single traversal of the Form DOM, placing nodes into the Layout DOM. When a container fills, traverse to the next container (§8.7 splitting, §8.8 pagination).
Supports multi-page pagination: when content overflows a page’s content area, remaining nodes are placed on subsequent pages. The last page template is repeated as needed for overflow content.
TODO §8.8: simplexPaginated/duplexPaginated, pagePosition/oddOrEven/ blankOrNotBlank qualifications, termination processing (last/only page).
Sourcepub fn compute_extent(&self, id: FormNodeId) -> Size
pub fn compute_extent(&self, id: FormNodeId) -> Size
Compute the outer extent (total bounding box) of a form node.
When available is provided, growable dimensions may expand to fill
the available space (XFA §8: growable objects fill the parent container).
Sourcepub fn compute_extent_with_override(
&self,
id: FormNodeId,
children_override: Option<&[FormNodeId]>,
) -> Size
pub fn compute_extent_with_override( &self, id: FormNodeId, children_override: Option<&[FormNodeId]>, ) -> Size
Compute extent with optional children override.