summaryrefslogtreecommitdiffstats
path: root/native
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-03-19 09:43:36 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-03-19 09:43:36 +0100
commit420275793e04b41254bacdaedd8ca60fb2ffe63f (patch)
treeb5d7b0189c11539621fa272ae4fe806c434e7a81 /native
parentbb898fa2e277d46642feec397efd753f133a0aae (diff)
downloadiced-420275793e04b41254bacdaedd8ca60fb2ffe63f.tar.gz
iced-420275793e04b41254bacdaedd8ca60fb2ffe63f.tar.bz2
iced-420275793e04b41254bacdaedd8ca60fb2ffe63f.zip
Fix minor documentation issues in `pane_grid`
Diffstat (limited to 'native')
-rw-r--r--native/src/widget/pane_grid.rs7
-rw-r--r--native/src/widget/pane_grid/state.rs5
2 files changed, 10 insertions, 2 deletions
diff --git a/native/src/widget/pane_grid.rs b/native/src/widget/pane_grid.rs
index d33573ca..5ced6610 100644
--- a/native/src/widget/pane_grid.rs
+++ b/native/src/widget/pane_grid.rs
@@ -93,6 +93,7 @@ impl<'a, Message, Renderer> PaneGrid<'a, Message, Renderer> {
///
/// [`PaneGrid`]: struct.PaneGrid.html
/// [`State`]: struct.State.html
+ /// [`Pane`]: struct.Pane.html
pub fn new<T>(
state: &'a mut State<T>,
view: impl Fn(
@@ -219,7 +220,7 @@ impl<'a, Message, Renderer> PaneGrid<'a, Message, Renderer> {
/// If the function returns `None`, the key press event will be discarded
/// without producing any message.
///
- /// This function is particularly useful to implement hotkey interactions.
+ /// This method is particularly useful to implement hotkey interactions.
/// For instance, you can use it to enable splitting, swapping, or resizing
/// panes by pressing combinations of keys.
///
@@ -319,12 +320,16 @@ pub enum DragEvent {
#[derive(Debug, Clone, Copy)]
pub struct ResizeEvent {
/// The [`Split`] that is being dragged for resizing.
+ ///
+ /// [`Split`]: struct.Split.html
pub split: Split,
/// The new ratio of the [`Split`].
///
/// The ratio is a value in [0, 1], representing the exact position of a
/// [`Split`] between two panes.
+ ///
+ /// [`Split`]: struct.Split.html
pub ratio: f32,
}
diff --git a/native/src/widget/pane_grid/state.rs b/native/src/widget/pane_grid/state.rs
index 6c80cacc..0e528d90 100644
--- a/native/src/widget/pane_grid/state.rs
+++ b/native/src/widget/pane_grid/state.rs
@@ -18,8 +18,9 @@ use std::collections::HashMap;
///
/// [`PaneGrid`]: struct.PaneGrid.html
/// [`PaneGrid::new`]: struct.PaneGrid.html#method.new
-/// [`State`]: struct.State.html
/// [`Pane`]: struct.Pane.html
+/// [`Split`]: struct.Split.html
+/// [`State`]: struct.State.html
#[derive(Debug)]
pub struct State<T> {
pub(super) panes: HashMap<Pane, T>,
@@ -28,6 +29,8 @@ pub struct State<T> {
}
/// The current focus of a [`Pane`].
+///
+/// [`Pane`]: struct.Pane.html
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Focus {
/// The [`Pane`] is just focused.