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
49
50
51
52
53
//! Widget System: Composable UI components for terminal applications.
//!
//! This module provides a collection of widgets that implement the [`Widget`] trait,
//! allowing them to be composed into complex layouts and rendered to the terminal.
//!
//! # Available Widgets
//!
//! - [`StreamWidget`] - Scrolling text viewport for streaming content (LLM output)
//! - [`TextInput`] - Single-line text input with cursor
//! - [`StatusBar`] - Three-section status bar (left, center, right)
//! - [`ProgressBar`] - Horizontal progress indicator
//!
//! # Widget Trait
//!
//! All widgets implement the [`Widget`] trait, which provides:
//! - `bounds()` / `set_bounds()` - Layout management
//! - `render(&mut Buffer)` - Draw to the buffer
//! - `handle_input(&InputEvent) -> bool` - Input handling
//! - `needs_redraw()` / `clear_redraw()` - Dirty tracking
//!
//! # Example
//!
//! ```rust,ignore
//! use flywheel::widget::{Widget, TextInput, StatusBar};
//! use flywheel::Rect;
//!
//! let mut input = TextInput::new(Rect::new(0, 23, 80, 1));
//! let mut status = StatusBar::new(Rect::new(0, 0, 80, 1));
//!
//! status.set_all("Flywheel", "v0.1.0", "60 FPS");
//! input.set_content("Hello, world!");
//!
//! // Render both widgets
//! input.render(buffer);
//! status.render(buffer);
//! ```
pub use Widget;
pub use ;
pub use ScrollBuffer;
pub use ;
pub use ;
pub use ;
pub use Terminal;