blob: d51abe5ae31172955b68bdce3412bae845ac24c6 (
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
|
use std::default::Default;
mod traits;
pub use traits::{Habit, HabitWrapper};
mod count;
pub use count::Count;
mod bit;
pub use bit::Bit;
mod prelude;
pub use prelude::{TrackEvent, ViewMode};
use crate::app::Cursor;
use cursive::direction::Absolute;
#[derive(Debug, Default)]
pub struct InnerData {
pub cursor: Cursor,
pub view_mode: ViewMode,
}
impl InnerData {
pub fn move_cursor(&mut self, d: Absolute) {
self.cursor.small_seek(d);
}
pub fn cursor(&self) -> Cursor {
self.cursor
}
pub fn set_view_mode(&mut self, mode: ViewMode) {
self.view_mode = mode;
}
pub fn view_mode(&self) -> ViewMode {
self.view_mode
}
}
|