W2 of the oak task list. A pure menu model (nesting, disabled items, separators, checked state, wrap-around keyboard navigation arithmetic) feeds two views: a MenuBar with drop-down popups and a right-click ContextMenu, both built on anchored+deferred with keyboard navigation (up/down/enter/ escape), hover-opened submenus, check marks, shortcut labels and request events. The Modal framework provides the mask, title bar, content slot and button row with escape/enter defaults; message_box (info/warning/error), progress_dialog (driven by ProgressContent) and file_dialog (native gpui fallback - the fork has no prompt_for_paths platform API) are built on it. A menus_dialogs example demonstrates everything. 79 tests pass.
30 lines
688 B
TOML
30 lines
688 B
TOML
[package]
|
|
name = "gpui_widgets"
|
|
version = "0.1.0"
|
|
edition.workspace = true
|
|
authors = ["Oak <oak@users.noreply.github.com>"]
|
|
description = "Form controls, menus, dialogs and NLE widgets built on gpui"
|
|
publish = true
|
|
license = "Apache-2.0"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
anyhow.workspace = true
|
|
gpui.workspace = true
|
|
gpui_elements = { path = "../gpui_elements" }
|
|
thiserror.workspace = true
|
|
|
|
[dev-dependencies]
|
|
gpui = { workspace = true, features = ["test-support"] }
|
|
gpui_platform = { workspace = true, features = ["font-kit", "wayland", "x11"] }
|
|
|
|
[[example]]
|
|
name = "controls"
|
|
path = "examples/controls.rs"
|
|
|
|
[[example]]
|
|
name = "menus_dialogs"
|
|
path = "examples/menus_dialogs.rs"
|