332 |
336 |
333 #(#FullSpec |
337 #(#FullSpec |
334 #window: |
338 #window: |
335 #(#WindowSpec |
339 #(#WindowSpec |
336 #name: 'Basics Item' |
340 #name: 'Basics Item' |
337 #layout: #(#LayoutFrame 473 0 301 0 739 0 619 0) |
341 #layout: #(#LayoutFrame 216 0 173 0 482 0 491 0) |
338 #label: 'Basics Item' |
342 #label: 'Basics Item' |
339 #min: #(#Point 10 10) |
343 #min: #(#Point 10 10) |
340 #max: #(#Point 1160 870) |
344 #max: #(#Point 1160 870) |
341 #bounds: #(#Rectangle 473 301 740 620) |
345 #bounds: #(#Rectangle 216 173 483 492) |
342 #usePreferredExtent: false |
346 #usePreferredExtent: false |
343 ) |
347 ) |
344 #component: |
348 #component: |
345 #(#SpecCollection |
349 #(#SpecCollection |
346 #collection: |
350 #collection: |
390 #name: 'valueField' |
394 #name: 'valueField' |
391 #layout: #(#LayoutFrame 110 0 79 0 -5 1.0 101 0) |
395 #layout: #(#LayoutFrame 110 0 79 0 -5 1.0 101 0) |
392 #activeHelpKey: #basicsAction |
396 #activeHelpKey: #basicsAction |
393 #tabable: true |
397 #tabable: true |
394 #model: #value |
398 #model: #value |
|
399 #group: #inputGroup |
395 #type: #symbolOrNil |
400 #type: #symbolOrNil |
396 #acceptOnReturn: false |
401 #acceptOnReturn: false |
397 #acceptOnTab: false |
402 #acceptOnTab: false |
398 #group: #inputGroup |
|
399 ) |
403 ) |
400 #(#LabelSpec |
404 #(#LabelSpec |
401 #name: 'argumentLabel' |
405 #name: 'argumentLabel' |
402 #layout: #(#AlignmentOrigin 107 0 115 0 1 0.5) |
406 #layout: #(#AlignmentOrigin 107 0 115 0 1 0.5) |
403 #label: 'Argument:' |
407 #label: 'Argument:' |
408 #name: 'argumentField' |
412 #name: 'argumentField' |
409 #layout: #(#LayoutFrame 110 0 104 0 -5 1.0 126 0) |
413 #layout: #(#LayoutFrame 110 0 104 0 -5 1.0 126 0) |
410 #activeHelpKey: #basicsArgument |
414 #activeHelpKey: #basicsArgument |
411 #tabable: true |
415 #tabable: true |
412 #model: #argument |
416 #model: #argument |
|
417 #group: #inputGroup |
413 #type: #string |
418 #type: #string |
414 #acceptOnReturn: false |
419 #acceptOnReturn: false |
415 #acceptOnTab: false |
420 #acceptOnTab: false |
416 #group: #inputGroup |
|
417 ) |
421 ) |
418 #(#LabelSpec |
422 #(#LabelSpec |
419 #name: 'indicationLabel' |
423 #name: 'indicationLabel' |
420 #layout: #(#AlignmentOrigin 107 0 155 0 1 0.5) |
424 #layout: #(#AlignmentOrigin 107 0 155 0 1 0.5) |
421 #label: 'Indication:' |
425 #label: 'Indication:' |
424 ) |
428 ) |
425 #(#InputFieldSpec |
429 #(#InputFieldSpec |
426 #name: 'indicationField' |
430 #name: 'indicationField' |
427 #layout: #(#LayoutFrame 110 0 144 0 -5 1.0 166 0) |
431 #layout: #(#LayoutFrame 110 0 144 0 -5 1.0 166 0) |
428 #activeHelpKey: #basicsIndication |
432 #activeHelpKey: #basicsIndication |
|
433 #enableChannel: #indicationEnabled |
429 #tabable: true |
434 #tabable: true |
430 #model: #indication |
435 #model: #indication |
|
436 #group: #inputGroup |
431 #type: #symbolOrNil |
437 #type: #symbolOrNil |
432 #acceptOnReturn: false |
438 #acceptOnReturn: false |
433 #acceptOnTab: false |
439 #acceptOnTab: false |
434 #group: #inputGroup |
|
435 ) |
440 ) |
436 #(#CheckBoxSpec |
441 #(#CheckBoxSpec |
437 #name: 'translateLabelCheckBox' |
442 #name: 'translateLabelCheckBox' |
438 #layout: #(#Point 20 190) |
443 #layout: #(#Point 20 230) |
439 #activeHelpKey: #basicsTranslateLabel |
444 #activeHelpKey: #basicsTranslateLabel |
440 #tabable: true |
445 #tabable: true |
441 #model: #translateLabel |
446 #model: #translateLabel |
442 #label: 'Translate Label' |
447 #label: 'Translate Label' |
443 ) |
448 ) |
444 #(#CheckBoxSpec |
449 #(#CheckBoxSpec |
445 #name: 'isButtonCheckBox' |
450 #name: 'isButtonCheckBox' |
446 #layout: #(#Point 20 219) |
451 #layout: #(#Point 20 259) |
447 #activeHelpKey: #basicsIsButton |
452 #activeHelpKey: #basicsIsButton |
448 #tabable: true |
453 #tabable: true |
449 #model: #isButton |
454 #model: #isButton |
450 #label: 'Is Button' |
455 #label: 'Is Button' |
451 ) |
456 ) |
|
457 #(#LabelSpec |
|
458 #name: 'choiceLabel' |
|
459 #layout: #(#AlignmentOrigin 107 0 180 0 1 0.5) |
|
460 #label: 'Choice:' |
|
461 #translateLabel: true |
|
462 #adjust: #right |
|
463 #resizeForLabel: true |
|
464 ) |
|
465 #(#InputFieldSpec |
|
466 #name: 'choiceField' |
|
467 #layout: #(#LayoutFrame 110 0 169 0 -5 1.0 191 0) |
|
468 #activeHelpKey: #basicsIndication |
|
469 #enableChannel: #choiceEnabled |
|
470 #tabable: true |
|
471 #model: #choice |
|
472 #group: #inputGroup |
|
473 #type: #symbolOrNil |
|
474 #acceptOnReturn: false |
|
475 #acceptOnTab: false |
|
476 ) |
|
477 #(#LabelSpec |
|
478 #name: 'choiceValueLabel' |
|
479 #layout: #(#AlignmentOrigin 107 0 205 0 1 0.5) |
|
480 #label: 'Value:' |
|
481 #translateLabel: true |
|
482 #adjust: #right |
|
483 #resizeForLabel: true |
|
484 ) |
|
485 #(#InputFieldSpec |
|
486 #name: 'choiceValueField' |
|
487 #layout: #(#LayoutFrame 110 0 194 0 -5 1.0 216 0) |
|
488 #activeHelpKey: #basicsIndication |
|
489 #enableChannel: #choiceValueEnabled |
|
490 #tabable: true |
|
491 #model: #choiceValue |
|
492 #group: #inputGroup |
|
493 #type: #smalltalkObject |
|
494 #acceptOnReturn: true |
|
495 #acceptOnTab: true |
|
496 #acceptOnLeave: true |
|
497 #acceptOnLostFocus: true |
|
498 #immediateAccept: false |
|
499 ) |
452 ) |
500 ) |
453 ) |
501 ) |
454 ) |
502 ) |
455 |
503 |
456 "Modified: / 31.7.1998 / 01:18:03 / cg" |
504 "Modified: / 14.8.1998 / 15:43:35 / cg" |
457 ! |
505 ! |
458 |
506 |
459 basicsLinkSpec |
507 basicsLinkSpec |
460 "This resource specification was automatically generated |
508 "This resource specification was automatically generated |
461 by the UIPainter of ST/X." |
509 by the UIPainter of ST/X." |
1985 |
2033 |
1986 |node item slc sel old| |
2034 |node item slc sel old| |
1987 |
2035 |
1988 aspects do: [:holder| holder removeDependent:self]. |
2036 aspects do: [:holder| holder removeDependent:self]. |
1989 (node := self treeView selectedNode) notNil ifTrue:[ |
2037 (node := self treeView selectedNode) notNil ifTrue:[ |
1990 aspects do:[:anAspect| anAspect value:nil ]. |
2038 aspects do:[:anAspect| |
|
2039 anAspect isBlock ifFalse:[anAspect value:nil] |
|
2040 ]. |
1991 item := node contents. |
2041 item := node contents. |
1992 item toAspects:aspects. |
2042 item toAspects:aspects. |
1993 |
2043 |
1994 item isSeparator ifFalse:[ |
2044 item isSeparator ifFalse:[ |
1995 node parent isNil ifFalse:[ |
2045 node parent isNil ifFalse:[ |
2032 self tabSelection:0. |
2082 self tabSelection:0. |
2033 ] |
2083 ] |
2034 ]. |
2084 ]. |
2035 self updateChannels. |
2085 self updateChannels. |
2036 aspects do: [:holder| holder addDependent:self]. |
2086 aspects do: [:holder| holder addDependent:self]. |
|
2087 |
|
2088 "Modified: / 14.8.1998 / 14:52:32 / cg" |
2037 ! |
2089 ! |
2038 |
2090 |
2039 tabSelection: aSelection |
2091 tabSelection: aSelection |
2040 "put the section aSelection into the note book" |
2092 "put the section aSelection into the note book" |
2041 |
2093 |
2056 |
2108 |
2057 self isHelpToolSelected ifTrue:[ |
2109 self isHelpToolSelected ifTrue:[ |
2058 self helpTool helpKey:(self helpKey). |
2110 self helpTool helpKey:(self helpKey). |
2059 helpCanvas raise. |
2111 helpCanvas raise. |
2060 ] ifFalse:[ |
2112 ] ifFalse:[ |
2061 aspects do: [:holder| holder release]. |
2113 aspects do: [:holder| holder removeDependent:self]. |
2062 specCanvas client:self spec:(self class perform:(slices at:tabSelection) last) builder:builder. |
2114 specCanvas client:self spec:(self class perform:(slices at:tabSelection) last) builder:builder. |
2063 aspects do: [:holder| holder addDependent:self]. |
2115 aspects do: [:holder| holder addDependent:self]. |
2064 self updateFonts. |
2116 self updateFonts. |
2065 specCanvas raise. |
2117 specCanvas raise. |
2066 ] |
2118 ] |
|
2119 |
|
2120 "Modified: / 14.8.1998 / 15:07:06 / cg" |
2067 ! ! |
2121 ! ! |
2068 |
2122 |
2069 !MenuEditor methodsFor:'startup / release'! |
2123 !MenuEditor methodsFor:'startup / release'! |
2070 |
2124 |
2071 initialize |
2125 initialize |
2077 |
2131 |
2078 aspects at:#seperatorSelection put:(holder := SelectionInList new). |
2132 aspects at:#seperatorSelection put:(holder := SelectionInList new). |
2079 holder list: Item separatorList. |
2133 holder list: Item separatorList. |
2080 holder addDependent:self. |
2134 holder addDependent:self. |
2081 |
2135 |
2082 "Modified: / 20.6.1998 / 14:53:26 / cg" |
2136 aspects at:#indicationEnabled put:(BlockValue |
|
2137 with:[:a | a size == 0] |
|
2138 argument:(aspects at:#choice)). |
|
2139 aspects at:#choiceEnabled put:(BlockValue |
|
2140 with:[:a | a size == 0] |
|
2141 argument:(aspects at:#indication)). |
|
2142 aspects at:#choiceValueEnabled put:(BlockValue |
|
2143 with:[:a | a size > 0] |
|
2144 argument:(aspects at:#choice)). |
|
2145 |
|
2146 "Modified: / 14.8.1998 / 15:07:58 / cg" |
2083 ! |
2147 ! |
2084 |
2148 |
2085 openModalOnMenu: aMenu |
2149 openModalOnMenu: aMenu |
2086 "build a tree from aMenu and open it modal" |
2150 "build a tree from aMenu and open it modal" |
2087 |
2151 |
2396 |
2460 |
2397 enabled := (aspects at:#enabled) value. |
2461 enabled := (aspects at:#enabled) value. |
2398 value := (aspects at:#value) value. |
2462 value := (aspects at:#value) value. |
2399 nameKey := (aspects at:#nameKey) value. |
2463 nameKey := (aspects at:#nameKey) value. |
2400 indication := (aspects at:#indication) value. |
2464 indication := (aspects at:#indication) value. |
|
2465 choice := (aspects at:#choice) value. |
|
2466 choiceValue := (aspects at:#choiceValue) value. |
2401 shortcutKey := (aspects at:#shortcutKey) value. |
2467 shortcutKey := (aspects at:#shortcutKey) value. |
2402 startGroup := (aspects at:#startGroup) value. |
2468 startGroup := (aspects at:#startGroup) value. |
2403 accessCharacterPos := (aspects at:#accessCharacterPos) value. |
2469 accessCharacterPos := (aspects at:#accessCharacterPos) value. |
2404 argument := (aspects at:#argument) value. |
2470 argument := (aspects at:#argument) value. |
2405 translateLabel := (aspects at:#translateLabel) value. |
2471 translateLabel := (aspects at:#translateLabel) value. |
2422 name := (aspects at:#seperatorSelection) selectionIndex. |
2488 name := (aspects at:#seperatorSelection) selectionIndex. |
2423 label := (self class separatorSlices at:name) last. |
2489 label := (self class separatorSlices at:name) last. |
2424 ]. |
2490 ]. |
2425 isVisible := (aspects at:#isVisible) value. |
2491 isVisible := (aspects at:#isVisible) value. |
2426 |
2492 |
2427 "Modified: / 6.6.1998 / 17:20:59 / cg" |
2493 "Modified: / 14.8.1998 / 15:36:38 / cg" |
2428 ! |
2494 ! |
2429 |
2495 |
2430 buildFromMenuItem:anItem |
2496 buildFromMenuItem:anItem |
2431 "read the attributes of anItem into my values" |
2497 "read the attributes of anItem into my values" |
2432 |
2498 |
2436 activeHelpKey := anItem activeHelpKey. |
2502 activeHelpKey := anItem activeHelpKey. |
2437 |
2503 |
2438 (enabled := anItem enabled) isSymbol ifFalse:[ |
2504 (enabled := anItem enabled) isSymbol ifFalse:[ |
2439 enabled := nil |
2505 enabled := nil |
2440 ]. |
2506 ]. |
2441 |
|
2442 (value := anItem value) isSymbol ifFalse:[ |
2507 (value := anItem value) isSymbol ifFalse:[ |
2443 value := nil. |
2508 value := nil. |
2444 ]. |
2509 ]. |
2445 |
|
2446 (indication := anItem indication) isSymbol ifFalse:[ |
2510 (indication := anItem indication) isSymbol ifFalse:[ |
2447 indication := nil |
2511 indication := nil |
2448 ]. |
2512 ]. |
|
2513 (choice := anItem choice) isSymbol ifFalse:[ |
|
2514 choice := nil |
|
2515 ]. |
|
2516 choiceValue := anItem choiceValue. |
2449 |
2517 |
2450 nameKey := anItem nameKey. |
2518 nameKey := anItem nameKey. |
2451 shortcutKey := anItem shortcutKeyCharacter. |
2519 shortcutKey := anItem shortcutKeyCharacter. |
2452 startGroup := anItem startGroup. |
2520 startGroup := anItem startGroup. |
2453 accessCharacterPos := anItem accessCharacterPosition. |
2521 accessCharacterPos := anItem accessCharacterPosition. |
2489 item nameKey:nameKey. |
2559 item nameKey:nameKey. |
2490 item shortcutKeyCharacter:shortcutKey. |
2560 item shortcutKeyCharacter:shortcutKey. |
2491 item startGroup:startGroup. |
2561 item startGroup:startGroup. |
2492 item value:value. |
2562 item value:value. |
2493 item indication:indication. |
2563 item indication:indication. |
|
2564 item choice:choice. |
|
2565 item choiceValue:choiceValue. |
2494 item translateLabel: translateLabel. |
2566 item translateLabel: translateLabel. |
2495 item isButton: isButton. |
2567 item isButton: isButton. |
2496 |
2568 |
2497 icon notNil ifTrue:[ |
2569 icon notNil ifTrue:[ |
2498 rcv := ResourceRetriever new. |
2570 rcv := ResourceRetriever new. |
2522 (aspects at:#label) value:label. |
2596 (aspects at:#label) value:label. |
2523 (aspects at:#enabled) value:enabled. |
2597 (aspects at:#enabled) value:enabled. |
2524 (aspects at:#value) value:value. |
2598 (aspects at:#value) value:value. |
2525 (aspects at:#nameKey) value:nameKey. |
2599 (aspects at:#nameKey) value:nameKey. |
2526 (aspects at:#indication) value:indication. |
2600 (aspects at:#indication) value:indication. |
|
2601 (aspects at:#choice) value:choice. |
|
2602 (aspects at:#choiceValue) value:choiceValue. |
2527 (aspects at:#shortcutKey) value:shortcutKey. |
2603 (aspects at:#shortcutKey) value:shortcutKey. |
2528 (aspects at:#startGroup) value:startGroup. |
2604 (aspects at:#startGroup) value:startGroup. |
2529 (aspects at:#accessCharacterPos) value:accessCharacterPos. |
2605 (aspects at:#accessCharacterPos) value:accessCharacterPos. |
2530 (aspects at:#translateLabel) value:translateLabel. |
2606 (aspects at:#translateLabel) value:translateLabel. |
2531 (aspects at:#submenuChannel) value:submenuChannel. |
2607 (aspects at:#submenuChannel) value:submenuChannel. |
2538 ifTrue: [(aspects at:#argument)value:'#', argument] |
2614 ifTrue: [(aspects at:#argument)value:'#', argument] |
2539 ifFalse:[(aspects at:#argument)value:argument]. |
2615 ifFalse:[(aspects at:#argument)value:argument]. |
2540 ]. |
2616 ]. |
2541 (aspects at:#isVisible) value:isVisible. |
2617 (aspects at:#isVisible) value:isVisible. |
2542 |
2618 |
|
2619 "Modified: / 14.8.1998 / 15:37:29 / cg" |
2543 ! ! |
2620 ! ! |
2544 |
2621 |
2545 !MenuEditor::Item methodsFor:'queries'! |
2622 !MenuEditor::Item methodsFor:'queries'! |
2546 |
2623 |
2547 iconFor: aNode |
2624 iconFor: aNode |