diff options
author | 2020-04-02 16:53:54 +0200 | |
---|---|---|
committer | 2020-04-02 16:53:54 +0200 | |
commit | 3aafd2c1f7539806449b116fa98d6bf0fff94de8 (patch) | |
tree | 727eb202e24d66836065e89c279d400c053563c0 /native/src/widget/pane_grid.rs | |
parent | 2fa6edf7a8b2a6e06b42ff9879fe81cbd1a957c6 (diff) | |
parent | 4a498ed0e3d0526ce9f47b7eefa0b2716f9b27a8 (diff) | |
download | iced-3aafd2c1f7539806449b116fa98d6bf0fff94de8.tar.gz iced-3aafd2c1f7539806449b116fa98d6bf0fff94de8.tar.bz2 iced-3aafd2c1f7539806449b116fa98d6bf0fff94de8.zip |
Merge pull request #252 from hecrj/improvement/documentation
Update and improve documentation
Diffstat (limited to 'native/src/widget/pane_grid.rs')
-rw-r--r-- | native/src/widget/pane_grid.rs | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/native/src/widget/pane_grid.rs b/native/src/widget/pane_grid.rs index 2eca68d3..f6dd328e 100644 --- a/native/src/widget/pane_grid.rs +++ b/native/src/widget/pane_grid.rs @@ -1,6 +1,13 @@ //! Let your users split regions of your application and organize layout dynamically. //! //! [](https://gfycat.com/mixedflatjellyfish) +//! +//! # Example +//! The [`pane_grid` example] showcases how to use a [`PaneGrid`] with resizing, +//! drag and drop, and hotkey support. +//! +//! [`pane_grid` example]: https://github.com/hecrj/iced/tree/0.1/examples/pane_grid +//! [`PaneGrid`]: struct.PaneGrid.html mod axis; mod direction; mod node; @@ -59,12 +66,13 @@ use crate::{ /// /// let (mut state, _) = pane_grid::State::new(PaneState::SomePane); /// -/// let pane_grid = PaneGrid::new(&mut state, |pane, state, focus| { -/// match state { -/// PaneState::SomePane => Text::new("This is some pane"), -/// PaneState::AnotherKindOfPane => Text::new("This is another kind of pane"), -/// }.into() -/// }) +/// let pane_grid = +/// PaneGrid::new(&mut state, |pane, state, focus| { +/// match state { +/// PaneState::SomePane => Text::new("This is some pane"), +/// PaneState::AnotherKindOfPane => Text::new("This is another kind of pane"), +/// }.into() +/// }) /// .on_drag(Message::PaneDragged) /// .on_resize(Message::PaneResized); /// ``` |