93
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1997 by eXept Software AG
|
|
3 |
All Rights Reserved
|
|
4 |
|
|
5 |
This software is furnished under a license and may be used
|
|
6 |
only in accordance with the terms of that license and with the
|
|
7 |
inclusion of the above copyright notice. This software may not
|
|
8 |
be provided or otherwise made available to, or used by, any
|
|
9 |
other person. No title to or ownership of the software is
|
|
10 |
hereby transferred.
|
|
11 |
"
|
|
12 |
|
|
13 |
|
|
14 |
View subclass:#UISelectionPanel
|
|
15 |
instanceVariableNames:'action window tabView labelView inputView selection
|
|
16 |
lastClickPoint specification'
|
|
17 |
classVariableNames:''
|
|
18 |
poolDictionaries:''
|
|
19 |
category:'Interface-UIPainter'
|
|
20 |
!
|
|
21 |
|
|
22 |
DropObject subclass:#DropSpecification
|
|
23 |
instanceVariableNames:''
|
|
24 |
classVariableNames:''
|
|
25 |
poolDictionaries:''
|
|
26 |
privateIn:UISelectionPanel
|
|
27 |
!
|
|
28 |
|
|
29 |
!UISelectionPanel class methodsFor:'documentation'!
|
|
30 |
|
|
31 |
copyright
|
|
32 |
"
|
|
33 |
COPYRIGHT (c) 1997 by eXept Software AG
|
|
34 |
All Rights Reserved
|
|
35 |
|
|
36 |
This software is furnished under a license and may be used
|
|
37 |
only in accordance with the terms of that license and with the
|
|
38 |
inclusion of the above copyright notice. This software may not
|
|
39 |
be provided or otherwise made available to, or used by, any
|
|
40 |
other person. No title to or ownership of the software is
|
|
41 |
hereby transferred.
|
|
42 |
"
|
|
43 |
|
|
44 |
!
|
|
45 |
|
|
46 |
documentation
|
|
47 |
"
|
|
48 |
implements a selection panel, keeping widgets which could be placed
|
|
49 |
into the UIPainter by drag & drop.
|
|
50 |
|
|
51 |
[author:]
|
|
52 |
Claus Atzkern
|
|
53 |
|
|
54 |
[see also:]
|
|
55 |
TabView
|
|
56 |
UIPainter
|
104
|
57 |
|
|
58 |
[start with:]
|
|
59 |
UISelectionPanel defaultPanel
|
|
60 |
|
93
|
61 |
"
|
|
62 |
|
|
63 |
!
|
|
64 |
|
|
65 |
examples
|
|
66 |
"
|
|
67 |
creates and opens the default panel
|
|
68 |
[exBegin]
|
|
69 |
self defaultPanel.
|
|
70 |
[exEnd]
|
|
71 |
|
|
72 |
|
|
73 |
create a panel with labels and selectors implemented by the receiver
|
|
74 |
which returns a FullSpec.
|
|
75 |
[exBegin]
|
|
76 |
|top slv inset list view idx frame colSelected colUnselected|
|
|
77 |
|
|
78 |
top := StandardSystemView new
|
|
79 |
label:'UI-Selection Panel';
|
|
80 |
extent:450@150.
|
|
81 |
|
|
82 |
view := self origin:0.0 @ 0.0 corner:1.0 @ 1.0 in:top.
|
|
83 |
|
|
84 |
view labels:#( 'Button & Toggles'
|
|
85 |
'Panels'
|
104
|
86 |
'Slider'
|
93
|
87 |
)
|
|
88 |
selectors:#( #buttonToggleSpec
|
|
89 |
#panelSpec
|
104
|
90 |
#sliderSpec
|
93
|
91 |
)
|
|
92 |
receiver:self.
|
|
93 |
|
|
94 |
top open.
|
|
95 |
[exEnd]
|
|
96 |
"
|
|
97 |
! !
|
|
98 |
|
|
99 |
!UISelectionPanel class methodsFor:'instance creation'!
|
|
100 |
|
|
101 |
defaultPanel
|
|
102 |
|top slv inset list view idx frame colSelected colUnselected|
|
|
103 |
|
|
104 |
top := StandardSystemView new
|
|
105 |
label:'UI-Selection Panel';
|
104
|
106 |
extent:480@255.
|
93
|
107 |
|
|
108 |
view := self origin:0.0 @ 0.0 corner:1.0 @ 1.0 in:top.
|
|
109 |
|
|
110 |
view labels:#( 'Button & Toggle'
|
|
111 |
'Panel'
|
|
112 |
'Text'
|
|
113 |
'View'
|
|
114 |
'Menu & Combo'
|
104
|
115 |
'Slider'
|
93
|
116 |
)
|
|
117 |
selectors:#( #buttonToggleSpec
|
|
118 |
#panelSpec
|
|
119 |
#textSpec
|
|
120 |
#viewsSpec
|
|
121 |
#menuComboSpec
|
104
|
122 |
#sliderSpec
|
93
|
123 |
)
|
|
124 |
receiver:self.
|
|
125 |
|
|
126 |
top open.
|
|
127 |
|
|
128 |
! !
|
|
129 |
|
104
|
130 |
!UISelectionPanel class methodsFor:'interface specs'!
|
93
|
131 |
|
|
132 |
buttonToggleSpec
|
|
133 |
"this window spec was automatically generated by the ST/X UIPainter"
|
|
134 |
|
|
135 |
"do not manually edit this - the painter/builder may not be able to
|
|
136 |
handle the specification if its corrupted."
|
|
137 |
|
|
138 |
"
|
|
139 |
UIPainter new openOnClass:UISelectionPanel andSelector:#buttonToggleSpec
|
|
140 |
UISelectionPanel new openInterface:#buttonToggleSpec
|
|
141 |
"
|
|
142 |
|
|
143 |
<resource: #canvas>
|
|
144 |
|
|
145 |
^
|
|
146 |
|
|
147 |
#(#FullSpec
|
|
148 |
#'window:'
|
|
149 |
#(#WindowSpec
|
|
150 |
#'name:' 'uIPainterView'
|
|
151 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
|
|
152 |
#'label:' 'unnamed'
|
105
|
153 |
#'bounds:' #(#Rectangle 0 0 439 193)
|
93
|
154 |
)
|
|
155 |
#'component:'
|
|
156 |
#(#SpecCollection
|
|
157 |
#'collection:'
|
|
158 |
#(
|
|
159 |
#(#ArrowButtonSpec
|
|
160 |
#'name:' 'ArrowButton up'
|
105
|
161 |
#'layout:' #(#LayoutFrame 237 0 20 0 259 0 42 0)
|
93
|
162 |
#'hasCharacterOrientedLabel:' false
|
|
163 |
#'isTriggerOnDown:' true
|
|
164 |
#'direction:' #up
|
|
165 |
)
|
|
166 |
#(#ActionButtonSpec
|
|
167 |
#'name:' 'Button'
|
105
|
168 |
#'layout:' #(#LayoutFrame 20 0 20 0 119 0 42 0)
|
93
|
169 |
#'label:' 'Button'
|
|
170 |
#'isTriggerOnDown:' false
|
|
171 |
)
|
|
172 |
#(#RadioButtonSpec
|
|
173 |
#'name:' 'RadioButton'
|
105
|
174 |
#'layout:' #(#LayoutFrame 127 0.0 20 0 226 0 42 0)
|
93
|
175 |
#'label:' 'RadioButton'
|
|
176 |
#'isTriggerOnDown:' true
|
|
177 |
#'showLamp:' true
|
|
178 |
#'lampColor:' #(#Color 100.0 100.0 0.0)
|
|
179 |
)
|
|
180 |
#(#ArrowButtonSpec
|
|
181 |
#'name:' 'ArrowButton down'
|
105
|
182 |
#'layout:' #(#LayoutFrame 238 0 51 0 260 0 73 0)
|
93
|
183 |
#'hasCharacterOrientedLabel:' false
|
|
184 |
#'isTriggerOnDown:' true
|
|
185 |
#'direction:' #down
|
|
186 |
)
|
|
187 |
#(#ArrowButtonSpec
|
|
188 |
#'name:' 'ArrowButton left'
|
105
|
189 |
#'layout:' #(#LayoutFrame 238 0 82 0 260 0 104 0)
|
93
|
190 |
#'hasCharacterOrientedLabel:' false
|
|
191 |
#'isTriggerOnDown:' true
|
|
192 |
#'direction:' #left
|
|
193 |
)
|
|
194 |
#(#ArrowButtonSpec
|
|
195 |
#'name:' 'ArrowButton right'
|
105
|
196 |
#'layout:' #(#LayoutFrame 238 0 113 0 260 0 135 0)
|
93
|
197 |
#'hasCharacterOrientedLabel:' false
|
|
198 |
#'isTriggerOnDown:' true
|
|
199 |
#'direction:' #right
|
|
200 |
)
|
|
201 |
#(#CheckToggleSpec
|
|
202 |
#'name:' 'CheckToggle'
|
105
|
203 |
#'layout:' #(#LayoutFrame 297 0 82 0 317 0 102 0)
|
93
|
204 |
#'hasCharacterOrientedLabel:' false
|
|
205 |
#'isTriggerOnDown:' true
|
|
206 |
#'showLamp:' false
|
|
207 |
#'lampColor:' #(#Color 100.0 100.0 0.0)
|
|
208 |
)
|
|
209 |
#(#ToggleSpec
|
|
210 |
#'name:' 'Toggle'
|
105
|
211 |
#'layout:' #(#LayoutFrame 297 0 20 0 396 0 42 0)
|
93
|
212 |
#'label:' 'Toggle'
|
|
213 |
#'isTriggerOnDown:' true
|
|
214 |
#'showLamp:' true
|
|
215 |
#'lampColor:' #(#Color 100.0 100.0 0.0)
|
|
216 |
)
|
|
217 |
#(#CheckBoxSpec
|
|
218 |
#'name:' 'CheckBox'
|
105
|
219 |
#'layout:' #(#LayoutFrame 295 0 51 0 396 0 73 0)
|
93
|
220 |
#'tabable:' false
|
|
221 |
#'label:' 'CheckBox'
|
|
222 |
#'translateLabel:' false
|
|
223 |
)
|
105
|
224 |
#(#ActionButtonSpec
|
|
225 |
#'name:' 'ok'
|
|
226 |
#'layout:' #(#LayoutFrame 20 0 51 0 119 0 73 0)
|
|
227 |
#'label:' 'ok'
|
|
228 |
#'model:' #accept
|
|
229 |
#'isTriggerOnDown:' false
|
|
230 |
)
|
|
231 |
#(#ActionButtonSpec
|
|
232 |
#'name:' 'cancel'
|
|
233 |
#'layout:' #(#LayoutFrame 20 0 82 0 119 0 104 0)
|
|
234 |
#'label:' 'cancel'
|
|
235 |
#'model:' #cancel
|
|
236 |
#'isTriggerOnDown:' false
|
|
237 |
)
|
|
238 |
#(#ActionButtonSpec
|
|
239 |
#'name:' 'help'
|
|
240 |
#'layout:' #(#LayoutFrame 20 0 113 0 119 0 135 0)
|
|
241 |
#'label:' 'help'
|
|
242 |
#'model:' #help
|
|
243 |
#'isTriggerOnDown:' false
|
|
244 |
)
|
93
|
245 |
)
|
|
246 |
)
|
|
247 |
)
|
|
248 |
!
|
|
249 |
|
|
250 |
menuComboSpec
|
|
251 |
"this window spec was automatically generated by the ST/X UIPainter"
|
|
252 |
|
|
253 |
"do not manually edit this - the painter/builder may not be able to
|
|
254 |
handle the specification if its corrupted."
|
|
255 |
|
|
256 |
"
|
|
257 |
UIPainter new openOnClass:UISelectionPanel andSelector:#menuComboSpec
|
|
258 |
UISelectionPanel new openInterface:#menuComboSpec
|
|
259 |
"
|
|
260 |
|
|
261 |
<resource: #canvas>
|
|
262 |
|
|
263 |
^
|
|
264 |
|
|
265 |
#(#FullSpec
|
|
266 |
#'window:'
|
|
267 |
#(#WindowSpec
|
|
268 |
#'name:' 'uIPainterView'
|
|
269 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
|
|
270 |
#'label:' 'unnamed'
|
|
271 |
#'bounds:' #(#Rectangle 0 0 450 100)
|
|
272 |
)
|
|
273 |
#'component:'
|
|
274 |
#(#SpecCollection
|
|
275 |
#'collection:'
|
|
276 |
#(
|
|
277 |
#(#ComboBoxSpec
|
|
278 |
#'name:' 'ComboBox'
|
105
|
279 |
#'layout:' #(#LayoutFrame 20 0 20 0 123 0 40 0)
|
93
|
280 |
#'immediateAccept:' false
|
|
281 |
#'acceptOnLeave:' true
|
|
282 |
#'acceptOnReturn:' true
|
|
283 |
#'acceptOnTab:' true
|
|
284 |
#'acceptOnLostFocus:' true
|
|
285 |
#'hasBorder:' false
|
|
286 |
)
|
|
287 |
#(#ComboListSpec
|
|
288 |
#'name:' 'ComboList'
|
105
|
289 |
#'layout:' #(#LayoutFrame 20 0 51 0 123 0 71 0)
|
93
|
290 |
#'tabable:' false
|
|
291 |
)
|
|
292 |
#(#PopUpListSpec
|
|
293 |
#'name:' 'PopUpList'
|
105
|
294 |
#'layout:' #(#LayoutFrame 145 0 20 0 248 0 42 0)
|
93
|
295 |
#'label:' 'PopUpList'
|
|
296 |
)
|
|
297 |
)
|
|
298 |
)
|
|
299 |
)
|
|
300 |
!
|
|
301 |
|
|
302 |
panelSpec
|
|
303 |
"this window spec was automatically generated by the ST/X UIPainter"
|
|
304 |
|
|
305 |
"do not manually edit this - the painter/builder may not be able to
|
|
306 |
handle the specification if its corrupted."
|
|
307 |
|
|
308 |
"
|
|
309 |
UIPainter new openOnClass:UISelectionPanel andSelector:#panelSpec
|
|
310 |
UISelectionPanel new openInterface:#panelSpec
|
|
311 |
"
|
|
312 |
|
|
313 |
<resource: #canvas>
|
|
314 |
|
|
315 |
^
|
|
316 |
|
|
317 |
#(#FullSpec
|
|
318 |
#'window:'
|
|
319 |
#(#WindowSpec
|
|
320 |
#'name:' 'uIPainterView'
|
|
321 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
|
|
322 |
#'label:' 'unnamed'
|
105
|
323 |
#'bounds:' #(#Rectangle 0 0 475 136)
|
93
|
324 |
)
|
|
325 |
#'component:'
|
|
326 |
#(#SpecCollection
|
|
327 |
#'collection:'
|
|
328 |
#(
|
|
329 |
#(#HorizontalPanelViewSpec
|
|
330 |
#'name:' 'HorizontalPanelView'
|
105
|
331 |
#'layout:' #(#LayoutFrame 20 0 20 0 104 0 105 0)
|
93
|
332 |
#'component:'
|
|
333 |
#(#SpecCollection
|
|
334 |
#'collection:'
|
|
335 |
#(
|
|
336 |
#(#ActionButtonSpec
|
|
337 |
#'name:' 'button1'
|
|
338 |
#'label:' 'A'
|
|
339 |
#'isTriggerOnDown:' false
|
104
|
340 |
#'extent:' #(#Point 22 23)
|
93
|
341 |
#'canUIDrag:' false
|
|
342 |
)
|
|
343 |
#(#ActionButtonSpec
|
|
344 |
#'name:' 'button8'
|
|
345 |
#'label:' 'B'
|
|
346 |
#'isTriggerOnDown:' false
|
104
|
347 |
#'extent:' #(#Point 22 23)
|
|
348 |
#'canUIDrag:' false
|
|
349 |
)
|
|
350 |
#(#ActionButtonSpec
|
|
351 |
#'name:' 'button9'
|
|
352 |
#'label:' 'C'
|
|
353 |
#'isTriggerOnDown:' false
|
|
354 |
#'extent:' #(#Point 22 23)
|
93
|
355 |
#'canUIDrag:' false
|
|
356 |
)
|
|
357 |
)
|
|
358 |
)
|
|
359 |
#'level:' 0
|
|
360 |
#'horizontalLayout:' #center
|
|
361 |
#'verticalLayout:' #center
|
|
362 |
#'horizontalSpace:' 3
|
|
363 |
#'verticalSpace:' 3
|
|
364 |
)
|
|
365 |
#(#VariableHorizontalPanelSpec
|
|
366 |
#'name:' 'VariableHorizontalPanel'
|
105
|
367 |
#'layout:' #(#LayoutFrame 275 0 20 0 363 0 105 0)
|
93
|
368 |
#'component:'
|
|
369 |
#(#SpecCollection
|
|
370 |
#'collection:'
|
|
371 |
#(
|
|
372 |
#(#ActionButtonSpec
|
|
373 |
#'name:' 'button2'
|
|
374 |
#'label:' 'A'
|
|
375 |
#'isTriggerOnDown:' false
|
|
376 |
#'canUIDrag:' false
|
|
377 |
)
|
|
378 |
#(#ActionButtonSpec
|
|
379 |
#'name:' 'button3'
|
|
380 |
#'label:' 'B'
|
|
381 |
#'isTriggerOnDown:' false
|
|
382 |
#'canUIDrag:' false
|
|
383 |
)
|
|
384 |
)
|
|
385 |
)
|
|
386 |
)
|
|
387 |
#(#VerticalPanelViewSpec
|
|
388 |
#'name:' 'VerticalPanelView'
|
105
|
389 |
#'layout:' #(#LayoutFrame 110 0 20 0 191 0 105 0)
|
93
|
390 |
#'component:'
|
|
391 |
#(#SpecCollection
|
|
392 |
#'collection:'
|
|
393 |
#(
|
|
394 |
#(#ActionButtonSpec
|
|
395 |
#'name:' 'button4'
|
|
396 |
#'label:' 'A'
|
|
397 |
#'isTriggerOnDown:' false
|
104
|
398 |
#'extent:' #(#Point 22 23)
|
93
|
399 |
#'canUIDrag:' false
|
|
400 |
)
|
|
401 |
#(#ActionButtonSpec
|
|
402 |
#'name:' 'button5'
|
|
403 |
#'label:' 'B'
|
|
404 |
#'isTriggerOnDown:' false
|
104
|
405 |
#'extent:' #(#Point 22 23)
|
|
406 |
#'canUIDrag:' false
|
|
407 |
)
|
|
408 |
#(#ActionButtonSpec
|
|
409 |
#'name:' 'button10'
|
|
410 |
#'label:' 'C'
|
|
411 |
#'isTriggerOnDown:' false
|
|
412 |
#'extent:' #(#Point 22 23)
|
93
|
413 |
#'canUIDrag:' false
|
|
414 |
)
|
|
415 |
)
|
|
416 |
)
|
|
417 |
#'level:' 0
|
|
418 |
#'horizontalLayout:' #center
|
|
419 |
#'verticalLayout:' #center
|
|
420 |
#'horizontalSpace:' 3
|
|
421 |
#'verticalSpace:' 3
|
|
422 |
)
|
|
423 |
#(#VariableVerticalPanelSpec
|
|
424 |
#'name:' 'VariableVerticalPanel'
|
105
|
425 |
#'layout:' #(#LayoutFrame 372 0 20 0 456 0 105 0)
|
93
|
426 |
#'component:'
|
|
427 |
#(#SpecCollection
|
|
428 |
#'collection:'
|
|
429 |
#(
|
|
430 |
#(#ActionButtonSpec
|
|
431 |
#'name:' 'button6'
|
|
432 |
#'label:' 'A'
|
|
433 |
#'isTriggerOnDown:' false
|
|
434 |
#'canUIDrag:' false
|
|
435 |
)
|
|
436 |
#(#ActionButtonSpec
|
|
437 |
#'name:' 'button7'
|
|
438 |
#'label:' 'B'
|
|
439 |
#'isTriggerOnDown:' false
|
|
440 |
#'canUIDrag:' false
|
|
441 |
)
|
|
442 |
)
|
|
443 |
)
|
|
444 |
)
|
104
|
445 |
#(#PanelViewSpec
|
|
446 |
#'name:' 'PanelView'
|
105
|
447 |
#'layout:' #(#LayoutFrame 197 0 20 0 255 0 105 0)
|
104
|
448 |
#'component:'
|
|
449 |
#(#SpecCollection
|
|
450 |
#'collection:'
|
|
451 |
#(
|
|
452 |
#(#ActionButtonSpec
|
|
453 |
#'name:' 'button11'
|
|
454 |
#'label:' 'A'
|
|
455 |
#'isTriggerOnDown:' false
|
|
456 |
#'extent:' #(#Point 22 23)
|
|
457 |
#'canUIDrag:' false
|
|
458 |
)
|
|
459 |
#(#ActionButtonSpec
|
|
460 |
#'name:' 'button12'
|
|
461 |
#'label:' 'B'
|
|
462 |
#'isTriggerOnDown:' false
|
|
463 |
#'extent:' #(#Point 22 23)
|
|
464 |
#'canUIDrag:' false
|
|
465 |
)
|
|
466 |
#(#ActionButtonSpec
|
|
467 |
#'name:' 'button13'
|
|
468 |
#'label:' 'C'
|
|
469 |
#'isTriggerOnDown:' false
|
|
470 |
#'extent:' #(#Point 22 23)
|
|
471 |
#'canUIDrag:' false
|
|
472 |
)
|
|
473 |
#(#ActionButtonSpec
|
|
474 |
#'name:' 'button14'
|
|
475 |
#'label:' 'D'
|
|
476 |
#'isTriggerOnDown:' false
|
|
477 |
#'extent:' #(#Point 22 23)
|
|
478 |
#'canUIDrag:' false
|
|
479 |
)
|
|
480 |
#(#ActionButtonSpec
|
|
481 |
#'name:' 'button15'
|
|
482 |
#'label:' 'E'
|
|
483 |
#'isTriggerOnDown:' false
|
|
484 |
#'extent:' #(#Point 22 23)
|
|
485 |
#'canUIDrag:' false
|
|
486 |
)
|
|
487 |
)
|
|
488 |
)
|
|
489 |
#'level:' 0
|
|
490 |
#'horizontalLayout:' #fitSpace
|
|
491 |
#'verticalLayout:' #fitSpace
|
|
492 |
#'horizontalSpace:' 3
|
|
493 |
#'verticalSpace:' 3
|
|
494 |
)
|
93
|
495 |
)
|
|
496 |
)
|
|
497 |
)
|
|
498 |
!
|
|
499 |
|
104
|
500 |
sliderSpec
|
93
|
501 |
"this window spec was automatically generated by the ST/X UIPainter"
|
|
502 |
|
|
503 |
"do not manually edit this - the painter/builder may not be able to
|
|
504 |
handle the specification if its corrupted."
|
|
505 |
|
|
506 |
"
|
104
|
507 |
UIPainter new openOnClass:UISelectionPanel andSelector:#sliderSpec
|
|
508 |
UISelectionPanel new openInterface:#sliderSpec
|
93
|
509 |
"
|
|
510 |
|
|
511 |
<resource: #canvas>
|
|
512 |
|
|
513 |
^
|
|
514 |
|
|
515 |
#(#FullSpec
|
|
516 |
#'window:'
|
|
517 |
#(#WindowSpec
|
|
518 |
#'name:' 'uIPainterView'
|
|
519 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
|
|
520 |
#'label:' 'unnamed'
|
105
|
521 |
#'bounds:' #(#Rectangle 0 0 445 162)
|
93
|
522 |
)
|
|
523 |
#'component:'
|
|
524 |
#(#SpecCollection
|
|
525 |
#'collection:'
|
|
526 |
#(
|
104
|
527 |
#(#SliderSpec
|
|
528 |
#'name:' 'Vertical Slider'
|
105
|
529 |
#'layout:' #(#LayoutFrame 20 0 20 0 38 0 108 0)
|
104
|
530 |
#'orientation:' #vertical
|
93
|
531 |
)
|
104
|
532 |
#(#ThumbWheelSpec
|
|
533 |
#'name:' 'Vertical ThumbWheel'
|
105
|
534 |
#'layout:' #(#LayoutFrame 48 0 20 0 63 0 108 0)
|
104
|
535 |
#'orientation:' #vertical
|
|
536 |
#'start:' 0
|
|
537 |
#'stop:' 360
|
93
|
538 |
)
|
104
|
539 |
#(#ThumbWheelSpec
|
|
540 |
#'name:' 'Horizontal ThumbWheel'
|
105
|
541 |
#'layout:' #(#LayoutFrame 102 0 20 0 191 0 35 0)
|
104
|
542 |
#'orientation:' #horizontal
|
|
543 |
#'start:' 0
|
|
544 |
#'stop:' 360
|
93
|
545 |
)
|
|
546 |
#(#SliderSpec
|
104
|
547 |
#'name:' 'Horizontal Slider'
|
105
|
548 |
#'layout:' #(#LayoutFrame 102 0 47 0 191 0 65 0)
|
104
|
549 |
#'orientation:' #horizontal
|
|
550 |
#'start:' 0
|
|
551 |
#'stop:' 100
|
93
|
552 |
)
|
|
553 |
)
|
|
554 |
)
|
|
555 |
)
|
|
556 |
!
|
|
557 |
|
97
|
558 |
textSpec
|
|
559 |
"this window spec was automatically generated by the ST/X UIPainter"
|
|
560 |
|
|
561 |
"do not manually edit this - the painter/builder may not be able to
|
|
562 |
handle the specification if its corrupted."
|
|
563 |
|
|
564 |
"
|
|
565 |
UIPainter new openOnClass:UISelectionPanel andSelector:#textSpec
|
|
566 |
UISelectionPanel new openInterface:#textSpec
|
|
567 |
"
|
|
568 |
|
|
569 |
<resource: #canvas>
|
|
570 |
|
|
571 |
^
|
104
|
572 |
|
97
|
573 |
#(#FullSpec
|
|
574 |
#'window:'
|
|
575 |
#(#WindowSpec
|
|
576 |
#'name:' 'uIPainterView'
|
|
577 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
|
|
578 |
#'label:' 'unnamed'
|
|
579 |
#'bounds:' #(#Rectangle 0 0 573 264)
|
|
580 |
)
|
|
581 |
#'component:'
|
|
582 |
#(#SpecCollection
|
|
583 |
#'collection:'
|
|
584 |
#(
|
|
585 |
#(#InputFieldSpec
|
|
586 |
#'name:' 'EditField'
|
105
|
587 |
#'layout:' #(#LayoutFrame 20 0 20 0 115 0 42 0)
|
97
|
588 |
#'immediateAccept:' false
|
|
589 |
#'acceptOnLeave:' true
|
|
590 |
#'acceptOnReturn:' true
|
|
591 |
#'acceptOnTab:' true
|
|
592 |
#'acceptOnLostFocus:' true
|
|
593 |
#'hasBorder:' false
|
|
594 |
)
|
|
595 |
#(#LabelSpec
|
|
596 |
#'name:' 'Text Label'
|
105
|
597 |
#'layout:' #(#LayoutFrame 20 0 50 0 115 0 66 0)
|
97
|
598 |
#'label:' 'Text Label'
|
|
599 |
#'level:' 0
|
|
600 |
#'adjust:' #center
|
|
601 |
#'hasCharacterOrientedLabel:' true
|
|
602 |
)
|
|
603 |
#(#TextEditorSpec
|
|
604 |
#'name:' 'EditTextView'
|
105
|
605 |
#'layout:' #(#LayoutFrame 130 0 20 0 234 0 100 0)
|
97
|
606 |
#'hasHorizontalScrollBar:' true
|
|
607 |
#'hasVerticalScrollBar:' true
|
|
608 |
#'miniScrollerHorizontal:' false
|
|
609 |
#'miniScrollerVertical:' false
|
|
610 |
)
|
|
611 |
#(#TextEditorSpec
|
|
612 |
#'name:' 'EditTextView miniH'
|
105
|
613 |
#'layout:' #(#LayoutFrame 246 0 20 0 350 0 100 0)
|
97
|
614 |
#'hasHorizontalScrollBar:' true
|
|
615 |
#'hasVerticalScrollBar:' true
|
|
616 |
#'miniScrollerHorizontal:' true
|
|
617 |
#'miniScrollerVertical:' false
|
|
618 |
)
|
|
619 |
#(#SequenceViewSpec
|
|
620 |
#'name:' 'SelectionInListView miniH'
|
105
|
621 |
#'layout:' #(#LayoutFrame 246 0 116 0 350 0 196 0)
|
97
|
622 |
#'hasHorizontalScrollBar:' true
|
|
623 |
#'hasVerticalScrollBar:' true
|
|
624 |
#'miniScrollerHorizontal:' true
|
|
625 |
#'miniScrollerVertical:' false
|
|
626 |
)
|
|
627 |
#(#SequenceViewSpec
|
|
628 |
#'name:' 'SelectionInListView'
|
105
|
629 |
#'layout:' #(#LayoutFrame 130 0 116 0 234 0 196 0)
|
97
|
630 |
#'hasHorizontalScrollBar:' true
|
|
631 |
#'hasVerticalScrollBar:' true
|
|
632 |
#'miniScrollerHorizontal:' false
|
|
633 |
#'miniScrollerVertical:' false
|
|
634 |
)
|
98
|
635 |
#(#TextEditorSpec
|
|
636 |
#'name:' 'EditTextView noH'
|
105
|
637 |
#'layout:' #(#LayoutFrame 364 0 20 0 468 0 100 0)
|
98
|
638 |
#'hasHorizontalScrollBar:' false
|
|
639 |
#'hasVerticalScrollBar:' true
|
|
640 |
#'miniScrollerHorizontal:' false
|
|
641 |
#'miniScrollerVertical:' false
|
|
642 |
)
|
|
643 |
#(#SequenceViewSpec
|
|
644 |
#'name:' 'scrollableView2'
|
105
|
645 |
#'layout:' #(#LayoutFrame 365 0 116 0 469 0 196 0)
|
98
|
646 |
#'hasHorizontalScrollBar:' false
|
|
647 |
#'hasVerticalScrollBar:' true
|
|
648 |
#'miniScrollerHorizontal:' false
|
|
649 |
#'miniScrollerVertical:' false
|
|
650 |
)
|
97
|
651 |
)
|
|
652 |
)
|
|
653 |
)
|
|
654 |
!
|
|
655 |
|
93
|
656 |
viewsSpec
|
|
657 |
"this window spec was automatically generated by the ST/X UIPainter"
|
|
658 |
|
|
659 |
"do not manually edit this - the painter/builder may not be able to
|
|
660 |
handle the specification if its corrupted."
|
|
661 |
|
|
662 |
"
|
|
663 |
UIPainter new openOnClass:UISelectionPanel andSelector:#viewsSpec
|
|
664 |
UISelectionPanel new openInterface:#viewsSpec
|
|
665 |
"
|
|
666 |
|
|
667 |
<resource: #canvas>
|
|
668 |
|
|
669 |
^
|
|
670 |
|
|
671 |
#(#FullSpec
|
|
672 |
#'window:'
|
|
673 |
#(#WindowSpec
|
|
674 |
#'name:' 'uIPainterView'
|
|
675 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
|
|
676 |
#'label:' 'unnamed'
|
104
|
677 |
#'bounds:' #(#Rectangle 0 0 457 177)
|
93
|
678 |
)
|
|
679 |
#'component:'
|
|
680 |
#(#SpecCollection
|
|
681 |
#'collection:'
|
|
682 |
#(
|
|
683 |
#(#FramedBoxSpec
|
|
684 |
#'name:' 'FramedBox'
|
105
|
685 |
#'layout:' #(#LayoutFrame 20 0 20 0 125 0 75 0)
|
104
|
686 |
#'label:' 'FramedBox'
|
93
|
687 |
#'labelPosition:' #topCenter
|
|
688 |
#'showFrame:' true
|
|
689 |
)
|
|
690 |
#(#ViewSpec
|
98
|
691 |
#'name:' 'View'
|
105
|
692 |
#'layout:' #(#LayoutFrame 134 0 20 0 239 0 75 0)
|
93
|
693 |
#'component:'
|
|
694 |
#(#SpecCollection
|
|
695 |
#'collection:'
|
|
696 |
#(
|
|
697 |
#(#LabelSpec
|
|
698 |
#'name:' 'label1'
|
|
699 |
#'layout:' #(#Point 3 2)
|
|
700 |
#'label:' 'View'
|
|
701 |
#'level:' 0
|
|
702 |
#'adjust:' #center
|
|
703 |
#'hasCharacterOrientedLabel:' true
|
|
704 |
#'canUIDrag:' false
|
|
705 |
)
|
|
706 |
)
|
|
707 |
)
|
|
708 |
)
|
|
709 |
#(#SubCanvasSpec
|
98
|
710 |
#'name:' 'SubCanvas'
|
105
|
711 |
#'layout:' #(#LayoutFrame 134 0 87 0 239 0 142 0)
|
93
|
712 |
)
|
|
713 |
#(#LabelSpec
|
|
714 |
#'name:' 'label2'
|
105
|
715 |
#'layout:' #(#Point 136 87)
|
93
|
716 |
#'label:' 'SubCanvas'
|
|
717 |
#'level:' 0
|
|
718 |
#'adjust:' #center
|
|
719 |
#'hasCharacterOrientedLabel:' true
|
|
720 |
#'canUIDrag:' false
|
|
721 |
)
|
|
722 |
#(#DividerSpec
|
|
723 |
#'name:' 'Horizontal Seperator'
|
105
|
724 |
#'layout:' #(#LayoutFrame 292 0 20 0 356 0 37 0)
|
93
|
725 |
#'orientation:' #horizontal
|
|
726 |
)
|
|
727 |
#(#DividerSpec
|
|
728 |
#'name:' 'Vertical Seperator'
|
105
|
729 |
#'layout:' #(#LayoutFrame 267 0 20 0 286 0 75 0)
|
93
|
730 |
#'orientation:' #vertical
|
|
731 |
)
|
104
|
732 |
#(#TabViewSpec
|
|
733 |
#'name:' 'TabView'
|
105
|
734 |
#'layout:' #(#LayoutFrame 20 0 87 0 125 0 142 0)
|
104
|
735 |
#'tabWidget:' #Folder
|
|
736 |
)
|
|
737 |
#(#LabelSpec
|
|
738 |
#'name:' 'label3'
|
105
|
739 |
#'layout:' #(#Point 23 87)
|
104
|
740 |
#'label:' 'TabView'
|
|
741 |
#'level:' 0
|
|
742 |
#'adjust:' #center
|
|
743 |
#'hasCharacterOrientedLabel:' true
|
|
744 |
#'canUIDrag:' false
|
|
745 |
)
|
93
|
746 |
)
|
|
747 |
)
|
|
748 |
)
|
|
749 |
! !
|
|
750 |
|
|
751 |
!UISelectionPanel methodsFor:'accessing'!
|
|
752 |
|
|
753 |
labels:labels selectors:selectors receiver:receiver
|
|
754 |
"change specification and tabs
|
|
755 |
"
|
|
756 |
tabView action:[:aNrOrNil||spec|
|
|
757 |
aNrOrNil notNil ifTrue:[
|
|
758 |
spec := receiver perform:(selectors at:aNrOrNil).
|
|
759 |
].
|
|
760 |
self specification:spec.
|
|
761 |
].
|
|
762 |
tabView list:labels.
|
|
763 |
self recomputeSizes.
|
|
764 |
|
|
765 |
|
|
766 |
!
|
|
767 |
|
|
768 |
specification:specOrSpecArray
|
|
769 |
"load a spec
|
|
770 |
"
|
|
771 |
|builder|
|
|
772 |
|
|
773 |
self selection:nil.
|
|
774 |
labelView label:''.
|
|
775 |
|
|
776 |
window subViews copy do:[:aSubView|
|
|
777 |
aSubView ~~ inputView ifTrue:[
|
|
778 |
aSubView == labelView ifTrue:[self halt].
|
|
779 |
aSubView destroy
|
|
780 |
]
|
|
781 |
].
|
|
782 |
|
|
783 |
specOrSpecArray notNil ifTrue:[
|
|
784 |
specification := UISpecification from:specOrSpecArray.
|
|
785 |
|
|
786 |
builder := UIBuilder new.
|
|
787 |
specification buildViewFor:builder in:window.
|
|
788 |
window realizeAllSubViews.
|
|
789 |
inputView raise.
|
|
790 |
]
|
|
791 |
! !
|
|
792 |
|
|
793 |
!UISelectionPanel methodsFor:'change & update'!
|
|
794 |
|
|
795 |
recomputeSizes
|
|
796 |
"recompute sizes dependent on list
|
|
797 |
"
|
|
798 |
|y x extent|
|
|
799 |
|
|
800 |
extent := tabView preferredExtent.
|
|
801 |
x := extent x.
|
|
802 |
|
|
803 |
x <= (self extent x) ifTrue:[
|
|
804 |
y := extent y.
|
|
805 |
] ifFalse:[
|
|
806 |
y := tabView preferredHeight.
|
|
807 |
].
|
|
808 |
y := y + 8.
|
|
809 |
tabView bottomInset:(y negated).
|
|
810 |
window topInset:y.
|
|
811 |
|
|
812 |
|
|
813 |
!
|
|
814 |
|
|
815 |
update:something with:aParameter from:changedObject
|
|
816 |
"tabView might change its size
|
|
817 |
"
|
|
818 |
(something == #preferredHeight and:[changedObject == tabView]) ifFalse:[
|
|
819 |
^ self
|
|
820 |
].
|
|
821 |
self recomputeSizes
|
|
822 |
|
|
823 |
|
|
824 |
! !
|
|
825 |
|
|
826 |
!UISelectionPanel methodsFor:'drag & drop'!
|
|
827 |
|
|
828 |
startDrag
|
|
829 |
"start drag of selection
|
|
830 |
"
|
|
831 |
|dragObj spec|
|
|
832 |
|
|
833 |
spec := self findSpecFor:selection.
|
|
834 |
|
|
835 |
spec notNil ifTrue:[
|
|
836 |
spec := self buildSpecFrom:spec.
|
|
837 |
|
|
838 |
self showUnselected.
|
|
839 |
dragObj := DropSpecification for:selection specification:spec.
|
|
840 |
self showSelected.
|
|
841 |
DragAndDropManager startDrag:dragObj from:inputView.
|
|
842 |
]
|
|
843 |
|
|
844 |
! !
|
|
845 |
|
|
846 |
!UISelectionPanel methodsFor:'event handling'!
|
|
847 |
|
|
848 |
buttonMotion:state x:x y:y
|
|
849 |
"start a drag on selection
|
|
850 |
"
|
|
851 |
|obj sensor|
|
|
852 |
|
104
|
853 |
(state ~~ 0 and:[selection notNil]) ifTrue:[
|
93
|
854 |
sensor := self sensor.
|
|
855 |
sensor anyButtonPressed ifTrue:[
|
|
856 |
(lastClickPoint dist:(x@y)) > 10.0 ifTrue:[
|
|
857 |
self startDrag
|
|
858 |
]
|
|
859 |
]
|
|
860 |
] ifFalse:[
|
|
861 |
obj := self findObjectAtX:x y:y.
|
|
862 |
|
|
863 |
obj notNil ifTrue:[
|
|
864 |
labelView label:obj name
|
|
865 |
]
|
|
866 |
].
|
|
867 |
!
|
|
868 |
|
|
869 |
buttonPress:button x:x y:y
|
|
870 |
"change selection
|
|
871 |
"
|
|
872 |
lastClickPoint := Point x:x y:y.
|
|
873 |
self selection:(self findObjectAtX:x y:y).
|
|
874 |
|
|
875 |
|
|
876 |
!
|
|
877 |
|
|
878 |
doesNotUnderstand:aMessage
|
|
879 |
"any event message not catched; discard message
|
|
880 |
"
|
|
881 |
|
|
882 |
|
|
883 |
!
|
|
884 |
|
|
885 |
exposeX:x y:y width:w height:h
|
|
886 |
"handle an expose event from device; redraw selection
|
|
887 |
"
|
|
888 |
super exposeX:x y:y width:w height:h.
|
|
889 |
self showSelected.
|
|
890 |
|
|
891 |
! !
|
|
892 |
|
|
893 |
!UISelectionPanel methodsFor:'initialization'!
|
|
894 |
|
|
895 |
initialize
|
|
896 |
|y|
|
|
897 |
|
|
898 |
super initialize.
|
|
899 |
tabView := TabView origin:0.0@0.0 corner:1.0@0.0 in:self.
|
|
900 |
window := NoteBookFrameView origin:0.0@0.0 corner:1.0@1.0 in:self.
|
|
901 |
labelView := Label origin:0.0@1.0 corner:1.0@1.0 in:self.
|
|
902 |
inputView := InputView origin:0.0@0.0 extent:1.0@1.0 in:window.
|
|
903 |
|
|
904 |
y := labelView preferredExtent y.
|
|
905 |
window bottomInset:y.
|
|
906 |
labelView topInset:(y negated).
|
|
907 |
|
|
908 |
inputView eventReceiver:self.
|
|
909 |
inputView enableButtonEvents.
|
|
910 |
inputView enableButtonMotionEvents.
|
|
911 |
inputView enableMotionEvents.
|
98
|
912 |
inputView delegate:(KeyboardForwarder from:inputView toView:tabView).
|
93
|
913 |
|
104
|
914 |
|
93
|
915 |
tabView tabWidget:#Window.
|
104
|
916 |
tabView useIndex:true.
|
93
|
917 |
|
|
918 |
tabView styleAt:#expandSelection put:6@2.
|
|
919 |
tabView styleAt:#labelBottomInset put:4.
|
|
920 |
tabView styleAt:#lableTopInset put:0.
|
|
921 |
tabView font:(Label defaultFont).
|
|
922 |
tabView addDependent:self.
|
98
|
923 |
self delegate:(KeyboardForwarder from:self toView:tabView).
|
93
|
924 |
|
|
925 |
window viewBackground:(tabView styleAt:#selectedColor).
|
|
926 |
labelView backgroundColor:(tabView styleAt:#unselectedColor).
|
|
927 |
|
|
928 |
! !
|
|
929 |
|
|
930 |
!UISelectionPanel methodsFor:'searching'!
|
|
931 |
|
|
932 |
buildSpecFrom:aSpec
|
|
933 |
"build spec out of spec
|
|
934 |
"
|
|
935 |
|spec comp coll|
|
|
936 |
|
|
937 |
(aSpec notNil and:[aSpec canUIDrag]) ifFalse:[
|
|
938 |
^ nil
|
|
939 |
].
|
|
940 |
|
|
941 |
(aSpec class supportsSubComponents and:[aSpec component notNil]) ifFalse:[
|
|
942 |
^ aSpec
|
|
943 |
].
|
|
944 |
comp := aSpec component.
|
|
945 |
spec := aSpec copy.
|
|
946 |
spec component:nil.
|
|
947 |
|
|
948 |
comp canUIDrag ifFalse:[
|
|
949 |
^ spec
|
|
950 |
].
|
|
951 |
coll := OrderedCollection new.
|
|
952 |
|
|
953 |
comp do:[:anEntry||spc|
|
|
954 |
(spc := self buildSpecFrom:anEntry) notNil ifTrue:[
|
|
955 |
coll add:spc
|
|
956 |
]
|
|
957 |
].
|
|
958 |
coll isEmpty ifTrue:[
|
|
959 |
^ spec
|
|
960 |
].
|
|
961 |
comp := comp copy.
|
|
962 |
comp collection:coll.
|
|
963 |
spec component:comp.
|
|
964 |
^ spec
|
|
965 |
!
|
|
966 |
|
|
967 |
findObjectAtX:x y:y
|
|
968 |
"find the origin/corner of the currentWidget
|
|
969 |
"
|
|
970 |
|view viewId point|
|
|
971 |
|
|
972 |
point := Point x:x y:y.
|
|
973 |
point := device translatePoint:point from:(inputView id)
|
|
974 |
to:(inputView device rootView id).
|
|
975 |
inputView lower.
|
|
976 |
viewId := device viewIdFromPoint:point in:(window id).
|
|
977 |
view := device viewFromId:viewId.
|
|
978 |
inputView raise.
|
|
979 |
|
|
980 |
(view ~~ window and:[view ~~ inputView]) ifTrue:[
|
|
981 |
(self findSpecFor:view) notNil ifTrue:[
|
|
982 |
^ view
|
|
983 |
]
|
|
984 |
].
|
|
985 |
^ nil
|
|
986 |
|
|
987 |
|
|
988 |
!
|
|
989 |
|
|
990 |
findSpecFor:anObject
|
|
991 |
"returns subspec assigned to instance or nil
|
|
992 |
"
|
|
993 |
|name components spec|
|
|
994 |
|
|
995 |
anObject notNil ifTrue:[
|
|
996 |
name := anObject name.
|
|
997 |
|
|
998 |
specification do:[:aSpec|
|
|
999 |
aSpec name = name ifTrue:[
|
|
1000 |
aSpec canUIDrag ifTrue:[^ aSpec]
|
|
1001 |
ifFalse:[^ nil]
|
|
1002 |
]
|
|
1003 |
]
|
|
1004 |
].
|
|
1005 |
^ nil
|
|
1006 |
|
|
1007 |
! !
|
|
1008 |
|
|
1009 |
!UISelectionPanel methodsFor:'selections'!
|
|
1010 |
|
|
1011 |
handlesOf:aComponent do:aOneArgBlock
|
|
1012 |
"evaluate the block on each handle; the argument to the block
|
|
1013 |
is a rectangle
|
|
1014 |
"
|
|
1015 |
aComponent notNil ifTrue:[
|
|
1016 |
aOneArgBlock value:(aComponent origin - (4@4) extent:7@7).
|
|
1017 |
aOneArgBlock value:(aComponent corner - (4@4) extent:7@7).
|
|
1018 |
aOneArgBlock value:(aComponent topRight - (4@4) extent:7@7).
|
|
1019 |
aOneArgBlock value:(aComponent bottomLeft - (4@4) extent:7@7).
|
|
1020 |
aOneArgBlock value:(aComponent leftCenter - (4@4) extent:7@7).
|
|
1021 |
aOneArgBlock value:(aComponent rightCenter - (4@4) extent:7@7).
|
|
1022 |
aOneArgBlock value:(aComponent topCenter - (4@4) extent:7@7).
|
|
1023 |
aOneArgBlock value:(aComponent bottomCenter - (4@4) extent:7@7).
|
|
1024 |
]
|
|
1025 |
|
|
1026 |
|
|
1027 |
!
|
|
1028 |
|
|
1029 |
selection:anObject
|
|
1030 |
"selection changed
|
|
1031 |
"
|
|
1032 |
|spec|
|
|
1033 |
|
|
1034 |
selection ~~ anObject ifTrue:[
|
|
1035 |
self showUnselected.
|
|
1036 |
spec := self findSpecFor:anObject.
|
|
1037 |
|
|
1038 |
spec notNil ifTrue:[
|
|
1039 |
selection := anObject.
|
|
1040 |
self showSelected
|
|
1041 |
] ifFalse:[
|
|
1042 |
selection := nil
|
|
1043 |
].
|
|
1044 |
|
|
1045 |
selection notNil ifTrue:[
|
|
1046 |
labelView label:(selection name)
|
|
1047 |
]
|
|
1048 |
]
|
|
1049 |
|
|
1050 |
!
|
|
1051 |
|
|
1052 |
showSelected
|
|
1053 |
"show selected
|
|
1054 |
"
|
|
1055 |
selection notNil ifTrue:[
|
|
1056 |
window clippedByChildren:false.
|
|
1057 |
|
|
1058 |
self handlesOf:selection do:[:aRectangle|
|
|
1059 |
window fillRectangle:aRectangle
|
|
1060 |
].
|
|
1061 |
window clippedByChildren:true.
|
|
1062 |
].
|
|
1063 |
!
|
|
1064 |
|
|
1065 |
showUnselected
|
|
1066 |
"show unselected
|
|
1067 |
"
|
|
1068 |
|r|
|
|
1069 |
|
|
1070 |
selection isNil ifTrue:[
|
|
1071 |
^ self
|
|
1072 |
].
|
|
1073 |
|
|
1074 |
window clippedByChildren:false.
|
|
1075 |
|
|
1076 |
self handlesOf:selection do:[:aRectangle|
|
|
1077 |
window clearRectangle:aRectangle
|
|
1078 |
].
|
|
1079 |
window clippedByChildren:true.
|
|
1080 |
|
|
1081 |
"must redraw all components which are affected b the handles
|
|
1082 |
"
|
|
1083 |
r := (selection originRelativeTo:window) - (4@4) extent:(selection extent + (4@4)).
|
|
1084 |
|
|
1085 |
window subViews do:[:aComponent |
|
|
1086 |
|absOrg absFrame|
|
|
1087 |
|
|
1088 |
aComponent ~~ inputView ifTrue:[
|
|
1089 |
absOrg := aComponent originRelativeTo:window.
|
|
1090 |
absFrame := absOrg extent:(aComponent extent).
|
|
1091 |
|
|
1092 |
(absFrame intersects:r) ifTrue:[
|
|
1093 |
aComponent withAllSubViewsDo:[:aView|
|
|
1094 |
aView clear.
|
|
1095 |
aView exposeX:0 y:0 width:9999 height:9999.
|
|
1096 |
]
|
|
1097 |
]
|
|
1098 |
]
|
|
1099 |
]
|
|
1100 |
|
|
1101 |
! !
|
|
1102 |
|
|
1103 |
!UISelectionPanel::DropSpecification class methodsFor:'instance creation'!
|
|
1104 |
|
|
1105 |
for:aView specification:aSpec
|
|
1106 |
"create drop object for a view derived from a specification
|
|
1107 |
"
|
|
1108 |
aView topView raise.
|
|
1109 |
aView device sync.
|
|
1110 |
aView invalidate.
|
|
1111 |
aView windowGroup processExposeEvents.
|
|
1112 |
DisplayObject := Image fromView:aView grab:false.
|
|
1113 |
|
|
1114 |
DisplayObject extent ~= aView extent ifTrue:[
|
|
1115 |
DisplayObject := Form extent:(aView extent) depth:1.
|
|
1116 |
DisplayObject colorMap:(Array with:Color white with:Color black).
|
|
1117 |
DisplayObject fill:(Color colorId:0).
|
|
1118 |
DisplayObject paint:(Color colorId:1).
|
|
1119 |
DisplayObject displayRectangleX:0 y:0 width:aView extent x height:aView extent y.
|
|
1120 |
].
|
|
1121 |
|
|
1122 |
^ self new theObject:aSpec
|
|
1123 |
! !
|
|
1124 |
|
|
1125 |
!UISelectionPanel class methodsFor:'documentation'!
|
|
1126 |
|
|
1127 |
version
|
|
1128 |
^ '$Header$'
|
|
1129 |
! !
|