summaryrefslogtreecommitdiff
path: root/library/src/structure/doc.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-11-22 20:52:58 +0100
committerLaurenz <laurmaedje@gmail.com>2022-11-22 21:09:20 +0100
commitc2749f761591b462ceeccf4a42b9ac75d8addf85 (patch)
treea2c51175fa996f5e59666da762b2e7d9e25b43e3 /library/src/structure/doc.rs
parentea2a1525f0fc461ec9a5dc1839aec9b66c4e1ecc (diff)
More sensible `LayoutRoot`
Diffstat (limited to 'library/src/structure/doc.rs')
-rw-r--r--library/src/structure/doc.rs9
1 files changed, 6 insertions, 3 deletions
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<PageNode>);
-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<dyn World>,
styles: StyleChain,