//! The components every application needs, one cargo feature each. //! //! Call [`init`] once at startup, before opening windows. use gpui::App; pub mod common; #[cfg(feature = "button")] pub mod button; #[cfg(feature = "checkbox")] pub mod checkbox; #[cfg(feature = "context_menu")] pub mod context_menu; #[cfg(feature = "switch")] pub mod switch; #[cfg(feature = "radio")] pub mod radio; #[cfg(feature = "select")] pub mod select; #[cfg(feature = "toggle")] pub mod toggle; #[cfg(feature = "link")] pub mod link; #[cfg(feature = "slider")] pub mod slider; #[cfg(feature = "progress")] pub mod progress; #[cfg(feature = "avatar")] pub mod avatar; #[cfg(feature = "badge")] pub mod badge; #[cfg(feature = "input")] pub mod input; #[cfg(feature = "dialog")] pub mod dialog; #[cfg(feature = "empty_state")] pub mod empty_state; #[cfg(feature = "menu")] pub mod menu; #[cfg(feature = "alert")] pub mod alert; #[cfg(feature = "popover")] pub mod popover; #[cfg(feature = "scroll_area")] pub mod scroll_area; #[cfg(feature = "scrollbar")] pub mod scrollbar; #[cfg(feature = "segmented")] pub mod segmented; #[cfg(feature = "spinner")] pub mod spinner; #[cfg(feature = "field")] pub mod field; #[cfg(feature = "status_dot")] pub mod status_dot; #[cfg(feature = "combobox")] pub mod combobox; #[cfg(feature = "command_palette")] pub mod command_palette; #[cfg(feature = "toast")] pub mod toast; #[cfg(feature = "tooltip")] pub mod tooltip; /// Initializes everything the components need at startup. pub fn init(cx: &mut App) { gpui_native_theme::Theme::init(cx); #[cfg(feature = "input")] input::bind_input_keys(cx, None); #[cfg(feature = "combobox")] combobox::bind_combobox_keys(cx); #[cfg(feature = "command_palette")] command_palette::bind_command_palette_keys(cx); }