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