1 //! # Cursive-core
2 //!
3 //! This library defines the core components for the Cursive TUI.
4 //!
5 //! The main purpose of `cursive-core` is to write third-party libraries to work with Cursive.
6 //!
7 //! If you are building an end-user application, then [`cursive`] is probably what you want.
8 //!
9 //! [`cursive`]: https://docs.rs/cursive
10 #![deny(missing_docs)]
11 
12 extern crate wasmer_enumset as enumset;
13 
14 macro_rules! new_default(
15     ($c:ident<$t:ident>) => {
16         impl<$t> Default for $c<$t> {
17             fn default() -> Self {
18                 Self::new()
19             }
20         }
21     };
22     ($c:ident) => {
23         impl Default for $c {
24             fn default() -> Self {
25                 Self::new()
26             }
27         }
28     };
29     ($c:ident<$t:ident: Default>) => {
30         impl <$t> Default for $c<$t>
31         where $t: Default {
32             fn default() -> Self {
33                 Self::new($t::default())
34             }
35         }
36     };
37 );
38 
39 #[macro_use]
40 pub mod utils;
41 #[macro_use]
42 pub mod view;
43 #[macro_use]
44 pub mod views;
45 
46 pub mod align;
47 pub mod backend;
48 pub mod direction;
49 pub mod event;
50 pub mod logger;
51 pub mod menu;
52 pub mod theme;
53 pub mod traits;
54 pub mod vec;
55 
56 mod cursive;
57 mod cursive_run;
58 mod dump;
59 mod printer;
60 mod rect;
61 mod with;
62 mod xy;
63 
64 mod div;
65 
66 pub use self::cursive::{CbSink, Cursive, ScreenId};
67 pub use self::cursive_run::CursiveRunner;
68 pub use self::dump::Dump;
69 pub use self::printer::Printer;
70 pub use self::rect::Rect;
71 pub use self::vec::Vec2;
72 pub use self::view::View;
73 pub use self::with::With;
74 pub use self::xy::XY;
75