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