diff options
author | 2020-07-10 00:35:15 +0200 | |
---|---|---|
committer | 2020-07-10 00:35:15 +0200 | |
commit | 46ce3a1f0004ddc527ba3de1ffe3dac3f41a06c3 (patch) | |
tree | 66449eec70609f8fc03a5e4e90ce39a7346d02fb /native/src/widget/pane_grid/configuration.rs | |
parent | 5c4f5ae5ecb36703a95cafb2cd58692529c9466d (diff) | |
parent | 3c5921f30c17bcbe0af74a30b6a256a3fa03515c (diff) | |
download | iced-46ce3a1f0004ddc527ba3de1ffe3dac3f41a06c3.tar.gz iced-46ce3a1f0004ddc527ba3de1ffe3dac3f41a06c3.tar.bz2 iced-46ce3a1f0004ddc527ba3de1ffe3dac3f41a06c3.zip |
Merge pull request #442 from hecrj/feature/pane-grid-titlebar
Title bar support for `PaneGrid`
Diffstat (limited to 'native/src/widget/pane_grid/configuration.rs')
-rw-r--r-- | native/src/widget/pane_grid/configuration.rs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/native/src/widget/pane_grid/configuration.rs b/native/src/widget/pane_grid/configuration.rs new file mode 100644 index 00000000..1fed98b7 --- /dev/null +++ b/native/src/widget/pane_grid/configuration.rs @@ -0,0 +1,30 @@ +use crate::pane_grid::Axis; + +/// The arrangement of a [`PaneGrid`]. +/// +/// [`PaneGrid`]: struct.PaneGrid.html +#[derive(Debug, Clone)] +pub enum Configuration<T> { + /// A split of the available space. + Split { + /// The direction of the split. + axis: Axis, + + /// The ratio of the split in [0.0, 1.0]. + ratio: f32, + + /// The left/top [`Content`] of the split. + /// + /// [`Configuration`]: enum.Node.html + a: Box<Configuration<T>>, + + /// The right/bottom [`Content`] of the split. + /// + /// [`Configuration`]: enum.Node.html + b: Box<Configuration<T>>, + }, + /// A [`Pane`]. + /// + /// [`Pane`]: struct.Pane.html + Pane(T), +} |