line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package FBP::Grid; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
20
|
use Mouse; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
24
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.41'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
extends 'FBP::Window'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
has rows => ( |
10
|
|
|
|
|
|
|
is => 'ro', |
11
|
|
|
|
|
|
|
isa => 'Int', |
12
|
|
|
|
|
|
|
); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
# Grid |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
has cols => ( |
17
|
|
|
|
|
|
|
is => 'ro', |
18
|
|
|
|
|
|
|
isa => 'Int', |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
has editing => ( |
22
|
|
|
|
|
|
|
is => 'ro', |
23
|
|
|
|
|
|
|
isa => 'Bool', |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
has grid_lines => ( |
27
|
|
|
|
|
|
|
is => 'ro', |
28
|
|
|
|
|
|
|
isa => 'Bool', |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
has grid_line_color => ( |
32
|
|
|
|
|
|
|
is => 'ro', |
33
|
|
|
|
|
|
|
isa => 'Str', |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
has drag_grid_size => ( |
37
|
|
|
|
|
|
|
is => 'ro', |
38
|
|
|
|
|
|
|
isa => 'Bool', |
39
|
|
|
|
|
|
|
); |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
has margin_width => ( |
42
|
|
|
|
|
|
|
is => 'ro', |
43
|
|
|
|
|
|
|
isa => 'Int', |
44
|
|
|
|
|
|
|
); |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
has margin_height => ( |
47
|
|
|
|
|
|
|
is => 'ro', |
48
|
|
|
|
|
|
|
isa => 'Int', |
49
|
|
|
|
|
|
|
); |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
# Columns |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
has column_sizes => ( |
54
|
|
|
|
|
|
|
is => 'ro', |
55
|
|
|
|
|
|
|
isa => 'Str', |
56
|
|
|
|
|
|
|
); |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
has autosize_cols => ( |
59
|
|
|
|
|
|
|
is => 'ro', |
60
|
|
|
|
|
|
|
isa => 'Bool', |
61
|
|
|
|
|
|
|
); |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
has drag_col_move => ( |
64
|
|
|
|
|
|
|
is => 'ro', |
65
|
|
|
|
|
|
|
isa => 'Bool', |
66
|
|
|
|
|
|
|
); |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
has drag_col_size => ( |
69
|
|
|
|
|
|
|
is => 'ro', |
70
|
|
|
|
|
|
|
isa => 'Bool', |
71
|
|
|
|
|
|
|
); |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
has col_label_size => ( |
74
|
|
|
|
|
|
|
is => 'ro', |
75
|
|
|
|
|
|
|
isa => 'Int', |
76
|
|
|
|
|
|
|
); |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
has col_label_values => ( |
79
|
|
|
|
|
|
|
is => 'ro', |
80
|
|
|
|
|
|
|
isa => 'Str', |
81
|
|
|
|
|
|
|
); |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
has col_label_horiz_alignment => ( |
84
|
|
|
|
|
|
|
is => 'ro', |
85
|
|
|
|
|
|
|
isa => 'Str', |
86
|
|
|
|
|
|
|
); |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
has col_label_vert_alignment => ( |
89
|
|
|
|
|
|
|
is => 'ro', |
90
|
|
|
|
|
|
|
isa => 'Str', |
91
|
|
|
|
|
|
|
); |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
# Rows |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
has row_sizes => ( |
96
|
|
|
|
|
|
|
is => 'ro', |
97
|
|
|
|
|
|
|
isa => 'Str', |
98
|
|
|
|
|
|
|
); |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
has autosize_rows => ( |
101
|
|
|
|
|
|
|
is => 'ro', |
102
|
|
|
|
|
|
|
isa => 'Bool', |
103
|
|
|
|
|
|
|
); |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
has drag_row_size => ( |
106
|
|
|
|
|
|
|
is => 'ro', |
107
|
|
|
|
|
|
|
isa => 'Bool', |
108
|
|
|
|
|
|
|
); |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
has row_label_size => ( |
111
|
|
|
|
|
|
|
is => 'ro', |
112
|
|
|
|
|
|
|
isa => 'Int', |
113
|
|
|
|
|
|
|
); |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
has row_label_values => ( |
116
|
|
|
|
|
|
|
is => 'ro', |
117
|
|
|
|
|
|
|
isa => 'Str', |
118
|
|
|
|
|
|
|
); |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
has row_label_horiz_alignment => ( |
121
|
|
|
|
|
|
|
is => 'ro', |
122
|
|
|
|
|
|
|
isa => 'Str', |
123
|
|
|
|
|
|
|
); |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
has row_label_vert_alignment => ( |
126
|
|
|
|
|
|
|
is => 'ro', |
127
|
|
|
|
|
|
|
isa => 'Str', |
128
|
|
|
|
|
|
|
); |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
# Label Appearance |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
has label_bg => ( |
133
|
|
|
|
|
|
|
is => 'ro', |
134
|
|
|
|
|
|
|
isa => 'Str', |
135
|
|
|
|
|
|
|
); |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
has label_font => ( |
138
|
|
|
|
|
|
|
is => 'ro', |
139
|
|
|
|
|
|
|
isa => 'Str', |
140
|
|
|
|
|
|
|
); |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
has label_text => ( |
143
|
|
|
|
|
|
|
is => 'ro', |
144
|
|
|
|
|
|
|
isa => 'Str', |
145
|
|
|
|
|
|
|
); |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
# Cell Defaults |
148
|
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
has cell_bg => ( |
150
|
|
|
|
|
|
|
is => 'ro', |
151
|
|
|
|
|
|
|
isa => 'Str', |
152
|
|
|
|
|
|
|
); |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
has cell_font => ( |
155
|
|
|
|
|
|
|
is => 'ro', |
156
|
|
|
|
|
|
|
isa => 'Str', |
157
|
|
|
|
|
|
|
); |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
has cell_text => ( |
160
|
|
|
|
|
|
|
is => 'ro', |
161
|
|
|
|
|
|
|
isa => 'Str', |
162
|
|
|
|
|
|
|
); |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
has cell_horiz_alignment => ( |
165
|
|
|
|
|
|
|
is => 'ro', |
166
|
|
|
|
|
|
|
isa => 'Str', |
167
|
|
|
|
|
|
|
); |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
has cell_vert_alignment => ( |
170
|
|
|
|
|
|
|
is => 'ro', |
171
|
|
|
|
|
|
|
isa => 'Str', |
172
|
|
|
|
|
|
|
); |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
# Events |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
has OnGridCellLeftClick => ( |
177
|
|
|
|
|
|
|
is => 'ro', |
178
|
|
|
|
|
|
|
isa => 'Str', |
179
|
|
|
|
|
|
|
); |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
has OnGridCellRightClick => ( |
182
|
|
|
|
|
|
|
is => 'ro', |
183
|
|
|
|
|
|
|
isa => 'Str', |
184
|
|
|
|
|
|
|
); |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
has OnGridCellLeftDClick => ( |
187
|
|
|
|
|
|
|
is => 'ro', |
188
|
|
|
|
|
|
|
isa => 'Str', |
189
|
|
|
|
|
|
|
); |
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
has OnGridCellRightDClick => ( |
192
|
|
|
|
|
|
|
is => 'ro', |
193
|
|
|
|
|
|
|
isa => 'Str', |
194
|
|
|
|
|
|
|
); |
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
has OnGridLabelLeftClick => ( |
197
|
|
|
|
|
|
|
is => 'ro', |
198
|
|
|
|
|
|
|
isa => 'Str', |
199
|
|
|
|
|
|
|
); |
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
has OnGridLabelRightClick => ( |
202
|
|
|
|
|
|
|
is => 'ro', |
203
|
|
|
|
|
|
|
isa => 'Str', |
204
|
|
|
|
|
|
|
); |
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
has OnGridLabelLeftDClick => ( |
207
|
|
|
|
|
|
|
is => 'ro', |
208
|
|
|
|
|
|
|
isa => 'Str', |
209
|
|
|
|
|
|
|
); |
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
has OnGridLabelRightDClick => ( |
212
|
|
|
|
|
|
|
is => 'ro', |
213
|
|
|
|
|
|
|
isa => 'Str', |
214
|
|
|
|
|
|
|
); |
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
has OnGridCellChange => ( |
217
|
|
|
|
|
|
|
is => 'ro', |
218
|
|
|
|
|
|
|
isa => 'Str', |
219
|
|
|
|
|
|
|
); |
220
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
has OnGridEditorHidden => ( |
222
|
|
|
|
|
|
|
is => 'ro', |
223
|
|
|
|
|
|
|
isa => 'Str', |
224
|
|
|
|
|
|
|
); |
225
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
has OnGridEditorShown => ( |
227
|
|
|
|
|
|
|
is => 'ro', |
228
|
|
|
|
|
|
|
isa => 'Str', |
229
|
|
|
|
|
|
|
); |
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
has OnGridCmdCellLeftClick => ( |
232
|
|
|
|
|
|
|
is => 'ro', |
233
|
|
|
|
|
|
|
isa => 'Str', |
234
|
|
|
|
|
|
|
); |
235
|
|
|
|
|
|
|
|
236
|
|
|
|
|
|
|
has OnGridCmdCellRightClick => ( |
237
|
|
|
|
|
|
|
is => 'ro', |
238
|
|
|
|
|
|
|
isa => 'Str', |
239
|
|
|
|
|
|
|
); |
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
has OnGridCmdCellLeftDClick => ( |
242
|
|
|
|
|
|
|
is => 'ro', |
243
|
|
|
|
|
|
|
isa => 'Str', |
244
|
|
|
|
|
|
|
); |
245
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
has OnGridCmdCellRightDClick => ( |
247
|
|
|
|
|
|
|
is => 'ro', |
248
|
|
|
|
|
|
|
isa => 'Str', |
249
|
|
|
|
|
|
|
); |
250
|
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
has OnGridCmdLabelLeftClick => ( |
252
|
|
|
|
|
|
|
is => 'ro', |
253
|
|
|
|
|
|
|
isa => 'Str', |
254
|
|
|
|
|
|
|
); |
255
|
|
|
|
|
|
|
|
256
|
|
|
|
|
|
|
has OnGridCmdLabelRightClick => ( |
257
|
|
|
|
|
|
|
is => 'ro', |
258
|
|
|
|
|
|
|
isa => 'Str', |
259
|
|
|
|
|
|
|
); |
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
has OnGridCmdLabelLeftDClick => ( |
262
|
|
|
|
|
|
|
is => 'ro', |
263
|
|
|
|
|
|
|
isa => 'Str', |
264
|
|
|
|
|
|
|
); |
265
|
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
has OnGridCmdLabelRightDClick => ( |
267
|
|
|
|
|
|
|
is => 'ro', |
268
|
|
|
|
|
|
|
isa => 'Str', |
269
|
|
|
|
|
|
|
); |
270
|
|
|
|
|
|
|
|
271
|
|
|
|
|
|
|
has OnGridCmdCellChange => ( |
272
|
|
|
|
|
|
|
is => 'ro', |
273
|
|
|
|
|
|
|
isa => 'Str', |
274
|
|
|
|
|
|
|
); |
275
|
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
has OnGridCmdSelectCell => ( |
277
|
|
|
|
|
|
|
is => 'ro', |
278
|
|
|
|
|
|
|
isa => 'Str', |
279
|
|
|
|
|
|
|
); |
280
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
has OnGridCmdEditorHidden => ( |
282
|
|
|
|
|
|
|
is => 'ro', |
283
|
|
|
|
|
|
|
isa => 'Str', |
284
|
|
|
|
|
|
|
); |
285
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
has OnGridCmdEditorShown => ( |
287
|
|
|
|
|
|
|
is => 'ro', |
288
|
|
|
|
|
|
|
isa => 'Str', |
289
|
|
|
|
|
|
|
); |
290
|
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
has OnGridColSize => ( |
292
|
|
|
|
|
|
|
is => 'ro', |
293
|
|
|
|
|
|
|
isa => 'Str', |
294
|
|
|
|
|
|
|
); |
295
|
|
|
|
|
|
|
|
296
|
|
|
|
|
|
|
has OnGridRowSize => ( |
297
|
|
|
|
|
|
|
is => 'ro', |
298
|
|
|
|
|
|
|
isa => 'Str', |
299
|
|
|
|
|
|
|
); |
300
|
|
|
|
|
|
|
|
301
|
|
|
|
|
|
|
has OnGridCmdColSize => ( |
302
|
|
|
|
|
|
|
is => 'ro', |
303
|
|
|
|
|
|
|
isa => 'Str', |
304
|
|
|
|
|
|
|
); |
305
|
|
|
|
|
|
|
|
306
|
|
|
|
|
|
|
has OnGridCmdRowSize => ( |
307
|
|
|
|
|
|
|
is => 'ro', |
308
|
|
|
|
|
|
|
isa => 'Str', |
309
|
|
|
|
|
|
|
); |
310
|
|
|
|
|
|
|
|
311
|
|
|
|
|
|
|
has OnGridRangeSelect => ( |
312
|
|
|
|
|
|
|
is => 'ro', |
313
|
|
|
|
|
|
|
isa => 'Str', |
314
|
|
|
|
|
|
|
); |
315
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
has OnGridCmdRangeSelect => ( |
317
|
|
|
|
|
|
|
is => 'ro', |
318
|
|
|
|
|
|
|
isa => 'Str', |
319
|
|
|
|
|
|
|
); |
320
|
|
|
|
|
|
|
|
321
|
|
|
|
|
|
|
has OnGridEditorCreated => ( |
322
|
|
|
|
|
|
|
is => 'ro', |
323
|
|
|
|
|
|
|
isa => 'Str', |
324
|
|
|
|
|
|
|
); |
325
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
has OnGridCmdEditorCreated => ( |
327
|
|
|
|
|
|
|
is => 'ro', |
328
|
|
|
|
|
|
|
isa => 'Str', |
329
|
|
|
|
|
|
|
); |
330
|
|
|
|
|
|
|
|
331
|
4
|
|
|
4
|
|
3893
|
no Mouse; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
24
|
|
332
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
333
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
1; |