Skip to main content

gpui_kit/overlay/
mod.rs

1//! Floating surfaces that render above the page.
2//!
3//! [`Overlay`] owns placement, stacking and dismissal; [`FocusTrap`] keeps the
4//! keyboard inside an open overlay and gives focus back when it closes.
5//! [`Dialog`] composes both into a modal that asks one question, [`Drawer`] is
6//! the same surface arriving from an edge, and [`Tooltip`] is hover-delayed
7//! help that is never the only way to act.
8//! [`ToastLayer`] holds transient notifications, which report what happened
9//! and never hide a failure on a timer.
10//!
11//! [`Popover`] is the anchored surface the menu family is built from:
12//! [`Menu`] hangs one off a trigger, [`ContextMenu`] opens the same list at
13//! the pointer, and [`CommandPalette`] filters it from the keyboard.
14
15mod dialog;
16mod drawer;
17mod focus;
18pub mod frost;
19pub mod hover_card;
20mod kbd;
21mod layer;
22mod menu;
23pub mod menubar;
24pub mod notification_center;
25mod palette;
26pub mod panel;
27pub mod popover;
28pub mod toast;
29pub mod tooltip;
30
31pub use dialog::{Dialog, DialogEvent};
32pub use drawer::{Drawer, DrawerEvent};
33pub use focus::FocusTrap;
34pub use frost::Frost;
35pub use hover_card::{HoverCard, HoverCardEvent};
36pub use kbd::{Kbd, caps};
37pub use layer::{Edge, Overlay, Placement, priority, surface};
38pub use menu::{ContextMenu, ContextMenuEvent, Menu, MenuEvent, MenuItem};
39pub use menubar::{Menubar, MenubarEvent, MenubarMenu};
40pub use notification_center::{
41    Notification, NotificationCenter, NotificationCenterEvent, UnreadCount,
42};
43pub use palette::{Command, CommandPalette, CommandPaletteEvent};
44pub use popover::{Popover, PopoverEvent};
45pub use toast::{Toast, ToastCorner, ToastLayer};
46pub use tooltip::{Tooltip, Tooltipped};