From 230bd6f7475752352ca9985802db0633e3508d9f Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Fri, 22 May 2020 22:15:44 +0200 Subject: Write documentation for new `pane_grid` API --- native/src/widget/pane_grid/content.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'native/src/widget/pane_grid/content.rs') diff --git a/native/src/widget/pane_grid/content.rs b/native/src/widget/pane_grid/content.rs index 6b0bd99a..8822083e 100644 --- a/native/src/widget/pane_grid/content.rs +++ b/native/src/widget/pane_grid/content.rs @@ -1,12 +1,30 @@ use crate::pane_grid::Axis; +/// The content of a [`PaneGrid`]. +/// +/// [`PaneGrid`]: struct.PaneGrid.html #[derive(Debug, Clone)] pub enum Content { + /// 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. + /// + /// [`Content`]: enum.Node.html a: Box>, + + /// The right/bottom [`Content`] of the split. + /// + /// [`Content`]: enum.Node.html b: Box>, }, + /// A [`Pane`]. + /// + /// [`Pane`]: struct.Pane.html Pane(T), } -- cgit