summaryrefslogtreecommitdiff
path: root/src/geom
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-10-16 11:39:26 +0200
committerLaurenz <laurmaedje@gmail.com>2021-10-23 20:22:47 +0200
commit6690bc23545bfe7275ad92de9e6bd11b7345caf4 (patch)
treee116a23f2f04b3053160aae09088830fdb21460f /src/geom
parent1e74f7c407e42174b631cb7477f3c88252da7e25 (diff)
Revise block node contract
Frames produced by block nodes are now always treated as exactly one per given region and a frame must not be larger than its respective region. Any overflow must be handled internally. This means that stack and grid don't need to search for fitting regions anymore, since the child has already does that for them. This commit further moves stack spacing into a new `SpacingNode`.
Diffstat (limited to 'src/geom')
-rw-r--r--src/geom/gen.rs2
-rw-r--r--src/geom/sides.rs2
-rw-r--r--src/geom/spec.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/geom/gen.rs b/src/geom/gen.rs
index 18801460..ff8c881a 100644
--- a/src/geom/gen.rs
+++ b/src/geom/gen.rs
@@ -98,7 +98,7 @@ impl<T: Debug> Debug for Gen<T> {
}
/// The two generic layouting axes.
-#[derive(Debug, Copy, Clone, Eq, PartialEq)]
+#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
pub enum GenAxis {
/// The axis words and lines are set along.
Inline,
diff --git a/src/geom/sides.rs b/src/geom/sides.rs
index fc7fb3f4..d1fcf9b7 100644
--- a/src/geom/sides.rs
+++ b/src/geom/sides.rs
@@ -76,7 +76,7 @@ impl<T> Get<Side> for Sides<T> {
}
/// The four sides of objects.
-#[derive(Debug, Copy, Clone, Eq, PartialEq)]
+#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
pub enum Side {
/// The left side.
Left,
diff --git a/src/geom/spec.rs b/src/geom/spec.rs
index a6235548..a257214b 100644
--- a/src/geom/spec.rs
+++ b/src/geom/spec.rs
@@ -101,7 +101,7 @@ impl<T: Debug> Debug for Spec<T> {
}
/// The two specific layouting axes.
-#[derive(Debug, Copy, Clone, Eq, PartialEq)]
+#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
pub enum SpecAxis {
/// The horizontal layouting axis.
Horizontal,