Skip to main content

guise/data/
mod.rs

1//! Data display: components that present structured content.
2//!
3//! - [`Avatar`], [`List`], [`Table`] are stateless `RenderOnce` builders.
4//! - [`Tabs`] and [`Accordion`] are gpui entities that own selection /
5//!   expansion state. Their panel content is supplied as a builder closure so
6//!   it can be rebuilt each frame.
7
8mod accordion;
9mod avatar;
10mod avatargroup;
11mod dataview;
12mod list;
13mod tabbar;
14mod table;
15mod tableview;
16mod tabs;
17mod timeline;
18mod tree;
19
20pub use accordion::Accordion;
21pub use avatar::Avatar;
22pub use avatargroup::AvatarGroup;
23pub use dataview::{DataView, DataViewEvent, DataViewLayout};
24pub use list::List;
25pub use tabbar::{TabBar, TabBarEvent};
26pub use table::Table;
27pub use tableview::{Column, SelectionMode, SortDir, TableView, TableViewEvent};
28pub use tabs::Tabs;
29pub use timeline::Timeline;
30pub use tree::{TreeNode, TreeView, TreeViewEvent};
31
32use gpui::{AnyElement, App, Window};
33
34/// A panel-content builder: re-invoked each render so stateful panels (Tabs,
35/// Accordion) can show arbitrary, always-fresh content.
36pub(crate) type Content = Box<dyn Fn(&mut Window, &mut App) -> AnyElement + 'static>;