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
#![doc = include_str!("../readme.md")]

pub mod button;
pub mod calendar;
pub mod date_input;
pub mod input;
pub mod layout_dialog;
pub mod layout_edit;
pub mod masked_input;
pub mod menuline;
pub mod msgdialog;
pub mod statusline;
pub mod util;

pub use pure_rust_locales::Locale;

pub mod event {
    use rat_event::UsedEvent;
    pub use rat_event::{FocusKeys, HandleEvent, MouseOnly};

    /// Result type for event-handling. Used by widgets in this crate.
    #[derive(Debug, Clone, Copy, PartialEq, Eq)]
    pub enum Outcome {
        /// The given event was not handled at all.
        NotUsed,
        /// The event was handled, no repaint necessary.
        Unchanged,
        /// The event was handled, repaint necessary.
        Changed,
    }

    impl UsedEvent for Outcome {
        fn used_event(&self) -> bool {
            *self != Outcome::NotUsed
        }
    }
}

mod _private {
    #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
    pub struct NonExhaustive;
}