author | tz |
Wed, 21 Jan 1998 20:53:10 +0100 | |
changeset 448 | 9f115893b4df |
parent 447 | 664522b11cde |
child 453 | 6fe8c481bab0 |
permissions | -rw-r--r-- |
156 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by 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 |
||
368 | 13 |
|
446 | 14 |
ToolApplicationModel subclass:#UIPainter |
287 | 15 |
instanceVariableNames:'treeView selectionPanel tabSelection specClass specSelector |
297 | 16 |
specSuperclass aspects layoutCanvas helpCanvas specCanvas |
17 |
transcript' |
|
446 | 18 |
classVariableNames:'' |
60 | 19 |
poolDictionaries:'' |
20 |
category:'Interface-UIPainter' |
|
21 |
! |
|
22 |
||
222 | 23 |
SelectionInTreeView subclass:#TreeView |
24 |
instanceVariableNames:'lastDrawnMaster cvsEventsDisabled imageMasterParent |
|
311 | 25 |
imageEmptyParent imageMasterChild windowSpec' |
440 | 26 |
classVariableNames:'Images' |
222 | 27 |
poolDictionaries:'' |
28 |
privateIn:UIPainter |
|
29 |
! |
|
30 |
||
60 | 31 |
!UIPainter class methodsFor:'documentation'! |
32 |
||
156 | 33 |
copyright |
34 |
" |
|
35 |
COPYRIGHT (c) 1995 by eXept Software AG |
|
36 |
All Rights Reserved |
|
37 |
||
38 |
This software is furnished under a license and may be used |
|
39 |
only in accordance with the terms of that license and with the |
|
40 |
inclusion of the above copyright notice. This software may not |
|
41 |
be provided or otherwise made available to, or used by, any |
|
42 |
other person. No title to or ownership of the software is |
|
43 |
hereby transferred. |
|
44 |
" |
|
45 |
||
46 |
! |
|
47 |
||
60 | 48 |
documentation |
49 |
" |
|
127 | 50 |
GUI-Builder: |
51 |
this class allows the user to build its own applications providing a graphical |
|
52 |
user interface to buildin components and to define the behavior of the components |
|
53 |
during runtime. The resulting specifications can be installed as methods on |
|
54 |
classes, typically subclasses of an ApplicationModel. These specifications |
|
55 |
are used by the UIBuilder to generate the application window and its component |
|
56 |
structues when open the application. |
|
60 | 57 |
|
58 |
[start with:] |
|
59 |
UIPainter open |
|
127 | 60 |
|
156 | 61 |
[author:] |
183 | 62 |
Claus Gittinger |
156 | 63 |
Claus Atzkern |
64 |
||
127 | 65 |
[see also:] |
66 |
UIBuilder |
|
67 |
ApplicationModel |
|
68 |
UISpecification |
|
60 | 69 |
" |
109 | 70 |
|
71 |
! ! |
|
72 |
||
73 |
!UIPainter class methodsFor:'instance creation'! |
|
74 |
||
195
350f95af5d9d
check before sending selector to class
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
75 |
openOnClass:aClass andSelector:aSelector |
282 | 76 |
"open up an interface builder, fetching a spec from aClass |
77 |
via some selector |
|
78 |
" |
|
195
350f95af5d9d
check before sending selector to class
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
79 |
^ self new openOnClass:aClass andSelector:aSelector |
350f95af5d9d
check before sending selector to class
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
80 |
! |
350f95af5d9d
check before sending selector to class
Claus Gittinger <cg@exept.de>
parents:
194
diff
changeset
|
81 |
|
109 | 82 |
painter:aBuilderView |
282 | 83 |
"set the painter |
84 |
" |
|
109 | 85 |
|application| |
86 |
||
87 |
application := self new. |
|
88 |
application painter:aBuilderView. |
|
89 |
^ application open |
|
60 | 90 |
! ! |
91 |
||
87 | 92 |
!UIPainter class methodsFor:'ST-80 queries'! |
93 |
||
94 |
preferenceFor:aSymbol |
|
282 | 95 |
"ST-80 compatible; always returns false |
96 |
" |
|
87 | 97 |
^ false |
109 | 98 |
|
99 |
||
100 |
! ! |
|
101 |
||
446 | 102 |
!UIPainter class methodsFor:'accessing'! |
103 |
||
104 |
label |
|
105 |
||
106 |
^'GUI Builder' |
|
107 |
! ! |
|
108 |
||
193 | 109 |
!UIPainter class methodsFor:'help specs'! |
110 |
||
111 |
helpSpec |
|
112 |
"return a dictionary filled with helpKey -> helptext associations. |
|
295 | 113 |
These are used by the activeHelp tool." |
114 |
||
193 | 115 |
" |
295 | 116 |
UIHelpTool openOnClass:UIPainter |
117 |
" |
|
118 |
||
358 | 119 |
<resource: #help> |
120 |
||
193 | 121 |
^ super helpSpec addPairsFrom:#( |
122 |
||
287 | 123 |
#moveSelectionLeft |
124 |
'move selected widgets left while pressing the button' |
|
194 | 125 |
|
126 |
#setToDefaultWidth |
|
282 | 127 |
'set selected widgets to their default width' |
194 | 128 |
|
129 |
#pasteBuffer |
|
282 | 130 |
'paste widgets at current mouse position' |
194 | 131 |
|
295 | 132 |
#moveSelectionUp |
133 |
'move selected widgets up while pressing the button' |
|
134 |
||
282 | 135 |
#galleryShown |
136 |
'show or hide gallery view' |
|
137 |
||
138 |
#moveSelectionDown |
|
139 |
'move selected widgets down while pressing the button' |
|
140 |
||
287 | 141 |
#spreadSelectionVer |
142 |
'vertical spacing between selected widgets is made the same' |
|
143 |
||
282 | 144 |
#menuChangeHierarchy |
145 |
'change hierarchy of the selected widget' |
|
146 |
||
287 | 147 |
#copyExtent |
148 |
'copy extent of the selected widget' |
|
149 |
||
150 |
#moveSelectionRight |
|
151 |
'move selected widgets right while pressing the button' |
|
152 |
||
153 |
#cancel |
|
154 |
'reread specification and layout' |
|
155 |
||
156 |
#pasteWithLayout |
|
157 |
'paste widgets without changing their layouts' |
|
158 |
||
159 |
#alignSelectionRight |
|
160 |
'align selected widgets to the right edge of the dominant widget' |
|
161 |
||
162 |
#alignSelectionLeftAndRight |
|
163 |
'align selected widgets to the right and left edge of the dominant widget' |
|
164 |
||
165 |
#pasteWidth |
|
166 |
'change width of all selected widgets to the last copied extent width' |
|
167 |
||
168 |
#alignSelectionTopAndBottom |
|
169 |
'align selected widgets to the top and bottom edge of the dominant widget' |
|
170 |
||
171 |
#copyLayout |
|
172 |
'copy layout of the selected widget' |
|
173 |
||
174 |
#painterShown |
|
175 |
'show or hide painter view' |
|
176 |
||
177 |
#pasteExtent |
|
178 |
'change extent of all selected widgets to the last copied extent' |
|
179 |
||
180 |
#pasteHeight |
|
181 |
'change height of all selected widgets to the last copied extent height' |
|
182 |
||
183 |
#accept |
|
184 |
'write back changes' |
|
185 |
||
186 |
#centerSelectionVer |
|
187 |
'center vertical horizontal in contained view' |
|
188 |
||
189 |
#centerSelectionHor |
|
190 |
'center widgets horizontal to their top widget' |
|
191 |
||
282 | 192 |
#menuAlignment |
193 |
'provides a set of alignment operation on the current selected widgets' |
|
194 |
||
287 | 195 |
#alignSelectionCenterVer |
196 |
'align selected widgets horizontal to the center of the dominant widget' |
|
197 |
||
198 |
#pasteLayout |
|
199 |
'change layout of all selected widgets to the last copied layout' |
|
200 |
||
201 |
#alignSelectionLeft |
|
202 |
'align selected widgets to the left edge of the dominant widget' |
|
203 |
||
204 |
#spreadSelectionHor |
|
205 |
'horizontal spacing between selected widgets is made the same' |
|
206 |
||
207 |
#alignSelectionBottom |
|
208 |
'align selected widgets to the bottom edge of the dominant widget' |
|
209 |
||
210 |
#setToDefaultExtent |
|
211 |
'set selected widgets to their default extent' |
|
212 |
||
213 |
#alignSelectionCenterHor |
|
214 |
'align selected widgets vertical to the center of the dominant widget' |
|
215 |
||
216 |
#alignSelectionTop |
|
217 |
'align selected widgets to the top edge of the dominant widget' |
|
218 |
||
219 |
#setToDefaultHeight |
|
220 |
'set selected widgets to their default height' |
|
194 | 221 |
|
193 | 222 |
) |
358 | 223 |
|
224 |
"Modified: / 29.10.1997 / 03:19:58 / cg" |
|
193 | 225 |
! ! |
226 |
||
297 | 227 |
!UIPainter class methodsFor:'helpers'! |
228 |
||
368 | 229 |
convertString:aString maxLineSize:maxCharactersPerLine skipLineFeed:skipLineFeed |
297 | 230 |
"converts a string to a string collection with maximum characters |
231 |
per line |
|
232 |
" |
|
233 |
|stream |
|
234 |
max "{ Class:SmallInteger }" |
|
235 |
size "{ Class:SmallInteger }" |
|
236 |
start "{ Class:SmallInteger }" |
|
237 |
stop "{ Class:SmallInteger }" |
|
238 |
cpySz "{ Class:SmallInteger }" |
|
239 |
lnSz "{ Class:SmallInteger }"| |
|
240 |
||
241 |
maxCharactersPerLine < 20 ifFalse:[max := maxCharactersPerLine - 1] |
|
242 |
ifTrue:[max := 20]. |
|
243 |
||
244 |
(size := aString size) <= max ifTrue:[ |
|
245 |
^ aString |
|
246 |
]. |
|
247 |
start := 1. |
|
248 |
lnSz := 0. |
|
249 |
stream := (String new:size) writeStream. |
|
250 |
||
251 |
[start <= size] whileTrue:[ |
|
252 |
(start := aString indexOfNonSeparatorStartingAt:start) == 0 ifTrue:[ |
|
253 |
^ stream contents |
|
254 |
]. |
|
368 | 255 |
(aString at:start) == $\ ifTrue:[ |
256 |
skipLineFeed ifFalse:[ |
|
257 |
stream nextPut:$\ |
|
258 |
]. |
|
259 |
start := start + 1. |
|
260 |
stream cr. |
|
261 |
start := start + 1. |
|
262 |
lnSz := 0. |
|
263 |
] ifFalse:[ |
|
264 |
(stop := aString indexOfSeparatorStartingAt:start) == 0 ifTrue:[ |
|
265 |
stop := size + 1 |
|
266 |
]. |
|
267 |
(aString at:(stop - 1)) == $\ ifTrue:[ |
|
268 |
stop := stop - 1 |
|
269 |
]. |
|
270 |
cpySz := stop - start. |
|
271 |
||
272 |
lnSz == 0 ifFalse:[ |
|
273 |
(lnSz := lnSz + cpySz) >= max ifTrue:[stream cr. lnSz := cpySz ] |
|
274 |
ifFalse:[stream space. lnSz := lnSz + 1] |
|
275 |
] ifTrue:[ |
|
276 |
lnSz := cpySz |
|
277 |
]. |
|
278 |
stream nextPutAll:aString startingAt:start to:(stop - 1). |
|
279 |
start := stop. |
|
280 |
] |
|
297 | 281 |
]. |
282 |
^ stream contents |
|
283 |
! ! |
|
284 |
||
60 | 285 |
!UIPainter class methodsFor:'interface specs'! |
286 |
||
366 | 287 |
gridParametersSpec |
288 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
289 |
||
290 |
"do not manually edit this - the painter/builder may not be able to |
|
291 |
handle the specification if its corrupted." |
|
292 |
||
293 |
" |
|
294 |
UIPainter new openOnClass:UIPainter andSelector:#gridParametersSpec |
|
295 |
UIPainter new openInterface:#gridParametersSpec |
|
296 |
" |
|
297 |
||
298 |
<resource: #canvas> |
|
299 |
||
300 |
^ |
|
446 | 301 |
|
366 | 302 |
#(#FullSpec |
303 |
#'window:' |
|
304 |
#(#WindowSpec |
|
305 |
#'name:' 'Grid Parameters:' |
|
446 | 306 |
#'layout:' #(#LayoutFrame 229 0 394 0 494 0 543 0) |
366 | 307 |
#'label:' 'Grid Parameters:' |
308 |
#'min:' #(#Point 10 10) |
|
309 |
#'max:' #(#Point 1280 1024) |
|
446 | 310 |
#'bounds:' #(#Rectangle 229 394 495 544) |
311 |
#'usePreferredExtent:' false |
|
366 | 312 |
) |
313 |
#'component:' |
|
314 |
#(#SpecCollection |
|
315 |
#'collection:' |
|
316 |
#( |
|
317 |
#(#CheckBoxSpec |
|
318 |
#'name:' 'show' |
|
446 | 319 |
#'layout:' #(#Point 13 14) |
366 | 320 |
#'model:' #showGrid |
446 | 321 |
#'label:' 'Show grid' |
366 | 322 |
) |
323 |
#(#CheckBoxSpec |
|
324 |
#'name:' 'align' |
|
446 | 325 |
#'layout:' #(#Point 117 14) |
366 | 326 |
#'model:' #alignToGrid |
446 | 327 |
#'label:' 'Align to Grid' |
366 | 328 |
) |
329 |
#(#LabelSpec |
|
330 |
#'name:' 'hrzLabel' |
|
446 | 331 |
#'layout:' #(#AlignmentOrigin 136 0 62 0 1 0.5) |
332 |
#'label:' 'Horizontal Pixels:' |
|
333 |
#'adjust:' #right |
|
366 | 334 |
#'resizeForLabel:' true |
335 |
) |
|
336 |
#(#InputFieldSpec |
|
337 |
#'name:' 'hrzField' |
|
446 | 338 |
#'layout:' #(#LayoutFrame 141 0 51 0 194 0 73 0) |
366 | 339 |
#'model:' #hspace |
340 |
#'type:' #numberOrNil |
|
341 |
) |
|
342 |
#(#LabelSpec |
|
343 |
#'name:' 'vrtLabel' |
|
446 | 344 |
#'layout:' #(#AlignmentOrigin 137 0 85 0 1 0.5) |
345 |
#'label:' 'Vertical Pixels:' |
|
346 |
#'adjust:' #right |
|
366 | 347 |
#'resizeForLabel:' true |
348 |
) |
|
349 |
#(#InputFieldSpec |
|
350 |
#'name:' 'vrtField' |
|
446 | 351 |
#'layout:' #(#LayoutFrame 141 0 74 0 194 0 96 0) |
366 | 352 |
#'model:' #vspace |
353 |
#'type:' #numberOrNil |
|
354 |
) |
|
446 | 355 |
#(#UISubSpecification |
356 |
#'name:' 'uISubSpecifica1' |
|
357 |
#'layout:' #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1) |
|
358 |
#'majorKey:' #ToolApplicationModel |
|
359 |
#'minorKey:' #windowSpecForCommitWithoutChannels |
|
366 | 360 |
) |
361 |
) |
|
362 |
) |
|
363 |
) |
|
364 |
! |
|
365 |
||
222 | 366 |
nameAndSelectorSpec |
367 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
368 |
||
369 |
"do not manually edit this - the painter/builder may not be able to |
|
370 |
handle the specification if its corrupted." |
|
371 |
||
372 |
" |
|
373 |
UIPainter new openOnClass:UIPainter andSelector:#nameAndSelectorSpec |
|
374 |
UIPainter new openInterface:#nameAndSelectorSpec |
|
375 |
" |
|
376 |
||
377 |
<resource: #canvas> |
|
378 |
||
379 |
^ |
|
380 |
||
381 |
#(#FullSpec |
|
382 |
#'window:' |
|
383 |
#(#WindowSpec |
|
446 | 384 |
#'name:' 'Painter' |
385 |
#'layout:' #(#LayoutFrame 101 0 328 0 491 0 497 0) |
|
222 | 386 |
#'label:' 'Painter' |
446 | 387 |
#'min:' #(#Point 10 10) |
388 |
#'max:' #(#Point 1152 900) |
|
389 |
#'bounds:' #(#Rectangle 101 328 492 498) |
|
390 |
#'usePreferredExtent:' false |
|
222 | 391 |
) |
392 |
#'component:' |
|
393 |
#(#SpecCollection |
|
394 |
#'collection:' |
|
395 |
#( |
|
396 |
#(#LabelSpec |
|
397 |
#'name:' 'classLabel' |
|
265 | 398 |
#'layout:' #(#AlignmentOrigin 50 0.11 51 0 1 0.5) |
446 | 399 |
#'label:' 'Class:' |
222 | 400 |
#'adjust:' #right |
401 |
#'resizeForLabel:' true |
|
402 |
) |
|
403 |
#(#LabelSpec |
|
404 |
#'name:' 'superClassLabel' |
|
265 | 405 |
#'layout:' #(#AlignmentOrigin 50 0.11 77 0 1 0.5) |
446 | 406 |
#'label:' 'Superclass:' |
222 | 407 |
#'adjust:' #right |
408 |
#'resizeForLabel:' true |
|
409 |
) |
|
410 |
#(#LabelSpec |
|
411 |
#'name:' 'selectorLabel' |
|
265 | 412 |
#'layout:' #(#AlignmentOrigin 50 0.11 105 0 1 0.5) |
446 | 413 |
#'label:' 'Selector:' |
222 | 414 |
#'adjust:' #right |
415 |
#'resizeForLabel:' true |
|
416 |
) |
|
417 |
#(#InputFieldSpec |
|
418 |
#'name:' 'methodNameField' |
|
265 | 419 |
#'layout:' #(#LayoutFrame 51 0.11 95 0 -2 1.0 117 0) |
222 | 420 |
#'tabable:' true |
421 |
#'model:' #methodNameChannel |
|
422 |
) |
|
423 |
#(#LabelSpec |
|
424 |
#'name:' 'boxLabel' |
|
265 | 425 |
#'layout:' #(#Point 2 10) |
446 | 426 |
#'label:' 'Class and selector for interface:' |
222 | 427 |
#'adjust:' #left |
428 |
#'resizeForLabel:' true |
|
429 |
) |
|
430 |
#(#InputFieldSpec |
|
431 |
#'name:' 'classNameField' |
|
265 | 432 |
#'layout:' #(#LayoutFrame 51 0.11 39 0 -2 1.0 61 0) |
222 | 433 |
#'tabable:' true |
434 |
#'model:' #classNameChannel |
|
435 |
) |
|
436 |
#(#ComboBoxSpec |
|
437 |
#'name:' 'comboBox1' |
|
265 | 438 |
#'layout:' #(#LayoutFrame 51 0.11 67 0 0 1.0 89 0) |
222 | 439 |
#'tabable:' true |
440 |
#'model:' #superclassNameChannel |
|
441 |
#'comboList:' #superclassNameDefaults |
|
442 |
) |
|
446 | 443 |
#(#UISubSpecification |
444 |
#'name:' 'uISubSpecifica1' |
|
445 |
#'layout:' #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1) |
|
446 |
#'majorKey:' #ToolApplicationModel |
|
447 |
#'minorKey:' #windowSpecForCommitWithoutChannels |
|
222 | 448 |
) |
449 |
) |
|
450 |
) |
|
451 |
) |
|
452 |
! |
|
453 |
||
454 |
windowSpec |
|
455 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
456 |
||
457 |
"do not manually edit this - the painter/builder may not be able to |
|
458 |
handle the specification if its corrupted." |
|
459 |
||
460 |
" |
|
461 |
UIPainter new openOnClass:UIPainter andSelector:#windowSpec |
|
462 |
UIPainter new openInterface:#windowSpec |
|
463 |
" |
|
464 |
"UIPainter open" |
|
465 |
||
466 |
<resource: #canvas> |
|
467 |
||
468 |
^ |
|
469 |
||
470 |
#(#FullSpec |
|
471 |
#'window:' |
|
472 |
#(#WindowSpec |
|
282 | 473 |
#'name:' 'Tree-View' |
448 | 474 |
#'layout:' #(#LayoutFrame 38 0 287 0 590 0 747 0) |
222 | 475 |
#'label:' 'Tree-View' |
282 | 476 |
#'min:' #(#Point 10 10) |
477 |
#'max:' #(#Point 1160 870) |
|
448 | 478 |
#'bounds:' #(#Rectangle 38 287 591 748) |
446 | 479 |
#'menu:' #menu |
375 | 480 |
#'usePreferredExtent:' false |
222 | 481 |
) |
482 |
#'component:' |
|
483 |
#(#SpecCollection |
|
484 |
#'collection:' |
|
485 |
#( |
|
486 |
#(#MenuPanelSpec |
|
446 | 487 |
#'name:' 'menuToolbarView' |
488 |
#'layout:' #(#LayoutFrame -1 0.0 0 0 -1 1.0 32 0) |
|
489 |
#'activeHelpKey:' #menuChangeHierarchy |
|
222 | 490 |
#'tabable:' true |
446 | 491 |
#'menu:' #menuToolbar |
492 |
#'showSeparatingLines:' true |
|
222 | 493 |
) |
297 | 494 |
#(#VariableVerticalPanelSpec |
495 |
#'name:' 'vpanel' |
|
448 | 496 |
#'layout:' #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -22 1.0) |
297 | 497 |
#'component:' |
498 |
#(#SpecCollection |
|
499 |
#'collection:' |
|
500 |
#( |
|
501 |
#(#VariableHorizontalPanelSpec |
|
502 |
#'name:' 'hpanel' |
|
503 |
#'component:' |
|
504 |
#(#SpecCollection |
|
505 |
#'collection:' |
|
506 |
#( |
|
507 |
#(#ArbitraryComponentSpec |
|
508 |
#'name:' 'treeView' |
|
375 | 509 |
#'tabable:' true |
446 | 510 |
#'menu:' #menuEdit |
297 | 511 |
#'hasHorizontalScrollBar:' true |
512 |
#'hasVerticalScrollBar:' true |
|
513 |
#'miniScrollerHorizontal:' true |
|
514 |
#'miniScrollerVertical:' true |
|
515 |
#'component:' #treeView |
|
516 |
#'hasBorder:' false |
|
517 |
) |
|
518 |
#(#ViewSpec |
|
519 |
#'name:' 'specHolderView' |
|
520 |
#'component:' |
|
521 |
#(#SpecCollection |
|
522 |
#'collection:' |
|
523 |
#( |
|
524 |
#(#NoteBookViewSpec |
|
525 |
#'name:' 'noteBook' |
|
446 | 526 |
#'layout:' #(#LayoutFrame 0 0.0 26 0.0 0 1.0 -30 1.0) |
297 | 527 |
#'enableChannel:' #enableChannel |
528 |
#'tabable:' true |
|
345 | 529 |
#'model:' #tabModel |
297 | 530 |
#'menu:' #tabList |
345 | 531 |
#'style:' #(#FontDescription #helvetica #medium #roman 10) |
297 | 532 |
#'canvas:' #noteBookView |
533 |
) |
|
534 |
#(#HorizontalPanelViewSpec |
|
535 |
#'name:' 'modifyPanel' |
|
536 |
#'layout:' #(#LayoutFrame 0 0.0 -30 1.0 0 1.0 0 1.0) |
|
537 |
#'component:' |
|
538 |
#(#SpecCollection |
|
539 |
#'collection:' |
|
540 |
#( |
|
541 |
#(#ActionButtonSpec |
|
542 |
#'name:' 'cancelButton' |
|
543 |
#'activeHelpKey:' #cancel |
|
446 | 544 |
#'label:' 'Cancel' |
297 | 545 |
#'tabable:' true |
546 |
#'model:' #cancel |
|
547 |
#'enableChannel:' #modifiedChannel |
|
446 | 548 |
#'extent:' #(#Point 179 24) |
297 | 549 |
) |
550 |
#(#ActionButtonSpec |
|
551 |
#'name:' 'acceptButton' |
|
552 |
#'activeHelpKey:' #accept |
|
446 | 553 |
#'label:' 'OK' |
297 | 554 |
#'tabable:' true |
555 |
#'model:' #accept |
|
556 |
#'enableChannel:' #modifiedChannel |
|
446 | 557 |
#'extent:' #(#Point 180 24) |
297 | 558 |
) |
559 |
) |
|
560 |
) |
|
561 |
#'horizontalLayout:' #fitSpace |
|
562 |
#'verticalLayout:' #fitSpace |
|
563 |
#'horizontalSpace:' 3 |
|
564 |
#'verticalSpace:' 3 |
|
565 |
) |
|
446 | 566 |
#(#HorizontalPanelViewSpec |
567 |
#'name:' 'panelViewButtons' |
|
568 |
#'layout:' #(#LayoutFrame 0 0.0 0 0 0 1.0 24 0) |
|
569 |
#'component:' |
|
570 |
#(#SpecCollection |
|
571 |
#'collection:' |
|
572 |
#( |
|
573 |
#(#ArrowButtonSpec |
|
574 |
#'name:' 'moveLeft' |
|
575 |
#'activeHelpKey:' #moveSelectionLeft |
|
576 |
#'tabable:' true |
|
577 |
#'model:' #moveSelectionLeft |
|
578 |
#'enableChannel:' #canMoveOrAlignSelection |
|
579 |
#'isTriggerOnDown:' true |
|
580 |
#'direction:' #left |
|
581 |
#'extent:' #(#Point 22 22) |
|
582 |
) |
|
583 |
#(#ArrowButtonSpec |
|
584 |
#'name:' 'moveRight' |
|
585 |
#'activeHelpKey:' #moveSelectionRight |
|
586 |
#'model:' #moveSelectionRight |
|
587 |
#'enableChannel:' #canMoveOrAlignSelection |
|
588 |
#'isTriggerOnDown:' true |
|
589 |
#'direction:' #right |
|
590 |
#'extent:' #(#Point 22 22) |
|
591 |
) |
|
592 |
#(#ArrowButtonSpec |
|
593 |
#'name:' 'moveDown' |
|
594 |
#'activeHelpKey:' #moveSelectionDown |
|
595 |
#'model:' #moveSelectionDown |
|
596 |
#'enableChannel:' #canMoveOrAlignSelection |
|
597 |
#'isTriggerOnDown:' true |
|
598 |
#'direction:' #down |
|
599 |
#'extent:' #(#Point 22 22) |
|
600 |
) |
|
601 |
#(#ArrowButtonSpec |
|
602 |
#'name:' 'moveUp' |
|
603 |
#'activeHelpKey:' #moveSelectionUp |
|
604 |
#'model:' #moveSelectionUp |
|
605 |
#'enableChannel:' #canMoveOrAlignSelection |
|
606 |
#'isTriggerOnDown:' true |
|
607 |
#'direction:' #up |
|
608 |
#'extent:' #(#Point 22 22) |
|
609 |
) |
|
610 |
) |
|
611 |
) |
|
612 |
#'level:' 1 |
|
613 |
#'horizontalLayout:' #left |
|
614 |
#'verticalLayout:' #fit |
|
615 |
#'horizontalSpace:' 4 |
|
616 |
#'verticalSpace:' 4 |
|
617 |
) |
|
297 | 618 |
) |
619 |
) |
|
620 |
#'borderWidth:' 1 |
|
621 |
) |
|
622 |
) |
|
623 |
) |
|
624 |
#'level:' 1 |
|
625 |
#'handles:' #(#Any 0.329435 1.0) |
|
626 |
) |
|
627 |
#(#TextEditorSpec |
|
628 |
#'name:' 'Transcript' |
|
629 |
#'hasHorizontalScrollBar:' true |
|
630 |
#'hasVerticalScrollBar:' true |
|
631 |
#'miniScrollerHorizontal:' true |
|
632 |
#'miniScrollerVertical:' true |
|
633 |
) |
|
634 |
) |
|
635 |
) |
|
636 |
#'handles:' #(#Any 0.880597 1.0) |
|
637 |
) |
|
448 | 638 |
#(#LabelSpec |
639 |
#'name:' 'infoLabel' |
|
640 |
#'layout:' #(#LayoutFrame 0 0.0 -22 1 -80 1.0 0 1.0) |
|
641 |
#'labelChannel:' #valueOfInfoLabel |
|
642 |
#'level:' 1 |
|
643 |
#'adjust:' #left |
|
644 |
) |
|
645 |
#(#LabelSpec |
|
646 |
#'name:' 'timeLabel' |
|
647 |
#'layout:' #(#LayoutFrame -80 1 -22 1 0 1.0 0 1.0) |
|
648 |
#'labelChannel:' #valueOfTimeLabel |
|
649 |
#'level:' 1 |
|
650 |
#'adjust:' #right |
|
651 |
) |
|
222 | 652 |
) |
653 |
) |
|
654 |
) |
|
655 |
! ! |
|
656 |
||
657 |
!UIPainter class methodsFor:'menu specs'! |
|
658 |
||
446 | 659 |
menu |
217 | 660 |
"this window spec was automatically generated by the ST/X MenuEditor" |
661 |
||
662 |
"do not manually edit this - the builder may not be able to |
|
663 |
handle the specification if its corrupted." |
|
664 |
||
665 |
" |
|
446 | 666 |
MenuEditor new openOnClass:UIPainter andSelector:#menu |
667 |
(Menu new fromLiteralArrayEncoding:(UIPainter menu)) startUp |
|
668 |
" |
|
669 |
||
670 |
<resource: #menu> |
|
671 |
||
672 |
^ |
|
673 |
||
674 |
#(#Menu |
|
675 |
||
676 |
#( |
|
677 |
#(#MenuItem |
|
678 |
#'label:' 'About' |
|
679 |
#'labelImage:' #(#ResourceRetriever nil #icon) |
|
680 |
#'submenuChannel:' #menuAbout |
|
681 |
) |
|
682 |
#(#MenuItem |
|
683 |
#'label:' 'File' |
|
684 |
#'value:' #file |
|
685 |
#'enabled:' #enableChannel |
|
686 |
#'submenu:' |
|
687 |
#(#Menu |
|
688 |
||
689 |
#( |
|
690 |
#(#MenuItem |
|
691 |
#'label:' 'New' |
|
692 |
#'value:' #doNew |
|
693 |
) |
|
694 |
#(#MenuItem |
|
695 |
#'label:' '-' |
|
696 |
) |
|
697 |
#(#MenuItem |
|
698 |
#'label:' 'Load From Class...' |
|
699 |
#'value:' #doFromClass |
|
700 |
) |
|
701 |
#(#MenuItem |
|
702 |
#'label:' 'Load From Class With Superclass...' |
|
703 |
#'value:' #loadFromClassWithSuperclass |
|
704 |
) |
|
705 |
#(#MenuItem |
|
706 |
#'label:' '-' |
|
707 |
) |
|
708 |
#(#MenuItem |
|
709 |
#'label:' 'Define Class And Selector...' |
|
710 |
#'value:' #defineClassAndSelector |
|
711 |
) |
|
712 |
#(#MenuItem |
|
713 |
#'label:' '-' |
|
714 |
) |
|
715 |
#(#MenuItem |
|
716 |
#'label:' 'Save Window Spec' |
|
717 |
#'value:' #doInstallSpec |
|
718 |
) |
|
719 |
#(#MenuItem |
|
720 |
#'label:' 'Save Help Spec' |
|
721 |
#'value:' #doInstallHelp |
|
722 |
#'enabled:' #hasSpecClass |
|
723 |
) |
|
724 |
#(#MenuItem |
|
725 |
#'label:' '-' |
|
726 |
) |
|
727 |
#(#MenuItem |
|
728 |
#'label:' 'Create Aspect Methods' |
|
729 |
#'value:' #doInstallAspects |
|
730 |
#'enabled:' #hasSpecClass |
|
731 |
) |
|
732 |
#(#MenuItem |
|
733 |
#'label:' 'Create Hook Methods' |
|
734 |
#'value:' #doInstallHooks |
|
735 |
) |
|
736 |
#(#MenuItem |
|
737 |
#'label:' '-' |
|
738 |
) |
|
739 |
#(#MenuItem |
|
740 |
#'label:' 'Show Window Spec' |
|
741 |
#'value:' #doWindowSpec |
|
742 |
) |
|
743 |
#(#MenuItem |
|
744 |
#'label:' 'Browse Application' |
|
745 |
#'value:' #doBrowseAppClass |
|
746 |
#'enabled:' #hasSpecClass |
|
747 |
) |
|
748 |
#(#MenuItem |
|
749 |
#'label:' 'Browse Aspect Methods' |
|
750 |
#'value:' #doBrowseAspectMethods |
|
751 |
) |
|
752 |
#(#MenuItem |
|
753 |
#'label:' '-' |
|
754 |
) |
|
755 |
#(#MenuItem |
|
756 |
#'label:' 'Pick a View ' |
|
757 |
#'value:' #doPickAView |
|
758 |
) |
|
759 |
#(#MenuItem |
|
760 |
#'label:' '-' |
|
761 |
) |
|
762 |
#(#MenuItem |
|
763 |
#'label:' 'Exit' |
|
764 |
#'value:' #closeRequest |
|
765 |
) |
|
766 |
) nil |
|
767 |
nil |
|
768 |
) |
|
769 |
) |
|
770 |
#(#MenuItem |
|
771 |
#'label:' 'Edit' |
|
772 |
#'submenuChannel:' #menuEdit |
|
773 |
) |
|
774 |
#(#MenuItem |
|
775 |
#'label:' 'Align' |
|
776 |
#'submenuChannel:' #menuAlign |
|
777 |
) |
|
778 |
#(#MenuItem |
|
779 |
#'label:' 'Test' |
|
780 |
#'submenu:' |
|
781 |
#(#Menu |
|
782 |
||
783 |
#( |
|
784 |
#(#MenuItem |
|
785 |
#'label:' 'Geometry Test Mode' |
|
786 |
#'indication:' #'testMode:' |
|
787 |
) |
|
788 |
) nil |
|
789 |
nil |
|
790 |
) |
|
791 |
) |
|
792 |
#(#MenuItem |
|
793 |
#'label:' 'Settings' |
|
794 |
#'submenu:' |
|
795 |
#(#Menu |
|
796 |
||
797 |
#( |
|
798 |
#(#MenuItem |
|
799 |
#'label:' 'Undo Manager' |
|
800 |
#'value:' #openUndoMenu |
|
801 |
) |
|
802 |
#(#MenuItem |
|
803 |
#'label:' '-' |
|
804 |
) |
|
805 |
#(#MenuItem |
|
806 |
#'label:' 'Grid Manager' |
|
807 |
#'value:' #gridMenu |
|
808 |
) |
|
809 |
) nil |
|
810 |
nil |
|
811 |
) |
|
812 |
) |
|
813 |
#(#MenuItem |
|
814 |
#'label:' 'History' |
|
815 |
#'submenuChannel:' #menuHistory |
|
816 |
) |
|
817 |
#(#MenuItem |
|
818 |
#'label:' '' |
|
819 |
) |
|
820 |
#(#MenuItem |
|
821 |
#'label:' 'Gallery' |
|
822 |
#'indication:' #galleryShown |
|
823 |
) |
|
824 |
#(#MenuItem |
|
825 |
#'label:' 'Canvas' |
|
826 |
#'indication:' #painterShown |
|
827 |
) |
|
828 |
) nil |
|
829 |
nil |
|
830 |
) |
|
831 |
! |
|
832 |
||
833 |
menuAlign |
|
834 |
"this window spec was automatically generated by the ST/X MenuEditor" |
|
835 |
||
836 |
"do not manually edit this - the builder may not be able to |
|
837 |
handle the specification if its corrupted." |
|
838 |
||
839 |
" |
|
840 |
MenuEditor new openOnClass:UIPainter andSelector:#menuAlign |
|
841 |
(Menu new fromLiteralArrayEncoding:(UIPainter menuAlign)) startUp |
|
217 | 842 |
" |
843 |
||
844 |
<resource: #menu> |
|
845 |
||
846 |
^ |
|
847 |
||
848 |
#(#Menu |
|
849 |
||
850 |
#( |
|
851 |
#(#MenuItem |
|
446 | 852 |
#'label:' 'Align Left' |
853 |
#'value:' #alignSelectionLeft |
|
854 |
#'activeHelpKey:' #alignSelectionLeft |
|
855 |
#'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignL 'Align Left') |
|
856 |
) |
|
857 |
#(#MenuItem |
|
858 |
#'label:' 'Align Right' |
|
859 |
#'value:' #alignSelectionRight |
|
860 |
#'activeHelpKey:' #alignSelectionRight |
|
861 |
#'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignR 'Align Right') |
|
862 |
) |
|
863 |
#(#MenuItem |
|
864 |
#'label:' 'Align Left & Right' |
|
865 |
#'value:' #alignSelectionLeftAndRight |
|
866 |
#'activeHelpKey:' #alignSelectionLeftAndRight |
|
867 |
#'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignLR 'Align Left & Right') |
|
868 |
) |
|
869 |
#(#MenuItem |
|
870 |
#'label:' 'Align top' |
|
871 |
#'value:' #alignSelectionTop |
|
872 |
#'activeHelpKey:' #alignSelectionTop |
|
873 |
#'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignT 'Align top') |
|
874 |
) |
|
875 |
#(#MenuItem |
|
876 |
#'label:' 'Align Bottom' |
|
877 |
#'value:' #alignSelectionBottom |
|
878 |
#'activeHelpKey:' #alignSelectionBottom |
|
879 |
#'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignB 'Align Bottom') |
|
880 |
) |
|
881 |
#(#MenuItem |
|
882 |
#'label:' 'Align Top & Bottom' |
|
883 |
#'value:' #alignSelectionTopAndBottom |
|
884 |
#'activeHelpKey:' #alignSelectionTopAndBottom |
|
885 |
#'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignTB 'Align Top & Bottom') |
|
886 |
) |
|
887 |
#(#MenuItem |
|
888 |
#'label:' 'Align Centered Horizontal' |
|
889 |
#'value:' #alignSelectionCenterHor |
|
890 |
#'activeHelpKey:' #alignSelectionCenterHor |
|
891 |
#'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignCenterH 'Align Centered Horizontal') |
|
892 |
) |
|
893 |
#(#MenuItem |
|
894 |
#'label:' 'Align Centered Vertical' |
|
895 |
#'value:' #alignSelectionCenterVer |
|
896 |
#'activeHelpKey:' #alignSelectionCenterVer |
|
897 |
#'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignCenterV 'Align Centered Vertical') |
|
898 |
) |
|
899 |
#(#MenuItem |
|
900 |
#'label:' '-' |
|
901 |
) |
|
902 |
#(#MenuItem |
|
903 |
#'label:' 'Spread Horizontal' |
|
904 |
#'value:' #spreadSelectionHor |
|
905 |
#'activeHelpKey:' #spreadSelectionHor |
|
906 |
) |
|
907 |
#(#MenuItem |
|
908 |
#'label:' 'Spread Vertical' |
|
909 |
#'value:' #spreadSelectionVer |
|
910 |
#'activeHelpKey:' #spreadSelectionVer |
|
911 |
) |
|
912 |
#(#MenuItem |
|
913 |
#'label:' '-' |
|
914 |
) |
|
915 |
#(#MenuItem |
|
916 |
#'label:' 'Center Horizontal In Frame' |
|
917 |
#'value:' #centerSelectionHor |
|
918 |
#'activeHelpKey:' #centerSelectionHor |
|
919 |
) |
|
920 |
#(#MenuItem |
|
921 |
#'label:' 'Center Vertical In Frame' |
|
922 |
#'value:' #centerSelectionVer |
|
923 |
#'activeHelpKey:' #centerSelectionVer |
|
924 |
) |
|
925 |
) nil |
|
926 |
nil |
|
927 |
) |
|
928 |
! |
|
929 |
||
930 |
menuEdit |
|
931 |
"this window spec was automatically generated by the ST/X MenuEditor" |
|
932 |
||
933 |
"do not manually edit this - the builder may not be able to |
|
934 |
handle the specification if its corrupted." |
|
935 |
||
936 |
" |
|
937 |
MenuEditor new openOnClass:UIPainter andSelector:#menuEdit |
|
938 |
(Menu new fromLiteralArrayEncoding:(UIPainter menuEdit)) startUp |
|
939 |
" |
|
940 |
||
941 |
<resource: #menu> |
|
942 |
||
943 |
^ |
|
944 |
||
945 |
#(#Menu |
|
946 |
||
947 |
#( |
|
948 |
#(#MenuItem |
|
949 |
#'label:' 'Cut' |
|
950 |
#'value:' #deleteSelection |
|
951 |
#'enabled:' #hasSelection |
|
952 |
#'shortcutKeyCharacter:' #Cut |
|
953 |
) |
|
954 |
#(#MenuItem |
|
955 |
#'label:' 'Copy' |
|
956 |
#'value:' #copySelection |
|
957 |
#'enabled:' #hasSelection |
|
958 |
#'shortcutKeyCharacter:' #Copy |
|
959 |
) |
|
960 |
#(#MenuItem |
|
961 |
#'label:' 'Paste' |
|
962 |
#'nameKey:' #paste |
|
963 |
#'value:' #paste |
|
964 |
#'enabled:' #canPaste |
|
965 |
#'submenu:' |
|
966 |
#(#Menu |
|
967 |
||
968 |
#( |
|
969 |
#(#MenuItem |
|
970 |
#'label:' 'Paste' |
|
971 |
#'value:' #pasteBuffer |
|
972 |
#'activeHelpKey:' #pasteBuffer |
|
973 |
#'shortcutKeyCharacter:' #Paste |
|
974 |
) |
|
975 |
#(#MenuItem |
|
976 |
#'label:' 'Keep Layout' |
|
977 |
#'value:' #pasteWithLayout |
|
978 |
#'activeHelpKey:' #pasteWithLayout |
|
979 |
#'enabled:' #canKeepLayoutInSelection |
|
980 |
) |
|
981 |
) nil |
|
982 |
nil |
|
983 |
) |
|
984 |
) |
|
985 |
#(#MenuItem |
|
986 |
#'label:' '-' |
|
987 |
) |
|
988 |
#(#MenuItem |
|
989 |
#'label:' 'Undo' |
|
990 |
#'nameKey:' #undo |
|
991 |
#'value:' #undoLast |
|
992 |
#'enabled:' #hasUndoHistory |
|
993 |
#'shortcutKeyCharacter:' #Cmdu |
|
994 |
) |
|
995 |
#(#MenuItem |
|
996 |
#'label:' '-' |
|
997 |
) |
|
998 |
#(#MenuItem |
|
999 |
#'label:' 'Dimension' |
|
1000 |
#'value:' #dimension |
|
1001 |
#'enabled:' #hasSelection |
|
1002 |
#'submenu:' |
|
1003 |
#(#Menu |
|
1004 |
||
1005 |
#( |
|
1006 |
#(#MenuItem |
|
1007 |
#'label:' 'Default Extent' |
|
1008 |
#'value:' #setToDefaultExtent |
|
1009 |
#'activeHelpKey:' #setToDefaultExtent |
|
1010 |
#'enabled:' #canMoveOrAlignSelection |
|
1011 |
) |
|
1012 |
#(#MenuItem |
|
1013 |
#'label:' 'Default Width' |
|
1014 |
#'value:' #setToDefaultWidth |
|
1015 |
#'activeHelpKey:' #setToDefaultWidth |
|
1016 |
#'enabled:' #canMoveOrAlignSelection |
|
1017 |
) |
|
1018 |
#(#MenuItem |
|
1019 |
#'label:' 'Default Height' |
|
1020 |
#'value:' #setToDefaultHeight |
|
1021 |
#'activeHelpKey:' #setToDefaultHeight |
|
1022 |
#'enabled:' #canMoveOrAlignSelection |
|
1023 |
) |
|
1024 |
#(#MenuItem |
|
1025 |
#'label:' '-' |
|
1026 |
) |
|
1027 |
#(#MenuItem |
|
1028 |
#'label:' 'Copy Extent' |
|
1029 |
#'value:' #copyExtent |
|
1030 |
#'activeHelpKey:' #copyExtent |
|
1031 |
#'enabled:' #hasSingleSelection |
|
1032 |
) |
|
1033 |
#(#MenuItem |
|
1034 |
#'label:' '-' |
|
1035 |
) |
|
1036 |
#(#MenuItem |
|
1037 |
#'label:' 'Paste Extent' |
|
1038 |
#'value:' #pasteExtent |
|
1039 |
#'activeHelpKey:' #pasteExtent |
|
1040 |
#'enabled:' #canMoveOrAlignSelection |
|
1041 |
) |
|
1042 |
#(#MenuItem |
|
1043 |
#'label:' 'Paste Width' |
|
1044 |
#'value:' #pasteWidth |
|
1045 |
#'activeHelpKey:' #pasteWidth |
|
1046 |
#'enabled:' #canMoveOrAlignSelection |
|
1047 |
) |
|
1048 |
#(#MenuItem |
|
1049 |
#'label:' 'Paste Height' |
|
1050 |
#'value:' #pasteHeight |
|
1051 |
#'activeHelpKey:' #pasteHeight |
|
1052 |
#'enabled:' #canMoveOrAlignSelection |
|
1053 |
) |
|
1054 |
#(#MenuItem |
|
1055 |
#'label:' '-' |
|
1056 |
) |
|
1057 |
#(#MenuItem |
|
1058 |
#'label:' 'Copy Layout' |
|
1059 |
#'value:' #copyLayout |
|
1060 |
#'activeHelpKey:' #copyLayout |
|
1061 |
#'enabled:' #hasSingleSelection |
|
1062 |
) |
|
1063 |
#(#MenuItem |
|
1064 |
#'label:' 'Paste Layout' |
|
1065 |
#'value:' #pasteLayout |
|
1066 |
#'activeHelpKey:' #pasteLayout |
|
1067 |
#'enabled:' #canMoveOrAlignSelection |
|
1068 |
) |
|
1069 |
) nil |
|
1070 |
nil |
|
1071 |
) |
|
1072 |
) |
|
1073 |
#(#MenuItem |
|
1074 |
#'label:' 'Align' |
|
1075 |
#'submenuChannel:' #menuAlign |
|
1076 |
) |
|
1077 |
) nil |
|
1078 |
nil |
|
1079 |
) |
|
1080 |
! |
|
1081 |
||
1082 |
menuToolbar |
|
1083 |
"this window spec was automatically generated by the ST/X MenuEditor" |
|
1084 |
||
1085 |
"do not manually edit this - the builder may not be able to |
|
1086 |
handle the specification if its corrupted." |
|
1087 |
||
1088 |
" |
|
1089 |
MenuEditor new openOnClass:UIPainter andSelector:#menuToolbar |
|
1090 |
(Menu new fromLiteralArrayEncoding:(UIPainter menuToolbar)) startUp |
|
1091 |
" |
|
1092 |
||
1093 |
<resource: #menu> |
|
1094 |
||
1095 |
^ |
|
1096 |
||
1097 |
#(#Menu |
|
1098 |
||
1099 |
#( |
|
1100 |
#(#MenuItem |
|
1101 |
#'label:' 'Run' |
|
1102 |
#'isButton:' true |
|
1103 |
#'value:' #doStartApplication |
|
1104 |
#'labelImage:' #(#ResourceRetriever nil #runIcon) |
|
1105 |
) |
|
1106 |
#(#MenuItem |
|
1107 |
#'label:' '-' |
|
1108 |
) |
|
1109 |
#(#MenuItem |
|
1110 |
#'label:' 'New' |
|
1111 |
#'isButton:' true |
|
1112 |
#'value:' #doNew |
|
1113 |
#'labelImage:' #(#ResourceRetriever nil #newIcon) |
|
1114 |
) |
|
1115 |
#(#MenuItem |
|
1116 |
#'label:' 'Load' |
|
1117 |
#'isButton:' true |
|
1118 |
#'value:' #doFromClass |
|
1119 |
#'labelImage:' #(#ResourceRetriever nil #loadIcon) |
|
1120 |
) |
|
1121 |
#(#MenuItem |
|
1122 |
#'label:' 'Save' |
|
1123 |
#'isButton:' true |
|
1124 |
#'value:' #doInstallSpec |
|
1125 |
#'labelImage:' #(#ResourceRetriever nil #saveIcon) |
|
1126 |
) |
|
1127 |
#(#MenuItem |
|
1128 |
#'label:' '-' |
|
1129 |
) |
|
1130 |
#(#MenuItem |
|
1131 |
#'label:' 'stepUp' |
|
1132 |
#'isButton:' true |
|
1133 |
#'value:' #doStepUp |
|
1134 |
#'enabled:' #enabledStepOver |
|
1135 |
#'labelImage:' #(#ResourceRetriever nil #upIcon) |
|
1136 |
) |
|
1137 |
#(#MenuItem |
|
1138 |
#'label:' 'stepDown' |
|
1139 |
#'isButton:' true |
|
1140 |
#'value:' #doStepDown |
|
1141 |
#'enabled:' #enabledStepOver |
|
1142 |
#'labelImage:' #(#ResourceRetriever nil #downIcon) |
|
1143 |
) |
|
1144 |
#(#MenuItem |
|
1145 |
#'label:' 'stepIn' |
|
1146 |
#'isButton:' true |
|
1147 |
#'value:' #doStepIn |
|
1148 |
#'enabled:' #enabledStepIn |
|
1149 |
#'labelImage:' #(#ResourceRetriever nil #downRightIcon) |
|
1150 |
) |
|
1151 |
#(#MenuItem |
|
1152 |
#'label:' 'stepOut' |
|
1153 |
#'isButton:' true |
|
1154 |
#'value:' #doStepOut |
|
1155 |
#'enabled:' #enabledStepOut |
|
1156 |
#'labelImage:' #(#ResourceRetriever nil #leftDownIcon) |
|
1157 |
) |
|
1158 |
#(#MenuItem |
|
1159 |
#'label:' '-' |
|
1160 |
) |
|
1161 |
#(#MenuItem |
|
217 | 1162 |
#'label:' 'align left' |
437 | 1163 |
#'isButton:' true |
217 | 1164 |
#'value:' #alignSelectionLeft |
287 | 1165 |
#'activeHelpKey:' #alignSelectionLeft |
437 | 1166 |
#'labelImage:' #(#ResourceRetriever nil #iconAlignL) |
217 | 1167 |
) |
1168 |
#(#MenuItem |
|
1169 |
#'label:' 'align right' |
|
437 | 1170 |
#'isButton:' true |
217 | 1171 |
#'value:' #alignSelectionRight |
1172 |
#'activeHelpKey:' #alignSelectionRight |
|
437 | 1173 |
#'labelImage:' #(#ResourceRetriever nil #iconAlignR) |
217 | 1174 |
) |
1175 |
#(#MenuItem |
|
1176 |
#'label:' 'align left & right' |
|
437 | 1177 |
#'isButton:' true |
217 | 1178 |
#'value:' #alignSelectionLeftAndRight |
1179 |
#'activeHelpKey:' #alignSelectionLeftAndRight |
|
437 | 1180 |
#'labelImage:' #(#ResourceRetriever nil #iconAlignLR) |
1181 |
) |
|
1182 |
#(#MenuItem |
|
217 | 1183 |
#'label:' 'align top' |
437 | 1184 |
#'isButton:' true |
217 | 1185 |
#'value:' #alignSelectionTop |
1186 |
#'activeHelpKey:' #alignSelectionTop |
|
437 | 1187 |
#'labelImage:' #(#ResourceRetriever nil #iconAlignT) |
217 | 1188 |
) |
1189 |
#(#MenuItem |
|
1190 |
#'label:' 'align bottom' |
|
437 | 1191 |
#'isButton:' true |
217 | 1192 |
#'value:' #alignSelectionBottom |
1193 |
#'activeHelpKey:' #alignSelectionBottom |
|
437 | 1194 |
#'labelImage:' #(#ResourceRetriever nil #iconAlignB) |
217 | 1195 |
) |
1196 |
#(#MenuItem |
|
1197 |
#'label:' 'align top & bottom' |
|
437 | 1198 |
#'isButton:' true |
217 | 1199 |
#'value:' #alignSelectionTopAndBottom |
1200 |
#'activeHelpKey:' #alignSelectionTopAndBottom |
|
437 | 1201 |
#'labelImage:' #(#ResourceRetriever nil #iconAlignTB) |
1202 |
) |
|
1203 |
#(#MenuItem |
|
1204 |
#'label:' '-' |
|
217 | 1205 |
) |
1206 |
#(#MenuItem |
|
1207 |
#'label:' 'align centered horizontal' |
|
437 | 1208 |
#'isButton:' true |
217 | 1209 |
#'value:' #alignSelectionCenterHor |
1210 |
#'activeHelpKey:' #alignSelectionCenterHor |
|
437 | 1211 |
#'labelImage:' #(#ResourceRetriever nil #iconAlignCenterH) |
217 | 1212 |
) |
1213 |
#(#MenuItem |
|
1214 |
#'label:' 'align centered vertical' |
|
437 | 1215 |
#'isButton:' true |
217 | 1216 |
#'value:' #alignSelectionCenterVer |
1217 |
#'activeHelpKey:' #alignSelectionCenterVer |
|
437 | 1218 |
#'labelImage:' #(#ResourceRetriever nil #iconAlignCenterV) |
217 | 1219 |
) |
437 | 1220 |
) nil |
217 | 1221 |
nil |
1222 |
) |
|
446 | 1223 |
! ! |
1224 |
||
1225 |
!UIPainter class methodsFor:'resources'! |
|
1226 |
||
1227 |
icon |
|
1228 |
||
1229 |
^self startGUIBuilderIcon subImageIn: (0@0 extent: (24@16)) |
|
1230 |
||
1231 |
||
222 | 1232 |
|
1233 |
||
1234 |
! |
|
1235 |
||
446 | 1236 |
iconAlignB |
1237 |
"ImageEditor openOnClass:self andSelector:#iconAlignB" |
|
1238 |
||
1239 |
<resource: #image> |
|
1240 |
^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 7 0 0 0 0 0 7 0 80 0 0 0 7 0 112 0 0 0 7 0 112 0 0 0 7 0 112 0 0 80 7 0 112 0 0 112 7 0 112 11 0 112 7 0 112 0 0 112 7 0 112 1 0 112 7 0 112 0 0 112 7 0 112 11 0 0 0 0 0 0 10 170 170 170 170 0 10 170 170 170 170 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9977)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 120 3 0 120 0 0 121 224 0 121 224 0 121 224 0 121 224 30 121 224 30 121 224 30 121 224 30 121 225 30 121 224 30 121 224 30 121 224 30 121 224 63 255 240 63 255 240 0 0 0 0 0 3 0 0 0]) ; yourself); yourself! |
|
1241 |
||
1242 |
iconAlignCenterH |
|
1243 |
"ImageEditor openOnClass:self andSelector:#iconAlignCenterH" |
|
1244 |
||
1245 |
<resource: #image> |
|
1246 |
^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 84 0 0 0 5 80 84 170 170 170 165 80 85 85 89 85 85 80 85 85 42 21 85 90 85 84 170 133 85 88 85 82 170 161 85 80 85 74 170 168 85 80 85 69 85 85 85 80 85 85 85 85 85 88 84 0 0 0 5 80 84 170 170 170 165 80 85 85 89 85 85 88 85 85 42 21 85 80 85 84 170 133 85 80 85 82 170 161 85 80 85 74 170 168 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 88]) ; colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9977 blue:49.9977); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 31 255 192 31 255 224 15 255 224 0 248 0 1 252 0 3 254 0 7 255 0 7 255 0 0 0 0 31 255 192 31 255 224 15 255 224 0 248 0 1 252 0 3 254 0 7 255 0 3 255 0 0 0 0 0 0 0]) ; yourself); yourself! |
|
1247 |
||
1248 |
iconAlignCenterV |
|
1249 |
"ImageEditor openOnClass:self andSelector:#iconAlignCenterV" |
|
1250 |
||
1251 |
<resource: #image> |
|
1252 |
^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 84 21 85 5 80 85 84 149 85 37 80 80 84 148 21 37 80 82 20 148 133 37 80 82 132 148 161 37 80 82 160 148 168 37 82 82 168 148 170 37 80 82 170 148 170 165 80 82 169 148 170 101 80 82 164 148 169 37 80 82 148 148 165 37 80 82 84 148 149 37 80 85 84 149 85 37 88 85 84 149 85 37 80 85 84 149 85 37 80 85 85 85 85 85 80 85 85 85 85 85 88 85 85 85 85 85 80 85 85 85 85 85 80]) ; colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9992 blue:49.9992); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 1 1 128 192 1 192 224 49 216 224 57 220 224 61 222 224 63 223 224 63 223 224 63 223 224 63 223 224 63 223 224 61 222 224 57 220 224 17 200 227 1 192 224 1 192 224 0 192 96 0 0 0 0 0 3 0 0 0]) ; yourself); yourself! |
|
1253 |
||
1254 |
iconAlignL |
|
1255 |
"ImageEditor openOnClass:self andSelector:#iconAlignL" |
|
1256 |
||
1257 |
<resource: #image> |
|
1258 |
^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 2 128 0 0 0 0 2 128 0 0 0 0 2 133 85 85 0 9 2 135 255 255 0 0 2 128 0 0 0 0 2 128 0 0 0 0 2 128 0 0 0 0 2 128 0 0 0 0 2 133 85 85 80 0 2 135 255 255 240 0 2 128 0 0 0 5 2 128 0 0 0 0 2 128 0 0 0 0 2 128 0 0 0 0 2 133 85 0 0 0 2 135 255 0 0 0 2 128 0 0 0 0 2 128 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9992)); at:4 put:((Color grey:66.9993)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 24 0 0 31 255 128 31 255 128 31 255 128 31 255 128 24 0 0 24 0 0 31 255 224 31 255 224 31 255 224 31 255 224 24 0 0 24 0 0 31 248 0 31 248 0 31 248 0 31 248 0 24 0 0 0 0 0 0 0 0]) ; yourself); yourself! |
|
1259 |
||
1260 |
iconAlignLR |
|
1261 |
"ImageEditor openOnClass:self andSelector:#iconAlignLR" |
|
1262 |
||
1263 |
<resource: #image> |
|
1264 |
^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 2 128 0 0 40 0 2 128 0 0 40 0 2 133 85 85 40 9 2 135 255 255 40 0 2 128 0 0 40 0 2 128 0 0 40 0 2 128 0 0 40 0 2 128 0 0 40 0 2 133 85 85 40 0 2 135 255 255 40 0 2 128 0 0 40 5 2 128 0 0 40 0 2 128 0 0 40 0 2 128 0 0 40 0 2 133 85 85 40 0 2 135 255 252 40 0 2 128 0 0 40 0 2 128 0 0 40 0 0 0 0 0 0 5 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9992)); at:4 put:((Color grey:66.9993)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 24 0 96 31 255 224 31 255 224 31 255 224 31 255 224 24 0 96 24 0 96 31 255 224 31 255 224 31 255 224 31 255 224 24 0 96 24 0 96 31 255 224 31 255 224 31 254 224 31 255 224 24 0 96 0 0 0 0 0 0]) ; yourself); yourself! |
|
1265 |
||
1266 |
iconAlignR |
|
1267 |
"ImageEditor openOnClass:self andSelector:#iconAlignR" |
|
1268 |
||
1269 |
<resource: #image> |
|
1270 |
^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 40 0 0 0 0 0 40 0 0 5 85 85 40 9 0 7 255 255 40 0 0 0 0 0 40 0 0 0 0 0 40 0 0 0 0 0 40 0 0 0 0 0 40 0 0 85 85 85 40 0 0 127 255 255 40 0 0 0 0 0 40 5 0 0 0 0 40 0 0 0 0 0 40 0 0 0 0 0 40 0 0 0 5 85 40 0 0 0 7 255 40 0 0 0 0 0 40 0 0 0 0 0 40 0 0 0 0 0 0 5 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9992)); at:4 put:((Color grey:66.9993)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 96 7 255 224 7 255 224 7 255 224 7 255 224 0 0 96 0 0 96 31 255 224 31 255 224 31 255 224 31 255 224 0 0 96 0 0 96 0 127 224 0 127 224 0 127 224 0 127 224 0 0 96 0 0 0 0 0 0]) ; yourself); yourself! |
|
1271 |
||
1272 |
iconAlignT |
|
1273 |
"ImageEditor openOnClass:self andSelector:#iconAlignT" |
|
1274 |
||
1275 |
<resource: #image> |
|
1276 |
^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 170 170 170 170 0 10 170 170 170 170 0 0 0 0 0 0 0 0 80 5 0 80 11 0 112 7 0 112 0 0 112 7 0 112 1 0 112 7 0 112 0 0 112 7 0 112 11 0 112 7 0 112 0 0 0 7 0 112 0 0 0 7 0 112 0 0 0 7 0 112 0 0 0 7 0 112 0 0 0 7 0 0 0 0 0 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9977)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 3 0 0 0 63 255 240 63 255 240 30 121 224 30 121 224 30 121 224 30 121 224 30 121 225 30 121 224 30 121 224 30 121 224 0 121 224 0 121 224 0 121 224 0 121 224 0 120 0 0 120 3 0 0 0 0 0 0 0 0 0]) ; yourself); yourself! |
|
1277 |
||
1278 |
iconAlignTB |
|
1279 |
"ImageEditor openOnClass:self andSelector:#iconAlignTB" |
|
1280 |
||
1281 |
<resource: #image> |
|
1282 |
^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 10 170 170 170 170 0 10 170 170 170 170 0 0 0 0 0 0 0 0 80 5 0 80 7 0 112 7 0 112 0 0 112 7 0 112 0 0 112 7 0 112 0 0 112 7 0 112 8 0 112 7 0 112 0 0 112 7 0 112 1 0 112 7 0 112 0 0 112 7 0 112 0 0 112 7 0 64 0 0 0 0 0 0 0 10 170 170 170 170 0 10 170 170 170 170 0 0 0 0 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9977)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 3 0 0 0 63 255 240 63 255 240 30 121 224 30 121 225 30 121 224 30 121 224 30 121 224 30 121 224 30 121 224 30 121 224 30 121 225 30 121 225 30 121 160 30 121 224 63 255 240 63 255 242 0 0 0 0 0 0 0 0 0]) ; yourself); yourself! ! |
|
222 | 1283 |
|
109 | 1284 |
!UIPainter methodsFor:'actions'! |
60 | 1285 |
|
109 | 1286 |
accept |
282 | 1287 |
"accept changes done to the specification. The component assigned to the |
1288 |
specification will change immediately dependant on the attributes derived |
|
1289 |
from the specification. |
|
1290 |
" |
|
287 | 1291 |
|layout spec prop key layoutTool| |
60 | 1292 |
|
166 | 1293 |
self isLayoutToolSelected ifTrue:[ |
287 | 1294 |
layoutTool := self layoutTool. |
1295 |
||
144 | 1296 |
(layout := layoutTool layout) notNil ifTrue:[ |
1297 |
layoutTool layoutType == #Extent ifTrue:[ |
|
282 | 1298 |
layoutTool layoutView == self painter topView ifTrue:[ |
1299 |
layoutTool layoutView extent:layout |
|
1300 |
] ifFalse:[ |
|
1301 |
self painter setExtent:layout |
|
1302 |
] |
|
144 | 1303 |
] ifFalse:[ |
149 | 1304 |
self painter setLayout:layout |
109 | 1305 |
] |
144 | 1306 |
] |
1307 |
] ifFalse:[ |
|
287 | 1308 |
spec := self specTool specification. |
1309 |
||
166 | 1310 |
self isHelpToolSelected ifTrue:[ |
287 | 1311 |
self helpTool accept. |
1312 |
key := self helpTool helpKey. |
|
1313 |
prop := treeView propertySelected. |
|
1314 |
||
1315 |
prop notNil ifTrue:[ |
|
1316 |
prop spec activeHelpKey:key |
|
1317 |
]. |
|
1318 |
spec activeHelpKey:key. |
|
1319 |
] ifFalse:[ |
|
1320 |
self painter updateFromSpec:spec. |
|
1321 |
] |
|
144 | 1322 |
]. |
166 | 1323 |
self modifiedChannel value:false. |
109 | 1324 |
! |
1325 |
||
1326 |
cancel |
|
282 | 1327 |
"cancel all changes done to the specification; reread attributes from the |
1328 |
assigned component |
|
109 | 1329 |
" |
328 | 1330 |
|spec key view| |
287 | 1331 |
|
272
99de6af43afa
confirm/cancel changes before switching a section or widget
ca
parents:
271
diff
changeset
|
1332 |
self isModified ifTrue:[ |
287 | 1333 |
(spec := self painter specForSelection) notNil ifTrue:[ |
1334 |
key := spec activeHelpKey. |
|
1335 |
]. |
|
1336 |
self helpTool helpKey:key. |
|
1337 |
self specTool specification:spec. |
|
328 | 1338 |
view := self layoutTool layoutView. |
1339 |
||
1340 |
self setViewInLayoutTool:view. |
|
1341 |
spec class == DataSetSpec ifTrue:[ |
|
1342 |
view columnDescriptors:(spec columns) |
|
1343 |
]. |
|
166 | 1344 |
self modifiedChannel value:false. |
1345 |
] |
|
137 | 1346 |
! |
1347 |
||
282 | 1348 |
moveSelectionDown |
1349 |
"move selected components down |
|
1350 |
" |
|
1351 |
self painter moveSelectionDown |
|
1352 |
! |
|
1353 |
||
1354 |
moveSelectionLeft |
|
1355 |
"move selected components left |
|
1356 |
" |
|
1357 |
self painter moveSelectionLeft |
|
1358 |
||
1359 |
! |
|
1360 |
||
1361 |
moveSelectionRight |
|
1362 |
"move selected components right |
|
1363 |
" |
|
1364 |
self painter moveSelectionRight |
|
1365 |
||
1366 |
! |
|
1367 |
||
1368 |
moveSelectionUp |
|
1369 |
"move selected components up |
|
1370 |
" |
|
1371 |
self painter moveSelectionUp |
|
1372 |
||
1373 |
! |
|
1374 |
||
328 | 1375 |
openDataSetColumnEditor |
1376 |
"opens a column editor |
|
1377 |
" |
|
1378 |
|cls aspect editor columns| |
|
1379 |
||
1380 |
cls := self resolveName:specClass. |
|
1381 |
||
1382 |
cls isNil ifTrue:[ |
|
1383 |
^ self information:'no application class defined yet' |
|
1384 |
]. |
|
1385 |
aspect := self specTool specification columns. |
|
1386 |
editor := DataSetBuilder new. |
|
341 | 1387 |
editor masterApplication:self. |
328 | 1388 |
editor columns:aspect fromView:(self layoutTool layoutView). |
333 | 1389 |
editor rowClassName:(self specTool specification rowClassName). |
328 | 1390 |
editor openModal. |
1391 |
||
1392 |
editor hasChanged ifTrue:[ |
|
1393 |
self specTool specification columns:(editor columns). |
|
333 | 1394 |
self specTool specification rowClassName:(editor rowClassName). |
328 | 1395 |
self modifiedChannel value:true. |
1396 |
]. |
|
1397 |
! |
|
1398 |
||
217 | 1399 |
openEditMenu |
287 | 1400 |
"opens a menu editor on current widget |
1401 |
" |
|
217 | 1402 |
|cls aspect editor| |
1403 |
||
328 | 1404 |
cls := self resolveName:specClass. |
1405 |
||
1406 |
cls isNil ifTrue:[ |
|
1407 |
^ self information:'no application class defined yet' |
|
217 | 1408 |
]. |
1409 |
||
1410 |
cls notNil ifTrue:[ |
|
295 | 1411 |
(aspect := self specTool specification menuSelector) notNil ifTrue:[ |
217 | 1412 |
aspect := aspect asSymbol |
229 | 1413 |
] ifFalse:[ |
267 | 1414 |
"/ cg: q&d hack ... |
1415 |
||
229 | 1416 |
aspect := treeView propertySelected. |
1417 |
aspect notNil ifTrue:[ |
|
245 | 1418 |
Object errorSignal handle:[:ex | |
271 | 1419 |
aspect := nil. |
245 | 1420 |
] do:[ |
1421 |
aspect := aspect view asMenu. |
|
1422 |
] |
|
271 | 1423 |
]. |
217 | 1424 |
]. |
229 | 1425 |
|
217 | 1426 |
editor := MenuEditor new. |