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
// Copyright (c) 2022-2025 R3BL LLC. Licensed under Apache License, Version 2.0.
//! # Backend Implementation: Crossterm Terminal Library
//!
//! This module provides the **Crossterm-specific backend implementation** for the
//! rendering pipeline, containing Stage 5 executor code.
//!
//! ```text
//! [Stage 1: App/Component]
//! ↓
//! [Stage 2: Pipeline]
//! ↓
//! [Stage 3: Compositor]
//! ↓
//! [Stage 4: Backend Converter] ← Shared (in offscreen_buffer/paint_impl)
//! ↓
//! [Stage 5: Backend Executor] ← Crossterm implementation here
//! ↓
//! [Stage 6: Terminal]
//! ```
//!
//! > **For the complete 6-stage rendering pipeline with visual diagrams and stage
//! > reference table**, see the [rendering pipeline overview].
//!
//! [rendering pipeline overview]: mod@crate::terminal_lib_backends#rendering-pipeline-architecture
//!
//! ## Module Organization
//!
//! This module contains the **Crossterm-specific Stage 5 backend executor**
//! implementation.
//!
//! ### Stage 4: Backend Converter (Shared)
//! - **Not in this module** - Stage 4 is shared across all backends
//! - See [`offscreen_buffer::paint_impl`] for the `OffscreenBufferPaintImplCrossterm`
//! converter
//! - Converts [`OffscreenBuffer`] → [`RenderOpOutputVec`] (shared by both Crossterm and
//! `DirectToAnsi`)
//!
//! ### Stage 5: Backend Executor (`crossterm_paint_render_op_impl`)
//! - **Implemented in this module** - Crossterm-specific execution
//! - Implements [`RenderOpPaint`] trait
//! - Executes [`RenderOpOutputVec`] operations via Crossterm API
//! - Manages terminal modes (raw mode, cursor visibility, mouse tracking)
//! - Uses [`RenderOpsLocalData`] for state tracking (avoid redundant commands)
//! - Handles colors, cursor movement, and text output
//!
//! [`offscreen_buffer::paint_impl`]: mod@crate::tui::terminal_lib_backends::offscreen_buffer::paint_impl
//!
//! [`OffscreenBuffer`]: crate::OffscreenBuffer
//! [`RenderOpOutputVec`]: crate::RenderOpOutputVec
//! [`OffscreenBufferPaint`]: crate::OffscreenBufferPaint
//! [`RenderOpPaint`]: crate::RenderOpPaint
//! [`RenderOpsLocalData`]: crate::RenderOpsLocalData
// Attach.
// Re-export.
pub use *;
pub use *;
pub use *;