Draft first-class TitleBar in pane_grid
This commit is contained in:
parent
4c494c7244
commit
a11bcf5af0
10 changed files with 190 additions and 56 deletions
30
native/src/widget/pane_grid/configuration.rs
Normal file
30
native/src/widget/pane_grid/configuration.rs
Normal file
|
|
@ -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),
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue