summaryrefslogtreecommitdiffstats
path: root/native/src/widget/pane_grid/node.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-11-25 07:11:27 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-11-26 02:05:43 +0100
commit01322f69a406eee76014f5e2834336e2295ad80e (patch)
tree380d9224b81537e460ea7f9fe84c0c912d3f4cbf /native/src/widget/pane_grid/node.rs
parentd612bf56784b41346f18ad9eda4f6d54d699dcb5 (diff)
downloadiced-01322f69a406eee76014f5e2834336e2295ad80e.tar.gz
iced-01322f69a406eee76014f5e2834336e2295ad80e.tar.bz2
iced-01322f69a406eee76014f5e2834336e2295ad80e.zip
Use recently stabilized intra-doc links
See RFC: https://github.com/rust-lang/rfcs/blob/master/text/1946-intra-rustdoc-links.md
Diffstat (limited to 'native/src/widget/pane_grid/node.rs')
-rw-r--r--native/src/widget/pane_grid/node.rs22
1 files changed, 1 insertions, 21 deletions
diff --git a/native/src/widget/pane_grid/node.rs b/native/src/widget/pane_grid/node.rs
index cbfd8a43..319936fc 100644
--- a/native/src/widget/pane_grid/node.rs
+++ b/native/src/widget/pane_grid/node.rs
@@ -7,17 +7,12 @@ use std::collections::HashMap;
/// A layout node of a [`PaneGrid`].
///
-/// [`PaneGrid`]: struct.PaneGrid.html
+/// [`PaneGrid`]: crate::widget::PaneGrid
#[derive(Debug, Clone)]
pub enum Node {
/// The region of this [`Node`] is split into two.
- ///
- /// [`Node`]: enum.Node.html
Split {
/// The [`Split`] of this [`Node`].
- ///
- /// [`Split`]: struct.Split.html
- /// [`Node`]: enum.Node.html
id: Split,
/// The direction of the split.
@@ -27,26 +22,17 @@ pub enum Node {
ratio: f32,
/// The left/top [`Node`] of the split.
- ///
- /// [`Node`]: enum.Node.html
a: Box<Node>,
/// The right/bottom [`Node`] of the split.
- ///
- /// [`Node`]: enum.Node.html
b: Box<Node>,
},
/// The region of this [`Node`] is taken by a [`Pane`].
- ///
- /// [`Pane`]: struct.Pane.html
Pane(Pane),
}
impl Node {
/// Returns an iterator over each [`Split`] in this [`Node`].
- ///
- /// [`Split`]: struct.Split.html
- /// [`Node`]: enum.Node.html
pub fn splits(&self) -> impl Iterator<Item = &Split> {
let mut unvisited_nodes = vec![self];
@@ -69,9 +55,6 @@ impl Node {
/// Returns the rectangular region for each [`Pane`] in the [`Node`] given
/// the spacing between panes and the total available space.
- ///
- /// [`Pane`]: struct.Pane.html
- /// [`Node`]: enum.Node.html
pub fn pane_regions(
&self,
spacing: f32,
@@ -96,9 +79,6 @@ impl Node {
/// Returns the axis, rectangular region, and ratio for each [`Split`] in
/// the [`Node`] given the spacing between panes and the total available
/// space.
- ///
- /// [`Split`]: struct.Split.html
- /// [`Node`]: enum.Node.html
pub fn split_regions(
&self,
spacing: f32,