Add menu2 crate

This commit is contained in:
Marshall Bowers 2023-10-30 12:56:23 -04:00
parent d3cd5f3ec5
commit b31a004def
4 changed files with 45 additions and 0 deletions

7
Cargo.lock generated
View file

@ -4795,6 +4795,13 @@ dependencies = [
"gpui",
]
[[package]]
name = "menu2"
version = "0.1.0"
dependencies = [
"gpui2",
]
[[package]]
name = "metal"
version = "0.21.0"

View file

@ -59,6 +59,7 @@ members = [
"crates/lsp2",
"crates/media",
"crates/menu",
"crates/menu2",
"crates/multi_buffer",
"crates/node_runtime",
"crates/notifications",

12
crates/menu2/Cargo.toml Normal file
View file

@ -0,0 +1,12 @@
[package]
name = "menu2"
version = "0.1.0"
edition = "2021"
publish = false
[lib]
path = "src/menu2.rs"
doctest = false
[dependencies]
gpui2 = { path = "../gpui2" }

25
crates/menu2/src/menu2.rs Normal file
View file

@ -0,0 +1,25 @@
// todo!(use actions! macro)
#[derive(Clone, Debug, Default, PartialEq)]
pub struct Cancel;
#[derive(Clone, Debug, Default, PartialEq)]
pub struct Confirm;
#[derive(Clone, Debug, Default, PartialEq)]
pub struct SecondaryConfirm;
#[derive(Clone, Debug, Default, PartialEq)]
pub struct SelectPrev;
#[derive(Clone, Debug, Default, PartialEq)]
pub struct SelectNext;
#[derive(Clone, Debug, Default, PartialEq)]
pub struct SelectFirst;
#[derive(Clone, Debug, Default, PartialEq)]
pub struct SelectLast;
#[derive(Clone, Debug, Default, PartialEq)]
pub struct ShowContextMenu;