Expose Node and State::layout for PaneGrid

This commit is contained in:
Héctor Ramón Jiménez 2020-05-09 00:16:07 +02:00
parent d1f2a18439
commit f3d54a0f33
4 changed files with 113 additions and 84 deletions

View file

@ -102,6 +102,13 @@ impl<T> State<T> {
self.panes.iter_mut()
}
/// Returns the layout tree stored in the [`State`].
///
/// [`State`]: struct.State.html
pub fn layout(&self) -> &Node {
&self.internal.layout
}
/// Returns the active [`Pane`] of the [`State`], if there is one.
///
/// A [`Pane`] is active if it is focused and is __not__ being dragged.