author | ca |
Fri, 27 Jun 1997 14:54:23 +0200 | |
changeset 185 | 10b797de4c2d |
parent 182 | 5e0f65e92d95 |
child 189 | bb569079ae6b |
permissions | -rw-r--r-- |
93 | 1 |
" |
182 | 2 |
COPYRIGHT (c) 1997 by Claus Gittinger / 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 |
||
15 |
ApplicationModel subclass:#UISelectionPanel |
|
16 |
instanceVariableNames:'userClass userSpecs userLabels majorSelection clipBoardSpec' |
|
17 |
classVariableNames:'UserClass UserSpecs UserLabels' |
|
18 |
poolDictionaries:'' |
|
19 |
category:'Interface-UIPainter' |
|
20 |
! |
|
21 |
||
22 |
!UISelectionPanel class methodsFor:'documentation'! |
|
23 |
||
24 |
copyright |
|
25 |
" |
|
26 |
COPYRIGHT (c) 1997 by Claus Gittinger / eXept Software AG |
|
93 | 27 |
All Rights Reserved |
28 |
||
29 |
This software is furnished under a license and may be used |
|
30 |
only in accordance with the terms of that license and with the |
|
31 |
inclusion of the above copyright notice. This software may not |
|
32 |
be provided or otherwise made available to, or used by, any |
|
33 |
other person. No title to or ownership of the software is |
|
34 |
hereby transferred. |
|
35 |
" |
|
36 |
||
37 |
||
38 |
! |
|
39 |
||
40 |
documentation |
|
41 |
" |
|
42 |
implements a selection panel, keeping widgets which could be placed |
|
43 |
into the UIPainter by drag & drop. |
|
44 |
||
182 | 45 |
[start with:] |
46 |
UISelectionPanel open |
|
47 |
||
93 | 48 |
[author:] |
182 | 49 |
Claus Gittinger |
93 | 50 |
Claus Atzkern |
51 |
||
52 |
[see also:] |
|
53 |
TabView |
|
182 | 54 |
NoteBookView |
55 |
UIGalleryView |
|
93 | 56 |
UIPainter |
104 | 57 |
|
93 | 58 |
" |
59 |
||
60 |
! ! |
|
61 |
||
182 | 62 |
!UISelectionPanel class methodsFor:'accessing'! |
93 | 63 |
|
182 | 64 |
specifications |
112 | 65 |
|
182 | 66 |
^ #( |
67 |
#( 'Standarts' #( |
|
68 |
#('Button & Toggle' standartButtonToggle) |
|
69 |
#('Menus' standartMenus) |
|
70 |
#('Panel' standartPanels) |
|
71 |
#('Text' standartText) |
|
72 |
#('Views' standartViews) |
|
73 |
#('Canvas' standartCanvas) |
|
74 |
#('Sliders' standartSliders) |
|
75 |
) |
|
76 |
) |
|
93 | 77 |
|
182 | 78 |
#( 'Clip Board' #( |
79 |
#('Copy & Paste Buffer' clipBoardSpec) |
|
80 |
) |
|
81 |
) |
|
135 | 82 |
|
182 | 83 |
#( 'User Defined' #userDefined ) |
84 |
) |
|
93 | 85 |
! ! |
86 |
||
182 | 87 |
!UISelectionPanel class methodsFor:'interface specification'! |
93 | 88 |
|
182 | 89 |
nameAndSelectorSpec |
93 | 90 |
"this window spec was automatically generated by the ST/X UIPainter" |
91 |
||
92 |
"do not manually edit this - the painter/builder may not be able to |
|
93 |
handle the specification if its corrupted." |
|
94 |
||
95 |
" |
|
182 | 96 |
UIPainter new openOnClass:UISelectionPanel andSelector:#nameAndSelectorSpec |
97 |
UISelectionPanel new openInterface:#nameAndSelectorSpec |
|
98 |
" |
|
99 |
||
100 |
<resource: #canvas> |
|
101 |
||
102 |
^ |
|
103 |
||
104 |
#(#FullSpec |
|
105 |
#'window:' |
|
106 |
#(#WindowSpec |
|
107 |
#'name:' 'uIPainterView' |
|
108 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
109 |
#'label:' 'Painter' |
|
110 |
#'bounds:' #(#Rectangle 0 0 315 216) |
|
111 |
) |
|
112 |
#'component:' |
|
113 |
#(#SpecCollection |
|
114 |
#'collection:' |
|
115 |
#( |
|
116 |
#(#LabelSpec |
|
117 |
#'name:' 'title' |
|
118 |
#'layout:' #(#Point 5 10) |
|
119 |
#'label:' 'class & selectors to access user specs:' |
|
120 |
#'adjust:' #left |
|
121 |
#'resizeForLabel:' true |
|
122 |
) |
|
123 |
#(#LabelSpec |
|
124 |
#'name:' 'classLabel' |
|
125 |
#'layout:' #(#AlignmentOrigin 68 0.11 51 0 1 0.5) |
|
126 |
#'label:' 'Class:' |
|
127 |
#'adjust:' #right |
|
128 |
#'resizeForLabel:' true |
|
129 |
) |
|
130 |
#(#InputFieldSpec |
|
131 |
#'name:' 'classField' |
|
132 |
#'layout:' #(#LayoutFrame 74 0.11 39 0 -5 1.0 61 0) |
|
133 |
#'tabable:' true |
|
134 |
#'model:' #className |
|
135 |
#'type:' #string |
|
136 |
) |
|
137 |
#(#LabelSpec |
|
138 |
#'name:' 'labelsLabel' |
|
139 |
#'layout:' #(#AlignmentOrigin 68 0.11 74 0 1 0.5) |
|
140 |
#'label:' 'Labels:' |
|
141 |
#'adjust:' #right |
|
142 |
#'resizeForLabel:' true |
|
143 |
) |
|
144 |
#(#InputFieldSpec |
|
145 |
#'name:' 'labelsField' |
|
146 |
#'layout:' #(#LayoutFrame 74 0.11 64 0 -5 1.0 86 0) |
|
147 |
#'tabable:' true |
|
148 |
#'model:' #labelsKey |
|
149 |
#'type:' #symbolOrNil |
|
150 |
) |
|
151 |
#(#LabelSpec |
|
152 |
#'name:' 'specsLabel' |
|
153 |
#'layout:' #(#AlignmentOrigin 68 0.11 99 0 1 0.5) |
|
154 |
#'label:' 'Specifications:' |
|
155 |
#'adjust:' #right |
|
156 |
#'resizeForLabel:' true |
|
157 |
) |
|
158 |
#(#InputFieldSpec |
|
159 |
#'name:' 'specsField' |
|
160 |
#'layout:' #(#LayoutFrame 74 0.11 89 0 -5 1.0 111 0) |
|
161 |
#'tabable:' true |
|
162 |
#'model:' #specsKey |
|
163 |
#'type:' #symbolOrNil |
|
164 |
) |
|
165 |
#(#HorizontalPanelViewSpec |
|
166 |
#'name:' 'commitPanel' |
|
167 |
#'layout:' #(#LayoutFrame 0 0.0 -23 1.0 0 1.0 0 1.0) |
|
168 |
#'component:' |
|
169 |
#(#SpecCollection |
|
170 |
#'collection:' |
|
171 |
#( |
|
172 |
#(#ActionButtonSpec |
|
173 |
#'name:' 'cancel' |
|
174 |
#'label:' 'cancel' |
|
175 |
#'tabable:' true |
|
176 |
#'model:' #cancel |
|
177 |
#'extent:' #(#Point 153 23) |
|
178 |
) |
|
179 |
#(#ActionButtonSpec |
|
180 |
#'name:' 'accept' |
|
181 |
#'label:' 'ok' |
|
182 |
#'tabable:' true |
|
183 |
#'isDefault:' true |
|
184 |
#'model:' #accept |
|
185 |
#'extent:' #(#Point 153 23) |
|
186 |
) |
|
187 |
) |
|
188 |
) |
|
189 |
#'horizontalLayout:' #fitSpace |
|
190 |
#'verticalLayout:' #fit |
|
191 |
#'horizontalSpace:' 3 |
|
192 |
#'verticalSpace:' 3 |
|
193 |
) |
|
194 |
#(#CheckBoxSpec |
|
195 |
#'name:' 'updateDefaultResources' |
|
196 |
#'layout:' #(#Point 5 133) |
|
197 |
#'model:' #updateDefaultResources |
|
198 |
#'label:' 'Update Default Resources' |
|
199 |
) |
|
200 |
) |
|
201 |
) |
|
202 |
) |
|
203 |
! |
|
204 |
||
205 |
windowSpec |
|
206 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
207 |
||
208 |
"do not manually edit this - the painter/builder may not be able to |
|
209 |
handle the specification if its corrupted." |
|
210 |
||
211 |
" |
|
212 |
UIPainter new openOnClass:UISelectionPanel andSelector:#windowSpec |
|
213 |
UISelectionPanel new openInterface:#windowSpec |
|
214 |
" |
|
215 |
"UISelectionPanel open" |
|
216 |
||
217 |
<resource: #canvas> |
|
218 |
||
219 |
^ |
|
220 |
||
221 |
#(#FullSpec |
|
222 |
#'window:' |
|
223 |
#(#WindowSpec |
|
224 |
#'name:' 'uIPainterView' |
|
225 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
226 |
#'label:' 'Component Gallery' |
|
227 |
#'bounds:' #(#Rectangle 0 0 471 223) |
|
228 |
) |
|
229 |
#'component:' |
|
230 |
#(#SpecCollection |
|
231 |
#'collection:' |
|
232 |
#( |
|
233 |
#(#UIGalleryViewSpec |
|
234 |
#'name:' 'gallery' |
|
235 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 -40 1.0 0 1.0) |
|
236 |
#'tabable:' true |
|
237 |
#'menu:' #galleryList |
|
238 |
#'style:' |
|
239 |
#(#FontDescription |
|
240 |
#helvetica #medium |
|
241 |
#roman #'10' |
|
242 |
) |
|
243 |
#'model:' #galleryModel |
|
244 |
#'tabWidget:' #Window |
|
245 |
#'minorKeys:' #minorKeys |
|
246 |
#'clientSpec:' #clientSpec |
|
247 |
#'raiseMenu:' #raiseMenu |
|
248 |
#'useIndex:' true |
|
249 |
) |
|
250 |
#(#TabViewSpec |
|
251 |
#'name:' 'major' |
|
252 |
#'layout:' #(#LayoutFrame -40 1.0 30 0.0 0 1.0 0 1.0) |
|
253 |
#'menu:' #majorList |
|
254 |
#'style:' |
|
255 |
#(#FontDescription |
|
256 |
#helvetica #medium |
|
257 |
#roman #'10' |
|
258 |
) |
|
259 |
#'model:' #majorChannel |
|
260 |
#'tabWidget:' #Window |
|
261 |
#'direction:' #right |
|
262 |
#'useIndex:' true |
|
263 |
) |
|
264 |
#(#LabelSpec |
|
265 |
#'name:' 'clientSpecLabel' |
|
266 |
#'layout:' #(#AlignmentOrigin 0 0.0 0 1.0 0 1) |
|
267 |
#'label:' '' |
|
268 |
#'adjust:' #left |
|
269 |
#'resizeForLabel:' true |
|
270 |
) |
|
271 |
) |
|
272 |
) |
|
273 |
) |
|
274 |
! ! |
|
275 |
||
276 |
!UISelectionPanel class methodsFor:'menus'! |
|
277 |
||
278 |
menuSelected |
|
279 |
^ #(#Menu #( |
|
280 |
#(#MenuItem |
|
281 |
#'label:' 'copy' |
|
282 |
#'value:' #copy |
|
283 |
) |
|
284 |
#(#MenuItem |
|
285 |
#'label:' 'cut' |
|
286 |
#'value:' #cut |
|
287 |
) |
|
288 |
) |
|
289 |
nil |
|
290 |
nil |
|
291 |
) |
|
292 |
||
293 |
||
294 |
||
295 |
! |
|
296 |
||
297 |
menuUnselected |
|
298 |
^ #(#Menu #( |
|
299 |
#(#MenuItem |
|
300 |
#'label:' 'paste' |
|
301 |
#'value:' #paste |
|
302 |
) |
|
303 |
) |
|
304 |
nil |
|
305 |
nil |
|
306 |
) |
|
307 |
||
308 |
||
309 |
||
310 |
! ! |
|
311 |
||
312 |
!UISelectionPanel class methodsFor:'standart specifications'! |
|
313 |
||
314 |
standartButtonToggle |
|
315 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
316 |
||
317 |
"do not manually edit this - the painter/builder may not be able to |
|
318 |
handle the specification if its corrupted." |
|
319 |
||
320 |
" |
|
321 |
UIPainter new openOnClass:UISelectionPanel andSelector:#standartButtonToggle |
|
322 |
UISelectionPanel new openInterface:#standartButtonToggle |
|
93 | 323 |
" |
324 |
||
325 |
<resource: #canvas> |
|
326 |
||
327 |
^ |
|
147 | 328 |
|
93 | 329 |
#(#FullSpec |
330 |
#'window:' |
|
331 |
#(#WindowSpec |
|
332 |
#'name:' 'uIPainterView' |
|
333 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
334 |
#'label:' 'unnamed' |
|
105 | 335 |
#'bounds:' #(#Rectangle 0 0 439 193) |
93 | 336 |
) |
337 |
#'component:' |
|
338 |
#(#SpecCollection |
|
339 |
#'collection:' |
|
340 |
#( |
|
341 |
#(#ArrowButtonSpec |
|
342 |
#'name:' 'ArrowButton up' |
|
105 | 343 |
#'layout:' #(#LayoutFrame 237 0 20 0 259 0 42 0) |
93 | 344 |
#'isTriggerOnDown:' true |
345 |
#'direction:' #up |
|
346 |
) |
|
347 |
#(#ActionButtonSpec |
|
348 |
#'name:' 'Button' |
|
105 | 349 |
#'layout:' #(#LayoutFrame 20 0 20 0 119 0 42 0) |
93 | 350 |
#'label:' 'Button' |
351 |
) |
|
352 |
#(#RadioButtonSpec |
|
353 |
#'name:' 'RadioButton' |
|
105 | 354 |
#'layout:' #(#LayoutFrame 127 0.0 20 0 226 0 42 0) |
93 | 355 |
#'label:' 'RadioButton' |
356 |
#'isTriggerOnDown:' true |
|
357 |
#'showLamp:' true |
|
358 |
#'lampColor:' #(#Color 100.0 100.0 0.0) |
|
359 |
) |
|
360 |
#(#ArrowButtonSpec |
|
361 |
#'name:' 'ArrowButton down' |
|
182 | 362 |
#'layout:' #(#LayoutFrame 237 0 51 0 259 0 73 0) |
93 | 363 |
#'hasCharacterOrientedLabel:' false |
364 |
#'isTriggerOnDown:' true |
|
365 |
#'direction:' #down |
|
366 |
) |
|
367 |
#(#ArrowButtonSpec |
|
368 |
#'name:' 'ArrowButton left' |
|
182 | 369 |
#'layout:' #(#LayoutFrame 237 0 82 0 259 0 104 0) |
93 | 370 |
#'hasCharacterOrientedLabel:' false |
371 |
#'isTriggerOnDown:' true |
|
372 |
#'direction:' #left |
|
373 |
) |
|
374 |
#(#ArrowButtonSpec |
|
375 |
#'name:' 'ArrowButton right' |
|
182 | 376 |
#'layout:' #(#LayoutFrame 237 0 113 0 259 0 135 0) |
93 | 377 |
#'hasCharacterOrientedLabel:' false |
378 |
#'isTriggerOnDown:' true |
|
379 |
#'direction:' #right |
|
380 |
) |
|
381 |
#(#CheckToggleSpec |
|
382 |
#'name:' 'CheckToggle' |
|
105 | 383 |
#'layout:' #(#LayoutFrame 297 0 82 0 317 0 102 0) |
93 | 384 |
#'isTriggerOnDown:' true |
385 |
#'showLamp:' false |
|
386 |
#'lampColor:' #(#Color 100.0 100.0 0.0) |
|
387 |
) |
|
388 |
#(#ToggleSpec |
|
389 |
#'name:' 'Toggle' |
|
105 | 390 |
#'layout:' #(#LayoutFrame 297 0 20 0 396 0 42 0) |
93 | 391 |
#'label:' 'Toggle' |
392 |
#'isTriggerOnDown:' true |
|
393 |
#'showLamp:' true |
|
394 |
#'lampColor:' #(#Color 100.0 100.0 0.0) |
|
395 |
) |
|
396 |
#(#CheckBoxSpec |
|
397 |
#'name:' 'CheckBox' |
|
182 | 398 |
#'layout:' #(#LayoutFrame 297 0 51 0 396 0 73 0) |
93 | 399 |
#'label:' 'CheckBox' |
400 |
) |
|
105 | 401 |
#(#ActionButtonSpec |
402 |
#'name:' 'ok' |
|
403 |
#'layout:' #(#LayoutFrame 20 0 51 0 119 0 73 0) |
|
404 |
#'label:' 'ok' |
|
405 |
#'model:' #accept |
|
406 |
) |
|
407 |
#(#ActionButtonSpec |
|
408 |
#'name:' 'cancel' |
|
409 |
#'layout:' #(#LayoutFrame 20 0 82 0 119 0 104 0) |
|
410 |
#'label:' 'cancel' |
|
411 |
#'model:' #cancel |
|
412 |
) |
|
413 |
#(#ActionButtonSpec |
|
414 |
#'name:' 'help' |
|
415 |
#'layout:' #(#LayoutFrame 20 0 113 0 119 0 135 0) |
|
416 |
#'label:' 'help' |
|
417 |
#'model:' #help |
|
418 |
) |
|
93 | 419 |
) |
420 |
) |
|
421 |
) |
|
422 |
! |
|
423 |
||
182 | 424 |
standartCanvas |
142 | 425 |
"this window spec was automatically generated by the ST/X UIPainter" |
426 |
||
427 |
"do not manually edit this - the painter/builder may not be able to |
|
428 |
handle the specification if its corrupted." |
|
429 |
||
430 |
" |
|
182 | 431 |
UIPainter new openOnClass:UISelectionPanel andSelector:#standartCanvas |
432 |
UISelectionPanel new openInterface:#standartCanvas |
|
142 | 433 |
" |
434 |
||
435 |
<resource: #canvas> |
|
436 |
||
437 |
^ |
|
438 |
||
439 |
#(#FullSpec |
|
440 |
#'window:' |
|
441 |
#(#WindowSpec |
|
442 |
#'name:' 'uIPainterView' |
|
443 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
444 |
#'label:' 'unnamed' |
|
182 | 445 |
#'bounds:' #(#Rectangle 0 0 370 203) |
446 |
) |
|
447 |
#'component:' |
|
448 |
#(#SpecCollection |
|
449 |
#'collection:' |
|
450 |
#( |
|
451 |
#(#UIGalleryViewSpec |
|
452 |
#'name:' 'Gallery' |
|
453 |
#'layout:' #(#LayoutFrame 16 0 19 0 168 0 92 0) |
|
454 |
#'tabWidget:' #Window |
|
455 |
) |
|
456 |
#(#LabelSpec |
|
457 |
#'name:' 'GalleryLabel' |
|
458 |
#'layout:' #(#AlignmentOrigin 20 0 88 0 0 1) |
|
459 |
#'label:' 'Gallery' |
|
460 |
#'style:' |
|
461 |
#(#FontDescription |
|
462 |
#helvetica #medium |
|
463 |
#roman #'10' |
|
464 |
) |
|
465 |
#'adjust:' #left |
|
466 |
#'resizeForLabel:' true |
|
467 |
#'canUIDrag:' false |
|
468 |
) |
|
469 |
#(#UISubSpecification |
|
470 |
#'name:' 'SubSpecification' |
|
471 |
#'layout:' #(#LayoutFrame 182 0 19 0 334 0 92 0) |
|
472 |
) |
|
473 |
#(#LabelSpec |
|
474 |
#'name:' 'SubSpecificationLabel' |
|
475 |
#'layout:' #(#AlignmentOrigin 186 0 88 0 0 1) |
|
476 |
#'label:' 'SubSpecification' |
|
477 |
#'style:' |
|
478 |
#(#FontDescription |
|
479 |
#helvetica #medium |
|
480 |
#roman #'10' |
|
481 |
) |
|
482 |
#'resizeForLabel:' true |
|
483 |
#'canUIDrag:' false |
|
484 |
) |
|
485 |
#(#SubCanvasSpec |
|
486 |
#'name:' 'SubCanvas' |
|
487 |
#'layout:' #(#LayoutFrame 182 0 104 0 334 0 177 0) |
|
488 |
#'hasHorizontalScrollBar:' true |
|
489 |
#'hasVerticalScrollBar:' true |
|
490 |
) |
|
491 |
#(#LabelSpec |
|
492 |
#'name:' 'subCanvasLabel' |
|
493 |
#'layout:' #(#AlignmentOrigin 255 0 158 0 0 0) |
|
494 |
#'label:' 'SubCanvas' |
|
495 |
#'style:' |
|
496 |
#(#FontDescription |
|
497 |
#helvetica #medium |
|
498 |
#roman #'10' |
|
499 |
) |
|
500 |
#'adjust:' #left |
|
501 |
#'resizeForLabel:' true |
|
502 |
#'canUIDrag:' false |
|
503 |
) |
|
504 |
) |
|
505 |
) |
|
506 |
) |
|
507 |
! |
|
508 |
||
509 |
standartMenus |
|
510 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
511 |
||
512 |
"do not manually edit this - the painter/builder may not be able to |
|
513 |
handle the specification if its corrupted." |
|
514 |
||
515 |
" |
|
516 |
UIPainter new openOnClass:self andSelector:#standartMenus |
|
517 |
self new openInterface:#standartMenus |
|
518 |
" |
|
519 |
||
520 |
<resource: #canvas> |
|
521 |
||
522 |
^ |
|
523 |
||
524 |
#(#FullSpec |
|
525 |
#'window:' |
|
526 |
#(#WindowSpec |
|
527 |
#'name:' 'uIPainterView' |
|
528 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
529 |
#'label:' 'unnamed' |
|
142 | 530 |
#'bounds:' #(#Rectangle 0 0 464 253) |
531 |
) |
|
532 |
#'component:' |
|
533 |
#(#SpecCollection |
|
534 |
#'collection:' |
|
535 |
#( |
|
536 |
#(#ComboBoxSpec |
|
537 |
#'name:' 'ComboBox' |
|
147 | 538 |
#'layout:' #(#LayoutFrame 20 0 14 0 123 0 34 0) |
142 | 539 |
) |
540 |
#(#ComboListSpec |
|
541 |
#'name:' 'ComboList' |
|
147 | 542 |
#'layout:' #(#LayoutFrame 20 0 71 0 123 0 91 0) |
543 |
#'useIndex:' false |
|
142 | 544 |
) |
545 |
#(#PopUpListSpec |
|
546 |
#'name:' 'PopUpList' |
|
147 | 547 |
#'layout:' #(#LayoutFrame 147 0 14 0 250 0 36 0) |
142 | 548 |
#'label:' 'PopUpList' |
147 | 549 |
#'useIndex:' false |
142 | 550 |
) |
551 |
#(#MenuPanelSpec |
|
552 |
#'name:' 'MenuPanel' |
|
147 | 553 |
#'layout:' #(#LayoutFrame 147 0 71 0 250 0 91 0) |
142 | 554 |
) |
555 |
#(#TabViewSpec |
|
556 |
#'name:' 'TabView' |
|
147 | 557 |
#'layout:' #(#LayoutFrame 269 0 14 0 409 0 50 0) |
142 | 558 |
#'tabWidget:' #Window |
559 |
) |
|
560 |
#(#NoteBookViewSpec |
|
182 | 561 |
#'name:' 'NoteBookView' |
147 | 562 |
#'layout:' #(#LayoutFrame 269 0 71 0 409 0 159 0) |
563 |
#'tabWidget:' #Window |
|
142 | 564 |
) |
565 |
#(#LabelSpec |
|
566 |
#'name:' 'label1' |
|
147 | 567 |
#'layout:' #(#LayoutFrame 150 0 73 0 236 0 89 0) |
142 | 568 |
#'label:' 'MenuPanel' |
167 | 569 |
#'style:' |
570 |
#(#FontDescription |
|
571 |
#helvetica #medium |
|
572 |
#roman #'10' |
|
573 |
) |
|
147 | 574 |
#'adjust:' #left |
142 | 575 |
#'canUIDrag:' false |
576 |
) |
|
577 |
) |
|
578 |
) |
|
579 |
) |
|
182 | 580 |
|
581 |
||
142 | 582 |
! |
583 |
||
182 | 584 |
standartPanels |
93 | 585 |
"this window spec was automatically generated by the ST/X UIPainter" |
586 |
||
587 |
"do not manually edit this - the painter/builder may not be able to |
|
588 |
handle the specification if its corrupted." |
|
589 |
||
590 |
" |
|
182 | 591 |
UIPainter new openOnClass:UISelectionPanel andSelector:#standartPanels |
592 |
UISelectionPanel new openInterface:#standartPanels |
|
93 | 593 |
" |
594 |
||
595 |
<resource: #canvas> |
|
596 |
||
597 |
^ |
|
182 | 598 |
|
93 | 599 |
#(#FullSpec |
600 |
#'window:' |
|
601 |
#(#WindowSpec |
|
602 |
#'name:' 'uIPainterView' |
|
603 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
604 |
#'label:' 'unnamed' |
|
182 | 605 |
#'bounds:' #(#Rectangle 0 0 411 131) |
93 | 606 |
) |
607 |
#'component:' |
|
608 |
#(#SpecCollection |
|
609 |
#'collection:' |
|
610 |
#( |
|
611 |
#(#HorizontalPanelViewSpec |
|
612 |
#'name:' 'HorizontalPanelView' |
|
105 | 613 |
#'layout:' #(#LayoutFrame 20 0 20 0 104 0 105 0) |
93 | 614 |
#'component:' |
615 |
#(#SpecCollection |
|
616 |
#'collection:' |
|
617 |
#( |
|
112 | 618 |
#(#LabelSpec |
619 |
#'name:' 'label1' |
|
93 | 620 |
#'label:' 'A' |
112 | 621 |
#'level:' 2 |
622 |
#'extent:' #(#Point 23 23) |
|
93 | 623 |
#'canUIDrag:' false |
624 |
) |
|
112 | 625 |
#(#LabelSpec |
626 |
#'name:' 'label2' |
|
93 | 627 |
#'label:' 'B' |
112 | 628 |
#'level:' 2 |
629 |
#'extent:' #(#Point 23 23) |
|
104 | 630 |
#'canUIDrag:' false |
631 |
) |
|
112 | 632 |
#(#LabelSpec |
633 |
#'name:' 'label3' |
|
104 | 634 |
#'label:' 'C' |
112 | 635 |
#'level:' 2 |
636 |
#'extent:' #(#Point 23 23) |
|
93 | 637 |
#'canUIDrag:' false |
638 |
) |
|
639 |
) |
|
640 |
) |
|
641 |
#'horizontalLayout:' #center |
|
642 |
#'verticalLayout:' #center |
|
643 |
#'horizontalSpace:' 3 |
|
644 |
#'verticalSpace:' 3 |
|
645 |
) |
|
646 |
#(#VariableHorizontalPanelSpec |
|
647 |
#'name:' 'VariableHorizontalPanel' |
|
182 | 648 |
#'layout:' #(#LayoutFrame 249 0 20 0 323 0 105 0) |
93 | 649 |
#'component:' |
650 |
#(#SpecCollection |
|
651 |
#'collection:' |
|
652 |
#( |
|
112 | 653 |
#(#LabelSpec |
654 |
#'name:' 'label4' |
|
93 | 655 |
#'label:' 'A' |
112 | 656 |
#'level:' 2 |
93 | 657 |
#'canUIDrag:' false |
658 |
) |
|
112 | 659 |
#(#LabelSpec |
660 |
#'name:' 'label5' |
|
93 | 661 |
#'label:' 'B' |
112 | 662 |
#'level:' 2 |
93 | 663 |
#'canUIDrag:' false |
664 |
) |
|
665 |
) |
|
666 |
) |
|
667 |
) |
|
668 |
#(#VerticalPanelViewSpec |
|
669 |
#'name:' 'VerticalPanelView' |
|
112 | 670 |
#'layout:' #(#LayoutFrame 110 0 20 0 168 0 105 0) |
93 | 671 |
#'component:' |
672 |
#(#SpecCollection |
|
673 |
#'collection:' |
|
674 |
#( |
|
112 | 675 |
#(#LabelSpec |
676 |
#'name:' 'label6' |
|
93 | 677 |
#'label:' 'A' |
112 | 678 |
#'level:' 2 |
679 |
#'extent:' #(#Point 23 23) |
|
93 | 680 |
#'canUIDrag:' false |
681 |
) |
|
112 | 682 |
#(#LabelSpec |
683 |
#'name:' 'label7' |
|
93 | 684 |
#'label:' 'B' |
112 | 685 |
#'level:' 2 |
686 |
#'extent:' #(#Point 23 23) |
|
104 | 687 |
#'canUIDrag:' false |
688 |
) |
|
112 | 689 |
#(#LabelSpec |
690 |
#'name:' 'label8' |
|
104 | 691 |
#'label:' 'C' |
112 | 692 |
#'level:' 2 |
693 |
#'extent:' #(#Point 23 23) |
|
93 | 694 |
#'canUIDrag:' false |
695 |
) |
|
696 |
) |
|
697 |
) |
|
698 |
#'horizontalLayout:' #center |
|
699 |
#'verticalLayout:' #center |
|
700 |
#'horizontalSpace:' 3 |
|
701 |
#'verticalSpace:' 3 |
|
702 |
) |
|
703 |
#(#VariableVerticalPanelSpec |
|
704 |
#'name:' 'VariableVerticalPanel' |
|
182 | 705 |
#'layout:' #(#LayoutFrame 328 0 20 0 402 0 105 0) |
93 | 706 |
#'component:' |
707 |
#(#SpecCollection |
|
708 |
#'collection:' |
|
709 |
#( |
|
112 | 710 |
#(#LabelSpec |
711 |
#'name:' 'label9' |
|
93 | 712 |
#'label:' 'A' |
112 | 713 |
#'level:' 2 |
93 | 714 |
#'canUIDrag:' false |
715 |
) |
|
112 | 716 |
#(#LabelSpec |
717 |
#'name:' 'label10' |
|
93 | 718 |
#'label:' 'B' |
112 | 719 |
#'level:' 2 |
93 | 720 |
#'canUIDrag:' false |
721 |
) |
|
722 |
) |
|
723 |
) |
|
724 |
) |
|
104 | 725 |
#(#PanelViewSpec |
726 |
#'name:' 'PanelView' |
|
112 | 727 |
#'layout:' #(#LayoutFrame 174 0 20 0 232 0 105 0) |
104 | 728 |
#'component:' |
729 |
#(#SpecCollection |
|
730 |
#'collection:' |
|
731 |
#( |
|
112 | 732 |
#(#LabelSpec |
733 |
#'name:' 'label11' |
|
104 | 734 |
#'label:' 'A' |
112 | 735 |
#'level:' 2 |
736 |
#'extent:' #(#Point 23 23) |
|
104 | 737 |
#'canUIDrag:' false |
738 |
) |
|
112 | 739 |
#(#LabelSpec |
740 |
#'name:' 'label12' |
|
104 | 741 |
#'label:' 'B' |
112 | 742 |
#'level:' 2 |
743 |
#'extent:' #(#Point 23 23) |
|
104 | 744 |
#'canUIDrag:' false |
745 |
) |
|
112 | 746 |
#(#LabelSpec |
747 |
#'name:' 'label13' |
|
104 | 748 |
#'label:' 'C' |
112 | 749 |
#'level:' 2 |
750 |
#'extent:' #(#Point 23 23) |
|
104 | 751 |
#'canUIDrag:' false |
752 |
) |
|
112 | 753 |
#(#LabelSpec |
754 |
#'name:' 'label14' |
|
104 | 755 |
#'label:' 'D' |
112 | 756 |
#'level:' 2 |
757 |
#'extent:' #(#Point 23 23) |
|
104 | 758 |
#'canUIDrag:' false |
759 |
) |
|
112 | 760 |
#(#LabelSpec |
761 |
#'name:' 'label15' |
|
104 | 762 |
#'label:' 'E' |
112 | 763 |
#'level:' 2 |
764 |
#'extent:' #(#Point 23 23) |
|
104 | 765 |
#'canUIDrag:' false |
766 |
) |
|
767 |
) |
|
768 |
) |
|
769 |
#'horizontalLayout:' #fitSpace |
|
770 |
#'verticalLayout:' #fitSpace |
|
771 |
#'horizontalSpace:' 3 |
|
772 |
#'verticalSpace:' 3 |
|
773 |
) |
|
93 | 774 |
) |
775 |
) |
|
776 |
) |
|
777 |
! |
|
778 |
||
182 | 779 |
standartSliders |
93 | 780 |
"this window spec was automatically generated by the ST/X UIPainter" |
781 |
||
782 |
"do not manually edit this - the painter/builder may not be able to |
|
783 |
handle the specification if its corrupted." |
|
784 |
||
785 |
" |
|
182 | 786 |
UIPainter new openOnClass:self andSelector:#standartSliders |
787 |
self new openInterface:#standartSliders |
|
93 | 788 |
" |
789 |
||
790 |
<resource: #canvas> |
|
791 |
||
792 |
^ |
|
182 | 793 |
|
93 | 794 |
#(#FullSpec |
795 |
#'window:' |
|
796 |
#(#WindowSpec |
|
797 |
#'name:' 'uIPainterView' |
|
798 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
799 |
#'label:' 'unnamed' |
|
105 | 800 |
#'bounds:' #(#Rectangle 0 0 445 162) |
93 | 801 |
) |
802 |
#'component:' |
|
803 |
#(#SpecCollection |
|
804 |
#'collection:' |
|
805 |
#( |
|
104 | 806 |
#(#SliderSpec |
807 |
#'name:' 'Vertical Slider' |
|
105 | 808 |
#'layout:' #(#LayoutFrame 20 0 20 0 38 0 108 0) |
104 | 809 |
#'orientation:' #vertical |
93 | 810 |
) |
104 | 811 |
#(#ThumbWheelSpec |
812 |
#'name:' 'Vertical ThumbWheel' |
|
105 | 813 |
#'layout:' #(#LayoutFrame 48 0 20 0 63 0 108 0) |
104 | 814 |
#'orientation:' #vertical |
815 |
#'start:' 0 |
|
816 |
#'stop:' 360 |
|
93 | 817 |
) |
104 | 818 |
#(#ThumbWheelSpec |
819 |
#'name:' 'Horizontal ThumbWheel' |
|
105 | 820 |
#'layout:' #(#LayoutFrame 102 0 20 0 191 0 35 0) |
104 | 821 |
#'orientation:' #horizontal |
822 |
#'start:' 0 |
|
823 |
#'stop:' 360 |
|
93 | 824 |
) |
825 |
#(#SliderSpec |
|
104 | 826 |
#'name:' 'Horizontal Slider' |
150 | 827 |
#'layout:' #(#LayoutFrame 102 0 53 0 191 0 71 0) |
104 | 828 |
#'orientation:' #horizontal |
829 |
#'start:' 0 |
|
830 |
#'stop:' 100 |
|
93 | 831 |
) |
150 | 832 |
#(#ProgressIndicatorSpec |
833 |
#'name:' 'Progress Indicator' |
|
834 |
#'layout:' #(#LayoutFrame 102 0 90 0 191 0 108 0) |
|
835 |
#'showPercentage:' true |
|
836 |
) |
|
93 | 837 |
) |
838 |
) |
|
839 |
) |
|
182 | 840 |
|
93 | 841 |
! |
842 |
||
182 | 843 |
standartText |
97 | 844 |
"this window spec was automatically generated by the ST/X UIPainter" |
845 |
||
846 |
"do not manually edit this - the painter/builder may not be able to |
|
847 |
handle the specification if its corrupted." |
|
848 |
||
849 |
" |
|
182 | 850 |
UIPainter new openOnClass:UISelectionPanel andSelector:#standartText |
851 |
UISelectionPanel new openInterface:#standartText |
|
97 | 852 |
" |
853 |
||
854 |
<resource: #canvas> |
|
855 |
||
856 |
^ |
|
139 | 857 |
|
97 | 858 |
#(#FullSpec |
859 |
#'window:' |
|
860 |
#(#WindowSpec |
|
861 |
#'name:' 'uIPainterView' |
|
862 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
863 |
#'label:' 'unnamed' |
|
139 | 864 |
#'bounds:' #(#Rectangle 0 0 467 207) |
97 | 865 |
) |
866 |
#'component:' |
|
867 |
#(#SpecCollection |
|
868 |
#'collection:' |
|
869 |
#( |
|
870 |
#(#InputFieldSpec |
|
871 |
#'name:' 'EditField' |
|
182 | 872 |
#'layout:' #(#LayoutFrame 20 0 100 0 199 0 122 0) |
97 | 873 |
) |
874 |
#(#LabelSpec |
|
875 |
#'name:' 'Text Label' |
|
182 | 876 |
#'layout:' #(#LayoutFrame 20 0 128 0 199 0 150 0) |
147 | 877 |
#'label:' '' |
97 | 878 |
) |
879 |
#(#TextEditorSpec |
|
880 |
#'name:' 'EditTextView' |
|
182 | 881 |
#'layout:' #(#LayoutFrame 20 0 13 0 199 0 94 0) |
139 | 882 |
#'hasHorizontalScrollBar:' true |
883 |
#'hasVerticalScrollBar:' true |
|
884 |
) |
|
885 |
#(#SequenceViewSpec |
|
886 |
#'name:' 'SelectionInListView' |
|
182 | 887 |
#'layout:' #(#LayoutFrame 222 0 13 0 401 0 94 0) |
139 | 888 |
#'hasHorizontalScrollBar:' true |
889 |
#'hasVerticalScrollBar:' true |
|
890 |
) |
|
891 |
#(#HTMLViewSpec |
|
892 |
#'name:' 'HTMLView' |
|
182 | 893 |
#'layout:' #(#LayoutFrame 222 0 100 0 401 0 181 0) |
97 | 894 |
#'hasHorizontalScrollBar:' true |
895 |
#'hasVerticalScrollBar:' true |
|
896 |
) |
|
139 | 897 |
#(#LabelSpec |
898 |
#'name:' 'HTMLViewLabel' |
|
182 | 899 |
#'layout:' #(#AlignmentOrigin 295 0 178 0 0 1) |
139 | 900 |
#'label:' 'HTMLView' |
167 | 901 |
#'style:' |
902 |
#(#FontDescription |
|
903 |
#helvetica #medium |
|
904 |
#roman #'10' |
|
905 |
) |
|
147 | 906 |
#'adjust:' #left |
182 | 907 |
#'resizeForLabel:' true |
139 | 908 |
#'canUIDrag:' false |
97 | 909 |
) |
139 | 910 |
#(#LabelSpec |
911 |
#'name:' 'label1' |
|
182 | 912 |
#'layout:' #(#AlignmentOrigin 93 0 91 0 0 1) |
139 | 913 |
#'label:' 'EditText' |
167 | 914 |
#'style:' |
915 |
#(#FontDescription |
|
916 |
#helvetica #medium |
|
917 |
#roman #'10' |
|
918 |
) |
|
147 | 919 |
#'adjust:' #left |
182 | 920 |
#'resizeForLabel:' true |
139 | 921 |
#'canUIDrag:' false |
97 | 922 |
) |
139 | 923 |
#(#LabelSpec |
924 |
#'name:' 'label2' |
|
182 | 925 |
#'layout:' #(#AlignmentOrigin 295 0 91 0 0 1) |
139 | 926 |
#'label:' 'SelectionInList' |
167 | 927 |
#'style:' |
928 |
#(#FontDescription |
|
929 |
#helvetica #medium |
|
930 |
#roman #'10' |
|
931 |
) |
|
147 | 932 |
#'adjust:' #left |
182 | 933 |
#'resizeForLabel:' true |
147 | 934 |
#'canUIDrag:' false |
935 |
) |
|
936 |
#(#LabelSpec |
|
937 |
#'name:' 'labelInLabel' |
|
182 | 938 |
#'layout:' #(#AlignmentOrigin 24 0 139 0 0 0.5) |
147 | 939 |
#'label:' 'Label' |
167 | 940 |
#'style:' |
941 |
#(#FontDescription |
|
942 |
#helvetica #medium |
|
943 |
#roman #'10' |
|
944 |
) |
|
147 | 945 |
#'adjust:' #left |
182 | 946 |
#'resizeForLabel:' true |
139 | 947 |
#'canUIDrag:' false |
98 | 948 |
) |
97 | 949 |
) |
950 |
) |
|
951 |
) |
|
952 |
! |
|
953 |
||
182 | 954 |
standartUserPanel |
93 | 955 |
"this window spec was automatically generated by the ST/X UIPainter" |
956 |
||
957 |
"do not manually edit this - the painter/builder may not be able to |
|
958 |
handle the specification if its corrupted." |
|
959 |
||
960 |
" |
|
182 | 961 |
UIPainter new openOnClass:UISelectionPanel andSelector:#standartUserPanel |
962 |
UISelectionPanel new openInterface:#standartUserPanel |
|
963 |
" |
|
964 |
||
965 |
<resource: #canvas> |
|
966 |
||
967 |
^ |
|
968 |
||
969 |
#(#FullSpec |
|
970 |
#'window:' |
|
971 |
#(#WindowSpec |
|
972 |
#'name:' 'uIPainterView' |
|
973 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
974 |
#'label:' 'unnamed' |
|
975 |
#'bounds:' #(#Rectangle 0 0 445 162) |
|
976 |
) |
|
977 |
#'component:' |
|
978 |
#(#SpecCollection |
|
979 |
#'collection:' |
|
980 |
#( |
|
981 |
#(#LabelSpec |
|
982 |
#'name:' 'helpText' |
|
983 |
#'layout:' #(#Point 10 0) |
|
984 |
#'labelChannel:' #userDefinedHelpText |
|
985 |
#'resizeForLabel:' true |
|
986 |
#'canUIDrag:' false |
|
987 |
) |
|
988 |
) |
|
989 |
) |
|
990 |
) |
|
991 |
! |
|
992 |
||
993 |
standartViews |
|
994 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
995 |
||
996 |
"do not manually edit this - the painter/builder may not be able to |
|
997 |
handle the specification if its corrupted." |
|
998 |
||
999 |
" |
|
1000 |
UIPainter new openOnClass:UISelectionPanel andSelector:#standartViews |
|
1001 |
UISelectionPanel new openInterface:#standartViews |
|
93 | 1002 |
" |
1003 |
||
1004 |
<resource: #canvas> |
|
1005 |
||
1006 |
^ |
|
135 | 1007 |
|
93 | 1008 |
#(#FullSpec |
1009 |
#'window:' |
|
1010 |
#(#WindowSpec |
|
1011 |
#'name:' 'uIPainterView' |
|
1012 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
1013 |
#'label:' 'unnamed' |
|
182 | 1014 |
#'bounds:' #(#Rectangle 0 0 431 200) |
93 | 1015 |
) |
1016 |
#'component:' |
|
1017 |
#(#SpecCollection |
|
1018 |
#'collection:' |
|
1019 |
#( |
|
1020 |
#(#FramedBoxSpec |
|
1021 |
#'name:' 'FramedBox' |
|
182 | 1022 |
#'layout:' #(#LayoutFrame 16 0 14 0 136 0 94 0) |
104 | 1023 |
#'label:' 'FramedBox' |
93 | 1024 |
#'labelPosition:' #topCenter |
1025 |
) |
|
1026 |
#(#ViewSpec |
|
98 | 1027 |
#'name:' 'View' |
182 | 1028 |
#'layout:' #(#LayoutFrame 152 0 14 0 266 0 94 0) |
93 | 1029 |
) |
1030 |
#(#DividerSpec |
|
1031 |
#'name:' 'Horizontal Seperator' |
|
182 | 1032 |
#'layout:' #(#LayoutFrame 16 0 107 0 137 0 111 0) |
93 | 1033 |
#'orientation:' #horizontal |
1034 |
) |
|
1035 |
#(#DividerSpec |
|
1036 |
#'name:' 'Vertical Seperator' |
|
182 | 1037 |
#'layout:' #(#LayoutFrame 16 0 107 0 20 0 159 0) |
93 | 1038 |
#'orientation:' #vertical |
1039 |
) |
|
104 | 1040 |
#(#LabelSpec |
112 | 1041 |
#'name:' 'viewLabel' |
182 | 1042 |
#'layout:' #(#AlignmentOrigin 158 0 20 0 0 0) |
112 | 1043 |
#'label:' 'View' |
167 | 1044 |
#'style:' |
1045 |
#(#FontDescription |
|
1046 |
#helvetica #medium |
|
1047 |
#roman #'10' |
|
1048 |
) |
|
147 | 1049 |
#'adjust:' #left |
182 | 1050 |
#'resizeForLabel:' true |
104 | 1051 |
#'canUIDrag:' false |
1052 |
) |
|
143
9add9e2609d9
change SubCanvasSpec; have to update caused by new attributes
ca
parents:
142
diff
changeset
|
1053 |
#(#LabelSpec |
9add9e2609d9
change SubCanvasSpec; have to update caused by new attributes
ca
parents:
142
diff
changeset
|
1054 |
#'name:' 'Seperators' |
182 | 1055 |
#'layout:' #(#AlignmentOrigin 136 0 117 0 1 0) |
143
9add9e2609d9
change SubCanvasSpec; have to update caused by new attributes
ca
parents:
142
diff
changeset
|
1056 |
#'label:' 'Seperators' |
167 | 1057 |
#'style:' |
1058 |
#(#FontDescription |
|
1059 |
#helvetica #medium |
|
1060 |
#roman #'10' |
|
1061 |
) |
|
147 | 1062 |
#'adjust:' #left |
182 | 1063 |
#'resizeForLabel:' true |
143
9add9e2609d9
change SubCanvasSpec; have to update caused by new attributes
ca
parents:
142
diff
changeset
|
1064 |
#'canUIDrag:' false |
9add9e2609d9
change SubCanvasSpec; have to update caused by new attributes
ca
parents:
142
diff
changeset
|
1065 |
) |
150 | 1066 |
#(#RegionSpec |
1067 |
#'name:' 'Region' |
|
182 | 1068 |
#'layout:' #(#LayoutFrame 278 0 14 0 358 0 94 0) |
150 | 1069 |
#'lineWidth:' 2 |
1070 |
#'regionType:' #ellipse |
|
1071 |
) |
|
1072 |
#(#LabelSpec |
|
1073 |
#'name:' 'RegionLabel' |
|
182 | 1074 |
#'layout:' #(#AlignmentOrigin 319 0 54 0 0.5 0.5) |
150 | 1075 |
#'label:' 'Region' |
167 | 1076 |
#'style:' |
1077 |
#(#FontDescription |
|
1078 |
#helvetica #medium |
|
1079 |
#roman #'10' |
|
1080 |
) |
|
182 | 1081 |
#'resizeForLabel:' true |
150 | 1082 |
#'canUIDrag:' false |
1083 |
) |
|
93 | 1084 |
) |
1085 |
) |
|
1086 |
) |
|
1087 |
! ! |
|
1088 |
||
182 | 1089 |
!UISelectionPanel methodsFor:'actions'! |
1090 |
||
1091 |
defineClassAndSelector |
|
1092 |
|bd cls sel lbl| |
|
1093 |
||
1094 |
bd := IdentityDictionary new. |
|
1095 |
bd at:#className put:( userClass asValue). |
|
1096 |
bd at:#specsKey put:( (userSpecs ? '') asValue). |
|
1097 |
bd at:#labelsKey put:( (userLabels ? '') asValue). |
|
1098 |
bd at:#updateDefaultResources put:(false asValue). |
|
1099 |
||
1100 |
(self openDialogInterface:#nameAndSelectorSpec withBindings:bd) ifTrue:[ |
|
1101 |
( (cls := (bd at:#className) value) notNil |
|
1102 |
and:[(sel := (bd at:#specsKey) value) notNil |
|
1103 |
and:[(lbl := (bd at:#labelsKey) value) notNil]] |
|
1104 |
) ifTrue:[ |
|
1105 |
userClass := cls. |
|
1106 |
userSpecs := sel. |
|
1107 |
userLabels := lbl. |
|
1108 |
||
1109 |
(bd at:#updateDefaultResources) value ifTrue:[ |
|
1110 |
UserClass := userClass. |
|
1111 |
UserSpecs := userSpecs. |
|
1112 |
UserLabels := userLabels. |
|
1113 |
] |
|
1114 |
] |
|
1115 |
]. |
|
1116 |
! |
|
1117 |
||
1118 |
paste:something |
|
1119 |
"paste something at a point |
|
1120 |
" |
|
1121 |
|coll specs point device gallery ext spec| |
|
1122 |
||
1123 |
clipBoardSpec isNil ifTrue:[ |
|
1124 |
clipBoardSpec := SpecCollection new. |
|
1125 |
clipBoardSpec collection:(OrderedCollection new). |
|
1126 |
]. |
|
1127 |
coll := clipBoardSpec collection. |
|
1128 |
gallery := self builder componentAt:#gallery. |
|
1129 |
device := gallery device. |
|
1130 |
||
1131 |
point := device translatePoint:(device pointerPosition) |
|
1132 |
from:(device rootView id) |
|
1133 |
to:(gallery canvas id). |
|
1134 |
||
1135 |
point y < 1 ifTrue:[point y:1]. |
|
1136 |
ext := gallery extent - (10@10). |
|
93 | 1137 |
|
182 | 1138 |
(specs := something) isCollection ifFalse:[ |
1139 |
specs := Array with:something |
|
1140 |
]. |
|
1141 |
||
1142 |
specs do:[:aSpec| |
|
1143 |
point x > ext x ifTrue:[point x:1]. |
|
1144 |
point y > ext y ifTrue:[point y:1]. |
|
1145 |
||
1146 |
spec := aSpec copy. |
|
1147 |
spec layout:(LayoutOrigin fromPoint:point). |
|
1148 |
coll add:spec. |
|
1149 |
point := point + (20@20). |
|
1150 |
]. |
|
1151 |
gallery update. |
|
1152 |
! |
|
1153 |
||
1154 |
raiseMenu |
|
1155 |
"can open menu |
|
1156 |
" |
|
1157 |
|spec menu value collection paste| |
|
1158 |
||
1159 |
spec := self clientSpec value. |
|
112 | 1160 |
|
182 | 1161 |
spec notNil ifTrue:[ |
1162 |
menu := self class menuSelected decodeAsLiteralArray. |
|
1163 |
self isClipBoard ifFalse:[ |
|
1164 |
(menu someMenuItemWithValue:#cut) disable. |
|
1165 |
]. |
|
1166 |
||
1167 |
(value := menu startUp) == #cut ifTrue:[ |
|
1168 |
clipBoardSpec collection remove:spec ifAbsent:nil. |
|
1169 |
(self builder componentAt:#gallery) update. |
|
1170 |
] ifFalse:[ |
|
1171 |
value == #copy ifTrue:[ |
|
1172 |
self window setSelection:spec |
|
1173 |
] |
|
1174 |
]. |
|
1175 |
^ self |
|
1176 |
]. |
|
1177 |
||
1178 |
self isUserBoard ifTrue:[ |
|
1179 |
^ self defineClassAndSelector |
|
1180 |
]. |
|
1181 |
||
1182 |
paste := self window getSelection. |
|
1183 |
||
1184 |
(self canPaste:paste) ifTrue:[ |
|
1185 |
menu := self class menuUnselected decodeAsLiteralArray. |
|
1186 |
||
1187 |
(menu startUp) == #paste ifTrue:[ |
|
1188 |
self paste:paste |
|
1189 |
] |
|
1190 |
]. |
|
112 | 1191 |
! ! |
1192 |
||
1193 |
!UISelectionPanel methodsFor:'aspects'! |
|
1194 |
||
182 | 1195 |
clientSpec |
1196 |
"automatically generated by UIPainter ..." |
|
1197 |
||
112 | 1198 |
|holder| |
1199 |
||
182 | 1200 |
(holder := builder bindingAt:#clientSpec) isNil ifTrue:[ |
1201 |
builder aspectAt:#clientSpec put:(holder := ValueHolder new). |
|
1202 |
holder addDependent:self. |
|
93 | 1203 |
]. |
112 | 1204 |
^ holder |
93 | 1205 |
! |
1206 |
||
182 | 1207 |
clipBoardSpec |
1208 |
^ clipBoardSpec |
|
1209 |
! |
|
1210 |
||
1211 |
galleryList |
|
1212 |
"automatically generated by UIPainter ..." |
|
1213 |
||
112 | 1214 |
|holder| |
1215 |
||
182 | 1216 |
(holder := builder bindingAt:#galleryList) isNil ifTrue:[ |
1217 |
builder aspectAt:#galleryList put:(holder := ValueHolder new). |
|
112 | 1218 |
]. |
1219 |
^ holder |
|
182 | 1220 |
! |
112 | 1221 |
|
182 | 1222 |
galleryModel |
1223 |
"automatically generated by UIPainter ..." |
|
112 | 1224 |
|
182 | 1225 |
|holder| |
112 | 1226 |
|
182 | 1227 |
(holder := builder bindingAt:#galleryModel) isNil ifTrue:[ |
1228 |
builder aspectAt:#galleryModel put:(holder := ValueHolder new). |
|
1229 |
]. |
|
1230 |
^ holder |
|
112 | 1231 |
! |
1232 |
||
182 | 1233 |
majorChannel |
1234 |
"automatically generated by UIPainter ..." |
|
112 | 1235 |
|
182 | 1236 |
|holder| |
1237 |
||
1238 |
(holder := builder bindingAt:#majorChannel) isNil ifTrue:[ |
|
1239 |
holder := AspectAdaptor new subject:self; forAspect:#majorSelection. |
|
1240 |
builder aspectAt:#majorChannel put:holder. |
|
139 | 1241 |
]. |
182 | 1242 |
^ holder |
1243 |
! |
|
1244 |
||
1245 |
majorList |
|
1246 |
"automatically generated by UIPainter ... |
|
1247 |
" |
|
1248 |
^ self class specifications collect:[:el| el first] |
|
1249 |
! |
|
1250 |
||
1251 |
minorKeys |
|
1252 |
"automatically generated by UIPainter ..." |
|
1253 |
||
1254 |
|holder| |
|
1255 |
||
1256 |
(holder := builder bindingAt:#minorKeys) isNil ifTrue:[ |
|
1257 |
builder aspectAt:#minorKeys put:(holder := ValueHolder new). |
|
112 | 1258 |
]. |
182 | 1259 |
^ holder |
112 | 1260 |
! ! |
1261 |
||
182 | 1262 |
!UISelectionPanel methodsFor:'change & update'! |
112 | 1263 |
|
182 | 1264 |
update:something with:aParameter from:changedObject |
1265 |
"one of my models changed its value |
|
112 | 1266 |
" |
182 | 1267 |
|channel label| |
112 | 1268 |
|
182 | 1269 |
(channel := self clientSpec) == changedObject ifTrue:[ |
1270 |
label := self builder componentAt:#clientSpecLabel. |
|
93 | 1271 |
|
182 | 1272 |
channel value notNil ifTrue:[ |
1273 |
label label:(' ', channel value name, ' '). |
|
1274 |
label level:1. |
|
1275 |
] ifFalse:[ |
|
1276 |
label label:nil. |
|
1277 |
label level:0. |
|
93 | 1278 |
] |
1279 |
]. |
|
1280 |
||
182 | 1281 |
super update:something with:aParameter from:changedObject. |
112 | 1282 |
|
1283 |
||
1284 |
! ! |
|
1285 |
||
182 | 1286 |
!UISelectionPanel methodsFor:'drag & drop'! |
112 | 1287 |
|
182 | 1288 |
canDrop:something in:aComponent |
1289 |
^ self canPaste:(something collect:[:el| el theObject ]). |
|
112 | 1290 |
! |
1291 |
||
182 | 1292 |
drop:something in:aComponent at:aPoint |
1293 |
||
1294 |
|spc top| |
|
1295 |
||
1296 |
top := DragAndDropManager dragOriginatorQuerySignal raise topView. |
|
1297 |
||
1298 |
top == aComponent topView ifTrue:[ |
|
1299 |
spc := self clientSpec value. |
|
1300 |
spc isNil ifTrue:[^ self]. |
|
1301 |
||
1302 |
(clipBoardSpec collection remove:spc ifAbsent:nil) isNil ifTrue:[ |
|
1303 |
^ self |
|
1304 |
]. |
|
1305 |
] ifFalse:[ |
|
1306 |
spc := something collect:[:el| el theObject]. |
|
1307 |
]. |
|
1308 |
self paste:spc. |
|
1309 |
! ! |
|
1310 |
||
1311 |
!UISelectionPanel methodsFor:'queries'! |
|
1312 |
||
1313 |
canPaste:something |
|
1314 |
"returns true if something could be paste |
|
112 | 1315 |
" |
182 | 1316 |
(self isClipBoard and:[something notNil]) ifTrue:[ |
1317 |
something isCollection ifTrue:[ |
|
1318 |
something notEmpty ifTrue:[ |
|
1319 |
^ (something at:1) isKindOf:UISpecification |
|
1320 |
] |
|
1321 |
] ifFalse:[ |
|
1322 |
^ something isKindOf:UISpecification |
|
1323 |
] |
|
1324 |
]. |
|
1325 |
^ false |
|
112 | 1326 |
|
1327 |
! |
|
1328 |
||
182 | 1329 |
isClipBoard |
1330 |
"returns true if current view is clip board |
|
1331 |
" |
|
1332 |
majorSelection notNil ifTrue:[ |
|
1333 |
^ (self majorList at:majorSelection) startsWith:'Clip' |
|
1334 |
]. |
|
1335 |
^ false |
|
1336 |
! |
|
1337 |
||
1338 |
isUserBoard |
|
1339 |
"returns true if current view is clip board |
|
112 | 1340 |
" |
182 | 1341 |
majorSelection notNil ifTrue:[ |
1342 |
^ (self majorList at:majorSelection) startsWith:'User' |
|
1343 |
]. |
|
1344 |
^ false |
|
1345 |
! ! |
|
1346 |
||
1347 |
!UISelectionPanel methodsFor:'selection'! |
|
1348 |
||
1349 |
majorSelection |
|
1350 |
^ majorSelection |
|
1351 |
! |
|
1352 |
||
1353 |
majorSelection:aSelection |
|
1354 |
|spec channel| |
|
112 | 1355 |
|
182 | 1356 |
(majorSelection == aSelection or:[aSelection isNil]) ifTrue:[ |
1357 |
^ self |
|
167 | 1358 |
]. |
182 | 1359 |
(self builder componentAt:#gallery) builder:nil. |
1360 |
majorSelection := aSelection. |
|
1361 |
spec := ((self class specifications) at:aSelection) last. |
|
1362 |
||
1363 |
spec isSymbol ifFalse:[ |
|
1364 |
self galleryList value:(spec collect:[:a| a first]). |
|
1365 |
self minorKeys value:(spec collect:[:a| a last]). |
|
1366 |
] ifTrue:[ |
|
1367 |
self perform:spec |
|
1368 |
]. |
|
1369 |
channel := self galleryModel. |
|
1370 |
||
1371 |
channel value notNil ifTrue:[ |
|
1372 |
channel setValue:nil |
|
1373 |
]. |
|
1374 |
channel value:1. |
|
112 | 1375 |
|
1376 |
! ! |
|
1377 |
||
182 | 1378 |
!UISelectionPanel methodsFor:'startup / release'! |
112 | 1379 |
|
182 | 1380 |
allButOpenInterface:aSpec |
1381 |
"setup default values |
|
1382 |
" |
|
1383 |
super allButOpenInterface:aSpec. |
|
1384 |
userClass := UserClass. |
|
1385 |
userSpecs := UserSpecs. |
|
1386 |
userLabels := UserLabels. |
|
1387 |
! |
|
1388 |
||
1389 |
closeRequest |
|
1390 |
|sav| |
|
112 | 1391 |
|
182 | 1392 |
(sav := masterApplication) notNil ifTrue:[ |
1393 |
masterApplication := nil. |
|
1394 |
masterApplication closeRequestFor:(self window). |
|
1395 |
masterApplication := sav. |
|
1396 |
] ifFalse:[ |
|
1397 |
super closeRequest. |
|
1398 |
] |
|
1399 |
! |
|
112 | 1400 |
|
182 | 1401 |
openWindow |
1402 |
"setup default values |
|
1403 |
" |
|
1404 |
super openWindow. |
|
1405 |
"/ self window waitForExpose. |
|
1406 |
Delay waitForSeconds:1. |
|
1407 |
self majorChannel value:1. |
|
112 | 1408 |
! ! |
1409 |
||
182 | 1410 |
!UISelectionPanel methodsFor:'user defined'! |
1411 |
||
1412 |
userDefined |
|
1413 |
|cls lbl sel builder| |
|
112 | 1414 |
|
182 | 1415 |
(cls := userClass) notNil ifTrue:[ |
1416 |
cls isBehavior ifFalse:[ |
|
1417 |
cls := Smalltalk at:cls asSymbol |
|
1418 |
]. |
|
1419 |
(cls notNil and:[(cls respondsTo:userLabels)]) ifTrue:[ |
|
1420 |
lbl := cls perform:userLabels. |
|
1421 |
sel := Array new:(lbl size) withAll:#userDefinedSpec. |
|
1422 |
self galleryList value:lbl. |
|
1423 |
self minorKeys value:sel. |
|
1424 |
] |
|
1425 |
]. |
|
1426 |
builder := UIBuilder new. |
|
1427 |
builder application:self. |
|
1428 |
(self builder componentAt:#gallery) builder:builder. |
|
1429 |
self galleryList value:#( '???' ). |
|
1430 |
self minorKeys value:#( standartUserPanel ). |
|
1431 |
! |
|
147 | 1432 |
|
182 | 1433 |
userDefinedHelpText |
1434 |
||
1435 |
^ ' |
|
1436 |
no user defined specifications are configured yet. To assign |
|
1437 |
user defined specifications to the gallery press the middle |
|
1438 |
button of your mouse to open a dialog. |
|
1439 |
' |
|
1440 |
! |
|
1441 |
||
1442 |
userDefinedSpec |
|
1443 |
|cls spc idx| |
|
93 | 1444 |
|
182 | 1445 |
(cls := userClass) notNil ifTrue:[ |
1446 |
cls isBehavior ifFalse:[ |
|
1447 |
cls := Smalltalk at:cls asSymbol |
|
1448 |
]. |
|
1449 |
(cls notNil and:[(cls respondsTo:userSpecs)]) ifTrue:[ |
|
1450 |
spc := cls perform:userSpecs. |
|
1451 |
idx := self galleryModel value. |
|
1452 |
||
1453 |
idx <= spc size ifTrue:[ |
|
1454 |
spc := spc at:idx. |
|
1455 |
(cls respondsTo:spc) ifTrue:[ |
|
1456 |
^ cls perform:spc |
|
1457 |
] |
|
147 | 1458 |
] |
93 | 1459 |
] |
1460 |
]. |
|
147 | 1461 |
^ nil |
93 | 1462 |
! ! |
1463 |
||
1464 |
!UISelectionPanel class methodsFor:'documentation'! |
|
1465 |
||
1466 |
version |
|
1467 |
^ '$Header$' |
|
182 | 1468 |
|
93 | 1469 |
! ! |