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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
//! Events for windows and modal windows
//!
//! This module contains the traits and methods for handling events from windows and modal windows.
//!
//! It includes traits for handling events from windows and modal windows, such as:
//! - WindowEvents
//! - ModalWindowEvents
//! - ToolBarEvents
use ;
use crate::;
// Window events always go to the same window that triggers them --> we don't need a handle as
// we already have &mut self
/// Trait for handling events from toolbar items.
///
/// This trait allows windows to receive and process events from toolbar items such as buttons,
/// checkboxes, and single choice items. When a user interacts with a toolbar item, the
/// corresponding method on this trait is called.
///
/// To use this trait, you need to:
/// 1. Include it in your Window or ModalWindow attributes with `#[Window(events = ToolBarEvents)]`
/// 2. Implement the trait methods for your window to handle toolbar item events
/// 3. Return `EventProcessStatus::Processed` if you've handled the event, or `EventProcessStatus::Ignored` otherwise
///
/// All methods have default implementations that return `EventProcessStatus::Ignored`, so you
/// only need to implement the methods for the toolbar items you're using.
/// Trait for managing modal window lifecycles and results.
///
/// This trait defines methods for showing, exiting, and returning results from modal windows.
/// Modal windows capture the entire focus during their existence and can return a result when closed.
///
/// The type parameter `T` represents the result type that the modal window will return.
///
/// When implementing a modal window, this trait is automatically implemented by the `#[ModalWindow]` macro,
/// so you typically don't need to implement it manually.
// #[derive(Copy, Clone)]
// pub(crate) enum EventData {
// }