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    pub use crate::radio::event::RadioOutcome;
26    pub use crate::slider::event::SliderOutcome;
27    pub use crate::tabbed::event::TabbedOutcome;
28    pub use rat_ftable::event::{DoubleClickOutcome, EditOutcome, TableOutcome};
29    pub use rat_menu::event::MenuOutcome;
30    pub use rat_popup::event::PopupOutcome;
31    pub use rat_scrolled::event::ScrollOutcome;
32    pub use rat_text::event::{ReadOnly, TextOutcome};
33}
34
35/// Module for focus-handling functionality.
36/// See [rat-focus](https://docs.rs/rat-focus)
37pub mod focus {
38    pub use rat_focus::{
39        Focus, FocusBuilder, FocusFlag, HasFocus, Navigation, handle_focus, impl_has_focus,
40        match_focus, on_gained, on_lost,
41    };
42}
43
44/// Layout calculations apart from ratatui/Layout.
45pub mod layout;
46
47/// Trait for relocatable widgets.
48/// See also [rat-reloc](https://docs.rs/rat-reloc/latest/rat_reloc/)
49pub mod reloc {
50    pub use rat_reloc::{
51        RelocatableState, impl_relocatable_state, relocate_area, relocate_areas, relocate_position,
52        relocate_positions,
53    };
54}
55
56/// Scroll attribute and event-handling.
57/// See [rat-scrolled](https://docs.rs/rat-scrolled/latest/rat_scrolled/)
58pub mod scrolled {
59    pub use rat_scrolled::{
60        SCROLLBAR_DOUBLE_HORIZONTAL, SCROLLBAR_DOUBLE_VERTICAL, SCROLLBAR_HORIZONTAL,
61        SCROLLBAR_VERTICAL, Scroll, ScrollArea, ScrollAreaState, ScrollState, ScrollStyle,
62        ScrollSymbols, ScrollbarPolicy,
63    };
64}
65
66/// Text editing core functionality and utilities.
67pub mod text {
68    pub use rat_text::clipboard;
69    pub use rat_text::core;
70    pub use rat_text::undo_buffer;
71    pub use rat_text::{
72        Cursor, Grapheme, HasScreenCursor, Locale, TextError, TextFocusGained, TextFocusLost,
73        TextPosition, TextRange, TextStyle, impl_screen_cursor, ipos_type, screen_cursor,
74        upos_type,
75    };
76}
77
78// --- widget modules here --- (alphabetical)
79
80pub mod button;
81pub mod calendar;
82pub mod checkbox;
83pub mod choice;
84pub mod clipper;
85pub mod date_input;
86pub mod file_dialog;
87pub mod form;
88pub mod hover;
89pub mod line_number;
90pub mod list;
91pub mod menu;
92pub mod msgdialog;
93pub mod number_input;
94pub mod paired;
95pub mod paragraph;
96pub mod popup;
97pub mod radio;
98pub mod range_op;
99pub mod shadow;
100pub mod slider;
101pub mod splitter;
102pub mod statusline;
103pub mod statusline_stacked;
104pub mod tabbed;
105pub mod table;
106pub mod text_input;
107pub mod text_input_mask;
108pub mod textarea;
109pub mod util;
110pub mod view;
111
112mod _private {
113    #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
114    pub struct NonExhaustive;
115}