zrd_core/
actions.rs

1//! Platform-agnostic editor actions
2
3#[derive(Debug, Clone, PartialEq)]
4pub enum EditorAction {
5    // Text manipulation
6    TypeCharacter(char),
7    TypeString(String),
8    Backspace,
9    Delete,
10    Newline,
11    Paste(String),
12
13    // Cursor movement
14    MoveLeft,
15    MoveRight,
16    MoveUp,
17    MoveDown,
18    MoveToBeginningOfLine,
19    MoveToEndOfLine,
20    MoveWordLeft,
21    MoveWordRight,
22
23    // Selection
24    SelectLeft,
25    SelectRight,
26    SelectUp,
27    SelectDown,
28    SelectWordLeft,
29    SelectWordRight,
30    SelectAll,
31
32    // Editing operations
33    Undo,
34    Redo,
35    Cut,
36    Copy,
37    DeleteLine,
38    DeleteToBeginningOfLine,
39    DeleteToEndOfLine,
40    DeleteWordLeft,
41    DeleteWordRight,
42    MoveLineUp,
43    MoveLineDown,
44    Tab,
45    Outdent,
46
47    // View operations
48    IncreaseFontSize,
49    DecreaseFontSize,
50    ResetFontSize,
51
52    // System operations
53    Quit,
54
55    // Mouse-driven cursor positioning
56    SetCursorPosition { row: usize, column: usize },
57    StartSelection { row: usize, column: usize },
58    ExtendSelection { row: usize, column: usize },
59}