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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
//! # MinUI - A Minimal Terminal UI Framework
//!
//! MinUI is a lightweight, flexible terminal user interface framework for Rust applications.
//! It provides essential building blocks for creating both traditional TUI applications
//! and terminal-based games with a simple, intuitive API.
//!
//! ## Key Features
//!
//! - **Dual-mode Operation**: Supports both event-driven TUI mode and fixed-tick game mode
//! - **Flexible Widget System**: Extensible widget architecture with built-in components
//! - **Color Support**: Rich color handling with RGB, ANSI, and named color support
//! - **Input Handling**: Comprehensive keyboard and mouse input processing
//! - **Game Development**: Built-in support for sprites, tiles, collision detection, and game loops
//! - **Cross-platform**: Works on Windows, macOS, and Linux terminals
//!
//! ## Quick Start
//!
//! ```rust
//! use minui::prelude::*;
//!
//! // Create a simple TUI application
//! let mut app = App::new(())?
//! .with_tick_rate(std::time::Duration::from_millis(16));
//!
//! app.run(
//! |_state, event| {
//! // Handle events - return false to exit
//! !matches!(event, Event::Character('q'))
//! },
//! |_state, window| {
//! // Draw UI
//! let label = Label::new("Hello, MinUI!", 0, 0);
//! let _ = label.draw(window);
//! }
//! )?;
//! # Ok::<(), minui::Error>(())
//! ```
//!
//! ## Architecture
//!
//! MinUI is organized into several key modules:
//!
//! - [`app`] - Application runner and main loop management
//! - [`widgets`] - UI components like labels, panels, and containers
//! - [`color`] - Color handling and terminal styling
//! - [`input`] - Keyboard and mouse input processing
//! - [`render`] - Low-level rendering and buffering
//! - [`game`] - Game development utilities (sprites, tiles, collision)
//! - [`window`] - Terminal window management
//!
//! ## Examples
//!
//! The `examples/` directory contains comprehensive examples showing:
//! - Basic widget usage
//! - Color and styling
//! - Game development patterns
//! - Custom widget implementation
//!
//! Run examples with: `cargo run --example basic_usage`
// Core types
pub use App;
pub use ;
pub use ;
pub use ;
pub use ;
// Input handling
pub use KeyboardHandler;
// Widget system
pub use ;
/// Convenience re-exports for common patterns.
///
/// This module provides a curated set of the most commonly used types and traits
/// from across the MinUI crate. Import this module to get started quickly:
///
/// ```rust
/// use minui::prelude::*;
///
/// // Now you can use common types directly:
/// let label = Label::new("Hello", 0, 0);
/// let color = Color::rgb(255, 0, 0);
/// let app = App::new(my_state)?;
/// # Ok::<(), minui::Error>(())
/// ```
///
/// ## Included Types
///
/// - **Core**: [`App`], [`Result`], [`Error`]
/// - **Events**: [`Event`]
/// - **Colors**: [`Color`], [`ColorPair`]
/// - **Widgets**: [`Widget`], [`Label`], [`Panel`], [`Container`], [`TextBlock`]
/// - **Layout**: [`Alignment`], [`VerticalAlignment`], [`BorderChars`]
/// - **Window**: [`Window`], [`TerminalWindow`]
/// - **Input**: [`KeyboardHandler`]