From 6c75037edd06e4c39d972a7897a87fc52500c511 Mon Sep 17 00:00:00 2001 From: bicarlsen Date: Thu, 14 Nov 2024 19:49:07 -0700 Subject: [PATCH] Add `Menu` functionality (#65) * Added core::Channel and menu functionality. core::Channel may leak memory. * Added leptos example. * Updated Channel to stream over message. Added Menu::with_items. * Updated examples to v2 using Leptos. * Added Menu::with_id_and_items. * Derived Clone for drag drop events. --- src/window.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/window.rs b/src/window.rs index 5de44a4..c76d0c2 100644 --- a/src/window.rs +++ b/src/window.rs @@ -95,7 +95,7 @@ pub(crate) struct WindowLabel { label: String, } -#[derive(Deserialize, Debug)] +#[derive(Deserialize, Clone, Debug)] pub enum DragDropEvent { Enter(DragDropPayload), Over(DragOverPayload), @@ -103,7 +103,7 @@ pub enum DragDropEvent { Leave, } -#[derive(Deserialize, Debug)] +#[derive(Deserialize, Clone, Debug)] pub struct DragDropPayload { paths: Vec, position: dpi::PhysicalPosition, @@ -119,7 +119,7 @@ impl DragDropPayload { } } -#[derive(Deserialize, Debug)] +#[derive(Deserialize, Clone, Debug)] pub struct DragOverPayload { position: dpi::PhysicalPosition, }