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