summaryrefslogtreecommitdiffstats
path: root/widget/src/pane_grid/state.rs
diff options
context:
space:
mode:
Diffstat (limited to 'widget/src/pane_grid/state.rs')
-rw-r--r--widget/src/pane_grid/state.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/widget/src/pane_grid/state.rs b/widget/src/pane_grid/state.rs
index f5d2bb02..e1934930 100644
--- a/widget/src/pane_grid/state.rs
+++ b/widget/src/pane_grid/state.rs
@@ -343,7 +343,7 @@ impl<T> State<T> {
/// [`PaneGrid`]: super::PaneGrid
#[derive(Debug, Clone)]
pub struct Internal {
- layout: Node,
+ pub(super) layout: Node,
last_id: usize,
}
@@ -397,11 +397,12 @@ impl Internal {
/// The current action of a [`PaneGrid`].
///
/// [`PaneGrid`]: super::PaneGrid
-#[derive(Debug, Clone, Copy, PartialEq)]
+#[derive(Debug, Clone, Copy, PartialEq, Default)]
pub enum Action {
/// The [`PaneGrid`] is idle.
///
/// [`PaneGrid`]: super::PaneGrid
+ #[default]
Idle,
/// A [`Pane`] in the [`PaneGrid`] is being dragged.
///
@@ -441,9 +442,8 @@ impl Action {
}
}
-impl Internal {
- /// The layout [`Node`] of the [`Internal`] state
- pub fn layout(&self) -> &Node {
- &self.layout
- }
+#[derive(Default)]
+pub(super) struct Widget {
+ pub action: Action,
+ pub panes: Vec<Pane>,
}