diff options
Diffstat (limited to 'native/src/window/action.rs')
-rw-r--r-- | native/src/window/action.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/native/src/window/action.rs b/native/src/window/action.rs index 168974bc..63858bc8 100644 --- a/native/src/window/action.rs +++ b/native/src/window/action.rs @@ -13,6 +13,11 @@ pub enum Action<T> { /// There’s no guarantee that this will work unless the left mouse /// button was pressed immediately before this function is called. Drag, + /// Spawns a new window with the provided [`window::Settings`]. + Spawn { + /// The settings of the [`Window`]. + settings: window::Settings, + }, /// Resize the window. Resize { /// The new logical width of the window @@ -82,6 +87,7 @@ impl<T> Action<T> { T: 'static, { match self { + Self::Spawn { settings } => Action::Spawn { settings }, Self::Close => Action::Close, Self::Drag => Action::Drag, Self::Resize { width, height } => Action::Resize { width, height }, @@ -105,6 +111,9 @@ impl<T> fmt::Debug for Action<T> { match self { Self::Close => write!(f, "Action::Close"), Self::Drag => write!(f, "Action::Drag"), + Self::Spawn { settings } => { + write!(f, "Action::Spawn {{ settings: {:?} }}", settings) + } Self::Resize { width, height } => write!( f, "Action::Resize {{ widget: {width}, height: {height} }}" |