diff options
| author | Laurenz <laurmaedje@gmail.com> | 2019-12-30 22:28:56 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2019-12-30 22:28:56 +0100 |
| commit | 269f069a4d721a986807293ef71be1348bfae3d4 (patch) | |
| tree | 31b737c4ff2aead3eb5e2673828595bb26622032 /src/layout/mod.rs | |
| parent | b8620121a692df6313eeb5ccf7baf89c1e364116 (diff) | |
Simple line layouter 🧾
Diffstat (limited to 'src/layout/mod.rs')
| -rw-r--r-- | src/layout/mod.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs index f937a054..53c3e91e 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -9,7 +9,7 @@ use crate::style::LayoutStyle; mod actions; mod tree; -mod flex; +mod line; mod stack; mod text; @@ -30,7 +30,7 @@ pub mod prelude { /// Different kinds of layouters (fully re-exported). pub mod layouters { pub use super::tree::layout; - pub use super::flex::{FlexLayouter, FlexContext}; + pub use super::line::{LineLayouter, LineContext}; pub use super::stack::{StackLayouter, StackContext}; pub use super::text::{layout_text, TextContext}; } @@ -174,7 +174,7 @@ impl LayoutExpansion { LayoutExpansion { horizontal, vertical } } - /// Borrow the spcified component mutably. + /// Borrow the specified component mutably. pub fn get_mut(&mut self, axis: SpecificAxis) -> &mut bool { match axis { Horizontal => &mut self.horizontal, @@ -366,6 +366,9 @@ const PARAGRAPH_KIND: SpacingKind = SpacingKind::Soft(1); /// The standard spacing kind used for line spacing. const LINE_KIND: SpacingKind = SpacingKind::Soft(2); +/// The standard spacing kind used for word spacing. +const WORD_KIND: SpacingKind = SpacingKind::Soft(1); + /// The last appeared spacing. #[derive(Debug, Copy, Clone, PartialEq)] enum LastSpacing { |
