iced_widget/pane_grid/
configuration.rs

1use crate::pane_grid::Axis;
2
3/// The arrangement of a [`PaneGrid`].
4///
5/// [`PaneGrid`]: super::PaneGrid
6#[derive(Debug, Clone)]
7pub enum Configuration<T> {
8    /// A split of the available space.
9    Split {
10        /// The direction of the split.
11        axis: Axis,
12
13        /// The ratio of the split in [0.0, 1.0].
14        ratio: f32,
15
16        /// The left/top [`Configuration`] of the split.
17        a: Box<Configuration<T>>,
18
19        /// The right/bottom [`Configuration`] of the split.
20        b: Box<Configuration<T>>,
21    },
22    /// A [`Pane`].
23    ///
24    /// [`Pane`]: super::Pane
25    Pane(T),
26}