45 lines
802 B
Rust
45 lines
802 B
Rust
//! 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 = "switch")]
|
|
pub mod switch;
|
|
|
|
#[cfg(feature = "radio")]
|
|
pub mod radio;
|
|
|
|
#[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 = "input")]
|
|
pub mod input;
|
|
|
|
/// 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);
|
|
}
|