gpui_kit/foundation/
mod.rs1pub mod direction;
9mod ident;
10mod interaction;
11pub(crate) mod stepping;
12mod styled_ext;
13
14pub use direction::{
15 ActiveDirection, DirectionalExt, LayoutDirection, LogicalSide, PhysicalSide,
16 set_layout_direction,
17};
18pub use ident::Ident;
19pub use interaction::{HoverLift, Pressable};
20pub use styled_ext::{FocusRing, StyledExt, text};
21
22pub use gpui_kit_theme::{
23 ActiveTheme, ControlSize, Density, Elevation, Layer, ThemeRegistry, activate_theme, set_density,
24};
25
26pub trait Disableable {
31 fn disabled(self, disabled: bool) -> Self;
32}
33
34pub trait Selectable {
36 fn selected(self, selected: bool) -> Self;
37}
38
39pub trait Sizable: Sized {
41 fn control_size(self, size: ControlSize) -> Self;
42
43 fn xs(self) -> Self {
44 self.control_size(ControlSize::Xs)
45 }
46
47 fn small(self) -> Self {
48 self.control_size(ControlSize::Sm)
49 }
50
51 fn medium(self) -> Self {
52 self.control_size(ControlSize::Md)
53 }
54
55 fn large(self) -> Self {
56 self.control_size(ControlSize::Lg)
57 }
58}