1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//! # Toolbar
//!
//! The toolbar module provides components for creating and managing toolbar elements in a window.
//!
//! A toolbar is an area over the margins of a window (top or bottom) where various interactive
//! and non-interactive controls reside. Toolbar items are simpler controls that convey their events
//! directly to the window via the `ToolBarEvents` trait.
//!
//! ## Toolbar Organization
//!
//! All toolbar items are organized into groups. A group is similar to a flow layout where
//! all toolbar items are aligned one after another, depending on the direction of the flow.
//! Toolbar items don't have a layout of themselves - their position is determined by the group
//! they belong to.
//!
//! Groups can be positioned in one of four locations:
//! - `TopLeft`: Items flow from left to right at the top of the window
//! - `BottomLeft`: Items flow from left to right at the bottom of the window
//! - `TopRight`: Items flow from right to left at the top of the window
//! - `BottomRight`: Items flow from right to left at the bottom of the window
//!
//! ## Toolbar Items
//!
//! The module provides several types of toolbar items:
//!
//! - `Button`: A clickable item that triggers actions when pressed
//! - `CheckBox`: A toggleable item with checked/unchecked states
//! - `Label`: A non-interactive item for displaying text
//! - `SingleChoice`: A selectable item where only one can be selected in a group
//!
//! ## Using Toolbars
//!
//! To add toolbar items to a window:
//!
//! 1. Create a group with `window.toolbar().create_group(GroupPosition::...)`
//! 2. Create toolbar items with their respective constructors
//! 3. Add items to the group with `window.toolbar().add(group, item)`
//! 4. Implement appropriate event handlers in your window
use ItemBase;
pub use ToolBarItem;
use AddToToolbar;
use PositionHelper;
use PaintData;
use SymbolAttrState;
pub use ToolBar;
pub use GroupPosition;
pub use Group;
// tool bar items (public)
pub use Label;
pub use Button;
pub use CheckBox;
pub use SingleChoice;
// tool bar items (internal)
pub use HotKey;
pub use Tag;
pub use CloseButton;
pub use MaximizeRestoreButton;
pub use ResizeGrip;