rat_widget/
lib.rs

1#![doc = include_str!("../readme.md")]
2//
3#![allow(clippy::collapsible_else_if)]
4#![allow(clippy::collapsible_if)]
5#![allow(clippy::if_same_then_else)]
6#![allow(clippy::clone_on_copy)]
7#![allow(clippy::assigning_clones)]
8#![allow(clippy::question_mark)]
9#![allow(clippy::uninlined_format_args)]
10
11pub mod event {
12    //!
13    //! Event-handler traits and Keybindings.
14    //!
15    //! See [rat-event](https://docs.rs/rat-event/latest/rat_event/)
16    //!
17    pub use rat_event::*;
18
19    pub use crate::button::event::ButtonOutcome;
20    pub use crate::calendar::event::CalOutcome;
21    pub use crate::checkbox::event::CheckOutcome;
22    pub use crate::choice::event::ChoiceOutcome;
23    pub use crate::file_dialog::event::FileOutcome;
24    pub use crate::form::event::FormOutcome;
25    #[allow(deprecated)]
26    pub use crate::pager::event::PagerOutcome;
27    pub use crate::radio::event::RadioOutcome;
28    pub use crate::slider::event::SliderOutcome;
29    pub use crate::tabbed::event::TabbedOutcome;
30    pub use rat_ftable::event::{DoubleClickOutcome, EditOutcome, TableOutcome};
31    pub use rat_menu::event::MenuOutcome;
32    pub use rat_popup::event::PopupOutcome;
33    pub use rat_scrolled::event::ScrollOutcome;
34    pub use rat_text::event::{ReadOnly, TextOutcome};
35}
36
37/// Module for focus-handling functionality.
38/// See [rat-focus](https://docs.rs/rat-focus)
39pub mod focus {
40    pub use rat_focus::{
41        Focus, FocusBuilder, FocusFlag, HasFocus, Navigation, handle_focus, impl_has_focus,
42        match_focus, on_gained, on_lost,
43    };
44}
45
46/// Layout calculations apart from ratatui/Layout.
47pub mod layout;
48
49/// Trait for relocatable widgets.
50/// See also [rat-reloc](https://docs.rs/rat-reloc/latest/rat_reloc/)
51pub mod reloc {
52    pub use rat_reloc::{
53        RelocatableState, impl_relocatable_state, relocate_area, relocate_areas, relocate_position,
54        relocate_positions,
55    };
56}
57
58/// Scroll attribute and event-handling.
59/// See [rat-scrolled](https://docs.rs/rat-scrolled/latest/rat_scrolled/)
60pub mod scrolled {
61    pub use rat_scrolled::{
62        SCROLLBAR_DOUBLE_HORIZONTAL, SCROLLBAR_DOUBLE_VERTICAL, SCROLLBAR_HORIZONTAL,
63        SCROLLBAR_VERTICAL, Scroll, ScrollArea, ScrollAreaState, ScrollState, ScrollStyle,
64        ScrollSymbols, ScrollbarPolicy,
65    };
66}
67
68/// Text editing core functionality and utilities.
69pub mod text {
70    #[allow(deprecated)]
71    pub use rat_text::Glyph;
72    pub use rat_text::clipboard;
73    pub use rat_text::core;
74    pub use rat_text::undo_buffer;
75    pub use rat_text::{
76        Cursor, Grapheme, HasScreenCursor, Locale, TextError, TextFocusGained, TextFocusLost,
77        TextPosition, TextRange, TextStyle, impl_screen_cursor, ipos_type, screen_cursor,
78        upos_type,
79    };
80}
81
82// --- widget modules here --- (alphabetical)
83
84pub mod button;
85pub mod calendar;
86pub mod checkbox;
87pub mod choice;
88pub mod clipper;
89pub mod date_input;
90pub mod file_dialog;
91pub mod form;
92pub mod hover;
93pub mod line_number;
94pub mod list;
95pub mod menu;
96pub mod msgdialog;
97pub mod number_input;
98#[deprecated(since = "1.2.0", note = "merged into form::Form")]
99pub mod pager;
100pub mod paired;
101pub mod paragraph;
102pub mod popup;
103pub mod radio;
104pub mod range_op;
105pub mod shadow;
106pub mod slider;
107pub mod splitter;
108pub mod statusline;
109pub mod tabbed;
110pub mod table;
111pub mod text_input;
112pub mod text_input_mask;
113pub mod textarea;
114pub mod util;
115pub mod view;
116
117mod _private {
118    #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
119    pub struct NonExhaustive;
120}