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