crates/tui-widgets/src/lib.rs 1.6 KiB raw
1
//! Higher-level widgets built on the core `rustik_tui_core` crate.
2
//!
3
//! This crate contains stateful and composite widgets that depend on the core
4
//! rendering primitives from `rustik_tui_core`: badges, selectable lists,
5
//! overlays, vertical scrolling, and scrollbar rendering. Keeping them
6
//! separate leaves the core crate focused on buffers, styled text, layout,
7
//! app/runtime traits, and small layout widgets.
8
//!
9
#![deny(unsafe_code)]
10
#![warn(missing_docs)]
11
#![warn(clippy::unwrap_used)]
12
13
/// One-line action hint bar.
14
pub mod action_bar;
15
/// Compact text badge widget.
16
pub mod badge;
17
/// Centered modal dialog widget.
18
pub mod dialog;
19
/// Editable text input widget.
20
pub mod input;
21
/// Selectable list widget.
22
pub mod list;
23
/// Centered overlay widget.
24
pub mod overlay;
25
/// Shared-border multi-panel layout.
26
pub mod panel;
27
/// Scrollbar rendering.
28
pub mod scrollbar;
29
/// Scrollable line widget.
30
pub mod scrollview;
31
/// Generic tree widget.
32
pub mod tree;
33
/// Scroll viewport primitives.
34
pub mod viewport;
35
36
pub use action_bar::{ActionBar, ActionItem, ActionList};
37
pub use badge::Badge;
38
pub use dialog::{DEFAULT_DIALOG_MARGIN, DEFAULT_DIALOG_MAX_SIZE, Dialog, DialogKind};
39
pub use input::{TextField, TextInput};
40
pub use list::{List, ListState, Selection};
41
pub use overlay::{Overlay, overlay_area};
42
pub use panel::Panel;
43
pub use scrollbar::{Scrollbar, ScrollbarStyle};
44
pub use scrollview::{ScrollLayout, ScrollMetrics, ScrollView, VirtualScrollView, scroll_layout};
45
pub use tree::{
46
    Tree, TreeHit, TreeHitZone, TreeModel, TreeNodeKind, TreeNodeState, TreeRow, TreeState,
47
    TreeStyle, TreeVisibleRow,
48
};
49
pub use viewport::{Placement, Scroll, View, Viewport};