.cargo/
crates/
brain/
diff/
files/
highlight/
repo/
signals/
tui/
tui-core/
src/
ansi/
aligned.rs
2.3 KiB
ansi.rs
2.3 KiB
app.rs
4.2 KiB
backend.rs
3.9 KiB
border.rs
6.5 KiB
buffer.rs
20.6 KiB
cell.rs
7.2 KiB
colors.rs
4.2 KiB
event.rs
3.4 KiB
frame.rs
3.7 KiB
hstack.rs
6.5 KiB
label.rs
5.5 KiB
layout.rs
11.2 KiB
lib.rs
2.4 KiB
primitive.rs
19.4 KiB
table.rs
23.5 KiB
terminal.rs
5.2 KiB
text.rs
3.0 KiB
textarea.rs
6.4 KiB
vstack.rs
16.4 KiB
widget.rs
11.0 KiB
Cargo.toml
298 B
README.md
521 B
tui-termion/
tui-widgets/
scripts/
src/
.gitignore
30 B
.gitsigners
198 B
AGENTS.md
1.9 KiB
CONTRIBUTING
1.7 KiB
Cargo.lock
5.4 KiB
Cargo.toml
1.9 KiB
LICENSE
1.1 KiB
README.md
245 B
STYLE
3.7 KiB
clippy.toml
213 B
crates/tui-core/src/lib.rs
raw
| 1 | //! Core primitives for the `rustik_tui` facade crate. |
| 2 | //! |
| 3 | //! The core keeps terminal I/O at the edge: applications own their state, |
| 4 | //! render into a reusable [`Buffer`], and flush through a narrow backend. |
| 5 | //! Widgets are plain values that measure themselves with [`Constraint`] and |
| 6 | //! write styled [`Cell`] values into the frame buffer. |
| 7 | //! |
| 8 | //! Styled text moves through three layers: |
| 9 | //! |
| 10 | //! - [`Paint<T>`](Paint) attaches a [`Style`] to any display value. |
| 11 | //! - [`Label`] is one cleaned, single-line styled text run used by [`Line`]. |
| 12 | //! - [`Cell`] is the final buffer unit: one terminal glyph plus its style. |
| 13 | //! |
| 14 | #![deny(unsafe_code)] |
| 15 | #![warn(missing_docs)] |
| 16 | #![warn(clippy::unwrap_used)] |
| 17 | |
| 18 | /// Widget alignment wrappers. |
| 19 | pub mod aligned; |
| 20 | /// ANSI color and style primitives. |
| 21 | pub mod ansi; |
| 22 | /// Application update and render traits. |
| 23 | pub mod app; |
| 24 | /// Terminal backends. |
| 25 | pub mod backend; |
| 26 | /// Shared border drawing primitives. |
| 27 | pub mod border; |
| 28 | /// Cell buffer and dirty-run diffing. |
| 29 | pub mod buffer; |
| 30 | /// Table cell sizing and padding support. |
| 31 | pub mod cell; |
| 32 | /// Shared terminal color palette. |
| 33 | pub mod colors; |
| 34 | /// Typed terminal events. |
| 35 | pub mod event; |
| 36 | /// Frame passed into application render calls. |
| 37 | pub mod frame; |
| 38 | /// Horizontal layout container. |
| 39 | pub mod hstack; |
| 40 | /// Text label widget. |
| 41 | pub mod label; |
| 42 | /// Strongly typed terminal layout primitives. |
| 43 | pub mod layout; |
| 44 | /// Core line and sizing primitives. |
| 45 | pub mod primitive; |
| 46 | /// Column-aligned table widget. |
| 47 | pub mod table; |
| 48 | /// Double-buffered terminal renderer. |
| 49 | pub mod terminal; |
| 50 | /// Styled text constructors. |
| 51 | pub mod text; |
| 52 | /// Wrapped text area widget. |
| 53 | pub mod textarea; |
| 54 | /// Vertical layout container. |
| 55 | pub mod vstack; |
| 56 | /// Immediate-mode widgets. |
| 57 | pub mod widget; |
| 58 | |
| 59 | pub use aligned::{Align, Aligned}; |
| 60 | pub use ansi::Color; |
| 61 | pub use ansi::{Filled, Paint, PaintMode, Painted, Style, paint}; |
| 62 | pub use app::{App, Control, drive}; |
| 63 | pub use backend::{Backend, TestBackend}; |
| 64 | pub use border::{Border, BorderChars}; |
| 65 | pub use buffer::{Buffer, Cell}; |
| 66 | pub use cell::Text; |
| 67 | pub use event::{Event, Key, Modifiers, Mouse, MouseButton}; |
| 68 | pub use frame::Frame; |
| 69 | pub use hstack::HStack; |
| 70 | pub use label::{Label, label}; |
| 71 | pub use layout::{Direction, Length, Point, Rect}; |
| 72 | pub use primitive::{Constraint, Line, Size, StyledLine}; |
| 73 | pub use table::{Column, Table, TableOptions}; |
| 74 | pub use terminal::Terminal; |
| 75 | pub use textarea::{TextArea, textarea}; |
| 76 | pub use vstack::{VStack, VStackOptions}; |
| 77 | pub use widget::{Block, Clear, Fill, RenderResult, StatefulWidget, Widget}; |