From c2749f761591b462ceeccf4a42b9ac75d8addf85 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Tue, 22 Nov 2022 20:52:58 +0100 Subject: More sensible `LayoutRoot` --- library/src/structure/doc.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'library/src/structure') diff --git a/library/src/structure/doc.rs b/library/src/structure/doc.rs index ac12c3ab..42ad628e 100644 --- a/library/src/structure/doc.rs +++ b/library/src/structure/doc.rs @@ -1,13 +1,16 @@ -use crate::layout::PageNode; +use crate::layout::{LayoutRoot, PageNode}; use crate::prelude::*; /// A sequence of page runs. #[derive(Hash)] pub struct DocNode(pub StyleVec); -impl DocNode { +#[node(LayoutRoot)] +impl DocNode {} + +impl LayoutRoot for DocNode { /// Layout the document into a sequence of frames, one per page. - pub fn layout( + fn layout_root( &self, world: Tracked, styles: StyleChain, -- cgit v1.2.3