Function fltk::app::wait

source ·
pub fn wait() -> bool
Expand description

Starts waiting for events. Calls to redraw within wait require an explicit sleep

Examples found in repository?
examples/custom_popup.rs (line 81)
76
77
78
79
80
81
82
83
84
    pub fn popup(&mut self, x: i32, y: i32) -> String {
        self.win.show();
        self.win.set_pos(x, y);
        self.win.redraw();
        while self.win.shown() {
            app::wait();
        }
        self.val.borrow().to_string()
    }
More examples
Hide additional examples
examples/custom_choice.rs (line 94)
89
90
91
92
93
94
95
96
97
    pub fn popup(&mut self, x: i32, y: i32) -> (String, i32) {
        self.win.show();
        self.win.force_position(true);
        self.win.set_pos(x, y);
        while self.win.shown() {
            app::wait();
        }
        (self.val.borrow().to_string(), *self.idx.borrow())
    }