Files
oak-gpui/crates/gpui_widgets/Cargo.toml
T
Mike-Solar d72d2e8210 feat(gpui_widgets): add menu bar, context menu and modal dialog framework
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.
2026-08-09 05:33:29 +08:00

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"