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