line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FBP::Window; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=pod |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
FBP::Window - Base class for all graphical wxWindow objects |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=cut |
10
|
|
|
|
|
|
|
|
11
|
4
|
|
|
4
|
|
2125
|
use Mouse; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
28
|
|
12
|
4
|
|
|
4
|
|
1023
|
use Scalar::Util (); |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
2599
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '0.41'; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
extends 'FBP::Object'; |
17
|
|
|
|
|
|
|
with 'FBP::KeyEvent'; |
18
|
|
|
|
|
|
|
with 'FBP::MouseEvent'; |
19
|
|
|
|
|
|
|
with 'FBP::FocusEvent'; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
###################################################################### |
26
|
|
|
|
|
|
|
# Direct Properties |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=pod |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head2 id |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
The C method returns the numeric wxWidgets identifier for the window. |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=cut |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
has id => ( |
37
|
|
|
|
|
|
|
is => 'ro', |
38
|
|
|
|
|
|
|
isa => 'Str', |
39
|
|
|
|
|
|
|
); |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=pod |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head2 name |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
The C method returns the logical name of the object. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=cut |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
has name => ( |
50
|
|
|
|
|
|
|
is => 'ro', |
51
|
|
|
|
|
|
|
isa => 'Str', |
52
|
|
|
|
|
|
|
); |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=pod |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head2 enabled |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
The C method indicates if the object is enabled or not. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=cut |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
has enabled => ( |
63
|
|
|
|
|
|
|
is => 'ro', |
64
|
|
|
|
|
|
|
isa => 'Bool', |
65
|
|
|
|
|
|
|
); |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=pod |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head2 hidden |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
The C method indicates if the object is true if the shown is removed |
72
|
|
|
|
|
|
|
from view, or false if the window is shown. |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=cut |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
has hidden => ( |
77
|
|
|
|
|
|
|
is => 'ro', |
78
|
|
|
|
|
|
|
isa => 'Bool', |
79
|
|
|
|
|
|
|
); |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=pod |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head2 subclass |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
The C method returns the literal C-style 'subclass' property |
86
|
|
|
|
|
|
|
produced by wxFormBuilder. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
The format of this raw version is 'ClassName;headerfile.h'. |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=cut |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
has subclass => ( |
93
|
|
|
|
|
|
|
is => 'ro', |
94
|
|
|
|
|
|
|
isa => 'Str', |
95
|
|
|
|
|
|
|
required => 1, |
96
|
|
|
|
|
|
|
default => '', |
97
|
|
|
|
|
|
|
); |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=pod |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head2 pos |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
The C method returns the position of the window. |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=cut |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
has pos => ( |
108
|
|
|
|
|
|
|
is => 'ro', |
109
|
|
|
|
|
|
|
isa => 'Str', |
110
|
|
|
|
|
|
|
); |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=pod |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head2 size |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
The C method returns the size of the window, if it has a specific |
117
|
|
|
|
|
|
|
strict size. |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=cut |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
has size => ( |
122
|
|
|
|
|
|
|
is => 'ro', |
123
|
|
|
|
|
|
|
isa => 'Str', |
124
|
|
|
|
|
|
|
); |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=pod |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=head2 fg |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
The C method returns a colour string for any custom foreground colour |
131
|
|
|
|
|
|
|
that should be applied to the window. |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=cut |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
has fg => ( |
136
|
|
|
|
|
|
|
is => 'ro', |
137
|
|
|
|
|
|
|
isa => 'Str', |
138
|
|
|
|
|
|
|
); |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=pod |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=head2 bg |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
The C method returns a colour string for any custom background colour |
145
|
|
|
|
|
|
|
that should be applied to the window. |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=cut |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
has bg => ( |
150
|
|
|
|
|
|
|
is => 'ro', |
151
|
|
|
|
|
|
|
isa => 'Str', |
152
|
|
|
|
|
|
|
); |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
=pod |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
=head2 font |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
The C method returns a string containing a comma-separated list of |
159
|
|
|
|
|
|
|
wxFont constructor params if the wxWindow uses a custom font, or null if it |
160
|
|
|
|
|
|
|
uses the default system font. |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
=cut |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
has font => ( |
165
|
|
|
|
|
|
|
is => 'ro', |
166
|
|
|
|
|
|
|
isa => 'Str', |
167
|
|
|
|
|
|
|
); |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
=pod |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
=head2 tooltip |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
The C method returns a tooltip string for the window, if it has one. |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
=cut |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
has tooltip => ( |
178
|
|
|
|
|
|
|
is => 'ro', |
179
|
|
|
|
|
|
|
isa => 'Str', |
180
|
|
|
|
|
|
|
); |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=pod |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
=head2 window_style |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
The C method returns a set of Wx style flags that are common |
187
|
|
|
|
|
|
|
to all window types. |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
=cut |
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
has window_style => ( |
192
|
|
|
|
|
|
|
is => 'ro', |
193
|
|
|
|
|
|
|
isa => 'Str', |
194
|
|
|
|
|
|
|
); |
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
=pod |
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
=head2 minimum_size |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
The C method returns a comma-separated pair of integers |
201
|
|
|
|
|
|
|
representing the minimum size for the window, or a zero-length string |
202
|
|
|
|
|
|
|
if no minimum size is defined. |
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
=cut |
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
has minimum_size => ( |
207
|
|
|
|
|
|
|
is => 'ro', |
208
|
|
|
|
|
|
|
isa => 'Str', |
209
|
|
|
|
|
|
|
); |
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
=pod |
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
=head2 maximum_size |
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
The C method returns a comma-separated pair of integers |
216
|
|
|
|
|
|
|
representing the maximum size for the window, or a zero-length string |
217
|
|
|
|
|
|
|
if no minimum size is defined. |
218
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
=cut |
220
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
has maximum_size => ( |
222
|
|
|
|
|
|
|
is => 'ro', |
223
|
|
|
|
|
|
|
isa => 'Str', |
224
|
|
|
|
|
|
|
); |
225
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
###################################################################### |
231
|
|
|
|
|
|
|
# Derived Values |
232
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
=pod |
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
=head2 styles |
236
|
|
|
|
|
|
|
|
237
|
|
|
|
|
|
|
The C method returns the merged set of all constructor style flags |
238
|
|
|
|
|
|
|
for the object. |
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
You should generally call this method if you are writing code generators, |
241
|
|
|
|
|
|
|
rather than calling C |