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.
This commit is contained in:
bicarlsen 2024-11-14 19:49:07 -07:00 committed by GitHub
parent ae49310ee1
commit 6c75037edd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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<PathBuf>,
position: dpi::PhysicalPosition,
@ -119,7 +119,7 @@ impl DragDropPayload {
}
}
#[derive(Deserialize, Debug)]
#[derive(Deserialize, Clone, Debug)]
pub struct DragOverPayload {
position: dpi::PhysicalPosition,
}