author | Claus Gittinger <cg@exept.de> |
Thu, 31 Jul 1997 14:29:58 +0200 | |
changeset 270 | 1a68f7479932 |
parent 266 | dd70070d6652 |
child 275 | cdecb5b5d356 |
permissions | -rw-r--r-- |
199 | 1 |
" |
2 |
COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
||
14 |
||
15 |
ApplicationModel subclass:#MenuEditor |
|
270
1a68f7479932
provide access to the menus selector;
Claus Gittinger <cg@exept.de>
parents:
266
diff
changeset
|
16 |
instanceVariableNames:'specClass tabSelection aspects slices activeHelpTool didInstall' |
220 | 17 |
classVariableNames:'' |
18 |
poolDictionaries:'' |
|
19 |
category:'Interface-UIPainter' |
|
199 | 20 |
! |
21 |
||
22 |
Object subclass:#Item |
|
220 | 23 |
instanceVariableNames:'activeHelpKey enabled label value nameKey indication shortcutKey |
24 |
accessCharaterPos retriever icon iconAndLabel submenuChannel' |
|
25 |
classVariableNames:'' |
|
26 |
poolDictionaries:'' |
|
27 |
privateIn:MenuEditor |
|
199 | 28 |
! |
29 |
||
30 |
SelectionInTreeView subclass:#Painter |
|
220 | 31 |
instanceVariableNames:'imageMenuLink imageSeparator' |
243 | 32 |
classVariableNames:'CopyBuffer ImageMenuLink ImageSeparator ImageItem ImageMenu |
33 |
ImageMenuOpen' |
|
220 | 34 |
poolDictionaries:'' |
35 |
privateIn:MenuEditor |
|
199 | 36 |
! |
37 |
||
38 |
!MenuEditor class methodsFor:'documentation'! |
|
39 |
||
40 |
copyright |
|
41 |
" |
|
42 |
COPYRIGHT (c) 1997 by eXept Software AG / Claus Gittinger |
|
43 |
All Rights Reserved |
|
44 |
||
45 |
This software is furnished under a license and may be used |
|
46 |
only in accordance with the terms of that license and with the |
|
47 |
inclusion of the above copyright notice. This software may not |
|
48 |
be provided or otherwise made available to, or used by, any |
|
49 |
other person. No title to or ownership of the software is |
|
50 |
hereby transferred. |
|
51 |
" |
|
52 |
||
53 |
||
54 |
! |
|
55 |
||
56 |
documentation |
|
57 |
" |
|
58 |
create and modify or inspect popup and pullDown menus of the |
|
59 |
new style( derives from Menu). |
|
60 |
||
61 |
[start with:] |
|
62 |
MenuEditor open |
|
63 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuPullDown |
|
64 |
||
65 |
[see also:] |
|
66 |
UIPainter |
|
67 |
UIHelpTool |
|
68 |
UISpecificationTool |
|
69 |
SelectionInTreeView |
|
70 |
||
71 |
[author:] |
|
72 |
Claus Atzkern |
|
73 |
" |
|
74 |
||
75 |
! ! |
|
76 |
||
218 | 77 |
!MenuEditor class methodsFor:'icons'! |
78 |
||
220 | 79 |
iconCreateItem |
80 |
^ Painter imageItem |
|
81 |
||
82 |
! |
|
83 |
||
84 |
iconCreateLink |
|
85 |
^ Painter imageMenuLink |
|
86 |
||
87 |
! |
|
88 |
||
89 |
iconCreateMenu |
|
243 | 90 |
^ Painter imageMenu |
91 |
||
92 |
"Modified: 28.7.1997 / 10:02:21 / cg" |
|
220 | 93 |
! |
94 |
||
95 |
iconCreateSep |
|
96 |
^ Painter imageSeparator |
|
97 |
||
227 | 98 |
! |
99 |
||
100 |
iconUnknown |
|
243 | 101 |
"returns an image used for picked items containing an image |
227 | 102 |
" |
243 | 103 |
^ Image fromFile:'brokenImage.xpm' |
104 |
||
105 |
"Modified: 28.7.1997 / 09:36:26 / cg" |
|
218 | 106 |
! ! |
107 |
||
199 | 108 |
!MenuEditor class methodsFor:'interface specs'! |
109 |
||
110 |
classAndMethodSpec |
|
111 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
112 |
||
113 |
"do not manually edit this - the painter/builder may not be able to |
|
114 |
handle the specification if its corrupted." |
|
115 |
||
116 |
" |
|
117 |
UIPainter new openOnClass:MenuEditor andSelector:#classAndMethodSpec |
|
118 |
MenuEditor new openInterface:#classAndMethodSpec |
|
119 |
" |
|
120 |
||
121 |
<resource: #canvas> |
|
122 |
||
123 |
^ |
|
124 |
||
125 |
#(#FullSpec |
|
126 |
#'window:' |
|
127 |
#(#WindowSpec |
|
128 |
#'name:' 'uIPainterView' |
|
129 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
130 |
#'label:' 'Painter' |
|
131 |
#'bounds:' #(#Rectangle 0 0 391 170) |
|
132 |
) |
|
133 |
#'component:' |
|
134 |
#(#SpecCollection |
|
135 |
#'collection:' |
|
136 |
#( |
|
137 |
#(#LabelSpec |
|
138 |
#'name:' 'classLabel' |
|
139 |
#'layout:' #(#AlignmentOrigin 45 0.11 51 0 1 0.5) |
|
140 |
#'label:' 'class:' |
|
141 |
#'adjust:' #right |
|
142 |
#'resizeForLabel:' true |
|
143 |
) |
|
144 |
#(#LabelSpec |
|
145 |
#'name:' 'selectorLabel' |
|
146 |
#'layout:' #(#AlignmentOrigin 45 0.11 74 0 1 0.5) |
|
147 |
#'label:' 'selector:' |
|
148 |
#'adjust:' #right |
|
149 |
#'resizeForLabel:' true |
|
150 |
) |
|
151 |
#(#InputFieldSpec |
|
152 |
#'name:' 'methodNameField' |
|
263 | 153 |
#'layout:' #(#LayoutFrame 47 0.11 64 0 0 1.0 86 0) |
199 | 154 |
#'tabable:' true |
155 |
#'model:' #methodNameChannel |
|
156 |
) |
|
157 |
#(#LabelSpec |
|
158 |
#'name:' 'boxLabel' |
|
159 |
#'layout:' #(#Point 5 10) |
|
160 |
#'label:' 'class & selector for code:' |
|
161 |
#'adjust:' #left |
|
162 |
#'resizeForLabel:' true |
|
163 |
) |
|
164 |
#(#InputFieldSpec |
|
165 |
#'name:' 'classNameField' |
|
263 | 166 |
#'layout:' #(#LayoutFrame 47 0.11 39 0 0 1.0 61 0) |
199 | 167 |
#'tabable:' true |
168 |
#'model:' #classNameChannel |
|
169 |
) |
|
170 |
#(#HorizontalPanelViewSpec |
|
171 |
#'name:' 'commitPanel' |
|
172 |
#'layout:' #(#LayoutFrame 0 0.0 -24 1.0 0 1.0 0 1.0) |
|
173 |
#'component:' |
|
174 |
#(#SpecCollection |
|
175 |
#'collection:' |
|
176 |
#( |
|
177 |
#(#ActionButtonSpec |
|
178 |
#'name:' 'button1' |
|
179 |
#'label:' 'cancel' |
|
180 |
#'tabable:' true |
|
181 |
#'model:' #cancel |
|
182 |
#'extent:' #(#Point 191 24) |
|
183 |
) |
|
184 |
#(#ActionButtonSpec |
|
185 |
#'name:' 'button2' |
|
186 |
#'label:' 'ok' |
|
187 |
#'tabable:' true |
|
188 |
#'isDefault:' true |
|
189 |
#'model:' #accept |
|
190 |
#'extent:' #(#Point 191 24) |
|
191 |
) |
|
192 |
) |
|
193 |
) |
|
194 |
#'horizontalLayout:' #fitSpace |
|
195 |
#'verticalLayout:' #fit |
|
196 |
#'horizontalSpace:' 3 |
|
197 |
#'verticalSpace:' 3 |
|
198 |
) |
|
199 |
) |
|
200 |
) |
|
201 |
) |
|
263 | 202 |
|
203 |
"Modified: 28.7.1997 / 15:40:15 / cg" |
|
199 | 204 |
! |
205 |
||
206 |
classDefineSpec |
|
207 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
208 |
||
209 |
"do not manually edit this - the painter/builder may not be able to |
|
210 |
handle the specification if its corrupted." |
|
211 |
||
212 |
" |
|
213 |
UIPainter new openOnClass:MenuEditor andSelector:#classDefineSpec |
|
214 |
MenuEditor new openInterface:#classDefineSpec |
|
215 |
" |
|
216 |
||
217 |
<resource: #canvas> |
|
218 |
||
219 |
^ |
|
220 |
||
221 |
#(#FullSpec |
|
222 |
#'window:' |
|
223 |
#(#WindowSpec |
|
224 |
#'name:' 'uIPainterView' |
|
225 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
226 |
#'label:' 'Painter' |
|
227 |
#'bounds:' #(#Rectangle 0 0 383 128) |
|
228 |
) |
|
229 |
#'component:' |
|
230 |
#(#SpecCollection |
|
231 |
#'collection:' |
|
232 |
#( |
|
233 |
#(#LabelSpec |
|
234 |
#'name:' 'classLabel' |
|
235 |
#'layout:' #(#AlignmentOrigin 45 0.11 51 0 1 0.5) |
|
236 |
#'label:' 'class:' |
|
237 |
#'adjust:' #right |
|
238 |
#'resizeForLabel:' true |
|
239 |
) |
|
240 |
#(#LabelSpec |
|
241 |
#'name:' 'boxLabel' |
|
242 |
#'layout:' #(#Point 5 10) |
|
243 |
#'label:' 'class for code:' |
|
244 |
#'adjust:' #left |
|
245 |
#'resizeForLabel:' true |
|
246 |
) |
|
247 |
#(#InputFieldSpec |
|
248 |
#'name:' 'classNameField' |
|
263 | 249 |
#'layout:' #(#LayoutFrame 47 0.11 39 0 0 1.0 61 0) |
199 | 250 |
#'tabable:' true |
251 |
#'model:' #classNameChannel |
|
252 |
) |
|
253 |
#(#HorizontalPanelViewSpec |
|
254 |
#'name:' 'commitPanel' |
|
255 |
#'layout:' #(#LayoutFrame 0 0.0 -24 1.0 0 1.0 0 1.0) |
|
256 |
#'component:' |
|
257 |
#(#SpecCollection |
|
258 |
#'collection:' |
|
259 |
#( |
|
260 |
#(#ActionButtonSpec |
|
261 |
#'name:' 'button1' |
|
262 |
#'label:' 'cancel' |
|
263 |
#'tabable:' true |
|
264 |
#'model:' #cancel |
|
265 |
#'extent:' #(#Point 187 24) |
|
266 |
) |
|
267 |
#(#ActionButtonSpec |
|
268 |
#'name:' 'button2' |
|
269 |
#'label:' 'ok' |
|
270 |
#'tabable:' true |
|
271 |
#'isDefault:' true |
|
272 |
#'model:' #accept |
|
273 |
#'extent:' #(#Point 187 24) |
|
274 |
) |
|
275 |
) |
|
276 |
) |
|
277 |
#'horizontalLayout:' #fitSpace |
|
278 |
#'verticalLayout:' #fit |
|
279 |
#'horizontalSpace:' 3 |
|
280 |
#'verticalSpace:' 3 |
|
281 |
) |
|
282 |
) |
|
283 |
) |
|
284 |
) |
|
263 | 285 |
|
286 |
"Modified: 28.7.1997 / 15:40:39 / cg" |
|
199 | 287 |
! |
288 |
||
220 | 289 |
menuButtons |
290 |
"this window spec was automatically generated by the ST/X MenuEditor" |
|
291 |
||
292 |
"do not manually edit this - the builder may not be able to |
|
293 |
handle the specification if its corrupted." |
|
294 |
||
295 |
" |
|
296 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuButtons |
|
297 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuButtons)) startUp |
|
298 |
" |
|
299 |
||
300 |
<resource: #menu> |
|
301 |
||
302 |
^ |
|
303 |
||
304 |
#(#Menu |
|
305 |
||
306 |
#( |
|
307 |
#(#MenuItem |
|
308 |
#'label:' 'createMenu' |
|
309 |
#'value:' #doCreateMenu |
|
310 |
#'enabled:' #hasAnySingleSelection |
|
311 |
#'labelImage:' |
|
312 |
#(#ResourceRetriever |
|
313 |
#MenuEditor #iconCreateMenu |
|
314 |
) |
|
315 |
) |
|
316 |
#(#MenuItem |
|
317 |
#'label:' 'createLink' |
|
318 |
#'value:' #doCreateLink |
|
319 |
#'enabled:' #hasAnySingleSelection |
|
320 |
#'labelImage:' |
|
321 |
#(#ResourceRetriever |
|
322 |
#MenuEditor #iconCreateLink |
|
323 |
) |
|
324 |
) |
|
325 |
#(#MenuItem |
|
326 |
#'label:' 'createItem' |
|
327 |
#'value:' #doCreateItem |
|
328 |
#'enabled:' #hasAnySingleSelection |
|
329 |
#'labelImage:' |
|
330 |
#(#ResourceRetriever |
|
331 |
#MenuEditor #iconCreateItem |
|
332 |
) |
|
333 |
) |
|
334 |
#(#MenuItem |
|
335 |
#'label:' 'createSeparator' |
|
336 |
#'value:' #doCreateSep |
|
337 |
#'enabled:' #hasAnySingleSelection |
|
338 |
#'labelImage:' |
|
339 |
#(#ResourceRetriever |
|
340 |
#MenuEditor #iconCreateSep |
|
341 |
) |
|
342 |
) |
|
343 |
#(#MenuItem |
|
344 |
#'label:' '' |
|
345 |
) |
|
346 |
#(#MenuItem |
|
347 |
#'label:' 'stepUp' |
|
348 |
#'value:' #doStepUp |
|
349 |
#'enabled:' #enabledStepOver |
|
350 |
#'labelImage:' |
|
351 |
#(#ResourceRetriever |
|
224 | 352 |
#UIPainter #iconStepUp |
220 | 353 |
) |
354 |
) |
|
355 |
#(#MenuItem |
|
356 |
#'label:' 'stepDown' |
|
357 |
#'value:' #doStepDown |
|
358 |
#'enabled:' #enabledStepOver |
|
359 |
#'labelImage:' |
|
360 |
#(#ResourceRetriever |
|
224 | 361 |
#UIPainter #iconStepDown |
220 | 362 |
) |
363 |
) |
|
364 |
#(#MenuItem |
|
365 |
#'label:' 'stepIn' |
|
366 |
#'value:' #doStepIn |
|
367 |
#'enabled:' #enabledStepIn |
|
368 |
#'labelImage:' |
|
369 |
#(#ResourceRetriever |
|
224 | 370 |
#UIPainter #iconStepIn |
220 | 371 |
) |
372 |
) |
|
373 |
#(#MenuItem |
|
374 |
#'label:' 'stepOut' |
|
375 |
#'value:' #doStepOut |
|
376 |
#'enabled:' #enabledStepOut |
|
377 |
#'labelImage:' |
|
378 |
#(#ResourceRetriever |
|
224 | 379 |
#UIPainter #iconStepOut |
220 | 380 |
) |
381 |
) |
|
382 |
) nil |
|
383 |
nil |
|
384 |
) |
|
385 |
! |
|
386 |
||
218 | 387 |
menuDefaultLink |
388 |
"this window spec was automatically generated by the ST/X MenuEditor" |
|
389 |
||
390 |
"do not manually edit this - the builder may not be able to |
|
391 |
handle the specification if its corrupted." |
|
392 |
||
393 |
" |
|
394 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuDefaultLink |
|
395 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuDefaultLink)) startUp |
|
396 |
" |
|
397 |
||
398 |
<resource: #menu> |
|
399 |
||
400 |
^ |
|
401 |
||
402 |
#(#Menu |
|
403 |
||
404 |
#( |
|
405 |
#(#MenuItem |
|
406 |
#'label:' '!! derives from application !!' |
|
407 |
) |
|
408 |
) nil |
|
409 |
nil |
|
410 |
) |
|
411 |
! |
|
412 |
||
220 | 413 |
menuPainter |
414 |
"this window spec was automatically generated by the ST/X MenuEditor" |
|
415 |
||
416 |
"do not manually edit this - the builder may not be able to |
|
417 |
handle the specification if its corrupted." |
|
418 |
||
419 |
" |
|
420 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuPainter |
|
421 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuPainter)) startUp |
|
422 |
" |
|
423 |
||
424 |
<resource: #menu> |
|
425 |
||
426 |
^ |
|
427 |
||
428 |
#(#Menu |
|
429 |
||
430 |
#( |
|
431 |
#(#MenuItem |
|
432 |
#'label:' 'copy' |
|
433 |
#'value:' #doCopy |
|
434 |
#'enabled:' #hasValidSelection |
|
435 |
) |
|
436 |
#(#MenuItem |
|
437 |
#'label:' 'cut' |
|
438 |
#'value:' #doCut |
|
439 |
#'enabled:' #hasValidSelection |
|
440 |
) |
|
441 |
#(#MenuItem |
|
442 |
#'label:' 'paste' |
|
443 |
#'value:' #doPaste |
|
444 |
#'enabled:' #hasAnySingleSelection |
|
445 |
) |
|
446 |
#(#MenuItem |
|
447 |
#'label:' '-' |
|
448 |
) |
|
449 |
#(#MenuItem |
|
450 |
#'label:' 'create' |
|
451 |
#'enabled:' #hasAnySingleSelection |
|
452 |
#'submenu:' |
|
453 |
#(#Menu |
|
454 |
||
455 |
#( |
|
456 |
#(#MenuItem |
|
457 |
#'label:' 'submenu static' |
|
458 |
#'value:' #doCreateMenu |
|
459 |
#'labelImage:' |
|
460 |
#(#ResourceRetriever |
|
461 |
#MenuEditor #iconCreateMenu |
|
462 |
'submenu static' |
|
463 |
) |
|
464 |
) |
|
465 |
#(#MenuItem |
|
466 |
#'label:' 'submenu dynamic' |
|
467 |
#'value:' #doCreateLink |
|
468 |
#'labelImage:' |
|
469 |
#(#ResourceRetriever |
|
470 |
#MenuEditor #iconCreateLink |
|
471 |
'submenu dynamic' |
|
472 |
) |
|
473 |
) |
|
474 |
#(#MenuItem |
|
475 |
#'label:' '-' |
|
476 |
) |
|
477 |
#(#MenuItem |
|
478 |
#'label:' 'item' |
|
479 |
#'value:' #doCreateItem |
|
480 |
#'labelImage:' |
|
481 |
#(#ResourceRetriever |
|
482 |
#MenuEditor #iconCreateItem |
|
483 |
'item' |
|
484 |
) |
|
485 |
) |
|
486 |
#(#MenuItem |
|
487 |
#'label:' 'separator' |
|
488 |
#'value:' #doCreateSep |
|
489 |
#'labelImage:' |
|
490 |
#(#ResourceRetriever |
|
491 |
#MenuEditor #iconCreateSep |
|
492 |
'separator' |
|
493 |
) |
|
494 |
) |
|
495 |
) nil |
|
496 |
nil |
|
497 |
) |
|
498 |
) |
|
499 |
) nil |
|
500 |
nil |
|
501 |
) |
|
502 |
! |
|
503 |
||
199 | 504 |
menuPullDown |
505 |
"this window spec was automatically generated by the ST/X MenuEditor" |
|
506 |
||
507 |
"do not manually edit this - the builder may not be able to |
|
508 |
handle the specification if its corrupted." |
|
509 |
||
510 |
" |
|
511 |
MenuEditor new openOnClass:MenuEditor andSelector:#menuPullDown |
|
512 |
(Menu new fromLiteralArrayEncoding:(MenuEditor menuPullDown)) startUp |
|
513 |
" |
|
514 |
||
515 |
<resource: #menu> |
|
516 |
||
517 |
^ |
|
518 |
||
519 |
#(#Menu |
|
520 |
||
521 |
#( |
|
522 |
#(#MenuItem |
|
523 |
#'label:' 'file' |
|
524 |
#'value:' #file |
|
525 |
#'submenu:' |
|
526 |
#(#Menu |
|
527 |
||
528 |
#( |
|
529 |
#(#MenuItem |
|
530 |
#'label:' 'new' |
|
531 |
#'value:' #doNew |
|
532 |
) |
|
533 |
#(#MenuItem |
|
534 |
#'label:' 'from class ...' |
|
535 |
#'value:' #doFromClass |
|
218 | 536 |
#'enabled:' #isOwnerOfHelpTool |
199 | 537 |
) |
538 |
#(#MenuItem |
|
539 |
#'label:' 'pick a menu' |
|
540 |
#'value:' #doPickAMenu |
|
218 | 541 |
#'enabled:' #isOwnerOfHelpTool |
199 | 542 |
) |
543 |
#(#MenuItem |
|
544 |
#'label:' '=' |
|
545 |
) |
|
546 |
#(#MenuItem |
|
547 |
#'label:' 'quit' |
|
548 |
#'value:' #closeRequest |
|
549 |
) |
|
550 |
) nil |
|
551 |
nil |
|
552 |
) |
|
553 |
) |
|
554 |
#(#MenuItem |
|
243 | 555 |
#'label:' 'edit' |
556 |
#'submenu:' |
|
557 |
#(#Menu |
|
558 |
||
559 |
#( |
|
560 |
#(#MenuItem |
|
561 |
#'label:' 'cut' |
|
246 | 562 |
#'value:' #doCut |
243 | 563 |
) |
564 |
#(#MenuItem |
|
565 |
#'label:' '=' |
|
566 |
) |
|
567 |
#(#MenuItem |
|
568 |
#'label:' 'create submenu static' |
|
246 | 569 |
#'value:' #doCreateMenu |
243 | 570 |
) |
571 |
#(#MenuItem |
|
572 |
#'label:' 'create summenu dynamic' |
|
246 | 573 |
#'value:' #doCreateLink |
243 | 574 |
) |
575 |
#(#MenuItem |
|
576 |
#'label:' '-' |
|
577 |
) |
|
578 |
#(#MenuItem |
|
579 |
#'label:' 'create item' |
|
246 | 580 |
#'value:' #doCreateItem |
243 | 581 |
) |
582 |
#(#MenuItem |
|
583 |
#'label:' 'create separator' |
|
246 | 584 |
#'value:' #doCreateSep |
243 | 585 |
) |
586 |
) nil |
|
587 |
nil |
|
588 |
) |
|
589 |
) |
|
590 |
#(#MenuItem |
|
199 | 591 |
#'label:' 'code' |
592 |
#'value:' #code |
|
593 |
#'submenu:' |
|
594 |
#(#Menu |
|
595 |
||
596 |
#( |
|
597 |
#(#MenuItem |
|
598 |
#'label:' 'class' |
|
599 |
#'value:' #doDefineClass |
|
218 | 600 |
#'enabled:' #isOwnerOfHelpTool |
199 | 601 |
) |
602 |
#(#MenuItem |
|
603 |
#'label:' '-' |
|
604 |
) |
|
605 |
#(#MenuItem |
|
266 | 606 |
#'label:' 'install menu spec.' |
199 | 607 |
#'value:' #doInstallSpec |
608 |
) |
|
609 |
#(#MenuItem |
|
610 |
#'label:' 'install help spec.' |
|
611 |
#'value:' #doInstallHelp |
|
218 | 612 |
#'enabled:' #isOwnerOfHelpTool |
199 | 613 |
) |
614 |
#(#MenuItem |
|
615 |
#'label:' '=' |
|
616 |
) |
|
617 |
#(#MenuItem |
|
618 |
#'label:' 'browse application' |
|
619 |
#'value:' #doBrowseAppClass |
|
620 |
) |
|
621 |
) nil |
|
622 |
nil |
|
623 |
) |
|
624 |
) |
|
625 |
#(#MenuItem |
|
626 |
#'label:' 'test' |
|
218 | 627 |
#'submenuChannel:' #submenuTest |
628 |
) |
|
199 | 629 |
) nil |
630 |
nil |
|
631 |
) |
|
243 | 632 |
|
266 | 633 |
"Modified: 28.7.1997 / 18:12:10 / cg" |
199 | 634 |
! |
635 |
||
636 |
windowSpec |
|
637 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
638 |
||
639 |
"do not manually edit this - the painter/builder may not be able to |
|
640 |
handle the specification if its corrupted." |
|
641 |
||
642 |
" |
|
643 |
UIPainter new openOnClass:MenuEditor andSelector:#windowSpec |
|
644 |
MenuEditor new openInterface:#windowSpec |
|
645 |
" |
|
646 |
"MenuEditor open" |
|
647 |
||
648 |
<resource: #canvas> |
|
649 |
||
650 |
^ |
|
651 |
||
652 |
#(#FullSpec |
|
653 |
#'window:' |
|
654 |
#(#WindowSpec |
|
655 |
#'name:' 'uIPainterView' |
|
656 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
657 |
#'label:' 'Menu Builder' |
|
658 |
#'bounds:' #(#Rectangle 0 0 580 384) |
|
659 |
) |
|
660 |
#'component:' |
|
661 |
#(#SpecCollection |
|
662 |
#'collection:' |
|
663 |
#( |
|
664 |
#(#ArbitraryComponentSpec |
|
665 |
#'name:' 'painterView' |
|
220 | 666 |
#'layout:' #(#LayoutFrame 0 0.0 57 0 0 0.5 0 1.0) |
667 |
#'menu:' #menuPainter |
|
199 | 668 |
#'hasHorizontalScrollBar:' true |
669 |
#'hasVerticalScrollBar:' true |
|
220 | 670 |
#'component:' #painter |
199 | 671 |
#'hasBorder:' false |
672 |
) |
|
673 |
#(#NoteBookViewSpec |
|
674 |
#'name:' 'specificationView' |
|
220 | 675 |
#'layout:' #(#LayoutFrame 0 0.5 0 0.0 0 1.0 -25 1.0) |
676 |
#'tabable:' true |
|
199 | 677 |
#'menu:' #tabList |
678 |
#'model:' #tabModel |
|
679 |
#'tabWidget:' #Window |
|
680 |
#'useIndex:' true |
|
681 |
#'canvas:' #tabCanvas |
|
682 |
) |
|
683 |
#(#HorizontalPanelViewSpec |
|
684 |
#'name:' 'confirmationPanel' |
|
685 |
#'layout:' #(#LayoutFrame 0 0.5 -24 1.0 0 1.0 0 1.0) |
|
686 |
#'component:' |
|
687 |
#(#SpecCollection |
|
688 |
#'collection:' |
|
689 |
#( |
|
690 |
#(#ActionButtonSpec |
|
691 |
#'name:' 'cancelButton' |
|
692 |
#'label:' 'cancel' |
|
693 |
#'model:' #cancel |
|
694 |
#'enableChannel:' #modifiedChannel |
|
695 |
#'extent:' #(#Point 140 24) |
|
696 |
) |
|
697 |
#(#ActionButtonSpec |
|
698 |
#'name:' 'acceptButton' |
|
699 |
#'label:' 'ok' |
|
700 |
#'model:' #accept |
|
701 |
#'enableChannel:' #modifiedChannel |
|
702 |
#'extent:' #(#Point 141 24) |
|
703 |
) |
|
704 |
) |
|
705 |
) |
|
706 |
#'horizontalLayout:' #fitSpace |
|
707 |
#'verticalLayout:' #fit |
|
708 |
#'horizontalSpace:' 3 |
|
709 |
#'verticalSpace:' 3 |
|
710 |
) |
|
711 |
#(#MenuPanelSpec |
|
712 |
#'name:' 'pullDownMenu' |
|
220 | 713 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 0.5 24 0) |
714 |
#'tabable:' true |
|
199 | 715 |
#'menu:' #menuPullDown |
716 |
) |
|
220 | 717 |
#(#MenuPanelSpec |
718 |
#'name:' 'menuPanel1' |
|
719 |
#'layout:' #(#LayoutFrame 0 0 28 0 0 0.5 53 0) |
|
720 |
#'menu:' #menuButtons |
|
721 |
#'showSeparatingLines:' true |
|
722 |
) |
|
199 | 723 |
) |
724 |
) |
|
725 |
) |
|
726 |
! ! |
|
727 |
||
728 |
!MenuEditor class methodsFor:'slices'! |
|
729 |
||
730 |
slicesItem |
|
731 |
^#( |
|
732 |
(Basics basicsItemSpec) |
|
733 |
(Details detailsEditSpec) |
|
734 |
(Misc miscEditSpec) |
|
735 |
(Help help) |
|
736 |
) |
|
737 |
||
738 |
! |
|
739 |
||
218 | 740 |
slicesLink |
741 |
^#( |
|
742 |
(Basics basicsLinkSpec) |
|
743 |
(Details detailsEditSpec) |
|
744 |
(Misc miscEditSpec) |
|
745 |
(Help help) |
|
746 |
) |
|
747 |
||
748 |
! |
|
749 |
||
199 | 750 |
slicesMenu |
751 |
^#( |
|
752 |
(Basics basicsMenuSpec) |
|
753 |
(Details detailsEditSpec) |
|
754 |
(Misc miscEditSpec) |
|
755 |
(Help help) |
|
756 |
) |
|
757 |
||
758 |
! |
|
759 |
||
760 |
slicesRootMenu |
|
761 |
^#( |
|
762 |
(Basics basicsRootSpec) |
|
763 |
) |
|
764 |
||
765 |
! |
|
766 |
||
218 | 767 |
slicesSeparatorMenu |
199 | 768 |
^#( |
218 | 769 |
(Basics basicsSeparatorSpec) |
199 | 770 |
) |
771 |
||
772 |
! ! |
|
773 |
||
774 |
!MenuEditor class methodsFor:'specs'! |
|
775 |
||
776 |
basicsItemSpec |
|
777 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
778 |
||
779 |
"do not manually edit this - the painter/builder may not be able to |
|
780 |
handle the specification if its corrupted." |
|
781 |
||
782 |
" |
|
783 |
UIPainter new openOnClass:MenuEditor andSelector:#basicsItemSpec |
|
784 |
MenuEditor new openInterface:#basicsItemSpec |
|
785 |
" |
|
786 |
||
787 |
<resource: #canvas> |
|
788 |
||
789 |
^ |
|
790 |
||
791 |
#(#FullSpec |
|
792 |
#'window:' |
|
793 |
#(#WindowSpec |
|
794 |
#'name:' 'uIPainterView' |
|
795 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
796 |
#'label:' 'unnamed canvas' |
|
797 |
#'bounds:' #(#Rectangle 0 0 267 319) |
|
798 |
) |
|
799 |
#'component:' |
|
800 |
#(#SpecCollection |
|
801 |
#'collection:' |
|
802 |
#( |
|
803 |
#(#LabelSpec |
|
804 |
#'name:' 'nameKeyLabel' |
|
805 |
#'layout:' #(#AlignmentOrigin 87 0 26 0 1 0.5) |
|
806 |
#'label:' 'NameKey:' |
|
263 | 807 |
#'adjust:' #right |
199 | 808 |
#'resizeForLabel:' true |
809 |
) |
|
810 |
#(#InputFieldSpec |
|
811 |
#'name:' 'itemNameKey' |
|
263 | 812 |
#'layout:' #(#LayoutFrame 91 0 15 0 0 1.0 37 0) |
199 | 813 |
#'tabable:' true |
814 |
#'model:' #nameKey |
|
815 |
#'type:' #symbolOrNil |
|
816 |
) |
|
817 |
#(#LabelSpec |
|
818 |
#'name:' 'labelLabel' |
|
819 |
#'layout:' #(#AlignmentOrigin 87 0 53 0 1 0.5) |
|
820 |
#'label:' 'Label' |
|
263 | 821 |
#'adjust:' #right |
199 | 822 |
#'resizeForLabel:' true |
823 |
) |
|
824 |
#(#InputFieldSpec |
|
825 |
#'name:' 'itemLabel' |
|
263 | 826 |
#'layout:' #(#LayoutFrame 91 0 42 0 0 1.0 64 0) |
199 | 827 |
#'tabable:' true |
828 |
#'model:' #label |
|
829 |
) |
|
830 |
#(#LabelSpec |
|
831 |
#'name:' 'valueLabel' |
|
832 |
#'layout:' #(#AlignmentOrigin 87 0 79 0 1 0.5) |
|
833 |
#'label:' 'Value:' |
|
263 | 834 |
#'adjust:' #right |
199 | 835 |
#'resizeForLabel:' true |
836 |
) |
|
837 |
#(#InputFieldSpec |
|
838 |
#'name:' 'itemValue' |
|
263 | 839 |
#'layout:' #(#LayoutFrame 91 0 68 0 0 1.0 90 0) |
199 | 840 |
#'tabable:' true |
841 |
#'model:' #value |
|
842 |
#'type:' #symbolOrNil |
|
843 |
) |
|
844 |
#(#LabelSpec |
|
845 |
#'name:' 'indicationLabel' |
|
846 |
#'layout:' #(#AlignmentOrigin 87 0 139 0 1 0.5) |
|
847 |
#'label:' 'Indication:' |
|
263 | 848 |
#'adjust:' #right |
199 | 849 |
#'resizeForLabel:' true |
850 |
) |
|
851 |
#(#InputFieldSpec |
|
852 |
#'name:' 'indicationValue' |
|
263 | 853 |
#'layout:' #(#LayoutFrame 91 0 128 0 0 1.0 150 0) |
199 | 854 |
#'tabable:' true |
855 |
#'model:' #indication |
|
856 |
#'type:' #symbolOrNil |
|
857 |
) |
|
858 |
) |
|
859 |
) |
|
860 |
) |
|
263 | 861 |
|
862 |
"Modified: 28.7.1997 / 15:37:47 / cg" |
|
199 | 863 |
! |
864 |
||
218 | 865 |
basicsLinkSpec |
866 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
867 |
||
868 |
"do not manually edit this - the painter/builder may not be able to |
|
869 |
handle the specification if its corrupted." |
|
870 |
||
871 |
" |
|
872 |
UIPainter new openOnClass:MenuEditor andSelector:#basicsLinkSpec |
|
873 |
MenuEditor new openInterface:#basicsLinkSpec |
|
874 |
" |
|
875 |
||
876 |
<resource: #canvas> |
|
877 |
||
878 |
^ |
|
879 |
||
880 |
#(#FullSpec |
|
881 |
#'window:' |
|
882 |
#(#WindowSpec |
|
883 |
#'name:' 'uIPainterView' |
|
884 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
885 |
#'label:' 'unnamed canvas' |
|
886 |
#'bounds:' #(#Rectangle 0 0 267 319) |
|
887 |
) |
|
888 |
#'component:' |
|
889 |
#(#SpecCollection |
|
890 |
#'collection:' |
|
891 |
#( |
|
892 |
#(#LabelSpec |
|
893 |
#'name:' 'nameKeyLabel' |
|
894 |
#'layout:' #(#AlignmentOrigin 87 0 26 0 1 0.5) |
|
895 |
#'label:' 'NameKey:' |
|
263 | 896 |
#'adjust:' #right |
218 | 897 |
#'resizeForLabel:' true |
898 |
) |
|
899 |
#(#InputFieldSpec |
|
900 |
#'name:' 'itemNameKey' |
|
263 | 901 |
#'layout:' #(#LayoutFrame 91 0 15 0 0 1.0 37 0) |
218 | 902 |
#'tabable:' true |
903 |
#'model:' #nameKey |
|
904 |
#'type:' #symbolOrNil |
|
905 |
) |
|
906 |
#(#LabelSpec |
|
907 |
#'name:' 'labelLabel' |
|
908 |
#'layout:' #(#AlignmentOrigin 87 0 53 0 1 0.5) |
|
909 |
#'label:' 'Label' |
|
910 |
#'resizeForLabel:' true |
|
911 |
) |
|
912 |
#(#InputFieldSpec |
|
913 |
#'name:' 'itemLabel' |
|
263 | 914 |
#'layout:' #(#LayoutFrame 91 0 42 0 0 1.0 64 0) |
218 | 915 |
#'tabable:' true |
916 |
#'model:' #label |
|
917 |
) |
|
918 |
#(#InputFieldSpec |
|
919 |
#'name:' 'submenuChannel' |
|
263 | 920 |
#'layout:' #(#LayoutFrame 91 0 69 0 0 1.0 91 0) |
218 | 921 |
#'tabable:' true |
922 |
#'model:' #submenuChannel |
|
923 |
#'type:' #symbolOrNil |
|
924 |
) |
|
925 |
#(#LabelSpec |
|
926 |
#'name:' 'menuLabel' |
|
927 |
#'layout:' #(#AlignmentOrigin 87 0 80 0 1 0.5) |
|
928 |
#'label:' 'Menu:' |
|
929 |
#'resizeForLabel:' true |
|
930 |
) |
|
931 |
) |
|
932 |
) |
|
933 |
) |
|
263 | 934 |
|
935 |
"Modified: 28.7.1997 / 15:38:29 / cg" |
|
218 | 936 |
! |
937 |
||
199 | 938 |
basicsMenuSpec |
939 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
940 |
||
941 |
"do not manually edit this - the painter/builder may not be able to |
|
942 |
handle the specification if its corrupted." |
|
943 |
||
944 |
" |
|
945 |
UIPainter new openOnClass:MenuEditor andSelector:#basicsMenuSpec |
|
946 |
MenuEditor new openInterface:#basicsMenuSpec |
|
947 |
" |
|
948 |
||
949 |
<resource: #canvas> |
|
950 |
||
951 |
^ |
|
952 |
||
953 |
#(#FullSpec |
|
954 |
#'window:' |
|
955 |
#(#WindowSpec |
|
956 |
#'name:' 'uIPainterView' |
|
957 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
958 |
#'label:' 'unnamed canvas' |
|
959 |
#'bounds:' #(#Rectangle 0 0 267 319) |
|
960 |
) |
|
961 |
#'component:' |
|
962 |
#(#SpecCollection |
|
963 |
#'collection:' |
|
964 |
#( |
|
965 |
#(#LabelSpec |
|
966 |
#'name:' 'nameKeyLabel' |
|
967 |
#'layout:' #(#AlignmentOrigin 87 0 26 0 1 0.5) |
|
968 |
#'label:' 'NameKey:' |
|
263 | 969 |
#'adjust:' #right |
199 | 970 |
#'resizeForLabel:' true |
971 |
) |
|
972 |
#(#InputFieldSpec |
|
973 |
#'name:' 'itemNameKey' |
|
263 | 974 |
#'layout:' #(#LayoutFrame 91 0 15 0 0 1.0 37 0) |
199 | 975 |
#'tabable:' true |
976 |
#'model:' #nameKey |
|
977 |
#'type:' #symbolOrNil |
|
978 |
) |
|
979 |
#(#LabelSpec |
|
980 |
#'name:' 'labelLabel' |
|
981 |
#'layout:' #(#AlignmentOrigin 87 0 53 0 1 0.5) |
|
982 |
#'label:' 'Label' |
|
263 | 983 |
#'adjust:' #right |
199 | 984 |
#'resizeForLabel:' true |
985 |
) |
|
986 |
#(#InputFieldSpec |
|
987 |
#'name:' 'itemLabel' |
|
263 | 988 |
#'layout:' #(#LayoutFrame 91 0 42 0 0 1.0 64 0) |
199 | 989 |
#'tabable:' true |
990 |
#'model:' #label |
|
991 |
) |
|
992 |
) |
|
993 |
) |
|
994 |
) |
|
263 | 995 |
|
996 |
"Modified: 28.7.1997 / 15:38:59 / cg" |
|
199 | 997 |
! |
998 |
||
999 |
basicsRootSpec |
|
1000 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
1001 |
||
1002 |
"do not manually edit this - the painter/builder may not be able to |
|
1003 |
handle the specification if its corrupted." |
|
1004 |
||
1005 |
" |
|
1006 |
UIPainter new openOnClass:MenuEditor andSelector:#basicsRootSpec |
|
1007 |
MenuEditor new openInterface:#basicsRootSpec |
|
1008 |
" |
|
1009 |
||
1010 |
<resource: #canvas> |
|
1011 |
||
1012 |
^ |
|
1013 |
||
1014 |
#(#FullSpec |
|
1015 |
#'window:' |
|
1016 |
#(#WindowSpec |
|
1017 |
#'name:' 'uIPainterView' |
|
1018 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
1019 |
#'label:' 'unnamed canvas' |
|
1020 |
#'bounds:' #(#Rectangle 0 0 267 319) |
|
1021 |
) |
|
1022 |
#'component:' |
|
1023 |
#(#SpecCollection |
|
1024 |
#'collection:' |
|
1025 |
#( |
|
1026 |
#(#LabelSpec |
|
1027 |
#'name:' 'selectorLabel' |
|
1028 |
#'layout:' #(#AlignmentOrigin 78 0 53 0 1 0.5) |
|
1029 |
#'label:' 'Selector:' |
|
263 | 1030 |
#'adjust:' #right |
199 | 1031 |
#'resizeForLabel:' true |
1032 |
) |
|
1033 |
#(#InputFieldSpec |
|
1034 |
#'name:' 'selector' |
|
263 | 1035 |
#'layout:' #(#LayoutFrame 82 0 42 0 0 1.0 64 0) |
199 | 1036 |
#'tabable:' true |
1037 |
#'model:' #label |
|
1038 |
) |
|
1039 |
) |
|
1040 |
) |
|
1041 |
) |
|
263 | 1042 |
|
1043 |
"Modified: 28.7.1997 / 15:39:17 / cg" |
|
199 | 1044 |
! |
1045 |
||
218 | 1046 |
basicsSeparatorSpec |
199 | 1047 |
"this window spec was automatically generated by the ST/X UIPainter" |
1048 |
||
1049 |
"do not manually edit this - the painter/builder may not be able to |
|
1050 |
handle the specification if its corrupted." |
|
1051 |
||
1052 |
" |
|
218 | 1053 |
UIPainter new openOnClass:MenuEditor andSelector:#basicsSeparatorSpec |
1054 |
MenuEditor new openInterface:#basicsSeparatorSpec |
|
199 | 1055 |
" |
1056 |
||
1057 |
<resource: #canvas> |
|
1058 |
||
1059 |
^ |
|
1060 |
||
1061 |
#(#FullSpec |
|
1062 |
#'window:' |
|
1063 |
#(#WindowSpec |
|
1064 |
#'name:' 'uIPainterView' |
|
1065 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
1066 |
#'label:' 'unnamed canvas' |
|
1067 |
#'bounds:' #(#Rectangle 0 0 267 319) |
|
1068 |
) |
|
1069 |
#'component:' |
|
1070 |
#(#SpecCollection |
|
1071 |
#'collection:' |
|
1072 |
#( |
|
218 | 1073 |
#(#LabelSpec |
1074 |
#'name:' 'separatorLabel' |
|
1075 |
#'layout:' #(#AlignmentOrigin 127 0 22 0 1 0.5) |
|
1076 |
#'label:' 'Separator Type:' |
|
263 | 1077 |
#'adjust:' #right |
218 | 1078 |
#'resizeForLabel:' true |
1079 |
) |
|
1080 |
#(#ComboListSpec |
|
1081 |
#'name:' 'comboList1' |
|
263 | 1082 |
#'layout:' #(#LayoutFrame 132 0 11 0 0 1.0 33 0) |
218 | 1083 |
#'model:' #seperatorSelection |
1084 |
#'useIndex:' false |
|
199 | 1085 |
) |
1086 |
) |
|
1087 |
) |
|
1088 |
) |
|
263 | 1089 |
|
1090 |
"Modified: 28.7.1997 / 15:39:43 / cg" |
|
199 | 1091 |
! |
1092 |
||
1093 |
detailsEditSpec |
|
1094 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
1095 |
||
1096 |
"do not manually edit this - the painter/builder may not be able to |
|
1097 |
handle the specification if its corrupted." |
|
1098 |
||
1099 |
" |
|
1100 |
UIPainter new openOnClass:MenuEditor andSelector:#detailsEditSpec |
|
1101 |
MenuEditor new openInterface:#detailsEditSpec |
|
1102 |
" |
|
1103 |
||
1104 |
<resource: #canvas> |
|
1105 |
||
1106 |
^ |
|
1107 |
||
1108 |
#(#FullSpec |
|
1109 |
#'window:' |
|
1110 |
#(#WindowSpec |
|
1111 |
#'name:' 'uIPainterView' |
|
1112 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
1113 |
#'label:' 'unnamed canvas' |
|
1114 |
#'bounds:' #(#Rectangle 0 0 259 288) |
|
1115 |
) |
|
1116 |
#'component:' |
|
1117 |
#(#SpecCollection |
|
1118 |
#'collection:' |
|
1119 |
#( |
|
1120 |
#(#LabelSpec |
|
1121 |
#'name:' 'enabledLabel' |
|
1122 |
#'layout:' #(#AlignmentOrigin 87 0 59 0 1 0.5) |
|
1123 |
#'label:' 'Enabled:' |
|
263 | 1124 |
#'adjust:' #right |
199 | 1125 |
#'resizeForLabel:' true |
1126 |
) |
|
1127 |
#(#InputFieldSpec |
|
1128 |
#'name:' 'enabled' |
|
263 | 1129 |
#'layout:' #(#LayoutFrame 91 0 48 0 0 1.0 70 0) |
199 | 1130 |
#'tabable:' true |
1131 |
#'model:' #enabled |
|
1132 |
#'type:' #symbolOrNil |
|
1133 |
) |
|
1134 |
#(#LabelSpec |
|
1135 |
#'name:' 'shortcutKeyLabel' |
|
1136 |
#'layout:' #(#AlignmentOrigin 87 0 33 0 1 0.5) |
|
1137 |
#'label:' 'Accelerator:' |
|
263 | 1138 |
#'adjust:' #right |
199 | 1139 |
#'resizeForLabel:' true |
1140 |
) |
|
1141 |
#(#InputFieldSpec |
|
1142 |
#'name:' 'accelerator' |
|
263 | 1143 |
#'layout:' #(#LayoutFrame 91 0 22 0 0 1.0 44 0) |
199 | 1144 |
#'tabable:' true |
1145 |
#'model:' #shortcutKey |
|
1146 |
#'type:' #symbolOrNil |
|
1147 |
) |
|
1148 |
#(#LabelSpec |
|
1149 |
#'name:' 'accessCharPosLabel' |
|
263 | 1150 |
#'layout:' #(#AlignmentOrigin 211 0 127 0 1 0.5) |
199 | 1151 |
#'label:' 'Access Character Position:' |
263 | 1152 |
#'adjust:' #right |
199 | 1153 |
#'resizeForLabel:' true |
1154 |
) |
|
1155 |
#(#InputFieldSpec |
|
1156 |
#'name:' 'accessCharaterPos' |
|
263 | 1157 |
#'layout:' #(#LayoutFrame 215 0 116 0 0 1.0 138 0) |
199 | 1158 |
#'tabable:' true |
1159 |
#'model:' #accessCharaterPos |
|
1160 |
#'type:' #numberOrNil |
|
1161 |
) |
|
1162 |
) |
|
1163 |
) |
|
1164 |
) |
|
263 | 1165 |
|
1166 |
"Modified: 28.7.1997 / 15:43:19 / cg" |
|
199 | 1167 |
! |
1168 |
||
1169 |
miscEditSpec |
|
1170 |
"this window spec was automatically generated by the ST/X UIPainter" |
|
1171 |
||
1172 |
"do not manually edit this - the painter/builder may not be able to |
|
1173 |
handle the specification if its corrupted." |
|
1174 |
||
1175 |
" |
|
1176 |
UIPainter new openOnClass:MenuEditor andSelector:#miscEditSpec |
|
1177 |
MenuEditor new openInterface:#miscEditSpec |
|
1178 |
" |
|
1179 |
||
1180 |
<resource: #canvas> |
|
1181 |
||
1182 |
^ |
|
1183 |
||
1184 |
#(#FullSpec |
|
1185 |
#'window:' |
|
1186 |
#(#WindowSpec |
|
1187 |
#'name:' 'uIPainterView' |
|
1188 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
1189 |
#'label:' 'unnamed canvas' |
|
1190 |
#'bounds:' #(#Rectangle 0 0 245 142) |
|
1191 |
) |
|
1192 |
#'component:' |
|
1193 |
#(#SpecCollection |
|
1194 |
#'collection:' |
|
1195 |
#( |
|
1196 |
#(#LabelSpec |
|
1197 |
#'name:' 'retrieverLabel' |
|
1198 |
#'layout:' #(#AlignmentOrigin 77 0 26 0 1 0.5) |
|
1199 |
#'label:' 'Retriever:' |
|
263 | 1200 |
#'adjust:' #right |
199 | 1201 |
#'resizeForLabel:' true |
1202 |
) |
|
1203 |
#(#InputFieldSpec |
|
1204 |
#'name:' 'retriever' |
|
263 | 1205 |
#'layout:' #(#LayoutFrame 81 0 15 0 0 1.0 37 0) |
199 | 1206 |
#'tabable:' true |
1207 |
#'model:' #retriever |
|
1208 |
#'type:' #symbolOrNil |
|
1209 |
) |
|
1210 |
#(#LabelSpec |
|
1211 |
#'name:' 'iconLabel' |
|
1212 |
#'layout:' #(#AlignmentOrigin 77 0 50 0 1 0.5) |
|
1213 |
#'label:' 'Icon:' |
|
263 | 1214 |
#'adjust:' #right |
199 | 1215 |
#'resizeForLabel:' true |
1216 |
) |
|
1217 |
#(#InputFieldSpec |
|
1218 |
#'name:' 'icon' |
|
263 | 1219 |
#'layout:' #(#LayoutFrame 81 0 39 0 0 1.0 61 0) |
199 | 1220 |
#'tabable:' true |
1221 |
#'model:' #icon |
|
1222 |
#'type:' #symbolOrNil |
|
1223 |
) |
|
1224 |
#(#CheckBoxSpec |
|
1225 |
#'name:' 'iconAndLabel' |
|
263 | 1226 |
#'layout:' #(#LayoutOrigin 15 0 85 0) |
199 | 1227 |
#'tabable:' true |
1228 |
#'model:' #iconAndLabel |
|
1229 |
#'label:' 'Icon & Label' |
|
1230 |
) |
|
1231 |
) |
|
1232 |
) |
|
1233 |
) |
|
263 | 1234 |
|
1235 |
"Modified: 28.7.1997 / 15:44:12 / cg" |
|
199 | 1236 |
! ! |
1237 |
||
209 | 1238 |
!MenuEditor class methodsFor:'startup'! |
1239 |
||
213 | 1240 |
openModalOnClass:aClass andSelector:aSelector |
1241 |
^ self new openModalOnClass:aClass andSelector:aSelector |
|
1242 |
||
1243 |
||
1244 |
! |
|
1245 |
||
209 | 1246 |
openOnClass:aClass andSelector:aSelector |
1247 |
^ self new openOnClass:aClass andSelector:aSelector |
|
1248 |
||
1249 |
||
1250 |
! ! |
|
1251 |
||
199 | 1252 |
!MenuEditor methodsFor:'accessing'! |
1253 |
||
218 | 1254 |
menuDefaultLink |
1255 |
^ self class menuDefaultLink |
|
1256 |
! |
|
1257 |
||
270
1a68f7479932
provide access to the menus selector;
Claus Gittinger <cg@exept.de>
parents:
266
diff
changeset
|
1258 |
selectorName |
1a68f7479932
provide access to the menus selector;
Claus Gittinger <cg@exept.de>
parents:
266
diff
changeset
|
1259 |
^ self painter selectorName |
1a68f7479932
provide access to the menus selector;
Claus Gittinger <cg@exept.de>
parents:
266
diff
changeset
|
1260 |
|
1a68f7479932
provide access to the menus selector;
Claus Gittinger <cg@exept.de>
parents:
266
diff
changeset
|
1261 |
"Created: 31.7.1997 / 14:11:28 / cg" |
1a68f7479932
provide access to the menus selector;
Claus Gittinger <cg@exept.de>
parents:
266
diff
changeset
|
1262 |
! |
1a68f7479932
provide access to the menus selector;
Claus Gittinger <cg@exept.de>
parents:
266
diff
changeset
|
1263 |
|
199 | 1264 |
specClass |
1265 |
^ specClass |
|
1266 |
! |
|
1267 |
||
1268 |
specClass:aClass |
|
1269 |
aClass isBehavior ifTrue:[specClass := aClass name] |
|
1270 |
ifFalse:[specClass := aClass]. |
|
218 | 1271 |
! |
1272 |
||
1273 |
submenuTest |
|
1274 |
"returns submenu assigned to item test |
|
1275 |
" |
|
1276 |
|menu| |
|
1277 |
||
1278 |
menu := self painter asMenu. |
|
1279 |
||
1280 |
menu allItemsDo:[:anItem| |
|
1281 |
anItem value:nil. |
|
1282 |
anItem enabled:true. |
|
1283 |
]. |
|
1284 |
^ menu |
|
199 | 1285 |
! ! |
1286 |
||
220 | 1287 |
!MenuEditor methodsFor:'accessing menu'! |
1288 |
||
1289 |
menuButtons |
|
1290 |
"this window spec was automatically generated by the ST/X MenuEditor" |
|
1291 |
||
1292 |
^ self class menuButtons |
|
1293 |
||
1294 |
||
1295 |
! |
|
1296 |
||
1297 |
menuPainter |
|
1298 |
"this window spec was automatically generated by the ST/X MenuEditor" |
|
1299 |
||
1300 |
^ self class menuPainter |
|
1301 |
||
1302 |
||
1303 |
! ! |
|
1304 |
||
199 | 1305 |
!MenuEditor methodsFor:'actions'! |
1306 |
||
1307 |
accept |
|
1308 |
"automatically generated by UIPainter ..." |
|
1309 |
||
255
989494227ffc
use #booleanAspectFor: , a codeSaver
Claus Gittinger <cg@exept.de>
parents:
249
diff
changeset
|
1310 |
|painter node cont| |
989494227ffc
use #booleanAspectFor: , a codeSaver
Claus Gittinger <cg@exept.de>
parents:
249
diff
changeset
|
1311 |
|
989494227ffc
use #booleanAspectFor: , a codeSaver
Claus Gittinger <cg@exept.de>
parents:
249
diff
changeset
|
1312 |
painter := self painter. |
989494227ffc
use #booleanAspectFor: , a codeSaver
Claus Gittinger <cg@exept.de>
parents:
249
diff
changeset
|
1313 |
node := painter selectedNode. |
199 | 1314 |
|
1315 |
node notNil ifTrue:[ |
|
1316 |
self isHelpToolSelected ifTrue:[ |
|
218 | 1317 |
self activeHelpTool accept |
199 | 1318 |
]. |
1319 |
cont := node contents buildFromAspects:aspects. |
|
255
989494227ffc
use #booleanAspectFor: , a codeSaver
Claus Gittinger <cg@exept.de>
parents:
249
diff
changeset
|
1320 |
painter selectedNodeChanged |
199 | 1321 |
]. |
1322 |
self modifiedChannel value:false. |
|
270
1a68f7479932
provide access to the menus selector;
Claus Gittinger <cg@exept.de>
parents:
266
diff
changeset
|
1323 |
didInstall := true |
1a68f7479932
provide access to the menus selector;
Claus Gittinger <cg@exept.de>
parents:
266
diff
changeset
|
1324 |
|
1a68f7479932
provide access to the menus selector;
Claus Gittinger <cg@exept.de>
parents:
266
diff
changeset
|
1325 |
"Modified: 31.7.1997 / 14:25:34 / cg" |
199 | 1326 |
! |
1327 |
||
1328 |
cancel |
|
1329 |
|node| |
|
1330 |
||
1331 |
(node := self painter selectedNode) notNil ifTrue:[ |
|
1332 |
aspects do:[:anAspect| anAspect value:nil ]. |
|
1333 |
node contents toAspects:aspects. |
|
1334 |
]. |
|
1335 |
self modifiedChannel value:false. |
|
1336 |
||
1337 |
! ! |
|
1338 |
||
218 | 1339 |
!MenuEditor methodsFor:'active help'! |
1340 |
||
1341 |
activeHelpTool |
|
1342 |
"access current active help editor |
|
1343 |
" |
|
1344 |
activeHelpTool isNil ifTrue:[ |
|
1345 |
self activeHelpTool:(UIHelpTool new) |
|
1346 |
]. |
|
1347 |
^ activeHelpTool |
|
1348 |
! |
|
1349 |
||
1350 |
activeHelpTool:anApplication |
|
1351 |
"change current active help editor |
|
1352 |
" |
|
1353 |
activeHelpTool := anApplication. |
|
1354 |
||
1355 |
activeHelpTool masterApplication isNil ifTrue:[ |
|
1356 |
activeHelpTool masterApplication:self. |
|
1357 |
]. |
|
1358 |
! |
|
1359 |
||
1360 |
isOwnerOfHelpTool |
|
1361 |
"returns true in case of owner of the helptool |
|
1362 |
" |
|
1363 |
^ self activeHelpTool masterApplication == self |
|
1364 |
! ! |
|
1365 |
||
199 | 1366 |
!MenuEditor methodsFor:'aspects'! |
1367 |
||
1368 |
aspectFor:aKey |
|
1369 |
"returns aspect for a key or nil |
|
1370 |
" |
|
1371 |
^ aspects at:aKey ifAbsent:[ super aspectFor:aKey ] |
|
1372 |
||
1373 |
||
1374 |
! |
|
1375 |
||
218 | 1376 |
enabledStepIn |
257 | 1377 |
^ builder booleanValueAspectFor:#enabledStepIn |
1378 |
||
1379 |
"Modified: 28.7.1997 / 12:51:55 / cg" |
|
218 | 1380 |
! |
1381 |
||
1382 |
enabledStepOut |
|
257 | 1383 |
^ builder booleanValueAspectFor:#enabledStepOut |
1384 |
||
1385 |
"Modified: 28.7.1997 / 12:52:04 / cg" |
|
218 | 1386 |
! |
1387 |
||
1388 |
enabledStepOver |
|
257 | 1389 |
^ builder booleanValueAspectFor:#enabledStepOver |
1390 |
||
1391 |
"Modified: 28.7.1997 / 12:52:07 / cg" |
|
218 | 1392 |
! |
1393 |
||
220 | 1394 |
hasAnySingleSelection |
257 | 1395 |
^ builder booleanValueAspectFor:#hasAnySingleSelection |
1396 |
||
1397 |
"Modified: 28.7.1997 / 12:52:09 / cg" |
|
220 | 1398 |
! |
1399 |
||
1400 |
hasValidSelection |
|
257 | 1401 |
^ builder booleanValueAspectFor:#hasValidSelection |
1402 |
||
1403 |
"Modified: 28.7.1997 / 12:52:11 / cg" |
|
220 | 1404 |
! |
1405 |
||
1406 |
hasValidSingleSelection |
|
257 | 1407 |
^ builder booleanValueAspectFor:#hasValidSingleSelection |
1408 |
||
1409 |
"Modified: 28.7.1997 / 12:52:13 / cg" |
|
220 | 1410 |
! |
1411 |
||
199 | 1412 |
menuPullDown |
1413 |
|menu| |
|
1414 |
||
1415 |
menu := Menu new. |
|
1416 |
menu fromLiteralArrayEncoding:(self class menuPullDown). |
|
1417 |
menu receiver:self. |
|
1418 |
^ menu |
|
1419 |
||
1420 |
||
1421 |
! |
|
1422 |
||
1423 |
modifiedChannel |
|
1424 |
"automatically generated by UIPainter ..." |
|
1425 |
||
257 | 1426 |
^ builder booleanValueAspectFor:#modifiedChannel |
1427 |
||
1428 |
"Modified: 28.7.1997 / 12:52:14 / cg" |
|
199 | 1429 |
! |
1430 |
||
1431 |
tabCanvas |
|
1432 |
"automatically generated by UIPainter ..." |
|
1433 |
||
1434 |
|holder| |
|
1435 |
||
1436 |
(holder := builder bindingAt:#tabCanvas) isNil ifTrue:[ |
|
1437 |
builder aspectAt:#tabCanvas put:(holder := SubCanvas new). |
|
1438 |
]. |
|
1439 |
^ holder |
|
1440 |
! |
|
1441 |
||
1442 |
tabList |
|
1443 |
"automatically generated by UIPainter ..." |
|
1444 |
||
258 | 1445 |
^ builder nilValueAspectFor:#tabList |
1446 |
||
1447 |
"Modified: 28.7.1997 / 13:11:17 / cg" |
|
199 | 1448 |
! |
1449 |
||
1450 |
tabModel |
|
1451 |
"automatically generated by UIPainter ..." |
|
1452 |
||
1453 |
|holder| |
|
1454 |
||
1455 |
(holder := builder bindingAt:#tabModel) isNil ifTrue:[ |
|
1456 |
holder := AspectAdaptor new subject:self; forAspect:#tabSelection. |
|
1457 |
builder aspectAt:#tabModel put:holder. |
|
1458 |
]. |
|
1459 |
^ holder |
|
1460 |
||
1461 |
! ! |
|
1462 |
||
1463 |
!MenuEditor methodsFor:'change & update'! |
|
1464 |
||
1465 |
update:something with:aParameter from:changedObject |
|
1466 |
"one of my models changed its value |
|
1467 |
" |
|
1468 |
self modifiedChannel value:true |
|
218 | 1469 |
! |
1470 |
||
1471 |
updateEnabledChannels |
|
1472 |
"update enabled channels |
|
1473 |
" |
|
220 | 1474 |
|node parent next painter state| |
1475 |
||
1476 |
painter := self painter. |
|
1477 |
node := painter selectedNode. |
|
1478 |
state := false. |
|
1479 |
||
1480 |
node notNil ifTrue:[ |
|
1481 |
self hasAnySingleSelection value:true. |
|
1482 |
||
1483 |
(parent := node parent) notNil ifTrue:[ |
|
1484 |
next := parent childAt:((parent indexOfChild:node) + 1). |
|
1485 |
self enabledStepIn value:(next notNil and:[next hasChildren]). |
|
1486 |
self enabledStepOver value:(parent children size > 1). |
|
1487 |
self enabledStepOut value:(parent parent notNil). |
|
1488 |
self hasValidSingleSelection value:true. |
|
1489 |
self hasValidSelection value:true. |
|
1490 |
^ self |
|
1491 |
] |
|
218 | 1492 |
] ifFalse:[ |
220 | 1493 |
self hasAnySingleSelection value:false. |
1494 |
||
1495 |
painter numberOfSelections ~~ 0 ifTrue:[ |
|
1496 |
state := (painter isInSelection:1) not |
|
1497 |
] |
|
1498 |
]. |
|
1499 |
self enabledStepOver value:false. |
|
1500 |
self enabledStepIn value:false. |
|
1501 |
self enabledStepOut value:false. |
|
1502 |
self hasValidSingleSelection value:false. |
|
1503 |
self hasValidSelection value:state. |
|
1504 |
! ! |
|
1505 |
||
1506 |
!MenuEditor methodsFor:'event handling'! |
|
1507 |
||
1508 |
doesNotUnderstand:aMessage |
|
1509 |
|painter| |
|
1510 |
||
1511 |
painter := self painter. |
|
1512 |
||
1513 |
(painter respondsTo:(aMessage selector)) ifTrue:[ |
|
1514 |
^ aMessage sendTo:painter |
|
1515 |
]. |
|
1516 |
super doesNotUnderstand:aMessage |
|
1517 |
||
1518 |
||
199 | 1519 |
! ! |
1520 |
||
1521 |
!MenuEditor methodsFor:'queries'! |
|
1522 |
||
270
1a68f7479932
provide access to the menus selector;
Claus Gittinger <cg@exept.de>
parents:
266
diff
changeset
|
1523 |
didInstall |
1a68f7479932
provide access to the menus selector;
Claus Gittinger <cg@exept.de>
parents:
266
diff
changeset
|
1524 |
"returns true if the menu was installed |
1a68f7479932
provide access to the menus selector;
Claus Gittinger <cg@exept.de>
parents:
266
diff
changeset
|
1525 |
" |
1a68f7479932
provide access to the menus selector;
Claus Gittinger <cg@exept.de>
parents:
266
diff
changeset
|
1526 |
|
1a68f7479932
provide access to the menus selector;
Claus Gittinger <cg@exept.de>
parents:
266
diff
changeset
|
1527 |
^ didInstall ? false |
1a68f7479932
provide access to the menus selector;
Claus Gittinger <cg@exept.de>
parents:
266
diff
changeset
|
1528 |
|
1a68f7479932
provide access to the menus selector;
Claus Gittinger <cg@exept.de>
parents:
266
diff
changeset
|
1529 |
"Created: 31.7.1997 / 14:24:24 / cg" |
1a68f7479932
provide access to the menus selector;
Claus Gittinger <cg@exept.de>
parents:
266
diff
changeset
|
1530 |
! |
1a68f7479932
provide access to the menus selector;
Claus Gittinger <cg@exept.de>
parents:
266
diff
changeset
|
1531 |
|
199 | 1532 |
isHelpToolSelected |
1533 |
"returns true if current selection is help tool |
|
1534 |
" |
|
1535 |
(slices notNil and:[tabSelection notNil]) ifTrue:[ |
|
1536 |
^ (slices at:tabSelection) last == #help |
|
1537 |
]. |
|
1538 |
^ false |
|
1539 |
! ! |
|
1540 |
||
1541 |
!MenuEditor methodsFor:'selection'! |
|
1542 |
||
1543 |
menuChanged |
|
1544 |
|node item slc sel| |
|
1545 |
||
1546 |
(node := self painter selectedNode) notNil ifTrue:[ |
|
1547 |
aspects do:[:anAspect| anAspect value:nil ]. |
|
1548 |
item := node contents. |
|
1549 |
item toAspects:aspects. |
|
1550 |
||
218 | 1551 |
item isSeparator ifFalse:[ |
199 | 1552 |
node parent isNil ifFalse:[ |
218 | 1553 |
node hasChildren ifTrue:[ |
1554 |
slc := #slicesMenu |
|
1555 |
] ifFalse:[ |
|
1556 |
item submenuChannel isNil ifTrue:[slc := #slicesItem] |
|
1557 |
ifFalse:[slc := #slicesLink] |
|
1558 |
]. |
|
199 | 1559 |
] ifTrue:[ |
1560 |
slc := #slicesRootMenu |
|
< |