minui 0.4.0

A minimalist Rust framework for TUIs and terminal games.
Documentation
//! # Table Widgets
//!
//! A comprehensive suite of table widgets for displaying, organizing, and interacting with
//! structured data in terminal applications. This module provides multiple table variants
//! ranging from simple data display to advanced interactive tables with sorting, filtering,
//! pagination, and in-place editing capabilities.
//!
//! ## Features (Planned)
//!
//! - **Multiple table types**: Basic, advanced, hierarchical, and editable variants
//! - **Flexible column system**: Configurable widths, alignment, and styling
//! - **Data source flexibility**: Support for various data types and formats
//! - **Interactive sorting**: Multi-column sorting with visual indicators
//! - **Advanced filtering**: Built-in and custom filter functions
//! - **Pagination support**: Handle large datasets efficiently
//! - **Selection system**: Row, column, and cell selection modes
//! - **Scrolling capabilities**: Smooth horizontal and vertical navigation
//! - **Custom formatting**: Cell-level renderers and formatters
//! - **Keyboard navigation**: Full keyboard accessibility
//!
//! ## Widget Types
//!
//! ### Table
//! The foundational table widget for displaying structured data in rows and columns.
//! Provides basic functionality with customizable borders, headers, and cell formatting.
//! Perfect for simple data presentation needs.
//!
//! ### DataTable
//! An advanced table widget with interactive features including sorting, filtering,
//! and pagination. Designed for applications that need to display and manipulate
//! large datasets with user interaction capabilities.
//!
//! ### TreeTable
//! A hierarchical table widget supporting expandable and collapsible rows.
//! Ideal for displaying nested data structures like file systems, organizational
//! charts, or any tree-structured information.
//!
//! ### EditableTable
//! A fully interactive table widget with in-place editing capabilities.
//! Users can modify cell contents directly within the table interface,
//! making it perfect for data entry and spreadsheet-like applications.
//!
//! ## Visual Structure
//!
//! ```text
//! ┌─────────┬─────┬─────────────────────┐
//! │ Name    │ Age │ Email               │  ← Header row
//! ├─────────┼─────┼─────────────────────┤
//! │ Alice   │  25 │ alice@example.com   │  ← Data rows
//! │ Bob     │  30 │ bob@example.com     │
//! │ Charlie │  35 │ charlie@example.com │
//! └─────────┴─────┴─────────────────────┘
//! ```
//!
//! ## Future API Design
//!
//! The table widgets will provide an intuitive, builder-pattern API:
//!
//! ```rust,ignore
//! use minui::{Table, Column, Alignment, Color, Widget};
//!
//! // Basic table setup
//! let table = Table::new(60, 20)
//!     .with_columns([
//!         Column::new("Name").with_width(20).with_alignment(Alignment::Left),
//!         Column::new("Age").with_width(5).with_alignment(Alignment::Right),
//!         Column::new("Email").with_width(30).with_alignment(Alignment::Left),
//!     ])
//!     .with_data([
//!         ["Alice", "25", "alice@example.com"],
//!         ["Bob", "30", "bob@example.com"],
//!         ["Charlie", "35", "charlie@example.com"],
//!     ])
//!     .with_header(true)
//!     .with_borders(true);
//! ```
//!
//! ## Advanced Features
//!
//! ```rust,ignore
//! use minui::{DataTable, SortOrder, FilterFunction};
//!
//! // Advanced table with interactive features
//! let data_table = DataTable::new(80, 25)
//!     .with_sortable_columns(true)
//!     .with_pagination(10) // 10 rows per page
//!     .with_filter(FilterFunction::contains("search_term"))
//!     .with_selection_mode(SelectionMode::Row)
//!     .with_header_style(Color::Blue.into())
//!     .with_alternate_row_colors(true);
//! ```
//!
//! ## Hierarchical Data Display
//!
//! ```rust,ignore
//! use minui::{TreeTable, TreeNode};
//!
//! // Tree table for nested data
//! let tree_table = TreeTable::new(60, 20)
//!     .with_root_nodes([
//!         TreeNode::new("Root 1")
//!             .with_children([
//!                 TreeNode::new("Child 1.1"),
//!                 TreeNode::new("Child 1.2"),
//!             ]),
//!         TreeNode::new("Root 2")
//!             .with_children([
//!                 TreeNode::new("Child 2.1"),
//!             ]),
//!     ])
//!     .with_expand_collapse_indicator(true)
//!     .with_indentation(2);
//! ```
//!
//! ## Event Handling
//!
//! ```rust,ignore
//! // Table interaction handling
//! match event {
//!     Event::KeyUp => table.previous_row(),
//!     Event::KeyDown => table.next_row(),
//!     Event::Enter => {
//!         if let Some(selected_row) = table.selected_row() {
//!             println!("Selected: {:?}", selected_row);
//!         }
//!     }
//!     _ => {}
//! }
//! ```
//!
//! ## Advanced Features
//!
//! ```rust,ignore
//! use minui::widgets::DataTable;
//!
//! let data_table = DataTable::new(0, 0, 80, 20)
//!     .with_data_source(my_database_query)
//!     .with_pagination(50) // 50 rows per page
//!     .with_filter_bar(true)
//!     .with_column_resizing(true)
//!     .with_export_options(["CSV", "JSON"])
//!     .with_cell_formatter("price", |value| format!("${:.2}", value));
//! ```
//!
//! ## Implementation Status
//!
//! Table widgets are not yet implemented. The current focus is on basic widgets
//! and core functionality. Table widgets will be added in a future release.

// TODO: Implement table widgets for structured data display
// This will include basic tables, data tables with sorting/filtering, and tree tables