diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-03-12 14:12:30 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-03-12 14:12:30 +0100 |
| commit | 584a43277dbfbdba834a2681afe63d10598db3f9 (patch) | |
| tree | 2a7b8d1f6b41fa39996c907d8d582b4c52448fcd /src/exec/state.rs | |
| parent | ffcb8cd97a7107bfd66805b1073c5ef3e0dd59a7 (diff) | |
Rename ChildAlign to LayoutAligns ✏
Diffstat (limited to 'src/exec/state.rs')
| -rw-r--r-- | src/exec/state.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/exec/state.rs b/src/exec/state.rs index 3293662a..65f26439 100644 --- a/src/exec/state.rs +++ b/src/exec/state.rs @@ -3,33 +3,33 @@ use std::rc::Rc; use fontdock::{fallback, FallbackTree, FontStretch, FontStyle, FontVariant, FontWeight}; use crate::geom::{ - Align, ChildAlign, Dir, LayoutDirs, Length, Linear, Relative, Sides, Size, + Align, Dir, LayoutAligns, LayoutDirs, Length, Linear, Relative, Sides, Size, }; use crate::paper::{Paper, PaperClass, PAPER_A4}; /// The evaluation state. #[derive(Debug, Clone, PartialEq)] pub struct State { + /// The current directions along which layouts are placed in their parents. + pub dirs: LayoutDirs, + /// The current alignments of layouts in their parents. + pub aligns: LayoutAligns, /// The current page settings. pub page: PageState, /// The current paragraph settings. pub par: ParState, /// The current font settings. pub font: FontState, - /// The current layouting directions. - pub dirs: LayoutDirs, - /// The current alignments of an item in its parent. - pub align: ChildAlign, } impl Default for State { fn default() -> Self { Self { + dirs: LayoutDirs::new(Dir::TTB, Dir::LTR), + aligns: LayoutAligns::new(Align::Start, Align::Start), page: PageState::default(), par: ParState::default(), font: FontState::default(), - dirs: LayoutDirs::new(Dir::TTB, Dir::LTR), - align: ChildAlign::new(Align::Start, Align::Start), } } } |
