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
45
46
47
48
//! `comb` — a tiny, native terminal-UI engine.
//!
//! No ratatui, no crossterm. Raw terminal control lives in [`terminal`] (Unix
//! termios / Windows Console VT + ANSI), the screen is a diffed grid of [`Cell`]s
//! in [`buffer`], and the
//! headline feature is compositing: [`Surface`]s stacked as [`Compositor`]
//! layers with z-order and transparency, so overlays (menus, popups, toasts)
//! paint on top of the scene without disturbing it.
//!
//! The mental model is deliberately close to what a ratatui user expects
//! (a [`Rect`], a [`Style`], [`Line`]/[`Span`] text, a `Frame` you draw into) so
//! porting an existing UI is mechanical, while the internals are ours to shape.
//!
//! ```no_run
//! use comb::{Terminal, Style, Color, Rect};
//! let mut term = Terminal::new().unwrap();
//! term.draw(|f| {
//! let area = f.area();
//! f.buffer().set_str(2, 1, "hello, comb", Style::new().fg(Color::rgb(0xe6,0xe6,0xe6)));
//! // an overlay layer, composited on top:
//! let pop = f.layer(Rect::new(4, 3, 20, 3), 10);
//! pop.fill(Rect::new(0, 0, 20, 3), ' ', Style::new().bg(Color::rgb(0x26,0x26,0x26)));
//! }).unwrap();
//! ```
// Logic is grouped into folders; `lib.rs` just wires them and re-exports a flat,
// stable public API so callers use `comb::Buffer`, `comb::Style`, etc.
// The `effects` module is re-exported by name so `comb::effects::…` keeps working.
pub use crateeffects;
pub use crate;
pub use crate;
pub use crate;
pub use crate;
pub use crate;
pub use crate;
pub use crateBorder;
pub use crate;
pub use crate;
pub use crate;