Skip to main content

slt/
layout.rs

1//! Flexbox layout engine: builds a tree from commands, computes positions,
2//! and renders to a [`Buffer`].
3
4use crate::buffer::Buffer;
5use crate::rect::Rect;
6use crate::style::{
7    Align, Border, BorderSides, Color, Constraints, Justify, Margin, Padding, Style,
8};
9use unicode_width::UnicodeWidthChar;
10use unicode_width::UnicodeWidthStr;
11
12mod collect;
13mod command;
14mod flexbox;
15mod render;
16mod tree;
17
18pub(crate) use collect::collect_all;
19pub(crate) use command::Command;
20pub use command::Direction;
21pub(crate) use flexbox::compute;
22pub(crate) use render::{render, render_debug_overlay};
23pub(crate) use tree::{build_tree, wrap_lines, wrap_segments, LayoutNode, NodeKind};
24
25#[cfg(test)]
26mod tests;