blob: 7da8347367f3eeee33a08b585023db94ce3853b9 (
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
34
35
36
37
38
39
|
use cursive::direction::Direction;
use cursive::event::{Event, EventResult, Key};
use cursive::theme::Style;
use cursive::view::View;
use cursive::{Printer, Vec2};
use chrono::prelude::*;
use chrono::{Duration, Local, NaiveDate};
use crate::habit::{Bit, Count, Habit, TrackEvent};
use crate::CONFIGURATION;
pub trait ShadowView {
fn draw(&self, printer: &Printer);
fn required_size(&mut self, _: Vec2) -> Vec2;
fn take_focus(&mut self, _: Direction) -> bool;
fn on_event(&mut self, e: Event) -> EventResult;
|