Skip to main content

kas_widgets/
lib.rs

1// Licensed under the Apache License, Version 2.0 (the "License");
2// you may not use this file except in compliance with the License.
3// You may obtain a copy of the License in the LICENSE-APACHE file or at:
4//     https://www.apache.org/licenses/LICENSE-2.0
5
6//! KAS widget library
7//!
8//! ## Complex widgets
9//!
10//! -   [`EventConfig`] provides an editor for event configuration
11//! -   [`TitleBar`] is a window title-bar (including buttons)
12//! -   [`TitleBarButtons`] is the standard minimize/maximize/close button cluster on a title-bar
13//!
14//! ## Sub-modules
15//!
16//! -   [`adapt`] provides [`Adapt`], [`AdaptWidget`], [`AdaptWidgetAny`] and supporting items
17//!     (the items mentioned are re-export here).
18//! -   [`dialog`] provides [`MessageBox`](dialog::MessageBox), ...
19//! -   [`edit`] provides text-editing functionality; the [`EditBox`] and [`EditField`] widgets are re-export here
20//! -   [`menu`] provides a [`MenuBar`](menu::MenuBar), [`SubMenu`](menu::SubMenu), ...
21//!
22//! ## Container widgets
23//!
24//! -   [`Frame`]: a frame around content
25//! -   [`ClipRegion`], [`ScrollRegion`]: larger on the inside
26//! -   [`Stack`], [`TabStack`]: a stack of widgets in the same rect
27//! -   [`List`]: a row / column of children
28//! -   [`Splitter`]: like [`List`] but with resizing handles
29//! -   [`Grid`]: a container using grid layout
30//!
31//! ## Controls
32//!
33//! -   [`Button`], [`MarkButton`]: button widgets
34//! -   [`CheckBox`], [`CheckButton`]: checkable boxes
35//! -   [`RadioBox`], [`RadioButton`]: linked checkable boxes
36//! -   [`ComboBox`]: a drop-down menu over a list
37//! -   [`ScrollBar`]: a scroll bar
38//!     bars around an inner widget
39//! -   [`Slider`]: a slider
40//! -   [`SpinBox`]: numeric entry
41//!
42//! ## Displays
43//!
44//! -   [`Filler`]: an empty widget, sometimes used to fill space
45//! -   [`Label`], [`AccessLabel`]: are static text labels
46//! -   [`Text`]: a dynamic (input-data derived) text label
47//! -   [`Mark`]: a small mark
48//! -   [`ScrollLabel`]: static text label supporting scrolling and selection
49//! -   [`ScrollText`]: dynamic text label supporting scrolling and selection
50//! -   [`Separator`]: a visible bar to separate things
51//! -   [`format_text`] and [`format_label`] are constructors for [`Text`],
52//!     displaying a text label derived from input data
53//! -   [`ProgressBar`]: show completion level
54//!
55//! ## Components
56//!
57//! -   [`AccessLabel`]: a label which parses access keys
58//! -   [`GripPart`]: a handle (e.g. for a slider, splitter or scroll_bar)
59
60pub mod adapt;
61#[doc(no_inline)]
62pub use adapt::{Adapt, AdaptWidget, AdaptWidgetAny};
63
64mod access_label;
65mod button;
66mod check_box;
67mod combobox;
68pub mod dialog;
69pub mod edit;
70mod event_config;
71mod filler;
72mod float;
73mod flow;
74mod frame;
75mod grid;
76mod grip;
77mod list;
78pub mod menu;
79mod progress;
80mod radio_box;
81mod scroll;
82mod scroll_bar;
83mod scroll_label;
84mod separator;
85mod slider;
86mod spin_box;
87mod splitter;
88mod stack;
89mod tab_stack;
90mod text;
91
92#[doc(inline)] pub use kas::widgets::*;
93
94pub use access_label::AccessLabel;
95pub use button::Button;
96pub use check_box::{CheckBox, CheckButton};
97pub use combobox::ComboBox;
98pub use edit::{EditBox, EditField};
99pub use event_config::EventConfig;
100pub use filler::Filler;
101pub use float::Float;
102pub use flow::Flow;
103pub use frame::Frame;
104pub use grid::Grid;
105pub use grip::{GripMsg, GripPart};
106pub use list::*;
107pub use progress::ProgressBar;
108pub use radio_box::{RadioBox, RadioButton};
109pub use scroll::{ClipRegion, ScrollRegion};
110pub use scroll_bar::{ScrollBar, ScrollBarMode, ScrollBarMsg};
111pub use scroll_label::{ScrollLabel, ScrollText, SelectableLabel, SelectableText};
112pub use separator::Separator;
113pub use slider::{Slider, SliderValue};
114pub use spin_box::{SpinBox, SpinValue};
115pub use splitter::Splitter;
116pub use stack::{Page, Stack};
117pub use tab_stack::{BoxTabStack, Tab, TabStack};
118pub use text::Text;