ad_editor/input.rs
1//! Fetching and parsing input from the user
2use crate::{
3 editor::{Action, Actions},
4 fsys::Message,
5 key::Input,
6};
7
8/// An input event that can be processed by the editor event loop
9#[derive(Debug)]
10pub enum Event {
11 /// An [Action] for the event loop to handle
12 Action(Action),
13 /// Multiple [Action]s to be handled in a batch
14 Actions(Actions),
15 /// Raw that need to be handled as an insert without applying auto-indent
16 BracketedPaste(String),
17 /// An [Input] from the user
18 Input(Input),
19 /// A Message received from the virtual filesystem interface
20 Message(Message),
21 /// A status message to display in the editor UI
22 StatusMessage(String),
23 /// A signal that our window size has changed
24 WinsizeChanged { rows: usize, cols: usize },
25}