summaryrefslogtreecommitdiffstats
path: root/src/ui/mod.rs
blob: c71feb6318bce1d020f24ca29f5fed98544dfe00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use std::path;

mod tui_backend;
pub mod views;
pub mod widgets;

pub use tui_backend::*;

#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq)]
pub struct Rect {
    pub x: u16,
    pub y: u16,
    pub width: u16,
    pub height: u16,
}

#[derive(Debug, Clone)]
pub struct PreviewArea {
    pub file_preview_path: path::PathBuf,
    pub preview_area: Rect,
}

impl PreviewArea {
    pub fn new(file_preview_path: path::PathBuf, preview_area: Rect) -> Self {
        Self {
            file_preview_path,
            preview_area,
        }
    }
}