Skip to main content

par_term/pane/types/
common.rs

1//! Shared enums for the pane system.
2
3// Re-export PaneId from par-term-config for shared access across subcrates
4pub use par_term_config::PaneId;
5
6// Re-export rendering types from par-term-config
7pub use par_term_config::{DividerRect, PaneBackground};
8
9/// State for shell restart behavior
10#[derive(Debug, Clone)]
11pub enum RestartState {
12    /// Waiting for user to press Enter to restart
13    AwaitingInput,
14    /// Waiting for delay timer before restart
15    AwaitingDelay(std::time::Instant),
16}
17
18/// Direction of a split
19#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
20pub enum SplitDirection {
21    /// Panes are stacked vertically (split creates top/bottom panes)
22    Horizontal,
23    /// Panes are side by side (split creates left/right panes)
24    Vertical,
25}
26
27/// Direction for pane navigation
28#[derive(Debug, Clone, Copy, PartialEq, Eq)]
29pub enum NavigationDirection {
30    Left,
31    Right,
32    Up,
33    Down,
34}