summaryrefslogtreecommitdiffstats
path: root/ui/src/state.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ui/src/state.rs')
-rw-r--r--ui/src/state.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/src/state.rs b/ui/src/state.rs
index 520a97c3..a9fdcd24 100644
--- a/ui/src/state.rs
+++ b/ui/src/state.rs
@@ -53,6 +53,7 @@ pub struct Context {
_backends: Backends,
input_thread: chan::Sender<bool>,
+ pub temp_files: Vec<File>,
}
impl Context {
@@ -62,6 +63,9 @@ impl Context {
pub fn input_thread(&mut self) -> &mut chan::Sender<bool> {
&mut self.input_thread
}
+ pub fn add_temp(&mut self, f: File) -> () {
+ self.temp_files.push(f);
+ }
}
/// A State object to manage and own components and entities of the UI. `State` is responsible for
@@ -159,6 +163,7 @@ impl State<std::io::Stdout> {
runtime_settings: settings,
dirty_areas: VecDeque::with_capacity(5),
replies: VecDeque::with_capacity(5),
+ temp_files: Vec::new(),
input_thread,
},