blob: e26006dc95455f82c90b904fe5f7fe464893c2d2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
use crate::canvas::LayoutConstraint;
use super::Element;
/// A [`ContainerDirection`] determines the direction of the [`Container`].
pub enum ContainerDirection {
Row,
Column,
}
/// A [`Container`] holds either more containers or a [`BottomWidget`].
///
/// Basically, a non-leaf node in the [`Element`] tree.
pub struct Container {
direction: ContainerDirection,
constraint: LayoutConstraint,
pub(super) children: Vec<Element>,
}
impl Container {
pub fn draw(&mut self) {
match self.direction {
ContainerDirection::Row => {}
ContainerDirection::Column => {}
}
}
}
|