Skip to main content

spec_ai/spec_ai_tui/layout/
direction.rs

1//! Layout direction
2
3/// Direction for layout operations
4#[derive(Debug, Clone, Copy, PartialEq, Eq, Default, Hash)]
5pub enum Direction {
6    /// Horizontal layout (left to right)
7    #[default]
8    Horizontal,
9    /// Vertical layout (top to bottom)
10    Vertical,
11}
12
13impl Direction {
14    /// Check if horizontal
15    pub fn is_horizontal(&self) -> bool {
16        matches!(self, Direction::Horizontal)
17    }
18
19    /// Check if vertical
20    pub fn is_vertical(&self) -> bool {
21        matches!(self, Direction::Vertical)
22    }
23}