1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! Panes that the user rearranges by dragging, as in Ghostty's splits.
//!
//! The layout and its edits are `gpui-base`'s dock: a [`DockArea`] owns a
//! tree of splits and tab groups, and each [`Panel`] is a pane. This
//! module adds the look and the drag through [`DockSkin`], and re-exports
//! the dock types an application needs, so it uses `gpui_cn::dock` only.
//!
//! ```no_run
//! use gpui_cn::dock::{DockLayout, DockSkin};
//! # use gpui_kit::{App, Window};
//! # fn build(left: gpui_kit::Entity<impl gpui_cn::dock::Panel>,
//! # right: gpui_kit::Entity<impl gpui_cn::dock::Panel>,
//! # window: &mut Window, cx: &mut App) {
//! let area = DockSkin::area("panes", window, cx);
//! area.update(cx, |area, cx| {
//! area.set_center(
//! DockLayout::h_split()
//! .child(DockLayout::tabs().panel(left), None)
//! .child(DockLayout::tabs().panel(right), None),
//! window,
//! cx,
//! );
//! });
//! # }
//! ```
//!
//! A pane moves by its layout, never by a resize per frame: when the
//! layout changes, each pane is laid out at its new slot at once and
//! painted gliding from its old rect, clipped to the rect it is passing
//! through. Nothing animates once every pane rests.
pub use Placement;
pub use ;
pub use DockSkin;