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 fccbe8c8..470ac3ba 100644
--- a/src/layout/mod.rs
+++ b/src/layout/mod.rs
@@ -134,6 +134,8 @@ pub struct LayoutContext<'a, 'p> {
pub style: &'a TextStyle,
/// The alignment to use for the content.
pub alignment: Alignment,
+ /// How to stack the context.
+ pub flow: Flow,
/// The primary space to layout in.
pub space: LayoutSpace,
/// The additional spaces which are used when the primary space
@@ -176,6 +178,13 @@ pub enum Alignment {
Center,
}
+/// The flow of content.
+#[derive(Debug, Copy, Clone, Eq, PartialEq)]
+pub enum Flow {
+ Vertical,
+ Horizontal,
+}
+
/// The error type for layouting.
pub enum LayoutError {
/// There is not enough space to add an item.