Resizable sizes a box from its right and bottom edges and a grip at its corner, within its least and greatest size; the grip is a Tab stop whose arrows resize a step. Rotatable turns an svg to its angle inside a ring whose knob a drag moves, Shift snapping to 15 degrees, with the arrows turning it a notch. SelectionArea selects items with a band drawn on empty space, a press, Command or Shift to add, and a cursor the arrows walk with Space to add or drop; Escape clears and Command-A takes all. The gallery shows gpui's own drag and drop, drag preview, double press and wheel zoom, with pointers for Sortable, LongPress and PanZoom; pinch stays blocked, gpui 0.2.2 forwards no magnify event. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
67 lines
1.5 KiB
Rust
67 lines
1.5 KiB
Rust
pub mod account;
|
|
pub mod agent;
|
|
mod assets;
|
|
|
|
pub mod buttons;
|
|
pub mod calendar;
|
|
pub mod canvas;
|
|
pub mod charts;
|
|
pub mod chat;
|
|
pub mod collab;
|
|
pub mod dashboard;
|
|
pub mod data_display;
|
|
pub mod debug;
|
|
pub mod devtools;
|
|
pub mod documents;
|
|
pub mod editor;
|
|
pub mod feedback;
|
|
pub mod files;
|
|
pub mod finance;
|
|
pub mod forms;
|
|
pub mod generative;
|
|
pub mod git;
|
|
pub mod interaction;
|
|
pub mod layout;
|
|
pub mod lists;
|
|
pub mod mail;
|
|
pub mod media;
|
|
pub mod menus;
|
|
pub mod messaging;
|
|
pub mod motion;
|
|
pub mod navigation;
|
|
pub mod onboarding;
|
|
pub mod overlays;
|
|
pub mod primitives;
|
|
pub mod project;
|
|
pub mod settings;
|
|
pub mod shell;
|
|
pub mod tables;
|
|
pub mod terminal;
|
|
pub mod theme;
|
|
pub mod typography;
|
|
|
|
pub use assets::Assets;
|
|
|
|
use gpui::{App, KeyBinding};
|
|
|
|
use crate::primitives::{FocusNext, FocusPrev, IconName};
|
|
|
|
/// Loads fonts and the theme, binds Tab and text keys. Call once, first.
|
|
pub fn init(cx: &mut App) {
|
|
match cx.asset_source().load(IconName::Check.path()) {
|
|
Ok(Some(_)) => {}
|
|
Ok(None) => panic!("ely: pass `ely_gpui_component::Assets` to `Application::with_assets`"),
|
|
Err(error) => panic!("ely: asset source failed: {error:#}"),
|
|
}
|
|
assets::load_fonts(cx).expect("ely: embedded fonts failed to register");
|
|
theme::Theme::init(cx);
|
|
cx.bind_keys([
|
|
KeyBinding::new("tab", FocusNext, None),
|
|
KeyBinding::new("shift-tab", FocusPrev, None),
|
|
]);
|
|
forms::bind_keys(cx);
|
|
editor::bind_keys(cx);
|
|
terminal::bind_keys(cx);
|
|
documents::bind_keys(cx);
|
|
}
|