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