summaryrefslogtreecommitdiffstats
path: root/src/app/mod.rs
blob: 9432f0ddc1d876f04dedf8d5c973a3e06aeefedf (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
31
32
33
use std::default::Default;
use std::sync::mpsc::Receiver;

use notify::{DebouncedEvent, RecommendedWatcher};

use crate::habit::HabitWrapper;

mod cursor;
mod impl_self;
mod impl_view;
mod message;

pub struct StatusLine(String, String);
pub use cursor::Cursor;
pub use message::{Message, MessageKind};

pub struct App {
    // holds app data
    habits: Vec<Box<dyn HabitWrapper>>,

    _file_watcher: RecommendedWatcher,
    file_event_recv: Receiver<DebouncedEvent>,
    focus: usize,
    view_month_offset: u32,
    cursor: Cursor,
    message: Message,
}

impl Default for App {
    fn default() -> Self {
        App::new()
    }
}