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
40
41
42
43
44
pub mod input1;
pub mod input2;
pub mod input3;
pub mod input4;
extern crate fltk;
use fltk::prelude::*;
use fltk::window::SingleWindow;
use std::cell::RefCell;
use std::rc::Rc;
pub trait Inputable {
fn get_wind(&self) -> &Rc<RefCell<SingleWindow>>;
fn set_input(&mut self) -> Result<Vec<String>, ()>;
#[inline]
fn shown(&self) -> bool {
(*self.get_wind()).borrow().shown()
}
#[inline]
fn hide(&self) {
(*self.get_wind()).borrow_mut().hide()
}
#[inline]
fn show(&self) {
(*self.get_wind()).borrow_mut().show_with_env_args()
}
}