summaryrefslogtreecommitdiff
path: root/src/layout/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/layout/mod.rs')
-rw-r--r--src/layout/mod.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs
index 470ac3ba..34c9b35a 100644
--- a/src/layout/mod.rs
+++ b/src/layout/mod.rs
@@ -40,6 +40,15 @@ pub struct Layout {
}
impl Layout {
+ /// Create an empty layout with the specified dimensions.
+ pub fn empty(width: Size, height: Size) -> Layout {
+ Layout {
+ dimensions: Size2D::new(width, height),
+ actions: vec![],
+ debug_render: true,
+ }
+ }
+
/// Serialize this layout into an output buffer.
pub fn serialize<W: Write>(&self, f: &mut W) -> io::Result<()> {
writeln!(