tui_additions/framework/
frameworkhistory.rs1use typemap::{CloneMap, TypeMap};
2
3use super::{CursorState, Framework, FrameworkData, State};
4
5#[derive(Clone)]
7pub struct FrameworkHistory {
8 pub selectables: Vec<Vec<(usize, usize)>>,
10 pub data: CloneMap,
12 pub state: State,
14 pub cursor: CursorState,
16}
17
18impl From<FrameworkHistory> for Framework {
19 fn from(original: FrameworkHistory) -> Framework {
20 Framework {
21 selectables: original.selectables,
22 data: FrameworkData::from((TypeMap::custom(), original.data)),
23 state: original.state,
24 cursor: original.cursor,
25 history: Vec::new(),
26 frame_area: None,
27 }
28 }
29}