MenuEditor.st
changeset 3013 4aa95683c0fc
parent 2948 b11312ccf82d
child 3016 6aff65697c4f
equal deleted inserted replaced
3012:27eb0659e5f0 3013:4aa95683c0fc
   110 
   110 
   111     The editor is typically opened by double-clicking on a menu-spec method in the browser.
   111     The editor is typically opened by double-clicking on a menu-spec method in the browser.
   112 
   112 
   113     [Instance variables:]
   113     [Instance variables:]
   114 
   114 
   115         listOfItemsView         <HierarcicalListView>  the view which shows the list of items
   115 	listOfItemsView         <HierarcicalListView>  the view which shows the list of items
   116         listOfItems             <HierarchicalList>     hierarchical list of menu items
   116 	listOfItems             <HierarchicalList>     hierarchical list of menu items
   117         listOfTabs              <List>                 list of current shown tab-labels
   117 	listOfTabs              <List>                 list of current shown tab-labels
   118 
   118 
   119         selectionHolder         <ValueHolder>          collection of current selected items
   119 	selectionHolder         <ValueHolder>          collection of current selected items
   120         selectedSuperItems      <Collection>           collection of superItems derived from selection
   120 	selectedSuperItems      <Collection>           collection of superItems derived from selection
   121 
   121 
   122         tabHolder               <ValueHolder>          selected tab label holder
   122 	tabHolder               <ValueHolder>          selected tab label holder
   123         notifyDisabledCounter   <SmallInteger>         ~~ 0 than change notifications are discard
   123 	notifyDisabledCounter   <SmallInteger>         ~~ 0 than change notifications are discard
   124         wizards                 <IdentityDictionary>   keeps all created wizard dialogs
   124 	wizards                 <IdentityDictionary>   keeps all created wizard dialogs
   125 
   125 
   126         dropOverLine            <nil or SmallInteger>  nil: drop context not dropabel.
   126 	dropOverLine            <nil or SmallInteger>  nil: drop context not dropabel.
   127                                                        = 0: drop context dropable but no item specified
   127 						       = 0: drop context dropable but no item specified
   128                                                        ~ 0: drop context dropable for item at lineNumber
   128 						       ~ 0: drop context dropable for item at lineNumber
   129                                                        used t6o restore drop indication drawings
   129 						       used t6o restore drop indication drawings
   130 
   130 
   131     [Class variables:]
   131     [Class variables:]
   132         ImageRetrieverClasses   <Collection>        sorted collection of image receivers
   132 	ImageRetrieverClasses   <Collection>        sorted collection of image receivers
   133 
   133 
   134     [start with:]
   134     [start with:]
   135         MenuEditor open
   135 	MenuEditor open
   136         MenuEditor openOnClass:MenuEditor andSelector:#menu
   136 	MenuEditor openOnClass:MenuEditor andSelector:#menu
   137 
   137 
   138     [author:]
   138     [author:]
   139         Claus Atzkern, eXept Software AG
   139 	Claus Atzkern, eXept Software AG
   140         Thomas Zwick, eXept Software AG
   140 	Thomas Zwick, eXept Software AG
   141 "
   141 "
   142 ! !
   142 ! !
   143 
   143 
   144 !MenuEditor class methodsFor:'initialization'!
   144 !MenuEditor class methodsFor:'initialization'!
   145 
   145 
   400 
   400 
   401 #hideMenuOnActivated
   401 #hideMenuOnActivated
   402 'If on, the menu hides itself after the item was activated (PopUp/PullDown-Menus only).'
   402 'If on, the menu hides itself after the item was activated (PopUp/PullDown-Menus only).'
   403 
   403 
   404 #horizontalLayout
   404 #horizontalLayout
   405 'If on, the submenu organizes its items horizontal insteat of vertical (default).'
   405 'If on, the submenu organizes its items horizontal instead of vertical (default).'
   406 
   406 
   407 #imageImageAndLabel
   407 #imageImageAndLabel
   408 'Toggle display of both image and textual label.'
   408 'Toggle display of both image and textual label.'
   409 
   409 
   410 #imageImageEditor
   410 #imageImageEditor
   604 
   604 
   605     <resource: #menu>
   605     <resource: #menu>
   606 
   606 
   607     ^
   607     ^
   608      #(Menu
   608      #(Menu
   609         (
   609 	(
   610          (MenuItem
   610 	 (MenuItem
   611             activeHelpKey: addMenuSeparator
   611 	    activeHelpKey: addMenuSeparator
   612             label: 'Separator'
   612 	    label: 'Separator'
   613             itemValue: doCreateSep
   613 	    itemValue: doCreateSep
   614             translateLabel: true
   614 	    translateLabel: true
   615             labelImage: (ResourceRetriever #'MenuEditor::Item' iconSeparator '')
   615 	    labelImage: (ResourceRetriever #'MenuEditor::Item' iconSeparator '')
   616           )
   616 	  )
   617          (MenuItem
   617 	 (MenuItem
   618             activeHelpKey: addMenuItem
   618 	    activeHelpKey: addMenuItem
   619             label: 'Item'
   619 	    label: 'Item'
   620             itemValue: doCreateItem
   620 	    itemValue: doCreateItem
   621             translateLabel: true
   621 	    translateLabel: true
   622             labelImage: (ResourceRetriever #'MenuEditor::Item' iconItem '')
   622 	    labelImage: (ResourceRetriever #'MenuEditor::Item' iconItem '')
   623           )
   623 	  )
   624          (MenuItem
   624 	 (MenuItem
   625             activeHelpKey: addMenuSliceItem
   625 	    activeHelpKey: addMenuSliceItem
   626             label: 'Menu Slice'
   626 	    label: 'Menu Slice'
   627             itemValue: doCreateMenuSliceItem
   627 	    itemValue: doCreateMenuSliceItem
   628             translateLabel: true
   628 	    translateLabel: true
   629             labelImage: (ResourceRetriever #'MenuEditor::Item' iconSliceMenu '')
   629 	    labelImage: (ResourceRetriever #'MenuEditor::Item' iconSliceMenu '')
   630           )
   630 	  )
   631          (MenuItem
   631 	 (MenuItem
   632             activeHelpKey: addMenuItem
   632 	    activeHelpKey: addMenuItem
   633             label: 'Menu'
   633 	    label: 'Menu'
   634             itemValue: doCreateMenu
   634 	    itemValue: doCreateMenu
   635             translateLabel: true
   635 	    translateLabel: true
   636             labelImage: (ResourceRetriever #'MenuEditor::Item' iconMenu '')
   636 	    labelImage: (ResourceRetriever #'MenuEditor::Item' iconMenu '')
   637           )
   637 	  )
   638          (MenuItem
   638 	 (MenuItem
   639             activeHelpKey: addSubMenuLink
   639 	    activeHelpKey: addSubMenuLink
   640             label: 'Linked Menu'
   640 	    label: 'Linked Menu'
   641             itemValue: doCreateLinkedMenu
   641 	    itemValue: doCreateLinkedMenu
   642             translateLabel: true
   642 	    translateLabel: true
   643             labelImage: (ResourceRetriever #'MenuEditor::Item' iconLinkedMenu '')
   643 	    labelImage: (ResourceRetriever #'MenuEditor::Item' iconLinkedMenu '')
   644           )
   644 	  )
   645          (MenuItem
   645 	 (MenuItem
   646             label: '-'
   646 	    label: '-'
   647           )
   647 	  )
   648          (MenuItem
   648 	 (MenuItem
   649             activeHelpKey: addDelayedMenu
   649 	    activeHelpKey: addDelayedMenu
   650             enabled: canCreateDelayedMenuChannel
   650 	    enabled: canCreateDelayedMenuChannel
   651             label: 'Delayed Menu'
   651 	    label: 'Delayed Menu'
   652             itemValue: doCreateDelayedMenu:
   652 	    itemValue: doCreateDelayedMenu:
   653             translateLabel: true
   653 	    translateLabel: true
   654             labelImage: (ResourceRetriever #'MenuEditor::Item' iconDelayedMenu '')
   654 	    labelImage: (ResourceRetriever #'MenuEditor::Item' iconDelayedMenu '')
   655             argument: menu
   655 	    argument: menu
   656           )
   656 	  )
   657          (MenuItem
   657 	 (MenuItem
   658             activeHelpKey: addDelayedSubMenuLink
   658 	    activeHelpKey: addDelayedSubMenuLink
   659             enabled: canCreateDelayedMenuChannel
   659 	    enabled: canCreateDelayedMenuChannel
   660             label: 'Delayed Linked Menu'
   660 	    label: 'Delayed Linked Menu'
   661             itemValue: doCreateDelayedMenu:
   661 	    itemValue: doCreateDelayedMenu:
   662             translateLabel: true
   662 	    translateLabel: true
   663             labelImage: (ResourceRetriever #'MenuEditor::Item' iconDelayedLinkedMenu '')
   663 	    labelImage: (ResourceRetriever #'MenuEditor::Item' iconDelayedLinkedMenu '')
   664             argument: linkedMenu
   664 	    argument: linkedMenu
   665           )
   665 	  )
   666          (MenuItem
   666 	 (MenuItem
   667             label: '-'
   667 	    label: '-'
   668           )
   668 	  )
   669          (MenuItem
   669 	 (MenuItem
   670             label: 'Standard Menus'
   670 	    label: 'Standard Menus'
   671             translateLabel: true
   671 	    translateLabel: true
   672             submenuChannel: standardMenus
   672 	    submenuChannel: standardMenus
   673             keepLinkedMenu: true
   673 	    keepLinkedMenu: true
   674           )
   674 	  )
   675          )
   675 	 )
   676 "/        nil
   676 "/        nil
   677 "/        nil
   677 "/        nil
   678       )
   678       )
   679 !
   679 !
   680 
   680 
   690      (Menu new fromLiteralArrayEncoding:(MenuEditor editMenu)) startUp
   690      (Menu new fromLiteralArrayEncoding:(MenuEditor editMenu)) startUp
   691     "
   691     "
   692 
   692 
   693     <resource: #menu>
   693     <resource: #menu>
   694 
   694 
   695     ^ 
   695     ^
   696      #(Menu
   696      #(Menu
   697         (
   697 	(
   698          (MenuItem
   698 	 (MenuItem
   699             activeHelpKey: editCut
   699 	    activeHelpKey: editCut
   700             enabled: hasSelectionChannel
   700 	    enabled: hasSelectionChannel
   701             label: 'Cut'
   701 	    label: 'Cut'
   702             itemValue: doCut
   702 	    itemValue: doCut
   703             translateLabel: true
   703 	    translateLabel: true
   704             shortcutKey: Cut
   704 	    shortcutKey: Cut
   705           )
   705 	  )
   706          (MenuItem
   706 	 (MenuItem
   707             activeHelpKey: editCopy
   707 	    activeHelpKey: editCopy
   708             enabled: hasSelectionChannel
   708 	    enabled: hasSelectionChannel
   709             label: 'Copy'
   709 	    label: 'Copy'
   710             itemValue: doCopy
   710 	    itemValue: doCopy
   711             translateLabel: true
   711 	    translateLabel: true
   712             shortcutKey: Copy
   712 	    shortcutKey: Copy
   713           )
   713 	  )
   714          (MenuItem
   714 	 (MenuItem
   715             activeHelpKey: editPaste
   715 	    activeHelpKey: editPaste
   716             enabled: canPasteHolder
   716 	    enabled: canPasteHolder
   717             label: 'Paste'
   717 	    label: 'Paste'
   718             itemValue: doPaste
   718 	    itemValue: doPaste
   719             translateLabel: true
   719 	    translateLabel: true
   720             shortcutKey: Paste
   720 	    shortcutKey: Paste
   721           )
   721 	  )
   722          (MenuItem
   722 	 (MenuItem
   723             activeHelpKey: editDelete
   723 	    activeHelpKey: editDelete
   724             enabled: hasSelectionChannel
   724 	    enabled: hasSelectionChannel
   725             label: 'Delete'
   725 	    label: 'Delete'
   726             itemValue: doDelete
   726 	    itemValue: doDelete
   727             translateLabel: true
   727 	    translateLabel: true
   728             isVisible: false
   728 	    isVisible: false
   729           )
   729 	  )
   730          (MenuItem
   730 	 (MenuItem
   731             label: '-'
   731 	    label: '-'
   732           )
   732 	  )
   733          (MenuItem
   733 	 (MenuItem
   734             activeHelpKey: editMoveUp
   734 	    activeHelpKey: editMoveUp
   735             enabled: enableMovingUpOrDownHolder
   735 	    enabled: enableMovingUpOrDownHolder
   736             label: 'Move Up'
   736 	    label: 'Move Up'
   737             itemValue: doMoveUpOrDown:
   737 	    itemValue: doMoveUpOrDown:
   738             translateLabel: true
   738 	    translateLabel: true
   739             startGroup: right
   739 	    startGroup: right
   740             shortcutKey: CtrlCursorUp
   740 	    shortcutKey: CtrlCursorUp
   741             labelImage: (ResourceRetriever Icon upIcon 'Move Up')
   741 	    labelImage: (ResourceRetriever Icon upIcon 'Move Up')
   742             argument: up
   742 	    argument: up
   743           )
   743 	  )
   744          (MenuItem
   744 	 (MenuItem
   745             activeHelpKey: editMoveDown
   745 	    activeHelpKey: editMoveDown
   746             enabled: enableMovingUpOrDownHolder
   746 	    enabled: enableMovingUpOrDownHolder
   747             label: 'Move Down'
   747 	    label: 'Move Down'
   748             itemValue: doMoveUpOrDown:
   748 	    itemValue: doMoveUpOrDown:
   749             translateLabel: true
   749 	    translateLabel: true
   750             shortcutKey: CtrlCursorDown
   750 	    shortcutKey: CtrlCursorDown
   751             labelImage: (ResourceRetriever Icon downIcon 'Move Down')
   751 	    labelImage: (ResourceRetriever Icon downIcon 'Move Down')
   752             argument: down
   752 	    argument: down
   753           )
   753 	  )
   754          (MenuItem
   754 	 (MenuItem
   755             activeHelpKey: editMoveIn
   755 	    activeHelpKey: editMoveIn
   756             enabled: enableMovingInHolder
   756 	    enabled: enableMovingInHolder
   757             label: 'Move Into Next'
   757 	    label: 'Move Into Next'
   758             itemValue: doMoveIn:
   758 	    itemValue: doMoveIn:
   759             translateLabel: true
   759 	    translateLabel: true
   760             shortcutKey: CtrlCursorRight
   760 	    shortcutKey: CtrlCursorRight
   761             labelImage: (ResourceRetriever Icon downRightIcon 'Move Into Next')
   761 	    labelImage: (ResourceRetriever Icon downRightIcon 'Move Into Next')
   762             argument: inNext
   762 	    argument: inNext
   763           )
   763 	  )
   764          (MenuItem
   764 	 (MenuItem
   765             activeHelpKey: editMoveInAbove
   765 	    activeHelpKey: editMoveInAbove
   766             enabled: enableMovingInAboveHolder
   766 	    enabled: enableMovingInAboveHolder
   767             label: 'Move Into Previous'
   767 	    label: 'Move Into Previous'
   768             itemValue: doMoveIn:
   768 	    itemValue: doMoveIn:
   769             translateLabel: true
   769 	    translateLabel: true
   770             labelImage: (ResourceRetriever Icon upRightIcon 'Move Into Previous' )
   770 	    labelImage: (ResourceRetriever Icon upRightIcon 'Move Into Previous' )
   771             argument: inPrev
   771 	    argument: inPrev
   772           )
   772 	  )
   773          (MenuItem
   773 	 (MenuItem
   774             activeHelpKey: editMoveOut
   774 	    activeHelpKey: editMoveOut
   775             enabled: enableMovingOutHolder
   775 	    enabled: enableMovingOutHolder
   776             label: 'Move Out'
   776 	    label: 'Move Out'
   777             itemValue: doMoveOut
   777 	    itemValue: doMoveOut
   778             translateLabel: true
   778 	    translateLabel: true
   779             shortcutKey: CtrlCursorLeft
   779 	    shortcutKey: CtrlCursorLeft
   780             labelImage: (ResourceRetriever Icon leftDownIcon 'Move Out' )
   780 	    labelImage: (ResourceRetriever Icon leftDownIcon 'Move Out' )
   781           )
   781 	  )
   782          )
   782 	 )
   783         nil
   783 	nil
   784         nil
   784 	nil
   785       )
   785       )
   786 !
   786 !
   787 
   787 
   788 editMenuForMainMenuWithoutAccelerators
   788 editMenuForMainMenuWithoutAccelerators
   789     "This resource specification was automatically generated
   789     "This resource specification was automatically generated
   897      (Menu new fromLiteralArrayEncoding:(MenuEditor fileMenu)) startUp
   897      (Menu new fromLiteralArrayEncoding:(MenuEditor fileMenu)) startUp
   898     "
   898     "
   899 
   899 
   900     <resource: #menu>
   900     <resource: #menu>
   901 
   901 
   902     ^ 
   902     ^
   903      #(Menu
   903      #(Menu
   904         (
   904 	(
   905          (MenuItem
   905 	 (MenuItem
   906             isVisible: isNotEditingSpecOnlyAndNotEmbeddedInBrowser
   906 	    isVisible: isNotEditingSpecOnlyAndNotEmbeddedInBrowser
   907             activeHelpKey: fileNew
   907 	    activeHelpKey: fileNew
   908             label: 'New'
   908 	    label: 'New'
   909             itemValue: doNew
   909 	    itemValue: doNew
   910             translateLabel: true
   910 	    translateLabel: true
   911           )
   911 	  )
   912          (MenuItem
   912 	 (MenuItem
   913             isVisible: isNotEditingSpecOnlyAndNotEmbeddedInBrowser
   913 	    isVisible: isNotEditingSpecOnlyAndNotEmbeddedInBrowser
   914             label: '-'
   914 	    label: '-'
   915           )
   915 	  )
   916          (MenuItem
   916 	 (MenuItem
   917             isVisible: isNotEditingSpecOnlyAndNotEmbeddedInBrowser
   917 	    isVisible: isNotEditingSpecOnlyAndNotEmbeddedInBrowser
   918             activeHelpKey: fileLoad
   918 	    activeHelpKey: fileLoad
   919             label: 'Load...'
   919 	    label: 'Load...'
   920             itemValue: doLoad
   920 	    itemValue: doLoad
   921             translateLabel: true
   921 	    translateLabel: true
   922           )
   922 	  )
   923          (MenuItem
   923 	 (MenuItem
   924             isVisible: isNotEditingSpecOnlyAndNotEmbeddedInBrowser
   924 	    isVisible: isNotEditingSpecOnlyAndNotEmbeddedInBrowser
   925             label: '-'
   925 	    label: '-'
   926           )
   926 	  )
   927          (MenuItem
   927 	 (MenuItem
   928             isVisible: isEditingSpecOnly
   928 	    isVisible: isEditingSpecOnly
   929             activeHelpKey: fileSaveSpec
   929 	    activeHelpKey: fileSaveSpec
   930             label: 'Save'
   930 	    label: 'Save'
   931             itemValue: doSave
   931 	    itemValue: doSave
   932             translateLabel: true
   932 	    translateLabel: true
   933           )
   933 	  )
   934          (MenuItem
   934 	 (MenuItem
   935             isVisible: isNotEditingSpecOnly
   935 	    isVisible: isNotEditingSpecOnly
   936             activeHelpKey: fileSave
   936 	    activeHelpKey: fileSave
   937             label: 'Save'
   937 	    label: 'Save'
   938             itemValue: doSave
   938 	    itemValue: doSave
   939             translateLabel: true
   939 	    translateLabel: true
   940           )
   940 	  )
   941          (MenuItem
   941 	 (MenuItem
   942             isVisible: isNotEditingSpecOnlyAndNotEmbeddedInBrowser
   942 	    isVisible: isNotEditingSpecOnlyAndNotEmbeddedInBrowser
   943             activeHelpKey: fileSaveAs
   943 	    activeHelpKey: fileSaveAs
   944             label: 'Save As...'
   944 	    label: 'Save As...'
   945             itemValue: doSaveAs
   945 	    itemValue: doSaveAs
   946             translateLabel: true
   946 	    translateLabel: true
   947           )
   947 	  )
   948          (MenuItem
   948 	 (MenuItem
   949             label: '-'
   949 	    label: '-'
   950           )
   950 	  )
   951          (MenuItem
   951 	 (MenuItem
   952             activeHelpKey: filePickAMenu
   952 	    activeHelpKey: filePickAMenu
   953             label: 'Pick a Menu...'
   953 	    label: 'Pick a Menu...'
   954             itemValue: doPickAMenu
   954 	    itemValue: doPickAMenu
   955             translateLabel: true
   955 	    translateLabel: true
   956           )
   956 	  )
   957          (MenuItem
   957 	 (MenuItem
   958             activeHelpKey: fileChooseAMenu
   958 	    activeHelpKey: fileChooseAMenu
   959             label: 'Choose a Menu...'
   959 	    label: 'Choose a Menu...'
   960             itemValue: doChooseAMenu
   960 	    itemValue: doChooseAMenu
   961             translateLabel: true
   961 	    translateLabel: true
   962           )
   962 	  )
   963          (MenuItem
   963 	 (MenuItem
   964             label: '-'
   964 	    label: '-'
   965             isVisible: isStandAlone
   965 	    isVisible: isStandAlone
   966           )
   966 	  )
   967          (MenuItem
   967 	 (MenuItem
   968             activeHelpKey: fileBrowseClass
   968 	    activeHelpKey: fileBrowseClass
   969             enabled: hasValidSpecClass
   969 	    enabled: hasValidSpecClass
   970             label: 'Browse Class'
   970 	    label: 'Browse Class'
   971             itemValue: doBrowseClass
   971 	    itemValue: doBrowseClass
   972             translateLabel: true
   972 	    translateLabel: true
   973             isVisible: isStandAlone
   973 	    isVisible: isStandAlone
   974           )
   974 	  )
   975          (MenuItem
   975 	 (MenuItem
   976             activeHelpKey: fileShowMenuSpec
   976 	    activeHelpKey: fileShowMenuSpec
   977             label: 'Show Menu Spec'
   977 	    label: 'Show Menu Spec'
   978             itemValue: doShowMenuSpec
   978 	    itemValue: doShowMenuSpec
   979             translateLabel: true
   979 	    translateLabel: true
   980             isVisible: isStandAlone
   980 	    isVisible: isStandAlone
   981           )
   981 	  )
   982          (MenuItem
   982 	 (MenuItem
   983             label: '-'
   983 	    label: '-'
   984             isVisible: isStandAlone
   984 	    isVisible: isStandAlone
   985           )
   985 	  )
   986          (MenuItem
   986 	 (MenuItem
   987             activeHelpKey: fileExit
   987 	    activeHelpKey: fileExit
   988             label: 'Exit'
   988 	    label: 'Exit'
   989             itemValue: closeRequest
   989 	    itemValue: closeRequest
   990             translateLabel: true
   990 	    translateLabel: true
   991             isVisible: isStandAlone
   991 	    isVisible: isStandAlone
   992           )
   992 	  )
   993          )
   993 	 )
   994         nil
   994 	nil
   995         nil
   995 	nil
   996       )
   996       )
   997 !
   997 !
   998 
   998 
   999 generateMenu
   999 generateMenu
  1000     "This resource specification was automatically generated
  1000     "This resource specification was automatically generated
  1096      (Menu new fromLiteralArrayEncoding:(MenuEditor menu)) startUp
  1096      (Menu new fromLiteralArrayEncoding:(MenuEditor menu)) startUp
  1097     "
  1097     "
  1098 
  1098 
  1099     <resource: #menu>
  1099     <resource: #menu>
  1100 
  1100 
  1101     ^ 
  1101     ^
  1102      #(Menu
  1102      #(Menu
  1103         (
  1103 	(
  1104          (MenuItem
  1104 	 (MenuItem
  1105             label: '&File'
  1105 	    label: '&File'
  1106             translateLabel: true
  1106 	    translateLabel: true
  1107             submenuChannel: fileMenu
  1107 	    submenuChannel: fileMenu
  1108             keepLinkedMenu: true
  1108 	    keepLinkedMenu: true
  1109             ignoreMnemonicKeys: true
  1109 	    ignoreMnemonicKeys: true
  1110             ignoreShortcutKeys: true
  1110 	    ignoreShortcutKeys: true
  1111           )
  1111 	  )
  1112          (MenuItem
  1112 	 (MenuItem
  1113             label: '&Edit'
  1113 	    label: '&Edit'
  1114             translateLabel: true
  1114 	    translateLabel: true
  1115             submenuChannel: editMenuForMainMenuWithoutAccelerators
  1115 	    submenuChannel: editMenuForMainMenuWithoutAccelerators
  1116             keepLinkedMenu: true
  1116 	    keepLinkedMenu: true
  1117           )
  1117 	  )
  1118          (MenuItem
  1118 	 (MenuItem
  1119             enabled: hasSingleSelectionChannel
  1119 	    enabled: hasSingleSelectionChannel
  1120             label: 'Item'
  1120 	    label: 'Item'
  1121             translateLabel: true
  1121 	    translateLabel: true
  1122             submenuChannel: addMenu
  1122 	    submenuChannel: addMenu
  1123             keepLinkedMenu: true
  1123 	    keepLinkedMenu: true
  1124             ignoreMnemonicKeys: true
  1124 	    ignoreMnemonicKeys: true
  1125             ignoreShortcutKeys: true
  1125 	    ignoreShortcutKeys: true
  1126           )
  1126 	  )
  1127          (MenuItem
  1127 	 (MenuItem
  1128             isVisible: isNotEditingSpecOnly
  1128 	    isVisible: isNotEditingSpecOnly
  1129             label: 'Generate'
  1129 	    label: 'Generate'
  1130             translateLabel: true
  1130 	    translateLabel: true
  1131             submenuChannel: generateMenu
  1131 	    submenuChannel: generateMenu
  1132             keepLinkedMenu: true
  1132 	    keepLinkedMenu: true
  1133             ignoreMnemonicKeys: true
  1133 	    ignoreMnemonicKeys: true
  1134             ignoreShortcutKeys: true
  1134 	    ignoreShortcutKeys: true
  1135           )
  1135 	  )
  1136          (MenuItem
  1136 	 (MenuItem
  1137             label: 'Test'
  1137 	    label: 'Test'
  1138             translateLabel: true
  1138 	    translateLabel: true
  1139             submenuChannel: submenuTest
  1139 	    submenuChannel: submenuTest
  1140             ignoreMnemonicKeys: true
  1140 	    ignoreMnemonicKeys: true
  1141             ignoreShortcutKeys: true
  1141 	    ignoreShortcutKeys: true
  1142           )
  1142 	  )
  1143          (MenuItem
  1143 	 (MenuItem
  1144             label: 'Settings'
  1144 	    label: 'Settings'
  1145             translateLabel: true
  1145 	    translateLabel: true
  1146             submenuChannel: settingsMenu
  1146 	    submenuChannel: settingsMenu
  1147             keepLinkedMenu: true
  1147 	    keepLinkedMenu: true
  1148             ignoreMnemonicKeys: true
  1148 	    ignoreMnemonicKeys: true
  1149             ignoreShortcutKeys: true
  1149 	    ignoreShortcutKeys: true
  1150           )
  1150 	  )
  1151          (MenuItem
  1151 	 (MenuItem
  1152             label: 'History'
  1152 	    label: 'History'
  1153             translateLabel: true
  1153 	    translateLabel: true
  1154             isVisible: isStandAlone
  1154 	    isVisible: isStandAlone
  1155             submenuChannel: menuHistory
  1155 	    submenuChannel: menuHistory
  1156             ignoreMnemonicKeys: true
  1156 	    ignoreMnemonicKeys: true
  1157             ignoreShortcutKeys: true
  1157 	    ignoreShortcutKeys: true
  1158           )
  1158 	  )
  1159          (MenuItem
  1159 	 (MenuItem
  1160             label: 'MENU_Help'
  1160 	    label: 'MENU_Help'
  1161             translateLabel: true
  1161 	    translateLabel: true
  1162             startGroup: conditionalRight
  1162 	    startGroup: conditionalRight
  1163             submenuChannel: helpMenu
  1163 	    submenuChannel: helpMenu
  1164             keepLinkedMenu: true
  1164 	    keepLinkedMenu: true
  1165             ignoreMnemonicKeys: true
  1165 	    ignoreMnemonicKeys: true
  1166             ignoreShortcutKeys: true
  1166 	    ignoreShortcutKeys: true
  1167           )
  1167 	  )
  1168          )
  1168 	 )
  1169         nil
  1169 	nil
  1170         nil
  1170 	nil
  1171       )
  1171       )
  1172 !
  1172 !
  1173 
  1173 
  1174 settingsMenu
  1174 settingsMenu
  1175     "This resource specification was automatically generated
  1175     "This resource specification was automatically generated
  1185 
  1185 
  1186     <resource: #menu>
  1186     <resource: #menu>
  1187 
  1187 
  1188     ^
  1188     ^
  1189      #(#Menu
  1189      #(#Menu
  1190         #(
  1190 	#(
  1191          #(#MenuItem
  1191 	 #(#MenuItem
  1192             isVisible: isNotEditingSpecOnly
  1192 	    isVisible: isNotEditingSpecOnly
  1193             #activeHelpKey: #settingsRedefineAspectMethods
  1193 	    #activeHelpKey: #settingsRedefineAspectMethods
  1194             #enabled: #hasValidSpecClass
  1194 	    #enabled: #hasValidSpecClass
  1195             #label: 'Redefine Aspect Methods'
  1195 	    #label: 'Redefine Aspect Methods'
  1196             #translateLabel: true
  1196 	    #translateLabel: true
  1197             #hideMenuOnActivated: false
  1197 	    #hideMenuOnActivated: false
  1198             #indication: #redefineAspectMethodsChannel
  1198 	    #indication: #redefineAspectMethodsChannel
  1199           )
  1199 	  )
  1200          #(#MenuItem
  1200 	 #(#MenuItem
  1201             #activeHelpKey: #settingsRedefineAspectMethods
  1201 	    #activeHelpKey: #settingsRedefineAspectMethods
  1202             #label: 'AutoAccept on Selection-Change'
  1202 	    #label: 'AutoAccept on Selection-Change'
  1203             #translateLabel: true
  1203 	    #translateLabel: true
  1204             #hideMenuOnActivated: false
  1204 	    #hideMenuOnActivated: false
  1205             #indication: #autoAcceptOnSelectionChange
  1205 	    #indication: #autoAcceptOnSelectionChange
  1206           )
  1206 	  )
  1207          )
  1207 	 )
  1208         nil
  1208 	nil
  1209         nil
  1209 	nil
  1210       )
  1210       )
  1211 !
  1211 !
  1212 
  1212 
  1213 standardMenus
  1213 standardMenus
  1214     "This resource specification was automatically generated
  1214     "This resource specification was automatically generated
  1260      (Menu new fromLiteralArrayEncoding:(MenuEditor toolbar)) startUp
  1260      (Menu new fromLiteralArrayEncoding:(MenuEditor toolbar)) startUp
  1261     "
  1261     "
  1262 
  1262 
  1263     <resource: #menu>
  1263     <resource: #menu>
  1264 
  1264 
  1265     ^ 
  1265     ^
  1266      #(Menu
  1266      #(Menu
  1267         (
  1267 	(
  1268          (MenuItem
  1268 	 (MenuItem
  1269             activeHelpKey: fileNew
  1269 	    activeHelpKey: fileNew
  1270             label: 'New'
  1270 	    label: 'New'
  1271             itemValue: doNew
  1271 	    itemValue: doNew
  1272             translateLabel: true
  1272 	    translateLabel: true
  1273             isButton: true
  1273 	    isButton: true
  1274             labelImage: (ResourceRetriever ToolbarIconLibrary newMenuIcon)
  1274 	    labelImage: (ResourceRetriever ToolbarIconLibrary newMenuIcon)
  1275           )
  1275 	  )
  1276          (MenuItem
  1276 	 (MenuItem
  1277             label: '-'
  1277 	    label: '-'
  1278           )
  1278 	  )
  1279          (MenuItem
  1279 	 (MenuItem
  1280             activeHelpKey: fileLoad
  1280 	    activeHelpKey: fileLoad
  1281             label: 'Load'
  1281 	    label: 'Load'
  1282             itemValue: doLoad
  1282 	    itemValue: doLoad
  1283             translateLabel: true
  1283 	    translateLabel: true
  1284             isButton: true
  1284 	    isButton: true
  1285             isVisible: isNotEditingSpecOnly
  1285 	    isVisible: isNotEditingSpecOnly
  1286             submenuChannel: menuHistory
  1286 	    submenuChannel: menuHistory
  1287             labelImage: (ResourceRetriever ToolbarIconLibrary loadFromMethodIcon)
  1287 	    labelImage: (ResourceRetriever ToolbarIconLibrary loadFromMethodIcon)
  1288             keepLinkedMenu: true
  1288 	    keepLinkedMenu: true
  1289           )
  1289 	  )
  1290          (MenuItem
  1290 	 (MenuItem
  1291             activeHelpKey: fileSave
  1291 	    activeHelpKey: fileSave
  1292             label: 'Save'
  1292 	    label: 'Save'
  1293             itemValue: doSave
  1293 	    itemValue: doSave
  1294             translateLabel: true
  1294 	    translateLabel: true
  1295             isButton: true
  1295 	    isButton: true
  1296             isVisible: isNotEditingSpecOnly
  1296 	    isVisible: isNotEditingSpecOnly
  1297             labelImage: (ResourceRetriever ToolbarIconLibrary saveAsMethodIcon)
  1297 	    labelImage: (ResourceRetriever ToolbarIconLibrary saveAsMethodIcon)
  1298           )
  1298 	  )
  1299          (MenuItem
  1299 	 (MenuItem
  1300             activeHelpKey: fileSaveSpec
  1300 	    activeHelpKey: fileSaveSpec
  1301             label: 'Save'
  1301 	    label: 'Save'
  1302             itemValue: doSave
  1302 	    itemValue: doSave
  1303             translateLabel: true
  1303 	    translateLabel: true
  1304             isButton: true
  1304 	    isButton: true
  1305             isVisible: isEditingSpecOnly
  1305 	    isVisible: isEditingSpecOnly
  1306             labelImage: (ResourceRetriever XPToolbarIconLibrary saveImageIcon)
  1306 	    labelImage: (ResourceRetriever XPToolbarIconLibrary saveImageIcon)
  1307           )
  1307 	  )
  1308          (MenuItem
  1308 	 (MenuItem
  1309             label: '-'
  1309 	    label: '-'
  1310           )
  1310 	  )
  1311          (MenuItem
  1311 	 (MenuItem
  1312             activeHelpKey: editCut
  1312 	    activeHelpKey: editCut
  1313             enabled: hasSelectionChannel
  1313 	    enabled: hasSelectionChannel
  1314             label: 'Cut'
  1314 	    label: 'Cut'
  1315             itemValue: doCut
  1315 	    itemValue: doCut
  1316             translateLabel: true
  1316 	    translateLabel: true
  1317             isButton: true
  1317 	    isButton: true
  1318             labelImage: (ResourceRetriever ToolbarIconLibrary cutMenuItemIcon)
  1318 	    labelImage: (ResourceRetriever ToolbarIconLibrary cutMenuItemIcon)
  1319           )
  1319 	  )
  1320          (MenuItem
  1320 	 (MenuItem
  1321             activeHelpKey: editCopy
  1321 	    activeHelpKey: editCopy
  1322             enabled: hasSelectionChannel
  1322 	    enabled: hasSelectionChannel
  1323             label: 'Copy'
  1323 	    label: 'Copy'
  1324             itemValue: doCopy
  1324 	    itemValue: doCopy
  1325             translateLabel: true
  1325 	    translateLabel: true
  1326             isButton: true
  1326 	    isButton: true
  1327             labelImage: (ResourceRetriever ToolbarIconLibrary copyMenuItemIcon)
  1327 	    labelImage: (ResourceRetriever ToolbarIconLibrary copyMenuItemIcon)
  1328           )
  1328 	  )
  1329          (MenuItem
  1329 	 (MenuItem
  1330             activeHelpKey: editPaste
  1330 	    activeHelpKey: editPaste
  1331             enabled: canPasteHolder
  1331 	    enabled: canPasteHolder
  1332             label: 'Paste'
  1332 	    label: 'Paste'
  1333             itemValue: doPaste
  1333 	    itemValue: doPaste
  1334             translateLabel: true
  1334 	    translateLabel: true
  1335             isButton: true
  1335 	    isButton: true
  1336             labelImage: (ResourceRetriever ToolbarIconLibrary pasteMenuItemIcon)
  1336 	    labelImage: (ResourceRetriever ToolbarIconLibrary pasteMenuItemIcon)
  1337           )
  1337 	  )
  1338          (MenuItem
  1338 	 (MenuItem
  1339             label: '-'
  1339 	    label: '-'
  1340           )
  1340 	  )
  1341          (MenuItem
  1341 	 (MenuItem
  1342             activeHelpKey: addMenuItem
  1342 	    activeHelpKey: addMenuItem
  1343             enabled: hasSingleSelectionChannel
  1343 	    enabled: hasSingleSelectionChannel
  1344             label: 'Add Item'
  1344 	    label: 'Add Item'
  1345             itemValue: doCreateItem
  1345 	    itemValue: doCreateItem
  1346             translateLabel: true
  1346 	    translateLabel: true
  1347             isButton: true
  1347 	    isButton: true
  1348             labelImage: (ResourceRetriever #'MenuEditor::Item' iconItem)
  1348 	    labelImage: (ResourceRetriever #'MenuEditor::Item' iconItem)
  1349           )
  1349 	  )
  1350          (MenuItem
  1350 	 (MenuItem
  1351             activeHelpKey: addMenuSeparator
  1351 	    activeHelpKey: addMenuSeparator
  1352             enabled: hasSingleSelectionChannel
  1352 	    enabled: hasSingleSelectionChannel
  1353             label: 'Add Separator'
  1353 	    label: 'Add Separator'
  1354             itemValue: doCreateSep
  1354 	    itemValue: doCreateSep
  1355             translateLabel: true
  1355 	    translateLabel: true
  1356             isButton: true
  1356 	    isButton: true
  1357             labelImage: (ResourceRetriever #'MenuEditor::Item' iconSeparator)
  1357 	    labelImage: (ResourceRetriever #'MenuEditor::Item' iconSeparator)
  1358           )
  1358 	  )
  1359          (MenuItem
  1359 	 (MenuItem
  1360             activeHelpKey: addMenuSlice
  1360 	    activeHelpKey: addMenuSlice
  1361             enabled: hasSingleSelectionChannel
  1361 	    enabled: hasSingleSelectionChannel
  1362             label: 'Menu Slice'
  1362 	    label: 'Menu Slice'
  1363             itemValue: doCreateMenuSliceItem
  1363 	    itemValue: doCreateMenuSliceItem
  1364             translateLabel: true
  1364 	    translateLabel: true
  1365             isButton: true
  1365 	    isButton: true
  1366             labelImage: (ResourceRetriever #'MenuEditor::Item' iconSliceMenu)
  1366 	    labelImage: (ResourceRetriever #'MenuEditor::Item' iconSliceMenu)
  1367           )
  1367 	  )
  1368          (MenuItem
  1368 	 (MenuItem
  1369             activeHelpKey: addSubMenu
  1369 	    activeHelpKey: addSubMenu
  1370             enabled: hasSingleSelectionChannel
  1370 	    enabled: hasSingleSelectionChannel
  1371             label: 'Add Menu'
  1371 	    label: 'Add Menu'
  1372             itemValue: doCreateMenu
  1372 	    itemValue: doCreateMenu
  1373             translateLabel: true
  1373 	    translateLabel: true
  1374             isButton: true
  1374 	    isButton: true
  1375             submenuChannel: standardMenus
  1375 	    submenuChannel: standardMenus
  1376             labelImage: (ResourceRetriever #'MenuEditor::Item' iconMenu)
  1376 	    labelImage: (ResourceRetriever #'MenuEditor::Item' iconMenu)
  1377             keepLinkedMenu: true
  1377 	    keepLinkedMenu: true
  1378           )
  1378 	  )
  1379          (MenuItem
  1379 	 (MenuItem
  1380             activeHelpKey: addSubMenuLink
  1380 	    activeHelpKey: addSubMenuLink
  1381             enabled: hasSingleSelectionChannel
  1381 	    enabled: hasSingleSelectionChannel
  1382             label: 'Add Linked Menu'
  1382 	    label: 'Add Linked Menu'
  1383             itemValue: doCreateLinkedMenu
  1383 	    itemValue: doCreateLinkedMenu
  1384             translateLabel: true
  1384 	    translateLabel: true
  1385             isButton: true
  1385 	    isButton: true
  1386             labelImage: (ResourceRetriever #'MenuEditor::Item' iconLinkedMenu)
  1386 	    labelImage: (ResourceRetriever #'MenuEditor::Item' iconLinkedMenu)
  1387           )
  1387 	  )
  1388          (MenuItem
  1388 	 (MenuItem
  1389             activeHelpKey: addDelayedMenu
  1389 	    activeHelpKey: addDelayedMenu
  1390             enabled: canCreateDelayedMenuChannel
  1390 	    enabled: canCreateDelayedMenuChannel
  1391             label: 'Add Delayed Menu'
  1391 	    label: 'Add Delayed Menu'
  1392             itemValue: doCreateDelayedMenu:
  1392 	    itemValue: doCreateDelayedMenu:
  1393             translateLabel: true
  1393 	    translateLabel: true
  1394             isButton: true
  1394 	    isButton: true
  1395             labelImage: (ResourceRetriever #'MenuEditor::Item' iconDelayedMenu)
  1395 	    labelImage: (ResourceRetriever #'MenuEditor::Item' iconDelayedMenu)
  1396             argument: menu
  1396 	    argument: menu
  1397           )
  1397 	  )
  1398          (MenuItem
  1398 	 (MenuItem
  1399             activeHelpKey: addDelayedSubMenuLink
  1399 	    activeHelpKey: addDelayedSubMenuLink
  1400             enabled: canCreateDelayedMenuChannel
  1400 	    enabled: canCreateDelayedMenuChannel
  1401             label: 'Add Delayed Linked Menu'
  1401 	    label: 'Add Delayed Linked Menu'
  1402             itemValue: doCreateDelayedMenu:
  1402 	    itemValue: doCreateDelayedMenu:
  1403             translateLabel: true
  1403 	    translateLabel: true
  1404             isButton: true
  1404 	    isButton: true
  1405             labelImage: (ResourceRetriever #'MenuEditor::Item' iconDelayedLinkedMenu)
  1405 	    labelImage: (ResourceRetriever #'MenuEditor::Item' iconDelayedLinkedMenu)
  1406             argument: linkedMenu
  1406 	    argument: linkedMenu
  1407           )
  1407 	  )
  1408          (MenuItem
  1408 	 (MenuItem
  1409             label: ''
  1409 	    label: ''
  1410           )
  1410 	  )
  1411          (MenuItem
  1411 	 (MenuItem
  1412             activeHelpKey: editMoveUp
  1412 	    activeHelpKey: editMoveUp
  1413             enabled: enableMovingUpOrDownHolder
  1413 	    enabled: enableMovingUpOrDownHolder
  1414             label: 'Move Up'
  1414 	    label: 'Move Up'
  1415             itemValue: doMoveUp
  1415 	    itemValue: doMoveUp
  1416             translateLabel: true
  1416 	    translateLabel: true
  1417             isButton: true
  1417 	    isButton: true
  1418             startGroup: right
  1418 	    startGroup: right
  1419             labelImage: (ResourceRetriever Icon upIcon)
  1419 	    labelImage: (ResourceRetriever Icon upIcon)
  1420           )
  1420 	  )
  1421          (MenuItem
  1421 	 (MenuItem
  1422             activeHelpKey: editMoveDown
  1422 	    activeHelpKey: editMoveDown
  1423             enabled: enableMovingUpOrDownHolder
  1423 	    enabled: enableMovingUpOrDownHolder
  1424             label: 'Move Down'
  1424 	    label: 'Move Down'
  1425             itemValue: doMoveDown
  1425 	    itemValue: doMoveDown
  1426             translateLabel: true
  1426 	    translateLabel: true
  1427             isButton: true
  1427 	    isButton: true
  1428             labelImage: (ResourceRetriever Icon downIcon)
  1428 	    labelImage: (ResourceRetriever Icon downIcon)
  1429           )
  1429 	  )
  1430          (MenuItem
  1430 	 (MenuItem
  1431             activeHelpKey: editMoveIn
  1431 	    activeHelpKey: editMoveIn
  1432             enabled: enableMovingInHolder
  1432 	    enabled: enableMovingInHolder
  1433             label: 'Move Into Next'
  1433 	    label: 'Move Into Next'
  1434             itemValue: doMoveInNext
  1434 	    itemValue: doMoveInNext
  1435             translateLabel: true
  1435 	    translateLabel: true
  1436             isButton: true
  1436 	    isButton: true
  1437             labelImage: (ResourceRetriever Icon downRightIcon)
  1437 	    labelImage: (ResourceRetriever Icon downRightIcon)
  1438           )
  1438 	  )
  1439          (MenuItem
  1439 	 (MenuItem
  1440             activeHelpKey: editMoveInAbove
  1440 	    activeHelpKey: editMoveInAbove
  1441             enabled: enableMovingInAboveHolder
  1441 	    enabled: enableMovingInAboveHolder
  1442             label: 'Move Into Previous'
  1442 	    label: 'Move Into Previous'
  1443             itemValue: doMoveInPrevious
  1443 	    itemValue: doMoveInPrevious
  1444             translateLabel: true
  1444 	    translateLabel: true
  1445             isButton: true
  1445 	    isButton: true
  1446             labelImage: (ResourceRetriever Icon upRightIcon)
  1446 	    labelImage: (ResourceRetriever Icon upRightIcon)
  1447           )
  1447 	  )
  1448          (MenuItem
  1448 	 (MenuItem
  1449             activeHelpKey: editMoveOut
  1449 	    activeHelpKey: editMoveOut
  1450             enabled: enableMovingOutHolder
  1450 	    enabled: enableMovingOutHolder
  1451             label: 'Move Out'
  1451 	    label: 'Move Out'
  1452             itemValue: doMoveOut
  1452 	    itemValue: doMoveOut
  1453             translateLabel: true
  1453 	    translateLabel: true
  1454             isButton: true
  1454 	    isButton: true
  1455             labelImage: (ResourceRetriever Icon leftDownIcon)
  1455 	    labelImage: (ResourceRetriever Icon leftDownIcon)
  1456           )
  1456 	  )
  1457          )
  1457 	 )
  1458         nil
  1458 	nil
  1459         nil
  1459 	nil
  1460       )
  1460       )
  1461 ! !
  1461 ! !
  1462 
  1462 
  1463 !MenuEditor class methodsFor:'menu specs-standard'!
  1463 !MenuEditor class methodsFor:'menu specs-standard'!
  1464 
  1464 
  1633 !
  1633 !
  1634 
  1634 
  1635 imageTool
  1635 imageTool
  1636     "get the image tool application"
  1636     "get the image tool application"
  1637 
  1637 
  1638     ^ wizards 
  1638     ^ wizards
  1639         at:#image 
  1639 	at:#image
  1640         ifAbsentPut:[ 
  1640 	ifAbsentPut:[
  1641             |tool|
  1641 	    |tool|
  1642 
  1642 
  1643             tool := ImageResourceEditor new createBuilder.
  1643 	    tool := ImageResourceEditor new createBuilder.
  1644             tool masterApplication:self.
  1644 	    tool masterApplication:self.
  1645             tool modifiedChannel: self enablingCommitButtonsHolder.
  1645 	    tool modifiedChannel: self enablingCommitButtonsHolder.
  1646             tool builder window:(ApplicationSubView new client:tool).
  1646 	    tool builder window:(ApplicationSubView new client:tool).
  1647             tool
  1647 	    tool
  1648         ]
  1648 	]
  1649 
  1649 
  1650     "Modified: / 03-08-2011 / 10:03:08 / cg"
  1650     "Modified: / 03-08-2011 / 10:03:08 / cg"
  1651 !
  1651 !
  1652 
  1652 
  1653 savedSpec
  1653 savedSpec
  1675     |selectedItem rscRetrHolder helpKeyHolder helpTool imageTool acceptChannel|
  1675     |selectedItem rscRetrHolder helpKeyHolder helpTool imageTool acceptChannel|
  1676 
  1676 
  1677     selectedItem := self selectedItem.
  1677     selectedItem := self selectedItem.
  1678 
  1678 
  1679     selectedItem notNil ifTrue:[
  1679     selectedItem notNil ifTrue:[
  1680         self withoutNotifyDo:[
  1680 	self withoutNotifyDo:[
  1681             rscRetrHolder := aspects at:#resourceRetriever.
  1681 	    rscRetrHolder := aspects at:#resourceRetriever.
  1682             helpKeyHolder := aspects at:#activeHelpKey.
  1682 	    helpKeyHolder := aspects at:#activeHelpKey.
  1683             imageTool     := self imageTool.
  1683 	    imageTool     := self imageTool.
  1684             helpTool      := self helpTool.
  1684 	    helpTool      := self helpTool.
  1685             acceptChannel := self acceptChannel.
  1685 	    acceptChannel := self acceptChannel.
  1686 
  1686 
  1687             acceptChannel triggerValue:true.
  1687 	    acceptChannel triggerValue:true.
  1688             acceptChannel setValue:false.
  1688 	    acceptChannel setValue:false.
  1689 
  1689 
  1690             ok ifTrue:[
  1690 	    ok ifTrue:[
  1691                 helpTool accept.
  1691 		helpTool accept.
  1692                 rscRetrHolder value:(imageTool resourceRetriever).
  1692 		rscRetrHolder value:(imageTool resourceRetriever).
  1693                 helpKeyHolder value:(helpTool helpKey).
  1693 		helpKeyHolder value:(helpTool helpKey).
  1694                 selectedItem  fromAspects:aspects.
  1694 		selectedItem  fromAspects:aspects.
  1695                 self setModified.
  1695 		self setModified.
  1696 
  1696 
  1697                 selectedItem isRootItem ifTrue:[
  1697 		selectedItem isRootItem ifTrue:[
  1698                     "/ update specSelector
  1698 		    "/ update specSelector
  1699                     specSelector := selectedItem rawLabel.
  1699 		    specSelector := selectedItem rawLabel.
  1700                 ].
  1700 		].
  1701             ].
  1701 	    ].
  1702             selectedItem toAspects:aspects.
  1702 	    selectedItem toAspects:aspects.
  1703             helpTool     helpKey:(helpKeyHolder value).
  1703 	    helpTool     helpKey:(helpKeyHolder value).
  1704             imageTool    resourceRetriever:(rscRetrHolder value).
  1704 	    imageTool    resourceRetriever:(rscRetrHolder value).
  1705         ]
  1705 	]
  1706     ].
  1706     ].
  1707     self updateChannels.
  1707     self updateChannels.
  1708 "/    self clearModified.
  1708 "/    self clearModified.
  1709     self clearModifiedFlag.
  1709     self clearModifiedFlag.
  1710 
  1710 
  1726     "
  1726     "
  1727     |item|
  1727     |item|
  1728 
  1728 
  1729     item := listOfItems at:atLine ifAbsent:nil.
  1729     item := listOfItems at:atLine ifAbsent:nil.
  1730     item notNil ifTrue:[
  1730     item notNil ifTrue:[
  1731         item toggleExpand.
  1731 	item toggleExpand.
  1732         self hasSelection ifFalse:[
  1732 	self hasSelection ifFalse:[
  1733             self selectedItem:item
  1733 	    self selectedItem:item
  1734         ]
  1734 	]
  1735     ].
  1735     ].
  1736 
  1736 
  1737     "Modified: / 29-11-2011 / 11:28:20 / cg"
  1737     "Modified: / 29-11-2011 / 11:28:20 / cg"
  1738 ! !
  1738 ! !
  1739 
  1739 
  1853 
  1853 
  1854     specClass := aClass.
  1854     specClass := aClass.
  1855     specSelector := aSelector.
  1855     specSelector := aSelector.
  1856 
  1856 
  1857     aSelector notNil ifTrue:[
  1857     aSelector notNil ifTrue:[
  1858         aClass notNil ifTrue:[
  1858 	aClass notNil ifTrue:[
  1859             cls := aClass isBehavior ifTrue:[ aClass ] ifFalse:[ self resolveName:aClass].
  1859 	    cls := aClass isBehavior ifTrue:[ aClass ] ifFalse:[ self resolveName:aClass].
  1860 
  1860 
  1861             (cls respondsTo:aSelector) ifTrue:[
  1861 	    (cls respondsTo:aSelector) ifTrue:[
  1862                 menu := cls perform: aSelector.
  1862 		menu := cls perform: aSelector.
  1863             ].
  1863 	    ].
  1864         ].
  1864 	].
  1865     ].
  1865     ].
  1866     self loadFromMenu:menu selector:aSelector.
  1866     self loadFromMenu:menu selector:aSelector.
  1867 !
  1867 !
  1868 
  1868 
  1869 loadFromMenu:menuArg selector:selectorOrNil
  1869 loadFromMenu:menuArg selector:selectorOrNil
  1871 
  1871 
  1872     |menu|
  1872     |menu|
  1873 
  1873 
  1874     menu := menuArg.
  1874     menu := menuArg.
  1875     menu notNil ifTrue:[
  1875     menu notNil ifTrue:[
  1876         (menu isCollection) ifTrue:[
  1876 	(menu isCollection) ifTrue:[
  1877             menu := Menu decodeFromLiteralArray:menu
  1877 	    menu := Menu decodeFromLiteralArray:menu
  1878         ].
  1878 	].
  1879     ].
  1879     ].
  1880     self buildFromMenu:menu selector:selectorOrNil.
  1880     self buildFromMenu:menu selector:selectorOrNil.
  1881     self clearModified.
  1881     self clearModified.
  1882 
  1882 
  1883     "Modified: / 27-03-2007 / 11:16:47 / cg"
  1883     "Modified: / 27-03-2007 / 11:16:47 / cg"
  1894 
  1894 
  1895     selection := selectionHolder value.
  1895     selection := selectionHolder value.
  1896     size      := selection size.
  1896     size      := selection size.
  1897 
  1897 
  1898     size <= 1 ifTrue:[
  1898     size <= 1 ifTrue:[
  1899         selectedSuperItems := selection ? #().
  1899 	selectedSuperItems := selection ? #().
  1900       ^ selectedSuperItems
  1900       ^ selectedSuperItems
  1901     ].
  1901     ].
  1902 
  1902 
  1903     root := listOfItems root.
  1903     root := listOfItems root.
  1904 
  1904 
  1905     (selection includesIdentical:root) ifTrue:[
  1905     (selection includesIdentical:root) ifTrue:[
  1906         selectedSuperItems := Array with:root.
  1906 	selectedSuperItems := Array with:root.
  1907       ^ selectedSuperItems
  1907       ^ selectedSuperItems
  1908     ].
  1908     ].
  1909     selectedSuperItems := OrderedCollection new.
  1909     selectedSuperItems := OrderedCollection new.
  1910 
  1910 
  1911     selection do:[:anItem|
  1911     selection do:[:anItem|
  1912         anItem parentsDetect:[:el| selection includesIdentical:el ]
  1912 	anItem parentsDetect:[:el| selection includesIdentical:el ]
  1913                       ifNone:[ selectedSuperItems add:anItem ].
  1913 		      ifNone:[ selectedSuperItems add:anItem ].
  1914     ].
  1914     ].
  1915     ^ selectedSuperItems
  1915     ^ selectedSuperItems
  1916 
  1916 
  1917     "Modified: / 29-11-2011 / 11:28:23 / cg"
  1917     "Modified: / 29-11-2011 / 11:28:23 / cg"
  1918 !
  1918 !
  1946 
  1946 
  1947     |tab selector item canvas wizardHolder|
  1947     |tab selector item canvas wizardHolder|
  1948 
  1948 
  1949     wizardHolder := self wizardHolder.
  1949     wizardHolder := self wizardHolder.
  1950     item := self selectedItem.
  1950     item := self selectedItem.
  1951     item isNil ifTrue:[ 
  1951     item isNil ifTrue:[
  1952         wizardHolder value:nil. 
  1952 	wizardHolder value:nil.
  1953         ^ self 
  1953 	^ self
  1954     ].
  1954     ].
  1955 
  1955 
  1956     tab := tabHolder value.
  1956     tab := tabHolder value.
  1957 
  1957 
  1958     tab notNil ifTrue:[
  1958     tab notNil ifTrue:[
  1959         tab := item slices detect:[:el| el first = tab ] ifNone:nil.
  1959 	tab := item slices detect:[:el| el first = tab ] ifNone:nil.
  1960     ].
  1960     ].
  1961     tab isNil ifTrue:[
  1961     tab isNil ifTrue:[
  1962         tabHolder value:( listOfTabs at:1 ifAbsent:nil ). 
  1962 	tabHolder value:( listOfTabs at:1 ifAbsent:nil ).
  1963         ^ self.
  1963 	^ self.
  1964     ].
  1964     ].
  1965     selector := tab last.
  1965     selector := tab last.
  1966 
  1966 
  1967     selector == #help  ifTrue:[ 
  1967     selector == #help  ifTrue:[
  1968         wizardHolder value:(self helpTool  window). 
  1968 	wizardHolder value:(self helpTool  window).
  1969         ^ self 
  1969 	^ self
  1970     ].
  1970     ].
  1971     selector == #image ifTrue:[ 
  1971     selector == #image ifTrue:[
  1972         wizardHolder value:(self imageTool window). 
  1972 	wizardHolder value:(self imageTool window).
  1973         ^ self
  1973 	^ self
  1974     ].
  1974     ].
  1975 
  1975 
  1976     canvas := wizards 
  1976     canvas := wizards
  1977                 at:(item class name, selector) asSymbol
  1977 		at:(item class name, selector) asSymbol
  1978                 ifAbsentPut:[ 
  1978 		ifAbsentPut:[
  1979                     SimpleView new 
  1979 		    SimpleView new
  1980                         client:self
  1980 			client:self
  1981                         spec:(item class perform:selector)
  1981 			spec:(item class perform:selector)
  1982                         builder:(self builder)
  1982 			builder:(self builder)
  1983                 ].
  1983 		].
  1984 
  1984 
  1985     wizardHolder value:canvas.
  1985     wizardHolder value:canvas.
  1986 !
  1986 !
  1987 
  1987 
  1988 update:something with:aParameter from:changedObject
  1988 update:something with:aParameter from:changedObject
  2012     selection := selectionHolder value.
  2012     selection := selectionHolder value.
  2013     sizeOfSel := selection size.
  2013     sizeOfSel := selection size.
  2014 
  2014 
  2015     hasSelection := sizeOfSel ~~ 0.
  2015     hasSelection := sizeOfSel ~~ 0.
  2016     sizeOfSel == 1 ifTrue:[selectedItem := selection at:1]
  2016     sizeOfSel == 1 ifTrue:[selectedItem := selection at:1]
  2017                   ifFalse:[selectedItem := nil].
  2017 		  ifFalse:[selectedItem := nil].
  2018 
  2018 
  2019     self hasSelectionChannel       value:hasSelection.
  2019     self hasSelectionChannel       value:hasSelection.
  2020     self hasSingleSelectionChannel value:(selectedItem notNil).
  2020     self hasSingleSelectionChannel value:(selectedItem notNil).
  2021 
  2021 
  2022     selectedItem isNil ifTrue:[
  2022     selectedItem isNil ifTrue:[
  2023 "/        self enableMovingUpOrDownHolder  value:false.
  2023 "/        self enableMovingUpOrDownHolder  value:false.
  2024         self enableMovingInHolder        value:false.
  2024 	self enableMovingInHolder        value:false.
  2025         self enableMovingOutHolder       value:false.
  2025 	self enableMovingOutHolder       value:false.
  2026         self enableMovingInAboveHolder   value:false.
  2026 	self enableMovingInAboveHolder   value:false.
  2027         self canCreateDelayedMenuChannel value:false.
  2027 	self canCreateDelayedMenuChannel value:false.
  2028     ] ifFalse:[
  2028     ] ifFalse:[
  2029 "/        self enableMovingUpOrDownHolder  value:(selectedItem canMoveUpOrDown).
  2029 "/        self enableMovingUpOrDownHolder  value:(selectedItem canMoveUpOrDown).
  2030         self enableMovingInHolder        value:(selectedItem canMoveInNext).
  2030 	self enableMovingInHolder        value:(selectedItem canMoveInNext).
  2031         self enableMovingOutHolder       value:(selectedItem canMoveOut).
  2031 	self enableMovingOutHolder       value:(selectedItem canMoveOut).
  2032         self enableMovingInAboveHolder   value:(selectedItem canMoveInAbove).
  2032 	self enableMovingInAboveHolder   value:(selectedItem canMoveInAbove).
  2033         self canCreateDelayedMenuChannel value:(selectedItem canAddDelayedMenu).
  2033 	self canCreateDelayedMenuChannel value:(selectedItem canAddDelayedMenu).
  2034     ].
  2034     ].
  2035     self enableMovingUpOrDownHolder value:(selection conform:[:i | i canMoveUpOrDown]).
  2035     self enableMovingUpOrDownHolder value:(selection conform:[:i | i canMoveUpOrDown]).
  2036 
  2036 
  2037     "Modified (comment): / 18-01-2012 / 11:24:07 / cg"
  2037     "Modified (comment): / 18-01-2012 / 11:24:07 / cg"
  2038 ! !
  2038 ! !
  2167 
  2167 
  2168     lnNr := listOfItemsView yVisibleToLineNr:(aDropContext targetPoint y).
  2168     lnNr := listOfItemsView yVisibleToLineNr:(aDropContext targetPoint y).
  2169     item := nil.
  2169     item := nil.
  2170 
  2170 
  2171     lnNr notNil ifTrue:[
  2171     lnNr notNil ifTrue:[
  2172         item := listOfItems at:lnNr ifAbsent:nil.
  2172 	item := listOfItems at:lnNr ifAbsent:nil.
  2173         item notNil ifTrue:[
  2173 	item notNil ifTrue:[
  2174             (item isAction and:[item hasDelayedMenu]) ifTrue:[
  2174 	    (item isAction and:[item hasDelayedMenu]) ifTrue:[
  2175                 item := nil
  2175 		item := nil
  2176             ]
  2176 	    ]
  2177         ]
  2177 	]
  2178     ].
  2178     ].
  2179     item isNil ifTrue:[ lnNr := 0 ].   "/ not dropable for item
  2179     item isNil ifTrue:[ lnNr := 0 ].   "/ not dropable for item
  2180 
  2180 
  2181     "/ redraw drop indication
  2181     "/ redraw drop indication
  2182     self changeDropLineTo:lnNr in:aDropContext.
  2182     self changeDropLineTo:lnNr in:aDropContext.
  2189 processEvent:anEvent
  2189 processEvent:anEvent
  2190     "filter keyboard edit-events typed into the listOfItemsView.
  2190     "filter keyboard edit-events typed into the listOfItemsView.
  2191      Return true, if I have eaten the event"
  2191      Return true, if I have eaten the event"
  2192 
  2192 
  2193     <resource: #keyboard (#Delete #BackSpace #Cut #Copy #Paste #CtrlCursorUp #CtrlCursorDown
  2193     <resource: #keyboard (#Delete #BackSpace #Cut #Copy #Paste #CtrlCursorUp #CtrlCursorDown
  2194                           #CtrlCursorLeft #CtrlCursorRight )>
  2194 			  #CtrlCursorLeft #CtrlCursorRight )>
  2195 
  2195 
  2196     |evView rawKey key|
  2196     |evView rawKey key|
  2197 
  2197 
  2198     anEvent isKeyPressEvent ifFalse:[^ false].
  2198     anEvent isKeyPressEvent ifFalse:[^ false].
  2199 
  2199 
  2209 
  2209 
  2210     (    key == #Delete
  2210     (    key == #Delete
  2211      or:[key == #BackSpace
  2211      or:[key == #BackSpace
  2212      or:[key == #Cut]]
  2212      or:[key == #Cut]]
  2213     ) ifTrue:[
  2213     ) ifTrue:[
  2214         self doCut.
  2214 	self doCut.
  2215         ^ true.
  2215 	^ true.
  2216     ].
  2216     ].
  2217 
  2217 
  2218     key == #Copy  ifTrue:[ self doCopy.  ^ true ].
  2218     key == #Copy  ifTrue:[ self doCopy.  ^ true ].
  2219     key == #Paste ifTrue:[ self doPaste. ^ true ].
  2219     key == #Paste ifTrue:[ self doPaste. ^ true ].
  2220 
  2220 
  2221     (rawKey == #CtrlCursorUp) ifTrue:[
  2221     (rawKey == #CtrlCursorUp) ifTrue:[
  2222         self doMoveUp.
  2222 	self doMoveUp.
  2223         ^ true.
  2223 	^ true.
  2224     ].
  2224     ].
  2225     (rawKey == #CtrlCursorDown) ifTrue:[
  2225     (rawKey == #CtrlCursorDown) ifTrue:[
  2226         self doMoveDown.
  2226 	self doMoveDown.
  2227         ^ true.
  2227 	^ true.
  2228     ].
  2228     ].
  2229     (rawKey == #CtrlCursorLeft) ifTrue:[
  2229     (rawKey == #CtrlCursorLeft) ifTrue:[
  2230         self doMoveOut.
  2230 	self doMoveOut.
  2231         ^ true.
  2231 	^ true.
  2232     ].
  2232     ].
  2233     (rawKey == #CtrlCursorRight) ifTrue:[
  2233     (rawKey == #CtrlCursorRight) ifTrue:[
  2234         self doMoveInNext.
  2234 	self doMoveInNext.
  2235         ^ true.
  2235 	^ true.
  2236     ].
  2236     ].
  2237 
  2237 
  2238     ^ false.
  2238     ^ false.
  2239 ! !
  2239 ! !
  2240 
  2240 
  2328 
  2328 
  2329     menu := listOfItems root submenu.
  2329     menu := listOfItems root submenu.
  2330     menu isNil ifTrue:[^ nil ].
  2330     menu isNil ifTrue:[^ nil ].
  2331 
  2331 
  2332     menu allItemsDo:[:anItem|
  2332     menu allItemsDo:[:anItem|
  2333         anItem ignoreShortcutKeys:true.
  2333 	anItem ignoreShortcutKeys:true.
  2334         anItem isVisible:true.
  2334 	anItem isVisible:true.
  2335         anItem enabled:true.
  2335 	anItem enabled:true.
  2336         anItem translateLabel:false.
  2336 	anItem translateLabel:false.
  2337 
  2337 
  2338         anItem itemValue notNil ifTrue:[
  2338 	anItem itemValue notNil ifTrue:[
  2339             anItem itemValue:[ Transcript showCR:(anItem label) ].
  2339 	    anItem itemValue:[ Transcript showCR:(anItem label) ].
  2340         ].
  2340 	].
  2341         anItem indication notNil ifTrue:[
  2341 	anItem indication notNil ifTrue:[
  2342             indication isNil ifTrue:[ indication := true asValue ].
  2342 	    indication isNil ifTrue:[ indication := true asValue ].
  2343             anItem indication:indication
  2343 	    anItem indication:indication
  2344         ].
  2344 	].
  2345         anItem choice notNil ifTrue:[
  2345 	anItem choice notNil ifTrue:[
  2346             choice isNil ifTrue:[ choice := anItem choiceValue asValue ].
  2346 	    choice isNil ifTrue:[ choice := anItem choiceValue asValue ].
  2347             anItem choice:choice
  2347 	    anItem choice:choice
  2348         ].
  2348 	].
  2349         anItem isMenuSlice ifTrue:[
  2349 	anItem isMenuSlice ifTrue:[
  2350             anItem submenuChannel:nil.
  2350 	    anItem submenuChannel:nil.
  2351             anItem label:'... Slice Menu ...'.
  2351 	    anItem label:'... Slice Menu ...'.
  2352         ].
  2352 	].
  2353         anItem submenuChannel notNil ifTrue:[
  2353 	anItem submenuChannel notNil ifTrue:[
  2354             anItem submenuChannel:nil.
  2354 	    anItem submenuChannel:nil.
  2355             anItem submenu isNil ifTrue:[
  2355 	    anItem submenu isNil ifTrue:[
  2356                 submenu isNil ifTrue:[
  2356 		submenu isNil ifTrue:[
  2357                     submenu := Menu new.
  2357 		    submenu := Menu new.
  2358                     submenu addItem:(MenuItem labeled:'Linked Menu...').
  2358 		    submenu addItem:(MenuItem labeled:'Linked Menu...').
  2359                 ].
  2359 		].
  2360                 anItem submenu:submenu.
  2360 		anItem submenu:submenu.
  2361             ].
  2361 	    ].
  2362         ].
  2362 	].
  2363         retriever := anItem resourceRetriever.
  2363 	retriever := anItem resourceRetriever.
  2364         retriever notNil ifTrue:[
  2364 	retriever notNil ifTrue:[
  2365             retriever labelText notNil ifTrue:[ retriever labelText:(anItem label) ]
  2365 	    retriever labelText notNil ifTrue:[ retriever labelText:(anItem label) ]
  2366         ].
  2366 	].
  2367     ].
  2367     ].
  2368     menu findGuiResourcesIn:(self resolveName:specClass).
  2368     menu findGuiResourcesIn:(self resolveName:specClass).
  2369     ^ menu
  2369     ^ menu
  2370 ! !
  2370 ! !
  2371 
  2371 
  2383     self askForItemModification ifFalse:[ ^ nil ].
  2383     self askForItemModification ifFalse:[ ^ nil ].
  2384 
  2384 
  2385     index := 1.
  2385     index := 1.
  2386 
  2386 
  2387     (intoItem canAddChildren and:[intoItem isExpanded]) ifFalse:[
  2387     (intoItem canAddChildren and:[intoItem isExpanded]) ifFalse:[
  2388         intoItem parent notNil ifTrue:[
  2388 	intoItem parent notNil ifTrue:[
  2389             [ intoItem parent canAddChildren ] whileFalse:[
  2389 	    [ intoItem parent canAddChildren ] whileFalse:[
  2390                 intoItem := intoItem parent.
  2390 		intoItem := intoItem parent.
  2391             ].
  2391 	    ].
  2392             index := intoItem parent identityIndexOf:intoItem.
  2392 	    index := intoItem parent identityIndexOf:intoItem.
  2393             index := index + 1.
  2393 	    index := index + 1.
  2394             intoItem := intoItem parent.
  2394 	    intoItem := intoItem parent.
  2395         ].
  2395 	].
  2396     ].
  2396     ].
  2397     newItem := aBlockOrItem value.
  2397     newItem := aBlockOrItem value.
  2398 
  2398 
  2399     newItem notNil ifTrue:[
  2399     newItem notNil ifTrue:[
  2400         selectionHolder setValue:nil.
  2400 	selectionHolder setValue:nil.
  2401         intoItem expand.
  2401 	intoItem expand.
  2402 
  2402 
  2403         newItem isCollection ifTrue:[
  2403 	newItem isCollection ifTrue:[
  2404             intoItem addAll:newItem beforeIndex:index.
  2404 	    intoItem addAll:newItem beforeIndex:index.
  2405             selectionHolder value:newItem.
  2405 	    selectionHolder value:newItem.
  2406         ] ifFalse:[
  2406 	] ifFalse:[
  2407             intoItem add:newItem beforeIndex:index.
  2407 	    intoItem add:newItem beforeIndex:index.
  2408             selectionHolder value:(Array with:newItem).
  2408 	    selectionHolder value:(Array with:newItem).
  2409         ].
  2409 	].
  2410         self setModified.
  2410 	self setModified.
  2411     ].
  2411     ].
  2412     ^ newItem
  2412     ^ newItem
  2413 
  2413 
  2414     "Modified: / 29-11-2011 / 11:28:06 / cg"
  2414     "Modified: / 29-11-2011 / 11:28:06 / cg"
  2415 !
  2415 !
  2578     |selectors|
  2578     |selectors|
  2579 
  2579 
  2580     selectors := IdentitySet new.
  2580     selectors := IdentitySet new.
  2581 
  2581 
  2582     listOfItems root recursiveDo:[:el|
  2582     listOfItems root recursiveDo:[:el|
  2583         selectors addAll:(el aspectSelectors).
  2583 	selectors addAll:(el aspectSelectors).
  2584     ].
  2584     ].
  2585     ^ selectors asOrderedCollection
  2585     ^ selectors asOrderedCollection
  2586 !
  2586 !
  2587 
  2587 
  2588 doBrowseActionMethod
  2588 doBrowseActionMethod
  2595 
  2595 
  2596 doBrowseApplicationMethodFor:aspect
  2596 doBrowseApplicationMethodFor:aspect
  2597     |selector cls category|
  2597     |selector cls category|
  2598 
  2598 
  2599     specClass isNil ifTrue:[
  2599     specClass isNil ifTrue:[
  2600         self warn:(resources string:'Please define the application class first.').
  2600 	self warn:(resources string:'Please define the application class first.').
  2601         ^ self
  2601 	^ self
  2602     ].
  2602     ].
  2603 
  2603 
  2604     selector := (self aspectFor:aspect) value.
  2604     selector := (self aspectFor:aspect) value.
  2605     selector isEmptyOrNil ifTrue:[
  2605     selector isEmptyOrNil ifTrue:[
  2606         Dialog information:(resources string:'Please enter an action method name.').
  2606 	Dialog information:(resources string:'Please enter an action method name.').
  2607         ^ self
  2607 	^ self
  2608     ].
  2608     ].
  2609     (selector = 'true' or:[selector = 'false']) ifTrue:[^ self].
  2609     (selector = 'true' or:[selector = 'false']) ifTrue:[^ self].
  2610     (selector == true or:[selector == false]) ifTrue:[^ self].
  2610     (selector == true or:[selector == false]) ifTrue:[^ self].
  2611 
  2611 
  2612     selector := selector asSymbol.
  2612     selector := selector asSymbol.
  2613 
  2613 
  2614     cls := self resolveName:specClass.
  2614     cls := self resolveName:specClass.
  2615     cls isNil ifTrue:[
  2615     cls isNil ifTrue:[
  2616         self warn:(resources string:'Class %1 does not exist!!' with:specClass asString).
  2616 	self warn:(resources string:'Class %1 does not exist!!' with:specClass asString).
  2617         ^ self
  2617 	^ self
  2618     ].
  2618     ].
  2619 
  2619 
  2620     (cls includesSelector:selector) ifFalse:[
  2620     (cls includesSelector:selector) ifFalse:[
  2621         category := UserPreferences current categoryForMenuActionsMethods.
  2621 	category := UserPreferences current categoryForMenuActionsMethods.
  2622 
  2622 
  2623         SmalltalkCodeGeneratorTool
  2623 	SmalltalkCodeGeneratorTool
  2624             createActionMethodFor:selector in:cls
  2624 	    createActionMethodFor:selector in:cls
  2625             category:category
  2625 	    category:category
  2626             redefine:(self redefineAspectMethodsChannel value).
  2626 	    redefine:(self redefineAspectMethodsChannel value).
  2627     ].
  2627     ].
  2628 
  2628 
  2629     UserPreferences current systemBrowserClass openInClass:cls selector:selector
  2629     UserPreferences current systemBrowserClass openInClass:cls selector:selector
  2630 
  2630 
  2631     "Created: / 21-10-2010 / 14:07:32 / cg"
  2631     "Created: / 21-10-2010 / 14:07:32 / cg"
  2652     "compile aspect and action methods"
  2652     "compile aspect and action methods"
  2653 
  2653 
  2654     |cls redefineAspectMethods category|
  2654     |cls redefineAspectMethods category|
  2655 
  2655 
  2656     specClass isNil ifTrue:[
  2656     specClass isNil ifTrue:[
  2657         self warn:'Define the class first !!'.
  2657 	self warn:'Define the class first !!'.
  2658         ^ self
  2658 	^ self
  2659     ].
  2659     ].
  2660     redefineAspectMethods := self redefineAspectMethodsChannel value.
  2660     redefineAspectMethods := self redefineAspectMethodsChannel value.
  2661 
  2661 
  2662     cls := self resolveName:specClass.
  2662     cls := self resolveName:specClass.
  2663     cls isNil ifTrue:[
  2663     cls isNil ifTrue:[
  2664         self warn:'Class ', specClass asString, ' does not exist!!'.
  2664 	self warn:'Class ', specClass asString, ' does not exist!!'.
  2665         ^ self
  2665 	^ self
  2666     ].
  2666     ].
  2667 
  2667 
  2668     category := UserPreferences current categoryForMenuActionsMethods.
  2668     category := UserPreferences current categoryForMenuActionsMethods.
  2669 
  2669 
  2670     self collectActionSelectors do:[:aSelector|
  2670     self collectActionSelectors do:[:aSelector|
  2671         SmalltalkCodeGeneratorTool
  2671 	SmalltalkCodeGeneratorTool
  2672             createActionMethodFor:aSelector in:cls
  2672 	    createActionMethodFor:aSelector in:cls
  2673             category:category
  2673 	    category:category
  2674             redefine:redefineAspectMethods.
  2674 	    redefine:redefineAspectMethods.
  2675     ].
  2675     ].
  2676 
  2676 
  2677     self collectAspectSelectors do:[:anAspect|
  2677     self collectAspectSelectors do:[:anAspect|
  2678         SmalltalkCodeGeneratorTool
  2678 	SmalltalkCodeGeneratorTool
  2679             createAspectMethodFor:anAspect in:cls
  2679 	    createAspectMethodFor:anAspect in:cls
  2680             category:category
  2680 	    category:category
  2681             redefine:redefineAspectMethods
  2681 	    redefine:redefineAspectMethods
  2682     ].
  2682     ].
  2683 
  2683 
  2684     "Modified: / 31-01-2011 / 18:29:06 / cg"
  2684     "Modified: / 31-01-2011 / 18:29:06 / cg"
  2685 ! !
  2685 ! !
  2686 
  2686 
  2690     "pick a menu and edit its spec method"
  2690     "pick a menu and edit its spec method"
  2691 
  2691 
  2692     |view subSpec app bldr spec menuSelector1 menuSelector2 info|
  2692     |view subSpec app bldr spec menuSelector1 menuSelector2 info|
  2693 
  2693 
  2694     self askForModification ifTrue:[
  2694     self askForModification ifTrue:[
  2695         view := Screen current viewFromUser.
  2695 	view := Screen current viewFromUser.
  2696         (view isNil or:[view == Screen current rootView]) ifTrue:[
  2696 	(view isNil or:[view == Screen current rootView]) ifTrue:[
  2697             ^ self
  2697 	    ^ self
  2698         ].
  2698 	].
  2699         view specClass == MenuPanelSpec ifTrue:[
  2699 	view specClass == MenuPanelSpec ifTrue:[
  2700             (app := view application) isNil ifTrue:[
  2700 	    (app := view application) isNil ifTrue:[
  2701                 info := 'Could not figure out the application class.'
  2701 		info := 'Could not figure out the application class.'
  2702             ] ifFalse:[
  2702 	    ] ifFalse:[
  2703                 (bldr := app builder) isNil ifTrue:[ 
  2703 		(bldr := app builder) isNil ifTrue:[
  2704                     info := 'Application has no builder.'
  2704 		    info := 'Application has no builder.'
  2705                 ] ifFalse:[
  2705 		] ifFalse:[
  2706                     menuSelector1 := bldr namedComponents keyAtValue:view ifAbsent:nil.
  2706 		    menuSelector1 := bldr namedComponents keyAtValue:view ifAbsent:nil.
  2707                     (spec := bldr spec) isNil ifTrue:[
  2707 		    (spec := bldr spec) isNil ifTrue:[
  2708                         info := 'Cannot fetch spec from applications builder.'
  2708 			info := 'Cannot fetch spec from applications builder.'
  2709                     ] ifFalse:[
  2709 		    ] ifFalse:[
  2710                         subSpec := spec findSpecForWhich:[:subSpec | subSpec name = view name].
  2710 			subSpec := spec findSpecForWhich:[:subSpec | subSpec name = view name].
  2711                         subSpec isNil ifTrue:[
  2711 			subSpec isNil ifTrue:[
  2712                             info := 'Cannot find view-spec for ',view name asString,'.'
  2712 			    info := 'Cannot find view-spec for ',view name asString,'.'
  2713                         ] ifFalse:[
  2713 			] ifFalse:[
  2714                             menuSelector2 := subSpec menu.
  2714 			    menuSelector2 := subSpec menu.
  2715                         ]
  2715 			]
  2716                     ].
  2716 		    ].
  2717                     (menuSelector1 isNil and:[ menuSelector2 isNil ]) ifTrue:[
  2717 		    (menuSelector1 isNil and:[ menuSelector2 isNil ]) ifTrue:[
  2718                         info := 'menu is probably not provided by a menuSelector.'
  2718 			info := 'menu is probably not provided by a menuSelector.'
  2719                     ] ifFalse:[
  2719 		    ] ifFalse:[
  2720                         (app class respondsTo:menuSelector1) ifTrue:[
  2720 			(app class respondsTo:menuSelector1) ifTrue:[
  2721                             self loadFromClass:app class andSelector:menuSelector1.
  2721 			    self loadFromClass:app class andSelector:menuSelector1.
  2722                             ^ self.
  2722 			    ^ self.
  2723                         ].
  2723 			].
  2724                         (app class respondsTo:menuSelector2) ifTrue:[
  2724 			(app class respondsTo:menuSelector2) ifTrue:[
  2725                             self loadFromClass:app class andSelector:menuSelector2.
  2725 			    self loadFromClass:app class andSelector:menuSelector2.
  2726                             ^ self.
  2726 			    ^ self.
  2727                         ].
  2727 			].
  2728                         info := 'menu is probably not provided by a menuSelector.'
  2728 			info := 'menu is probably not provided by a menuSelector.'
  2729                     ].
  2729 		    ].
  2730                 ]
  2730 		]
  2731             ].
  2731 	    ].
  2732             info notNil ifTrue:[
  2732 	    info notNil ifTrue:[
  2733                 app notNil ifTrue:[
  2733 		app notNil ifTrue:[
  2734                     (Dialog confirm:(info,'\\Browse ?' withCRs)) ifTrue:[
  2734 		    (Dialog confirm:(info,'\\Browse ?' withCRs)) ifTrue:[
  2735                         app browse.
  2735 			app browse.
  2736                     ].
  2736 		    ].
  2737                 ] ifFalse:[
  2737 		] ifFalse:[
  2738                     Dialog information:info.
  2738 		    Dialog information:info.
  2739                 ].
  2739 		].
  2740             ].
  2740 	    ].
  2741             ^ self.
  2741 	    ^ self.
  2742         ].
  2742 	].
  2743     ].
  2743     ].
  2744 !
  2744 !
  2745 
  2745 
  2746 doNew
  2746 doNew
  2747     "clear editing menu; start from scratch
  2747     "clear editing menu; start from scratch
  2753     "let user pick a menu and create a new spec"
  2753     "let user pick a menu and create a new spec"
  2754 
  2754 
  2755     |view|
  2755     |view|
  2756 
  2756 
  2757     self askForModification ifTrue:[
  2757     self askForModification ifTrue:[
  2758         view := Screen current viewFromUser.
  2758 	view := Screen current viewFromUser.
  2759         (view isNil or:[view == Screen current rootView]) ifTrue:[
  2759 	(view isNil or:[view == Screen current rootView]) ifTrue:[
  2760             ^ self
  2760 	    ^ self
  2761         ].
  2761 	].
  2762         view specClass == MenuPanelSpec ifTrue:[
  2762 	view specClass == MenuPanelSpec ifTrue:[
  2763             specSelector := #pickedMenu.
  2763 	    specSelector := #pickedMenu.
  2764             self buildFromMenu:(view asMenu) selector:specSelector.
  2764 	    self buildFromMenu:(view asMenu) selector:specSelector.
  2765         ].
  2765 	].
  2766     ].
  2766     ].
  2767 !
  2767 !
  2768 
  2768 
  2769 doSave
  2769 doSave
  2770     "save current editing menu to
  2770     "save current editing menu to
  2771            class: specClass
  2771 	   class: specClass
  2772         selector: specSelector
  2772 	selector: specSelector
  2773     "
  2773     "
  2774     |cls specCode mthd category code excla s|
  2774     |cls specCode mthd category code excla s|
  2775 
  2775 
  2776     self isEditingSpecOnly ifTrue:[
  2776     self isEditingSpecOnly ifTrue:[
  2777         savedSpec := self generateMenuSpec.
  2777 	savedSpec := self generateMenuSpec.
  2778         hasSaved := true.
  2778 	hasSaved := true.
  2779         self clearModified.
  2779 	self clearModified.
  2780         ^ self
  2780 	^ self
  2781     ].
  2781     ].
  2782 
  2782 
  2783     super doSave ifFalse: [^nil].
  2783     super doSave ifFalse: [^nil].
  2784     specCode := self generateMenuSpecString.
  2784     specCode := self generateMenuSpecString.
  2785     specCode isNil ifTrue:[^ nil].
  2785     specCode isNil ifTrue:[^ nil].
  2788 
  2788 
  2789     "/ if that method already exists, do not overwrite the category
  2789     "/ if that method already exists, do not overwrite the category
  2790 
  2790 
  2791     category := 'menu specs'.
  2791     category := 'menu specs'.
  2792     (mthd := cls class compiledMethodAt:specSelector) notNil ifTrue:[
  2792     (mthd := cls class compiledMethodAt:specSelector) notNil ifTrue:[
  2793         category := mthd category.
  2793 	category := mthd category.
  2794     ].
  2794     ].
  2795 
  2795 
  2796     s := '' writeStream.
  2796     s := '' writeStream.
  2797 
  2797 
  2798     s nextPutChunkSeparator;
  2798     s nextPutChunkSeparator;
  2802       nextPutChunkSeparator;
  2802       nextPutChunkSeparator;
  2803       cr; cr;
  2803       cr; cr;
  2804       nextPutAll:specSelector;
  2804       nextPutAll:specSelector;
  2805       cr;
  2805       cr;
  2806       nextPutAllAsChunk:(self class codeGenerationComment) withCRs;
  2806       nextPutAllAsChunk:(self class codeGenerationComment) withCRs;
  2807       cr; cr; 
  2807       cr; cr;
  2808       nextPutLine:'    "';
  2808       nextPutLine:'    "';
  2809       nextPutLine:('     MenuEditor new openOnClass:' , cls name , ' andSelector:#' , specSelector);
  2809       nextPutLine:('     MenuEditor new openOnClass:' , cls name , ' andSelector:#' , specSelector);
  2810       nextPutLine:('     (Menu new fromLiteralArrayEncoding:(' , cls name , ' ' , specSelector , ')) startUp');
  2810       nextPutLine:('     (Menu new fromLiteralArrayEncoding:(' , cls name , ' ' , specSelector , ')) startUp');
  2811       nextPutLine:'    "';
  2811       nextPutLine:'    "';
  2812       cr;
  2812       cr;
  2819       cr.
  2819       cr.
  2820 
  2820 
  2821     (ReadStream on:s contents) fileIn.
  2821     (ReadStream on:s contents) fileIn.
  2822 
  2822 
  2823     self isStandAlone ifTrue:[
  2823     self isStandAlone ifTrue:[
  2824         self helpTool doSave
  2824 	self helpTool doSave
  2825     ].
  2825     ].
  2826 
  2826 
  2827     self updateHistory.
  2827     self updateHistory.
  2828     hasSaved := true.
  2828     hasSaved := true.
  2829     self clearModified.
  2829     self clearModified.
  2846     |code|
  2846     |code|
  2847 
  2847 
  2848     code := self generateMenuSpecString.
  2848     code := self generateMenuSpecString.
  2849 
  2849 
  2850     code notNil ifTrue:[
  2850     code notNil ifTrue:[
  2851         CodeView openWith:code title: 'Menu Spec'
  2851 	CodeView openWith:code title: 'Menu Spec'
  2852     ].
  2852     ].
  2853 
  2853 
  2854     "Modified: / 29-11-2011 / 11:28:12 / cg"
  2854     "Modified: / 29-11-2011 / 11:28:12 / cg"
  2855 !
  2855 !
  2856 
  2856 
  2868 
  2868 
  2869     selectedItem canAddDelayedMenu      ifFalse:[ ^ self ].
  2869     selectedItem canAddDelayedMenu      ifFalse:[ ^ self ].
  2870     self askForItemModification ifFalse:[ ^ self ].
  2870     self askForItemModification ifFalse:[ ^ self ].
  2871 
  2871 
  2872     what == #menu ifTrue:[ delayedItem := RegularMenuItem new ]
  2872     what == #menu ifTrue:[ delayedItem := RegularMenuItem new ]
  2873                  ifFalse:[ delayedItem := LinkedMenuItem new ].
  2873 		 ifFalse:[ delayedItem := LinkedMenuItem new ].
  2874 
  2874 
  2875     delayedItem setExpanded:true.
  2875     delayedItem setExpanded:true.
  2876     delayedItem := selectedItem add:delayedItem.
  2876     delayedItem := selectedItem add:delayedItem.
  2877 
  2877 
  2878     delayedItem notNil ifTrue:[
  2878     delayedItem notNil ifTrue:[
  2879         self selectedItem:delayedItem.
  2879 	self selectedItem:delayedItem.
  2880     ].
  2880     ].
  2881 
  2881 
  2882     "Modified: / 29-11-2011 / 11:28:09 / cg"
  2882     "Modified: / 29-11-2011 / 11:28:09 / cg"
  2883 !
  2883 !
  2884 
  2884 
  2920 
  2920 
  2921 doCreateStandardEditMenu
  2921 doCreateStandardEditMenu
  2922     "create a standard edit menu
  2922     "create a standard edit menu
  2923     "
  2923     "
  2924     self addAndSelectValueOf:[
  2924     self addAndSelectValueOf:[
  2925         RegularMenuItem menu:(self class standardEditMenu) labeled:'Edit' translateLabel:true
  2925 	RegularMenuItem menu:(self class standardEditMenu) labeled:'Edit' translateLabel:true
  2926     ].
  2926     ].
  2927 !
  2927 !
  2928 
  2928 
  2929 doCreateStandardFileMenu
  2929 doCreateStandardFileMenu
  2930     "create a standard file menu
  2930     "create a standard file menu
  2931     "
  2931     "
  2932     self addAndSelectValueOf:[
  2932     self addAndSelectValueOf:[
  2933         RegularMenuItem menu:(self class standardFileMenu) labeled:'File' translateLabel:true
  2933 	RegularMenuItem menu:(self class standardFileMenu) labeled:'File' translateLabel:true
  2934     ].
  2934     ].
  2935 !
  2935 !
  2936 
  2936 
  2937 doCreateStandardHelpMenu
  2937 doCreateStandardHelpMenu
  2938     "create a standard help menu
  2938     "create a standard help menu
  2939     "
  2939     "
  2940     |item|
  2940     |item|
  2941 
  2941 
  2942     self addAndSelectValueOf:[
  2942     self addAndSelectValueOf:[
  2943         item := RegularMenuItem menu:(self class standardHelpMenu) labeled:'Help' translateLabel:true.
  2943 	item := RegularMenuItem menu:(self class standardHelpMenu) labeled:'Help' translateLabel:true.
  2944         item aspectAt:#startGroup put:#conditionalRight.
  2944 	item aspectAt:#startGroup put:#conditionalRight.
  2945         item
  2945 	item
  2946     ].
  2946     ].
  2947 
  2947 
  2948     "Modified: / 16-10-2006 / 12:49:27 / cg"
  2948     "Modified: / 16-10-2006 / 12:49:27 / cg"
  2949 ! !
  2949 ! !
  2950 
  2950 
  3131     (items conform:[:i | i canMoveUpOrDown]) ifFalse:[^ self].
  3131     (items conform:[:i | i canMoveUpOrDown]) ifFalse:[^ self].
  3132 
  3132 
  3133     self askForItemModification ifFalse:[ ^ self ].
  3133     self askForItemModification ifFalse:[ ^ self ].
  3134 
  3134 
  3135     self withoutNotifyDo:[
  3135     self withoutNotifyDo:[
  3136         itemsSortedByIndex := items copy.
  3136 	itemsSortedByIndex := items copy.
  3137         (items collect:[:i | listOfItems identityIndexOf:i])
  3137 	(items collect:[:i | listOfItems identityIndexOf:i])
  3138             sortWith:itemsSortedByIndex.
  3138 	    sortWith:itemsSortedByIndex.
  3139 
  3139 
  3140         aDirectionSymbol == #down ifTrue:[
  3140 	aDirectionSymbol == #down ifTrue:[
  3141             itemsSortedByIndex := itemsSortedByIndex reversed
  3141 	    itemsSortedByIndex := itemsSortedByIndex reversed
  3142         ].
  3142 	].
  3143         itemsSortedByIndex do:[:item |
  3143 	itemsSortedByIndex do:[:item |
  3144             parent   := item parent.
  3144 	    parent   := item parent.
  3145             children := parent children.
  3145 	    children := parent children.
  3146             index    := children identityIndexOf:item.
  3146 	    index    := children identityIndexOf:item.
  3147 
  3147 
  3148             selectionHolder setValue:#().
  3148 	    selectionHolder setValue:#().
  3149             children removeIndex:index.
  3149 	    children removeIndex:index.
  3150 
  3150 
  3151             aDirectionSymbol == #up ifTrue:[
  3151 	    aDirectionSymbol == #up ifTrue:[
  3152                 index == 1 ifTrue:[ children add:item ]
  3152 		index == 1 ifTrue:[ children add:item ]
  3153                         ifFalse:[ children add:item beforeIndex:index - 1 ]
  3153 			ifFalse:[ children add:item beforeIndex:index - 1 ]
  3154             ] ifFalse:[
  3154 	    ] ifFalse:[
  3155                 index > children size ifTrue:[ children addFirst:item ]
  3155 		index > children size ifTrue:[ children addFirst:item ]
  3156                                     ifFalse:[ children add:item afterIndex:index ]
  3156 				    ifFalse:[ children add:item afterIndex:index ]
  3157             ].
  3157 	    ].
  3158             parent childrenOrderChanged.
  3158 	    parent childrenOrderChanged.
  3159         ]
  3159 	]
  3160     ].
  3160     ].
  3161     self selectedItems:items.
  3161     self selectedItems:items.
  3162     self setModified.
  3162     self setModified.
  3163 
  3163 
  3164     "Modified: / 18-01-2012 / 11:35:38 / cg"
  3164     "Modified: / 18-01-2012 / 11:35:38 / cg"
  3186     "
  3186     "
  3187 
  3187 
  3188     <resource: #image>
  3188     <resource: #image>
  3189 
  3189 
  3190     ^Icon
  3190     ^Icon
  3191         constantNamed:'MenuEditor::Item class iconDelayedLinkedMenu'
  3191 	constantNamed:'MenuEditor::Item class iconDelayedLinkedMenu'
  3192         ifAbsentPut:[(Depth4Image new) width: 20; height: 16; photometric:(#palette); bitsPerSample:(#(4)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
  3192 	ifAbsentPut:[(Depth4Image new) width: 20; height: 16; photometric:(#palette); bitsPerSample:(#(4)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
  3193 @@@@@@@@@@@@@@DQDQDQDQDQDR@AH"H"H"H"H"H0@@@BH"H"@@@BL@QDPBH"H"@@H#@DQDPBH@H"@"H0ADQDPBA@H"H"L@@@QDP@Q@@@@C@ADPQDQDQ@DQD:
  3193 @@@@@@@@@@@@@@DQDQDQDQDQDR@AH"H"H"H"H"H0@@@BH"H"@@@BL@QDPBH"H"@@H#@DQDPBH@H"@"H0ADQDPBA@H"H"L@@@QDP@Q@@@@C@ADPQDQDQ@DQD:
  3194 @RH QDQDQ@H"L@D"H QDQD@"H#@A@@@@@DP@@@@0@QDQDQA@DQDQL@D"H"H @"H"H#@BL3L3L3L3L3L0@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127 255 0 0]; mask:((Depth1Image new) width: 20; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???0???0???0???0???0???0???0???0???0???0???0???0???0???0???0???0') ; yourself); yourself]
  3194 @RH QDQDQ@H"L@D"H QDQD@"H#@A@@@@@DP@@@@0@QDQDQA@DQDQL@D"H"H @"H"H#@BL3L3L3L3L3L0@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127 255 0 0]; mask:((Depth1Image new) width: 20; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???0???0???0???0???0???0???0???0???0???0???0???0???0???0???0???0') ; yourself); yourself]
  3195 !
  3195 !
  3196 
  3196 
  3197 iconDelayedMenu
  3197 iconDelayedMenu
  3208     "
  3208     "
  3209 
  3209 
  3210     <resource: #image>
  3210     <resource: #image>
  3211 
  3211 
  3212     ^Icon
  3212     ^Icon
  3213         constantNamed:'MenuEditor::Item class iconDelayedMenu'
  3213 	constantNamed:'MenuEditor::Item class iconDelayedMenu'
  3214         ifAbsentPut:[(Depth2Image new) width: 20; height: 16; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@UUUUUVA*****,F***@B0Z***@+A****J,F*****0@@@@@@AUUUUUXF*****0Z****+A@@@@@LEUUUUU0Z****+B?????<@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 20; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???0???0???0???0???0???0???0???0???0???0???0???0???0???0???0???0') ; yourself); yourself]
  3214 	ifAbsentPut:[(Depth2Image new) width: 20; height: 16; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@UUUUUVA*****,F***@B0Z***@+A****J,F*****0@@@@@@AUUUUUXF*****0Z****+A@@@@@LEUUUUU0Z****+B?????<@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 20; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???0???0???0???0???0???0???0???0???0???0???0???0???0???0???0???0') ; yourself); yourself]
  3215 !
  3215 !
  3216 
  3216 
  3217 iconItem
  3217 iconItem
  3218     "This resource specification was automatically generated
  3218     "This resource specification was automatically generated
  3219      by the ImageEditor of ST/X."
  3219      by the ImageEditor of ST/X."
  3228     "
  3228     "
  3229 
  3229 
  3230     <resource: #image>
  3230     <resource: #image>
  3231 
  3231 
  3232     ^Icon
  3232     ^Icon
  3233         constantNamed:'MenuEditor::Item class iconItem'
  3233 	constantNamed:'MenuEditor::Item class iconItem'
  3234         ifAbsentPut:[(Depth2Image new) width: 20; height: 16; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUUUUUUUP@@@@@@EUUUUU Z****+A.?/;+,F:::/>0[++>:;A...++,F::?..0Z****+B?????<@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 20; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@???0???0???0???0???0???0???0???0???0???0???0@@@@@@@@@@@@') ; yourself); yourself]
  3234 	ifAbsentPut:[(Depth2Image new) width: 20; height: 16; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUUUUUUUP@@@@@@EUUUUU Z****+A.?/;+,F:::/>0[++>:;A...++,F::?..0Z****+B?????<@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 20; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@???0???0???0???0???0???0???0???0???0???0???0@@@@@@@@@@@@') ; yourself); yourself]
  3235 !
  3235 !
  3236 
  3236 
  3237 iconLinkedMenu
  3237 iconLinkedMenu
  3238     "This resource specification was automatically generated
  3238     "This resource specification was automatically generated
  3239      by the ImageEditor of ST/X."
  3239      by the ImageEditor of ST/X."
  3248     "
  3248     "
  3249 
  3249 
  3250     <resource: #image>
  3250     <resource: #image>
  3251 
  3251 
  3252     ^Icon
  3252     ^Icon
  3253         constantNamed:'MenuEditor::Item class iconLinkedMenu'
  3253 	constantNamed:'MenuEditor::Item class iconLinkedMenu'
  3254         ifAbsentPut:[(Depth4Image new) width: 20; height: 16; photometric:(#palette); bitsPerSample:(#(4)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
  3254 	ifAbsentPut:[(Depth4Image new) width: 20; height: 16; photometric:(#palette); bitsPerSample:(#(4)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
  3255 @@@@@@@@@@@@@@QDQDQDQDQDQA@DH"H"H"H"H"HPABH@@@H"H"H"D@PQ@3L0DQDQDQ@D@@L3L0@@@@@PADPCL3L0PCADD@P"@@@3L0@3@!!@DH"H"@3L3L3@P
  3255 @@@@@@@@@@@@@@QDQDQDQDQDQA@DH"H"H"H"H"HPABH@@@H"H"H"D@PQ@3L0DQDQDQ@D@@L3L0@@@@@PADPCL3L0PCADD@P"@@@3L0@3@!!@DH"H"@3L3L3@P
  3256 AADQDQ@3L3L3@@P@@@@@@3L3LA@DQDQDQD@@L0PPABH"H"H"HC@"D@P"H"H"H"@BH!!@BDQDQDQDQDQDP@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 127 127 127 170 170 170 255 0 0 255 255 255]; mask:((Depth1Image new) width: 20; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???0???0???0???0???0???0???0???0???0???0???0???0???0???0???0???0') ; yourself); yourself]
  3256 AADQDQ@3L3L3@@P@@@@@@3L3LA@DQDQDQD@@L0PPABH"H"H"HC@"D@P"H"H"H"@BH!!@BDQDQDQDQDQDP@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 127 127 127 170 170 170 255 0 0 255 255 255]; mask:((Depth1Image new) width: 20; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???0???0???0???0???0???0???0???0???0???0???0???0???0???0???0???0') ; yourself); yourself]
  3257 !
  3257 !
  3258 
  3258 
  3259 iconMenu
  3259 iconMenu
  3270     "
  3270     "
  3271 
  3271 
  3272     <resource: #image>
  3272     <resource: #image>
  3273 
  3273 
  3274     ^Icon
  3274     ^Icon
  3275         constantNamed:'MenuEditor::Item class iconMenu'
  3275 	constantNamed:'MenuEditor::Item class iconMenu'
  3276         ifAbsentPut:[(Depth2Image new) width: 20; height: 16; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@?????=C*****$N*****P5UUUUUC@@@@@DO?????P:****)C*****$MUUUUUP0@@@@AC?????4N*****P:****)BUUUUUT@@@@@@@b') ; colorMapFromArray:#[0 0 0 127 127 127 170 170 170 255 255 255]; mask:((Depth1Image new) width: 20; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???0???0???0???0???0???0???0???0???0???0???0???0???0???0???0???0') ; yourself); yourself]
  3276 	ifAbsentPut:[(Depth2Image new) width: 20; height: 16; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@?????=C*****$N*****P5UUUUUC@@@@@DO?????P:****)C*****$MUUUUUP0@@@@AC?????4N*****P:****)BUUUUUT@@@@@@@b') ; colorMapFromArray:#[0 0 0 127 127 127 170 170 170 255 255 255]; mask:((Depth1Image new) width: 20; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???0???0???0???0???0???0???0???0???0???0???0???0???0???0???0???0') ; yourself); yourself]
  3277 !
  3277 !
  3278 
  3278 
  3279 iconSeparator
  3279 iconSeparator
  3280     "This resource specification was automatically generated
  3280     "This resource specification was automatically generated
  3281      by the ImageEditor of ST/X."
  3281      by the ImageEditor of ST/X."
  3290     "
  3290     "
  3291 
  3291 
  3292     <resource: #image>
  3292     <resource: #image>
  3293 
  3293 
  3294     ^Icon
  3294     ^Icon
  3295         constantNamed:'MenuEditor::Item class iconSeparator'
  3295 	constantNamed:'MenuEditor::Item class iconSeparator'
  3296         ifAbsentPut:[(Depth2Image new) width: 20; height: 16; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUUUUUUUP@@@@@@EUUUUU Z****+A*****,F????:0[@@@@[A)UUUU,F*****0Z****+B?????<@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 20; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@???0???0???0???0???0???0???0???0???0???0???0@@@@@@@@@@@@') ; yourself); yourself]
  3296 	ifAbsentPut:[(Depth2Image new) width: 20; height: 16; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'UUUUUUUUUUUUUP@@@@@@EUUUUU Z****+A*****,F????:0[@@@@[A)UUUU,F*****0Z****+B?????<@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255 170 170 170 127 127 127]; mask:((Depth1Image new) width: 20; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@???0???0???0???0???0???0???0???0???0???0???0@@@@@@@@@@@@') ; yourself); yourself]
  3297 !
  3297 !
  3298 
  3298 
  3299 iconSliceMenu
  3299 iconSliceMenu
  3300     "This resource specification was automatically generated
  3300     "This resource specification was automatically generated
  3301      by the ImageEditor of ST/X."
  3301      by the ImageEditor of ST/X."
  3310     "
  3310     "
  3311 
  3311 
  3312     <resource: #image>
  3312     <resource: #image>
  3313 
  3313 
  3314     ^Icon
  3314     ^Icon
  3315         constantNamed:'MenuEditor::Item class iconSliceMenu'
  3315 	constantNamed:'MenuEditor::Item class iconSliceMenu'
  3316         ifAbsentPut:[(Depth2Image new) width: 20; height: 16; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@O?????0:*****C/?6??XN:*[*) ;*).*&C.*&:*XN5U[UU :*****C*****(@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 127 127 127 170 170 170 255 255 255]; mask:((Depth1Image new) width: 20; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@???0???0???0???0???0???0???0???0???0???0???0@@@@@@@@@@@@') ; yourself); yourself]
  3316 	ifAbsentPut:[(Depth2Image new) width: 20; height: 16; photometric:(#palette); bitsPerSample:(#(2)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@O?????0:*****C/?6??XN:*[*) ;*).*&C.*&:*XN5U[UU :*****C*****(@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 127 127 127 170 170 170 255 255 255]; mask:((Depth1Image new) width: 20; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@???0???0???0???0???0???0???0???0???0???0???0@@@@@@@@@@@@') ; yourself); yourself]
  3317 ! !
  3317 ! !
  3318 
  3318 
  3319 !MenuEditor::Item class methodsFor:'instance creation'!
  3319 !MenuEditor::Item class methodsFor:'instance creation'!
  3320 
  3320 
  3321 classFor:aMenuItem
  3321 classFor:aMenuItem
  3358      UIPainter new openOnClass:MenuEditor::Item andSelector:#detailsEditSpec
  3358      UIPainter new openOnClass:MenuEditor::Item andSelector:#detailsEditSpec
  3359     "
  3359     "
  3360 
  3360 
  3361     <resource: #canvas>
  3361     <resource: #canvas>
  3362 
  3362 
  3363     ^ 
  3363     ^
  3364      #(FullSpec
  3364      #(FullSpec
  3365         name: detailsEditSpec
  3365 	name: detailsEditSpec
  3366         window: 
  3366 	window:
  3367        (WindowSpec
  3367        (WindowSpec
  3368           label: 'Details Edit'
  3368 	  label: 'Details Edit'
  3369           name: 'Details Edit'
  3369 	  name: 'Details Edit'
  3370           min: (Point 10 10)
  3370 	  min: (Point 10 10)
  3371           bounds: (Rectangle 0 0 407 291)
  3371 	  bounds: (Rectangle 0 0 407 291)
  3372         )
  3372 	)
  3373         component: 
  3373 	component:
  3374        (SpecCollection
  3374        (SpecCollection
  3375           collection: (
  3375 	  collection: (
  3376            (LabelSpec
  3376 	   (LabelSpec
  3377               label: 'Accelerator:'
  3377 	      label: 'Accelerator:'
  3378               name: 'shortcutKeyLabel'
  3378 	      name: 'shortcutKeyLabel'
  3379               layout: (AlignmentOrigin 107 0 26 0 1 0.5)
  3379 	      layout: (AlignmentOrigin 107 0 26 0 1 0.5)
  3380               activeHelpKey: detailsAccelerator
  3380 	      activeHelpKey: detailsAccelerator
  3381               translateLabel: true
  3381 	      translateLabel: true
  3382               resizeForLabel: true
  3382 	      resizeForLabel: true
  3383               adjust: right
  3383 	      adjust: right
  3384             )
  3384 	    )
  3385            (InputFieldSpec
  3385 	   (InputFieldSpec
  3386               name: 'shortcutKeyField'
  3386 	      name: 'shortcutKeyField'
  3387               layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0)
  3387 	      layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0)
  3388               activeHelpKey: detailsAccelerator
  3388 	      activeHelpKey: detailsAccelerator
  3389               tabable: true
  3389 	      tabable: true
  3390               model: shortcutKeyCharacter
  3390 	      model: shortcutKeyCharacter
  3391               group: inputGroup
  3391 	      group: inputGroup
  3392               type: symbolOrNil
  3392 	      type: symbolOrNil
  3393               immediateAccept: false
  3393 	      immediateAccept: false
  3394               acceptOnReturn: true
  3394 	      acceptOnReturn: true
  3395               acceptOnTab: true
  3395 	      acceptOnTab: true
  3396               acceptChannel: acceptChannel
  3396 	      acceptChannel: acceptChannel
  3397               modifiedChannel: modifiedChannel
  3397 	      modifiedChannel: modifiedChannel
  3398               acceptOnPointerLeave: false
  3398 	      acceptOnPointerLeave: false
  3399             )
  3399 	    )
  3400            (LabelSpec
  3400 	   (LabelSpec
  3401               label: 'Enabled:'
  3401 	      label: 'Enabled:'
  3402               name: 'enabledLabel'
  3402 	      name: 'enabledLabel'
  3403               layout: (AlignmentOrigin 107 0 51 0 1 0.5)
  3403 	      layout: (AlignmentOrigin 107 0 51 0 1 0.5)
  3404               activeHelpKey: detailsEnabled
  3404 	      activeHelpKey: detailsEnabled
  3405               translateLabel: true
  3405 	      translateLabel: true
  3406               resizeForLabel: true
  3406 	      resizeForLabel: true
  3407               adjust: right
  3407 	      adjust: right
  3408             )
  3408 	    )
  3409            (InputFieldSpec
  3409 	   (InputFieldSpec
  3410               name: 'enabledField'
  3410 	      name: 'enabledField'
  3411               layout: (LayoutFrame 110 0 40 0 -25 1.0 62 0)
  3411 	      layout: (LayoutFrame 110 0 40 0 -25 1.0 62 0)
  3412               activeHelpKey: detailsEnabled
  3412 	      activeHelpKey: detailsEnabled
  3413               tabable: true
  3413 	      tabable: true
  3414               model: enabled
  3414 	      model: enabled
  3415               group: inputGroup
  3415 	      group: inputGroup
  3416               type: symbolOrBooleanOrNil
  3416 	      type: symbolOrBooleanOrNil
  3417               immediateAccept: false
  3417 	      immediateAccept: false
  3418               acceptOnReturn: true
  3418 	      acceptOnReturn: true
  3419               acceptOnTab: true
  3419 	      acceptOnTab: true
  3420               acceptChannel: acceptChannel
  3420 	      acceptChannel: acceptChannel
  3421               modifiedChannel: modifiedChannel
  3421 	      modifiedChannel: modifiedChannel
  3422               acceptOnPointerLeave: false
  3422 	      acceptOnPointerLeave: false
  3423             )
  3423 	    )
  3424            (ActionButtonSpec
  3424 	   (ActionButtonSpec
  3425               label: 'browseActionImage'
  3425 	      label: 'browseActionImage'
  3426               name: 'Button1'
  3426 	      name: 'Button1'
  3427               layout: (LayoutFrame -25 1 40 0 -5 1 62 0)
  3427 	      layout: (LayoutFrame -25 1 40 0 -5 1 62 0)
  3428               activeHelpKey: browseMethod
  3428 	      activeHelpKey: browseMethod
  3429               hasCharacterOrientedLabel: false
  3429 	      hasCharacterOrientedLabel: false
  3430               translateLabel: true
  3430 	      translateLabel: true
  3431               resizeForLabel: true
  3431 	      resizeForLabel: true
  3432               tabable: true
  3432 	      tabable: true
  3433               model: doBrowseEnabledMethod
  3433 	      model: doBrowseEnabledMethod
  3434             )
  3434 	    )
  3435            (LabelSpec
  3435 	   (LabelSpec
  3436               label: 'Visibility:'
  3436 	      label: 'Visibility:'
  3437               name: 'visibilityLabel'
  3437 	      name: 'visibilityLabel'
  3438               layout: (AlignmentOrigin 107 0 76 0 1 0.5)
  3438 	      layout: (AlignmentOrigin 107 0 76 0 1 0.5)
  3439               activeHelpKey: detailsVisibility
  3439 	      activeHelpKey: detailsVisibility
  3440               translateLabel: true
  3440 	      translateLabel: true
  3441               resizeForLabel: true
  3441 	      resizeForLabel: true
  3442               adjust: right
  3442 	      adjust: right
  3443             )
  3443 	    )
  3444            (InputFieldSpec
  3444 	   (InputFieldSpec
  3445               name: 'isVisibleInputField'
  3445 	      name: 'isVisibleInputField'
  3446               layout: (LayoutFrame 110 0 65 0 -25 1.0 87 0)
  3446 	      layout: (LayoutFrame 110 0 65 0 -25 1.0 87 0)
  3447               activeHelpKey: detailsVisibility
  3447 	      activeHelpKey: detailsVisibility
  3448               tabable: true
  3448 	      tabable: true
  3449               model: isVisible
  3449 	      model: isVisible
  3450               group: inputGroup
  3450 	      group: inputGroup
  3451               type: symbolOrBooleanOrNil
  3451 	      type: symbolOrBooleanOrNil
  3452               immediateAccept: false
  3452 	      immediateAccept: false
  3453               acceptOnReturn: true
  3453 	      acceptOnReturn: true
  3454               acceptOnTab: true
  3454 	      acceptOnTab: true
  3455               acceptChannel: acceptChannel
  3455 	      acceptChannel: acceptChannel
  3456               modifiedChannel: modifiedChannel
  3456 	      modifiedChannel: modifiedChannel
  3457               acceptOnPointerLeave: false
  3457 	      acceptOnPointerLeave: false
  3458             )
  3458 	    )
  3459            (ActionButtonSpec
  3459 	   (ActionButtonSpec
  3460               label: 'browseActionImage'
  3460 	      label: 'browseActionImage'
  3461               name: 'Button2'
  3461 	      name: 'Button2'
  3462               layout: (LayoutFrame -25 1 65 0 -5 1 87 0)
  3462 	      layout: (LayoutFrame -25 1 65 0 -5 1 87 0)
  3463               activeHelpKey: browseMethod
  3463 	      activeHelpKey: browseMethod
  3464               hasCharacterOrientedLabel: false
  3464 	      hasCharacterOrientedLabel: false
  3465               translateLabel: true
  3465 	      translateLabel: true
  3466               resizeForLabel: true
  3466 	      resizeForLabel: true
  3467               tabable: true
  3467 	      tabable: true
  3468               model: doBrowseVisibilityMethod
  3468 	      model: doBrowseVisibilityMethod
  3469             )
  3469 	    )
  3470            (LabelSpec
  3470 	   (LabelSpec
  3471               label: 'Aux Value'
  3471 	      label: 'Aux Value'
  3472               name: 'auxLabel'
  3472 	      name: 'auxLabel'
  3473               layout: (AlignmentOrigin 107 0 101 0 1 0.5)
  3473 	      layout: (AlignmentOrigin 107 0 101 0 1 0.5)
  3474               activeHelpKey: detailsAuxValue
  3474 	      activeHelpKey: detailsAuxValue
  3475               translateLabel: true
  3475 	      translateLabel: true
  3476               resizeForLabel: true
  3476 	      resizeForLabel: true
  3477               adjust: right
  3477 	      adjust: right
  3478             )
  3478 	    )
  3479            (InputFieldSpec
  3479 	   (InputFieldSpec
  3480               name: 'auxInputField'
  3480 	      name: 'auxInputField'
  3481               layout: (LayoutFrame 110 0 90 0 -5 1.0 112 0)
  3481 	      layout: (LayoutFrame 110 0 90 0 -5 1.0 112 0)
  3482               activeHelpKey: detailsAuxValue
  3482 	      activeHelpKey: detailsAuxValue
  3483               tabable: true
  3483 	      tabable: true
  3484               model: auxValue
  3484 	      model: auxValue
  3485               group: inputGroup
  3485 	      group: inputGroup
  3486               type: smalltalkObjectOrNil
  3486 	      type: smalltalkObjectOrNil
  3487               immediateAccept: false
  3487 	      immediateAccept: false
  3488               acceptOnReturn: true
  3488 	      acceptOnReturn: true
  3489               acceptOnTab: true
  3489 	      acceptOnTab: true
  3490               acceptChannel: acceptChannel
  3490 	      acceptChannel: acceptChannel
  3491               modifiedChannel: modifiedChannel
  3491 	      modifiedChannel: modifiedChannel
  3492               acceptOnPointerLeave: false
  3492 	      acceptOnPointerLeave: false
  3493             )
  3493 	    )
  3494            (LabelSpec
  3494 	   (LabelSpec
  3495               label: 'Start Group:'
  3495 	      label: 'Start Group:'
  3496               name: 'StartGroupLabel'
  3496 	      name: 'StartGroupLabel'
  3497               layout: (AlignmentOrigin 107 0 139 0 1 0.5)
  3497 	      layout: (AlignmentOrigin 107 0 139 0 1 0.5)
  3498               activeHelpKey: detailsStartGroup
  3498 	      activeHelpKey: detailsStartGroup
  3499               translateLabel: true
  3499 	      translateLabel: true
  3500               resizeForLabel: true
  3500 	      resizeForLabel: true
  3501               adjust: right
  3501 	      adjust: right
  3502             )
  3502 	    )
  3503            (PopUpListSpec
  3503 	   (PopUpListSpec
  3504               label: 'left'
  3504 	      label: 'left'
  3505               name: 'StartGroupPopUp'
  3505 	      name: 'StartGroupPopUp'
  3506               layout: (LayoutFrame 110 0 128 0 -5 1.0 150 0)
  3506 	      layout: (LayoutFrame 110 0 128 0 -5 1.0 150 0)
  3507               activeHelpKey: detailsStartGroup
  3507 	      activeHelpKey: detailsStartGroup
  3508               tabable: true
  3508 	      tabable: true
  3509               model: startGroup
  3509 	      model: startGroup
  3510               menu: 
  3510 	      menu:
  3511              (Array
  3511 	     (Array
  3512                 left right
  3512 		left right
  3513                 conditionalRight
  3513 		conditionalRight
  3514               )
  3514 	      )
  3515             )
  3515 	    )
  3516            (LabelSpec
  3516 	   (LabelSpec
  3517               label: 'Access Character Position:'
  3517 	      label: 'Access Character Position:'
  3518               name: 'accessCharLabel'
  3518 	      name: 'accessCharLabel'
  3519               layout: (AlignmentOrigin 217 0 170 0 1 0.5)
  3519 	      layout: (AlignmentOrigin 217 0 170 0 1 0.5)
  3520               translateLabel: true
  3520 	      translateLabel: true
  3521               resizeForLabel: true
  3521 	      resizeForLabel: true
  3522               adjust: right
  3522 	      adjust: right
  3523             )
  3523 	    )
  3524            (InputFieldSpec
  3524 	   (InputFieldSpec
  3525               name: 'accessCharField'
  3525 	      name: 'accessCharField'
  3526               layout: (LayoutFrame 220 0 159 0 -5 1.0 181 0)
  3526 	      layout: (LayoutFrame 220 0 159 0 -5 1.0 181 0)
  3527               activeHelpKey: detailsAccessCharaterPosition
  3527 	      activeHelpKey: detailsAccessCharaterPosition
  3528               tabable: true
  3528 	      tabable: true
  3529               model: accessCharacterPosition
  3529 	      model: accessCharacterPosition
  3530               group: inputGroup
  3530 	      group: inputGroup
  3531               type: numberOrNil
  3531 	      type: numberOrNil
  3532               immediateAccept: false
  3532 	      immediateAccept: false
  3533               acceptOnReturn: true
  3533 	      acceptOnReturn: true
  3534               acceptOnTab: true
  3534 	      acceptOnTab: true
  3535               acceptChannel: acceptChannel
  3535 	      acceptChannel: acceptChannel
  3536               modifiedChannel: modifiedChannel
  3536 	      modifiedChannel: modifiedChannel
  3537               acceptOnPointerLeave: false
  3537 	      acceptOnPointerLeave: false
  3538             )
  3538 	    )
  3539            (CheckBoxSpec
  3539 	   (CheckBoxSpec
  3540               label: 'Ignore Accelerator (i.e. Display Only)'
  3540 	      label: 'Ignore Accelerator (i.e. Display Only)'
  3541               name: 'ignoreShortcutKeysInItem'
  3541 	      name: 'ignoreShortcutKeysInItem'
  3542               layout: (AlignmentOrigin 42 0 204 0 0 0.5)
  3542 	      layout: (AlignmentOrigin 42 0 204 0 0 0.5)
  3543               activeHelpKey: detailsIgnoreAcceleratorKeys
  3543 	      activeHelpKey: detailsIgnoreAcceleratorKeys
  3544               visibilityChannel: hasNoSubmenu
  3544 	      visibilityChannel: hasNoSubmenu
  3545               model: ignoreShortcutKeys
  3545 	      model: ignoreShortcutKeys
  3546               translateLabel: true
  3546 	      translateLabel: true
  3547               resizeForLabel: true
  3547 	      resizeForLabel: true
  3548             )
  3548 	    )
  3549            (CheckBoxSpec
  3549 	   (CheckBoxSpec
  3550               label: 'Ignore Accelerators in Submenu'
  3550 	      label: 'Ignore Accelerators in Submenu'
  3551               name: 'ignoreShortcutKeys'
  3551 	      name: 'ignoreShortcutKeys'
  3552               layout: (AlignmentOrigin 42 0 204 0 0 0.5)
  3552 	      layout: (AlignmentOrigin 42 0 204 0 0 0.5)
  3553               activeHelpKey: detailsIgnoreAcceleratorKeys
  3553 	      activeHelpKey: detailsIgnoreAcceleratorKeys
  3554               visibilityChannel: hasSubmenu
  3554 	      visibilityChannel: hasSubmenu
  3555               model: ignoreShortcutKeys
  3555 	      model: ignoreShortcutKeys
  3556               translateLabel: true
  3556 	      translateLabel: true
  3557               resizeForLabel: true
  3557 	      resizeForLabel: true
  3558             )
  3558 	    )
  3559            (CheckBoxSpec
  3559 	   (CheckBoxSpec
  3560               label: 'Ignore Mnemonics in Submenu'
  3560 	      label: 'Ignore Mnemonics in Submenu'
  3561               name: 'ignoreMnemonicKeys'
  3561 	      name: 'ignoreMnemonicKeys'
  3562               layout: (AlignmentOrigin 42 0 232 0 0 0.5)
  3562 	      layout: (AlignmentOrigin 42 0 232 0 0 0.5)
  3563               activeHelpKey: detailsIgnoreMnemonicKeys
  3563 	      activeHelpKey: detailsIgnoreMnemonicKeys
  3564               visibilityChannel: hasSubmenu
  3564 	      visibilityChannel: hasSubmenu
  3565               model: ignoreMnemonicKeys
  3565 	      model: ignoreMnemonicKeys
  3566               translateLabel: true
  3566 	      translateLabel: true
  3567               resizeForLabel: true
  3567 	      resizeForLabel: true
  3568             )
  3568 	    )
  3569            (LabelSpec
  3569 	   (LabelSpec
  3570               label: 'Font:'
  3570 	      label: 'Font:'
  3571               name: 'fontLabel'
  3571 	      name: 'fontLabel'
  3572               layout: (AlignmentOrigin 107 0 271 0 1 0.5)
  3572 	      layout: (AlignmentOrigin 107 0 271 0 1 0.5)
  3573               translateLabel: true
  3573 	      translateLabel: true
  3574               resizeForLabel: true
  3574 	      resizeForLabel: true
  3575               adjust: right
  3575 	      adjust: right
  3576             )
  3576 	    )
  3577            (FontMenuSpec
  3577 	   (FontMenuSpec
  3578               name: 'fontMenu'
  3578 	      name: 'fontMenu'
  3579               layout: (LayoutFrame 110 0 260 0 -5 1.0 282 0)
  3579 	      layout: (LayoutFrame 110 0 260 0 -5 1.0 282 0)
  3580               activeHelpKey: fontMenu
  3580 	      activeHelpKey: fontMenu
  3581               model: font
  3581 	      model: font
  3582               allowSymbolicFonts: true
  3582 	      allowSymbolicFonts: true
  3583             )
  3583 	    )
  3584            )
  3584 	   )
  3585          
  3585 
  3586         )
  3586 	)
  3587       )
  3587       )
  3588 
  3588 
  3589     "Modified: / 21-10-2010 / 14:15:09 / cg"
  3589     "Modified: / 21-10-2010 / 14:15:09 / cg"
  3590 ! !
  3590 ! !
  3591 
  3591 
  3698 
  3698 
  3699 fromAspects:aspects
  3699 fromAspects:aspects
  3700     "read values from aspects
  3700     "read values from aspects
  3701     "
  3701     "
  3702     MenuEditor aspects do:[:aKey|
  3702     MenuEditor aspects do:[:aKey|
  3703         self aspectAt:aKey put:((aspects at:aKey) value).
  3703 	self aspectAt:aKey put:((aspects at:aKey) value).
  3704     ].
  3704     ].
  3705     self validateMenuItem.
  3705     self validateMenuItem.
  3706     self changed.
  3706     self changed.
  3707 !
  3707 !
  3708 
  3708 
  3721     "validate the menuItem for correctness"
  3721     "validate the menuItem for correctness"
  3722 
  3722 
  3723     menuItem isNil ifTrue:[^ self].
  3723     menuItem isNil ifTrue:[^ self].
  3724 
  3724 
  3725     menuItem choice isEmptyOrNil ifTrue:[
  3725     menuItem choice isEmptyOrNil ifTrue:[
  3726         menuItem choice:nil.
  3726 	menuItem choice:nil.
  3727         menuItem choiceValue:nil.
  3727 	menuItem choiceValue:nil.
  3728     ].
  3728     ].
  3729 ! !
  3729 ! !
  3730 
  3730 
  3731 !MenuEditor::Item methodsFor:'displaying'!
  3731 !MenuEditor::Item methodsFor:'displaying'!
  3732 
  3732 
  3842     |aspects|
  3842     |aspects|
  3843 
  3843 
  3844     aspects := OrderedCollection new.
  3844     aspects := OrderedCollection new.
  3845 
  3845 
  3846     #( indication choice enabled isVisible ) do:[:aKey| |sel|
  3846     #( indication choice enabled isVisible ) do:[:aKey| |sel|
  3847         sel := menuItem perform:aKey.
  3847 	sel := menuItem perform:aKey.
  3848         sel isSymbol ifTrue:[ aspects add:sel ]
  3848 	sel isSymbol ifTrue:[ aspects add:sel ]
  3849     ].
  3849     ].
  3850     ^ aspects
  3850     ^ aspects
  3851 ! !
  3851 ! !
  3852 
  3852 
  3853 !MenuEditor::Item methodsFor:'queries-operation'!
  3853 !MenuEditor::Item methodsFor:'queries-operation'!
  3925      MenuEditor::ImageResourceEditor open
  3925      MenuEditor::ImageResourceEditor open
  3926     "
  3926     "
  3927 
  3927 
  3928     <resource: #canvas>
  3928     <resource: #canvas>
  3929 
  3929 
  3930     ^ 
  3930     ^
  3931      #(FullSpec
  3931      #(FullSpec
  3932         name: windowSpec
  3932 	name: windowSpec
  3933         window: 
  3933 	window:
  3934        (WindowSpec
  3934        (WindowSpec
  3935           label: 'Image Item'
  3935 	  label: 'Image Item'
  3936           name: 'Image Item'
  3936 	  name: 'Image Item'
  3937           min: (Point 10 10)
  3937 	  min: (Point 10 10)
  3938           bounds: (Rectangle 0 0 303 304)
  3938 	  bounds: (Rectangle 0 0 303 304)
  3939         )
  3939 	)
  3940         component: 
  3940 	component:
  3941        (SpecCollection
  3941        (SpecCollection
  3942           collection: (
  3942 	  collection: (
  3943            (LabelSpec
  3943 	   (LabelSpec
  3944               label: 'Retriever:'
  3944 	      label: 'Retriever:'
  3945               name: 'retrieverLabel'
  3945 	      name: 'retrieverLabel'
  3946               layout: (AlignmentOrigin 107 0 26 0 1 0.5)
  3946 	      layout: (AlignmentOrigin 107 0 26 0 1 0.5)
  3947               activeHelpKey: imageRetriever
  3947 	      activeHelpKey: imageRetriever
  3948               translateLabel: true
  3948 	      translateLabel: true
  3949               resizeForLabel: true
  3949 	      resizeForLabel: true
  3950               adjust: right
  3950 	      adjust: right
  3951             )
  3951 	    )
  3952            (ComboBoxSpec
  3952 	   (ComboBoxSpec
  3953               name: 'retrieverHolder'
  3953 	      name: 'retrieverHolder'
  3954               layout: (LayoutFrame 110 0 15 0 -2 1.0 37 0)
  3954 	      layout: (LayoutFrame 110 0 15 0 -2 1.0 37 0)
  3955               activeHelpKey: imageRetriever
  3955 	      activeHelpKey: imageRetriever
  3956               tabable: true
  3956 	      tabable: true
  3957               model: retrieverHolder
  3957 	      model: retrieverHolder
  3958               type: symbolOrNil
  3958 	      type: symbolOrNil
  3959               immediateAccept: true
  3959 	      immediateAccept: true
  3960               acceptOnReturn: false
  3960 	      acceptOnReturn: false
  3961               acceptOnTab: false
  3961 	      acceptOnTab: false
  3962               acceptOnPointerLeave: false
  3962 	      acceptOnPointerLeave: false
  3963               entryCompletionBlock: entryCompletionForRetriever
  3963 	      entryCompletionBlock: entryCompletionForRetriever
  3964               comboList: retrieverList
  3964 	      comboList: retrieverList
  3965               isFilenameBox: false
  3965 	      isFilenameBox: false
  3966             )
  3966 	    )
  3967            (LabelSpec
  3967 	   (LabelSpec
  3968               label: 'Selector:'
  3968 	      label: 'Selector:'
  3969               name: 'iconLabel'
  3969 	      name: 'iconLabel'
  3970               layout: (AlignmentOrigin 107 0 51 0 1 0.5)
  3970 	      layout: (AlignmentOrigin 107 0 51 0 1 0.5)
  3971               activeHelpKey: imageSelector
  3971 	      activeHelpKey: imageSelector
  3972               translateLabel: true
  3972 	      translateLabel: true
  3973               resizeForLabel: true
  3973 	      resizeForLabel: true
  3974               adjust: right
  3974 	      adjust: right
  3975             )
  3975 	    )
  3976            (InputFieldSpec
  3976 	   (InputFieldSpec
  3977               name: 'selectorHolder'
  3977 	      name: 'selectorHolder'
  3978               layout: (LayoutFrame 110 0 40 0 -24 1.0 62 0)
  3978 	      layout: (LayoutFrame 110 0 40 0 -24 1.0 62 0)
  3979               activeHelpKey: imageSelector
  3979 	      activeHelpKey: imageSelector
  3980               tabable: true
  3980 	      tabable: true
  3981               model: selectorHolder
  3981 	      model: selectorHolder
  3982               group: inputGroup
  3982 	      group: inputGroup
  3983               type: symbolOrNil
  3983 	      type: symbolOrNil
  3984               immediateAccept: true
  3984 	      immediateAccept: true
  3985               acceptOnReturn: false
  3985 	      acceptOnReturn: false
  3986               acceptOnTab: false
  3986 	      acceptOnTab: false
  3987               modifiedChannel: modifiedChannel
  3987 	      modifiedChannel: modifiedChannel
  3988               acceptOnPointerLeave: false
  3988 	      acceptOnPointerLeave: false
  3989             )
  3989 	    )
  3990            (ActionButtonSpec
  3990 	   (ActionButtonSpec
  3991               label: '...'
  3991 	      label: '...'
  3992               name: 'browseButton'
  3992 	      name: 'browseButton'
  3993               layout: (LayoutFrame -22 1 40 0 -2 1 62 0)
  3993 	      layout: (LayoutFrame -22 1 40 0 -2 1 62 0)
  3994               activeHelpKey: browseResource
  3994 	      activeHelpKey: browseResource
  3995               tabable: true
  3995 	      tabable: true
  3996               model: doBrowseForImageResource
  3996 	      model: doBrowseForImageResource
  3997             )
  3997 	    )
  3998            (DividerSpec
  3998 	   (DividerSpec
  3999               name: 'Separator1'
  3999 	      name: 'Separator1'
  4000               layout: (LayoutFrame 0 0.0 66 0 0 1.0 70 0)
  4000 	      layout: (LayoutFrame 0 0.0 66 0 0 1.0 70 0)
  4001             )
  4001 	    )
  4002            (ViewSpec
  4002 	   (ViewSpec
  4003               name: 'SelectorFilterBox2'
  4003 	      name: 'SelectorFilterBox2'
  4004               layout: (LayoutFrame 0 0.0 74 0 0 1.0 96 0)
  4004 	      layout: (LayoutFrame 0 0.0 74 0 0 1.0 96 0)
  4005               activeHelpKey: selectorFilter
  4005 	      activeHelpKey: selectorFilter
  4006               component: 
  4006 	      component:
  4007              (SpecCollection
  4007 	     (SpecCollection
  4008                 collection: (
  4008 		collection: (
  4009                  (LabelSpec
  4009 		 (LabelSpec
  4010                     label: 'Filter:'
  4010 		    label: 'Filter:'
  4011                     name: 'Label1'
  4011 		    name: 'Label1'
  4012                     layout: (AlignmentOrigin 107 0 11 0 1 0.5)
  4012 		    layout: (AlignmentOrigin 107 0 11 0 1 0.5)
  4013                     activeHelpKey: selectorFilter
  4013 		    activeHelpKey: selectorFilter
  4014                     translateLabel: true
  4014 		    translateLabel: true
  4015                     resizeForLabel: true
  4015 		    resizeForLabel: true
  4016                     adjust: right
  4016 		    adjust: right
  4017                   )
  4017 		  )
  4018                  (InputFieldSpec
  4018 		 (InputFieldSpec
  4019                     name: 'EntryField1'
  4019 		    name: 'EntryField1'
  4020                     layout: (LayoutFrame 110 0 0 0 -2 1 22 0)
  4020 		    layout: (LayoutFrame 110 0 0 0 -2 1 22 0)
  4021                     model: selectorFilterHolder
  4021 		    model: selectorFilterHolder
  4022                     immediateAccept: true
  4022 		    immediateAccept: true
  4023                     acceptOnLeave: true
  4023 		    acceptOnLeave: true
  4024                     acceptOnReturn: false
  4024 		    acceptOnReturn: false
  4025                     acceptOnTab: false
  4025 		    acceptOnTab: false
  4026                     acceptOnPointerLeave: false
  4026 		    acceptOnPointerLeave: false
  4027                     activeHelpKey: selectorFilter
  4027 		    activeHelpKey: selectorFilter
  4028                   )
  4028 		  )
  4029                  )
  4029 		 )
  4030                
  4030 
  4031               )
  4031 	      )
  4032             )
  4032 	    )
  4033            (HierarchicalListViewSpec
  4033 	   (HierarchicalListViewSpec
  4034               name: 'imageList'
  4034 	      name: 'imageList'
  4035               layout: (LayoutFrame 2 0.0 100 0 -2 1.0 -60 1.0)
  4035 	      layout: (LayoutFrame 2 0.0 100 0 -2 1.0 -60 1.0)
  4036               activeHelpKey: imageImageList
  4036 	      activeHelpKey: imageImageList
  4037               model: imageHolder
  4037 	      model: imageHolder
  4038               menu: menuEditImage
  4038 	      menu: menuEditImage
  4039               hasHorizontalScrollBar: true
  4039 	      hasHorizontalScrollBar: true
  4040               hasVerticalScrollBar: true
  4040 	      hasVerticalScrollBar: true
  4041               miniScrollerHorizontal: true
  4041 	      miniScrollerHorizontal: true
  4042               listModel: imageList
  4042 	      listModel: imageList
  4043               useIndex: false
  4043 	      useIndex: false
  4044               highlightMode: label
  4044 	      highlightMode: label
  4045               postBuildCallback: postBuildImageViewer:
  4045 	      postBuildCallback: postBuildImageViewer:
  4046             )
  4046 	    )
  4047            (ViewSpec
  4047 	   (ViewSpec
  4048               name: 'Box1'
  4048 	      name: 'Box1'
  4049               layout: (LayoutFrame 20 0.0 -60 1.0 -20 1.0 0 1.0)
  4049 	      layout: (LayoutFrame 20 0.0 -60 1.0 -20 1.0 0 1.0)
  4050               level: 0
  4050 	      level: 0
  4051               component: 
  4051 	      component:
  4052              (SpecCollection
  4052 	     (SpecCollection
  4053                 collection: (
  4053 		collection: (
  4054                  (CheckBoxSpec
  4054 		 (CheckBoxSpec
  4055                     label: 'Image & Label'
  4055 		    label: 'Image & Label'
  4056                     name: 'iconAndLabelCheckBox'
  4056 		    name: 'iconAndLabelCheckBox'
  4057                     layout: (AlignmentOrigin 0 0 17 0 0 0.5)
  4057 		    layout: (AlignmentOrigin 0 0 17 0 0 0.5)
  4058                     activeHelpKey: imageImageAndLabel
  4058 		    activeHelpKey: imageImageAndLabel
  4059                     tabable: true
  4059 		    tabable: true
  4060                     model: iconAndLabelHolder
  4060 		    model: iconAndLabelHolder
  4061                     translateLabel: true
  4061 		    translateLabel: true
  4062                   )
  4062 		  )
  4063                  (ActionButtonSpec
  4063 		 (ActionButtonSpec
  4064                     label: 'Image Editor'
  4064 		    label: 'Image Editor'
  4065                     name: 'imageEditorButton'
  4065 		    name: 'imageEditorButton'
  4066                     layout: (AlignmentOrigin -69 1.0 17 0 0 0.5)
  4066 		    layout: (AlignmentOrigin -69 1.0 17 0 0 0.5)
  4067                     activeHelpKey: imageImageEditor
  4067 		    activeHelpKey: imageImageEditor
  4068                     hasCharacterOrientedLabel: false
  4068 		    hasCharacterOrientedLabel: false
  4069                     foregroundColor: (Color 0.0 0.0 66.9993133440146)
  4069 		    foregroundColor: (Color 0.0 0.0 66.9993133440146)
  4070                     tabable: true
  4070 		    tabable: true
  4071                     model: doEditImage
  4071 		    model: doEditImage
  4072                   )
  4072 		  )
  4073                  (ActionButtonSpec
  4073 		 (ActionButtonSpec
  4074                     label: 'Browse'
  4074 		    label: 'Browse'
  4075                     name: 'Button1'
  4075 		    name: 'Button1'
  4076                     layout: (AlignmentOrigin -69 1.0 41 0 0 0.5)
  4076 		    layout: (AlignmentOrigin -69 1.0 41 0 0 0.5)
  4077                     activeHelpKey: imageBrowseImageClass
  4077 		    activeHelpKey: imageBrowseImageClass
  4078                     hasCharacterOrientedLabel: false
  4078 		    hasCharacterOrientedLabel: false
  4079                     foregroundColor: (Color 0.0 0.0 66.9993133440146)
  4079 		    foregroundColor: (Color 0.0 0.0 66.9993133440146)
  4080                     tabable: true
  4080 		    tabable: true
  4081                     model: doBrowseImageClass
  4081 		    model: doBrowseImageClass
  4082                   )
  4082 		  )
  4083                  )
  4083 		 )
  4084                
  4084 
  4085               )
  4085 	      )
  4086             )
  4086 	    )
  4087            )
  4087 	   )
  4088          
  4088 
  4089         )
  4089 	)
  4090       )
  4090       )
  4091 
  4091 
  4092     "Modified: / 03-08-2011 / 10:16:13 / cg"
  4092     "Modified: / 03-08-2011 / 10:16:13 / cg"
  4093 ! !
  4093 ! !
  4094 
  4094 
  4098     |rcv sel cls clsName|
  4098     |rcv sel cls clsName|
  4099 
  4099 
  4100     sel := selectorHolder value.
  4100     sel := selectorHolder value.
  4101     sel size == 0 ifTrue:[ ^ nil ].
  4101     sel size == 0 ifTrue:[ ^ nil ].
  4102     cls := self retrieverClass.
  4102     cls := self retrieverClass.
  4103     cls notNil ifTrue:[ 
  4103     cls notNil ifTrue:[
  4104         clsName := retrieverHolder value.
  4104 	clsName := retrieverHolder value.
  4105         clsName isEmptyOrNil ifTrue:[
  4105 	clsName isEmptyOrNil ifTrue:[
  4106             clsName := cls name.
  4106 	    clsName := cls name.
  4107         ].
  4107 	].
  4108         clsName := clsName asSymbol.
  4108 	clsName := clsName asSymbol.
  4109     ].
  4109     ].
  4110 
  4110 
  4111     rcv := ResourceRetriever new.
  4111     rcv := ResourceRetriever new.
  4112     rcv className:clsName.
  4112     rcv className:clsName.
  4113     rcv selector:sel.
  4113     rcv selector:sel.
  4118 
  4118 
  4119 resourceRetriever:aResourceRetriever
  4119 resourceRetriever:aResourceRetriever
  4120     |className sel isOn|
  4120     |className sel isOn|
  4121 
  4121 
  4122     aResourceRetriever notNil ifTrue:[
  4122     aResourceRetriever notNil ifTrue:[
  4123         className := aResourceRetriever className.
  4123 	className := aResourceRetriever className.
  4124         className isBehavior ifTrue:[
  4124 	className isBehavior ifTrue:[
  4125             className := className name asSymbol
  4125 	    className := className name asSymbol
  4126         ].
  4126 	].
  4127         sel  := aResourceRetriever selector.
  4127 	sel  := aResourceRetriever selector.
  4128         isOn := aResourceRetriever labelText notNil.
  4128 	isOn := aResourceRetriever labelText notNil.
  4129     ] ifFalse:[
  4129     ] ifFalse:[
  4130         className := sel := nil.
  4130 	className := sel := nil.
  4131         isOn := false.
  4131 	isOn := false.
  4132     ].
  4132     ].
  4133 
  4133 
  4134     retrieverHolder value:className.
  4134     retrieverHolder value:className.
  4135     selectorHolder  value:sel.
  4135     selectorHolder  value:sel.
  4136     iconAndLabelHolder value:isOn.
  4136     iconAndLabelHolder value:isOn.
  4139 retrieverClass
  4139 retrieverClass
  4140     |clsName cls|
  4140     |clsName cls|
  4141 
  4141 
  4142     clsName  := retrieverHolder value.
  4142     clsName  := retrieverHolder value.
  4143     clsName notEmptyOrNil ifTrue:[
  4143     clsName notEmptyOrNil ifTrue:[
  4144         cls := Smalltalk at:clsName ifAbsent:nil.
  4144 	cls := Smalltalk at:clsName ifAbsent:nil.
  4145         (cls isBehavior) ifTrue:[
  4145 	(cls isBehavior) ifTrue:[
  4146             ^ cls
  4146 	    ^ cls
  4147         ].
  4147 	].
  4148     ].
  4148     ].
  4149     ^ nil
  4149     ^ nil
  4150 ! !
  4150 ! !
  4151 
  4151 
  4152 !MenuEditor::ImageResourceEditor methodsFor:'actions'!
  4152 !MenuEditor::ImageResourceEditor methodsFor:'actions'!
  4171 
  4171 
  4172 doBrowseImageClass
  4172 doBrowseImageClass
  4173     |cls sel image|
  4173     |cls sel image|
  4174 
  4174 
  4175     (cls := retrieverHolder value) isNil ifTrue:[
  4175     (cls := retrieverHolder value) isNil ifTrue:[
  4176         Dialog warn:'No resource retriever is defined.'.
  4176 	Dialog warn:'No resource retriever is defined.'.
  4177     ] ifFalse:[
  4177     ] ifFalse:[
  4178         sel := selectorHolder value.
  4178 	sel := selectorHolder value.
  4179 
  4179 
  4180         cls := Smalltalk classNamed:cls.
  4180 	cls := Smalltalk classNamed:cls.
  4181         cls isNil ifTrue:[
  4181 	cls isNil ifTrue:[
  4182             Dialog warn:'No such resource retriever class.'.
  4182 	    Dialog warn:'No such resource retriever class.'.
  4183         ] ifFalse:[
  4183 	] ifFalse:[
  4184             (cls respondsTo:#visualFor:) ifTrue:[
  4184 	    (cls respondsTo:#visualFor:) ifTrue:[
  4185                 image := cls visualFor:sel.
  4185 		image := cls visualFor:sel.
  4186                 image ~~ (cls perform:sel) ifTrue:[
  4186 		image ~~ (cls perform:sel) ifTrue:[
  4187                     self warn:'The image is resolved via #visualFor: from some unknown class'.
  4187 		    self warn:'The image is resolved via #visualFor: from some unknown class'.
  4188                     sel := #visualFor:.
  4188 		    sel := #visualFor:.
  4189                 ].
  4189 		].
  4190             ].
  4190 	    ].
  4191             UserPreferences current systemBrowserClass openInClass:cls class selector:sel
  4191 	    UserPreferences current systemBrowserClass openInClass:cls class selector:sel
  4192         ]
  4192 	]
  4193     ]
  4193     ]
  4194 
  4194 
  4195     "Created: / 20-09-2010 / 13:27:34 / cg"
  4195     "Created: / 20-09-2010 / 13:27:34 / cg"
  4196 !
  4196 !
  4197 
  4197 
  4198 doEditImage
  4198 doEditImage
  4199     |sel cls item image|
  4199     |sel cls item image|
  4200 
  4200 
  4201     item := imageHolder value.
  4201     item := imageHolder value.
  4202     item notNil ifTrue:[
  4202     item notNil ifTrue:[
  4203         item doEdit.
  4203 	item doEdit.
  4204         ^ self.
  4204 	^ self.
  4205     ].
  4205     ].
  4206 
  4206 
  4207     sel := selectorHolder value. 
  4207     sel := selectorHolder value.
  4208     sel isNil ifTrue:[
  4208     sel isNil ifTrue:[
  4209         Dialog warn:'No selector is defined.'.
  4209 	Dialog warn:'No selector is defined.'.
  4210         ^ self.
  4210 	^ self.
  4211     ].
  4211     ].
  4212     cls := retrieverHolder value.
  4212     cls := retrieverHolder value.
  4213     cls isNil ifTrue:[
  4213     cls isNil ifTrue:[
  4214         Dialog warn:'No resource retriever is defined.'.
  4214 	Dialog warn:'No resource retriever is defined.'.
  4215         ^ self.
  4215 	^ self.
  4216     ].
  4216     ].
  4217     cls := Smalltalk classNamed:cls.
  4217     cls := Smalltalk classNamed:cls.
  4218     cls isNil ifTrue:[
  4218     cls isNil ifTrue:[
  4219         Dialog warn:'No such resource retriever class.'.
  4219 	Dialog warn:'No such resource retriever class.'.
  4220         ^ self.
  4220 	^ self.
  4221     ].
  4221     ].
  4222     (cls respondsTo:#visualFor:) ifTrue:[
  4222     (cls respondsTo:#visualFor:) ifTrue:[
  4223         image := cls visualFor:sel.
  4223 	image := cls visualFor:sel.
  4224         image ~~ (cls perform:sel ifNotUnderstood:nil) ifTrue:[
  4224 	image ~~ (cls perform:sel ifNotUnderstood:nil) ifTrue:[
  4225             self warn:'The image is resolved via #visualFor: from some unknown class'.
  4225 	    self warn:'The image is resolved via #visualFor: from some unknown class'.
  4226             image notNil ifTrue:[
  4226 	    image notNil ifTrue:[
  4227                 ImageEditor openOnImage:image.
  4227 		ImageEditor openOnImage:image.
  4228             ].
  4228 	    ].
  4229             ^ self.
  4229 	    ^ self.
  4230         ].
  4230 	].
  4231     ].
  4231     ].
  4232 
  4232 
  4233     ImageEditor openOnClass:cls andSelector:sel
  4233     ImageEditor openOnClass:cls andSelector:sel
  4234 ! !
  4234 ! !
  4235 
  4235 
  4268 retrieverList
  4268 retrieverList
  4269     |list cls|
  4269     |list cls|
  4270 
  4270 
  4271     list := builder bindingAt:#retrieverList.
  4271     list := builder bindingAt:#retrieverList.
  4272     list isNil ifTrue:[
  4272     list isNil ifTrue:[
  4273         list := MenuEditor imageRetrieverClasses asList.
  4273 	list := MenuEditor imageRetrieverClasses asList.
  4274         builder aspectAt:#retrieverList put:list.
  4274 	builder aspectAt:#retrieverList put:list.
  4275     ].
  4275     ].
  4276     (masterApplication notNil 
  4276     (masterApplication notNil
  4277      and:[(cls := masterApplication specClass) notNil]) ifTrue:[
  4277      and:[(cls := masterApplication specClass) notNil]) ifTrue:[
  4278         list := list copyWithFirst:cls.
  4278 	list := list copyWithFirst:cls.
  4279     ].
  4279     ].
  4280     ^ list
  4280     ^ list
  4281 !
  4281 !
  4282 
  4282 
  4283 selectorFilterHolder
  4283 selectorFilterHolder
  4300 
  4300 
  4301     self updateImageList.
  4301     self updateImageList.
  4302     self updateSelectedImage.
  4302     self updateSelectedImage.
  4303 
  4303 
  4304     (retriever notNil and:[imageList size ~~ 0]) ifTrue:[
  4304     (retriever notNil and:[imageList size ~~ 0]) ifTrue:[
  4305         list := self retrieverList.
  4305 	list := self retrieverList.
  4306         name := retriever name.
  4306 	name := retriever name.
  4307 
  4307 
  4308         (list includes:name) ifFalse:[
  4308 	(list includes:name) ifFalse:[
  4309             list add:(name asSymbol).
  4309 	    list add:(name asSymbol).
  4310         ]
  4310 	]
  4311     ].
  4311     ].
  4312 
  4312 
  4313     "Modified: / 03-08-2011 / 10:56:58 / cg"
  4313     "Modified: / 03-08-2011 / 10:56:58 / cg"
  4314 !
  4314 !
  4315 
  4315 
  4334     aModel == retrieverHolder ifTrue:[ self retrieverChanged. ^ self ].
  4334     aModel == retrieverHolder ifTrue:[ self retrieverChanged. ^ self ].
  4335     aModel == selectorHolder ifTrue:[ self selectorChanged. ^ self  ].
  4335     aModel == selectorHolder ifTrue:[ self selectorChanged. ^ self  ].
  4336     aModel == selectorFilterHolder ifTrue:[ self selectorFilterChanged. ^ self  ].
  4336     aModel == selectorFilterHolder ifTrue:[ self selectorFilterChanged. ^ self  ].
  4337 
  4337 
  4338     aModel == imageHolder ifTrue:[
  4338     aModel == imageHolder ifTrue:[
  4339         item := imageHolder value.
  4339 	item := imageHolder value.
  4340         item notNil ifTrue:[ 
  4340 	item notNil ifTrue:[
  4341             selectorHolder value:(item label) 
  4341 	    selectorHolder value:(item label)
  4342         ].
  4342 	].
  4343         ^ self
  4343 	^ self
  4344     ].
  4344     ].
  4345     super update:what with:aPara from:aModel
  4345     super update:what with:aPara from:aModel
  4346 
  4346 
  4347     "Modified: / 29-11-2011 / 11:28:26 / cg"
  4347     "Modified: / 29-11-2011 / 11:28:26 / cg"
  4348 !
  4348 !
  4352 
  4352 
  4353     retriever := self retrieverClass.
  4353     retriever := self retrieverClass.
  4354 
  4354 
  4355     filter := [:sel | true].
  4355     filter := [:sel | true].
  4356     (selectorFilterString := selectorFilterHolder value) notEmptyOrNil ifTrue:[
  4356     (selectorFilterString := selectorFilterHolder value) notEmptyOrNil ifTrue:[
  4357         selectorFilterString includesMatchCharacters ifTrue:[
  4357 	selectorFilterString includesMatchCharacters ifTrue:[
  4358             filter := [:sel | selectorFilterString match:sel ignoreCase:true].
  4358 	    filter := [:sel | selectorFilterString match:sel ignoreCase:true].
  4359         ] ifFalse:[
  4359 	] ifFalse:[
  4360             filter := [:sel | sel includesString:selectorFilterString].
  4360 	    filter := [:sel | sel includesString:selectorFilterString].
  4361         ].
  4361 	].
  4362     ].
  4362     ].
  4363 
  4363 
  4364     imageList root updateFromClass:retriever selectorFilter:filter.
  4364     imageList root updateFromClass:retriever selectorFilter:filter.
  4365 
  4365 
  4366     "Created: / 03-08-2011 / 10:56:41 / cg"
  4366     "Created: / 03-08-2011 / 10:56:41 / cg"
  4372     |item selector line|
  4372     |item selector line|
  4373 
  4373 
  4374     imageList isEmpty ifTrue:[^ self].
  4374     imageList isEmpty ifTrue:[^ self].
  4375 
  4375 
  4376     selector := selectorHolder value.
  4376     selector := selectorHolder value.
  4377     selector isEmptyOrNil ifTrue:[ 
  4377     selector isEmptyOrNil ifTrue:[
  4378         imageHolder value:nil. 
  4378 	imageHolder value:nil.
  4379         ^ self 
  4379 	^ self
  4380     ].
  4380     ].
  4381 
  4381 
  4382     item     := nil.
  4382     item     := nil.
  4383     selector := selector asSymbol.
  4383     selector := selector asSymbol.
  4384 
  4384 
  4385     imageList do:[:anItem| 
  4385     imageList do:[:anItem|
  4386         |sel|
  4386 	|sel|
  4387 
  4387 
  4388         sel := anItem selector.
  4388 	sel := anItem selector.
  4389         selector == sel ifTrue:[
  4389 	selector == sel ifTrue:[
  4390             imageHolder value:anItem.
  4390 	    imageHolder value:anItem.
  4391             ^ self
  4391 	    ^ self
  4392         ].
  4392 	].
  4393         item isNil ifTrue:[
  4393 	item isNil ifTrue:[
  4394             (sel startsWith:selector) ifTrue:[ item := anItem ]
  4394 	    (sel startsWith:selector) ifTrue:[ item := anItem ]
  4395         ]
  4395 	]
  4396     ].
  4396     ].
  4397     imageHolder value:nil.
  4397     imageHolder value:nil.
  4398 
  4398 
  4399     item notNil ifTrue:[
  4399     item notNil ifTrue:[
  4400         line := imageList identityIndexOf:item.
  4400 	line := imageList identityIndexOf:item.
  4401         line ~~ 0 ifTrue:[
  4401 	line ~~ 0 ifTrue:[
  4402             "/ imageListView scrollToLine:line
  4402 	    "/ imageListView scrollToLine:line
  4403             imageListView makeLineVisible:line
  4403 	    imageListView makeLineVisible:line
  4404         ]
  4404 	]
  4405     ].
  4405     ].
  4406 
  4406 
  4407     "Created: / 03-08-2011 / 10:55:45 / cg"
  4407     "Created: / 03-08-2011 / 10:55:45 / cg"
  4408 ! !
  4408 ! !
  4409 
  4409 
  4463     selector := aSelector asSymbol.
  4463     selector := aSelector asSymbol.
  4464     selector numArgs == 0 ifFalse:[^ self].
  4464     selector numArgs == 0 ifFalse:[^ self].
  4465 
  4465 
  4466     "do what the ResourceRetriever will do"
  4466     "do what the ResourceRetriever will do"
  4467     (aClass respondsTo:#visualFor:) ifTrue:[
  4467     (aClass respondsTo:#visualFor:) ifTrue:[
  4468         iconOrSymbol := aClass visualFor:selector.
  4468 	iconOrSymbol := aClass visualFor:selector.
  4469     ].
  4469     ].
  4470     iconOrSymbol isNil ifTrue:[
  4470     iconOrSymbol isNil ifTrue:[
  4471         iconOrSymbol := aClass perform:selector.
  4471 	iconOrSymbol := aClass perform:selector.
  4472     ].
  4472     ].
  4473     iconOrSymbol isNil ifTrue:[^ self].
  4473     iconOrSymbol isNil ifTrue:[^ self].
  4474 
  4474 
  4475     iconOrSymbol isSymbol ifTrue:[
  4475     iconOrSymbol isSymbol ifTrue:[
  4476         icon := ToolbarIconLibrary perform:iconOrSymbol.
  4476 	icon := ToolbarIconLibrary perform:iconOrSymbol.
  4477     ] ifFalse:[
  4477     ] ifFalse:[
  4478         icon := iconOrSymbol.
  4478 	icon := iconOrSymbol.
  4479     ].
  4479     ].
  4480 
  4480 
  4481     w := icon width.
  4481     w := icon width.
  4482     h := icon height.
  4482     h := icon height.
  4483 
  4483 
  4484     w > 32 ifTrue:[
  4484     w > 32 ifTrue:[
  4485         magnify := 32 / w.
  4485 	magnify := 32 / w.
  4486         h > 32 ifTrue:[ magnify := (32 / h) max:magnify ].
  4486 	h > 32 ifTrue:[ magnify := (32 / h) max:magnify ].
  4487     ] ifFalse:[
  4487     ] ifFalse:[
  4488         h > 32 ifFalse:[^ self].
  4488 	h > 32 ifFalse:[^ self].
  4489         magnify := 32 / h.
  4489 	magnify := 32 / h.
  4490     ].
  4490     ].
  4491     icon := icon magnifiedBy: magnify.
  4491     icon := icon magnifiedBy: magnify.
  4492 
  4492 
  4493     "Modified: / 13-04-2011 / 18:56:45 / cg"
  4493     "Modified: / 13-04-2011 / 18:56:45 / cg"
  4494     "Created: / 03-08-2011 / 10:47:16 / cg"
  4494     "Created: / 03-08-2011 / 10:47:16 / cg"
  4501 
  4501 
  4502 updateFromClass:aClass selectorFilter:aFilterBlock
  4502 updateFromClass:aClass selectorFilter:aFilterBlock
  4503     |r item|
  4503     |r item|
  4504 
  4504 
  4505     (aClass notNil and:[aClass isBehavior]) ifFalse:[
  4505     (aClass notNil and:[aClass isBehavior]) ifFalse:[
  4506         ^ self collapse.
  4506 	^ self collapse.
  4507     ].
  4507     ].
  4508 "/    aClass == selector ifTrue:[
  4508 "/    aClass == selector ifTrue:[
  4509 "/        ^ self expand
  4509 "/        ^ self expand
  4510 "/    ].
  4510 "/    ].
  4511     self collapse.
  4511     self collapse.
  4512 
  4512 
  4513     selector := aClass.
  4513     selector := aClass.
  4514     children := OrderedCollection new.
  4514     children := OrderedCollection new.
  4515 
  4515 
  4516     self application withWaitCursorDo:[
  4516     self application withWaitCursorDo:[
  4517         aClass withAllSuperclassesDo:[:aClass|
  4517 	aClass withAllSuperclassesDo:[:aClass|
  4518             aClass class selectorsAndMethodsDo:[:sel :m|
  4518 	    aClass class selectorsAndMethodsDo:[:sel :m|
  4519                 (aFilterBlock value:sel) ifTrue:[
  4519 		(aFilterBlock value:sel) ifTrue:[
  4520                     m hasResource ifTrue:[
  4520 		    m hasResource ifTrue:[
  4521                         r := m resources.
  4521 			r := m resources.
  4522                         r notEmptyOrNil ifTrue:[
  4522 			r notEmptyOrNil ifTrue:[
  4523                             ((r includesKey:#image) or:[r includesKey:#programImage]) ifTrue:[
  4523 			    ((r includesKey:#image) or:[r includesKey:#programImage]) ifTrue:[
  4524                                 item := self class new forClass:aClass selector:sel.
  4524 				item := self class new forClass:aClass selector:sel.
  4525                                 item parent:self.
  4525 				item parent:self.
  4526                                 children add:item
  4526 				children add:item
  4527                             ]
  4527 			    ]
  4528                         ]
  4528 			]
  4529                     ]
  4529 		    ]
  4530                 ]
  4530 		]
  4531             ]
  4531 	    ]
  4532         ].
  4532 	].
  4533         children sort:[:a :b | a label < b label ].
  4533 	children sort:[:a :b | a label < b label ].
  4534         self expand
  4534 	self expand
  4535     ].
  4535     ].
  4536 
  4536 
  4537     "Created: / 03-08-2011 / 10:48:10 / cg"
  4537     "Created: / 03-08-2011 / 10:48:10 / cg"
  4538 ! !
  4538 ! !
  4539 
  4539 
  4544 
  4544 
  4545     |parent aClass image|
  4545     |parent aClass image|
  4546 
  4546 
  4547     parent := self parent.
  4547     parent := self parent.
  4548     parent notNil ifTrue:[
  4548     parent notNil ifTrue:[
  4549         aClass := parent selector.
  4549 	aClass := parent selector.
  4550         (aClass respondsTo:#visualFor:) ifTrue:[
  4550 	(aClass respondsTo:#visualFor:) ifTrue:[
  4551             image := aClass visualFor:selector.
  4551 	    image := aClass visualFor:selector.
  4552             image ~~ (aClass perform:selector) ifTrue:[
  4552 	    image ~~ (aClass perform:selector) ifTrue:[
  4553                 self warn:'The image is resolved via #visualFor: from some unknown class'.
  4553 		self warn:'The image is resolved via #visualFor: from some unknown class'.
  4554                 ImageEditor openOnImage:image.
  4554 		ImageEditor openOnImage:image.
  4555                 ^ self.
  4555 		^ self.
  4556             ].
  4556 	    ].
  4557         ].
  4557 	].
  4558         ImageEditor openOnClass:aClass andSelector:selector.
  4558 	ImageEditor openOnClass:aClass andSelector:selector.
  4559     ].
  4559     ].
  4560 ! !
  4560 ! !
  4561 
  4561 
  4562 !MenuEditor::ActionItem class methodsFor:'defaults'!
  4562 !MenuEditor::ActionItem class methodsFor:'defaults'!
  4563 
  4563 
  4578      UIPainter new openOnClass:MenuEditor::ActionItem andSelector:#basicsEditSpec
  4578      UIPainter new openOnClass:MenuEditor::ActionItem andSelector:#basicsEditSpec
  4579     "
  4579     "
  4580 
  4580 
  4581     <resource: #canvas>
  4581     <resource: #canvas>
  4582 
  4582 
  4583     ^ 
  4583     ^
  4584      #(FullSpec
  4584      #(FullSpec
  4585         name: basicsEditSpec
  4585 	name: basicsEditSpec
  4586         window: 
  4586 	window:
  4587        (WindowSpec
  4587        (WindowSpec
  4588           label: 'basicsEditSpec'
  4588 	  label: 'basicsEditSpec'
  4589           name: 'basicsEditSpec'
  4589 	  name: 'basicsEditSpec'
  4590           min: (Point 10 10)
  4590 	  min: (Point 10 10)
  4591           bounds: (Rectangle 0 0 340 340)
  4591 	  bounds: (Rectangle 0 0 340 340)
  4592         )
  4592 	)
  4593         component: 
  4593 	component:
  4594        (SpecCollection
  4594        (SpecCollection
  4595           collection: (
  4595 	  collection: (
  4596            (LabelSpec
  4596 	   (LabelSpec
  4597               label: 'Name Key:'
  4597 	      label: 'Name Key:'
  4598               name: 'nameKeyLabel'
  4598 	      name: 'nameKeyLabel'
  4599               layout: (AlignmentOrigin 107 0 25 0 1 0.5)
  4599 	      layout: (AlignmentOrigin 107 0 25 0 1 0.5)
  4600               activeHelpKey: basicsKey
  4600 	      activeHelpKey: basicsKey
  4601               translateLabel: true
  4601 	      translateLabel: true
  4602               resizeForLabel: true
  4602 	      resizeForLabel: true
  4603               adjust: right
  4603 	      adjust: right
  4604             )
  4604 	    )
  4605            (InputFieldSpec
  4605 	   (InputFieldSpec
  4606               name: 'nameKeyField'
  4606 	      name: 'nameKeyField'
  4607               layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0)
  4607 	      layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0)
  4608               activeHelpKey: basicsKey
  4608 	      activeHelpKey: basicsKey
  4609               tabable: true
  4609 	      tabable: true
  4610               model: nameKey
  4610 	      model: nameKey
  4611               group: inputGroup
  4611 	      group: inputGroup
  4612               type: symbolOrNil
  4612 	      type: symbolOrNil
  4613               immediateAccept: false
  4613 	      immediateAccept: false
  4614               acceptOnLeave: false
  4614 	      acceptOnLeave: false
  4615               acceptOnReturn: true
  4615 	      acceptOnReturn: true
  4616               acceptOnTab: true
  4616 	      acceptOnTab: true
  4617               acceptOnLostFocus: false
  4617 	      acceptOnLostFocus: false
  4618               acceptChannel: acceptChannel
  4618 	      acceptChannel: acceptChannel
  4619               modifiedChannel: modifiedChannel
  4619 	      modifiedChannel: modifiedChannel
  4620               acceptOnPointerLeave: false
  4620 	      acceptOnPointerLeave: false
  4621             )
  4621 	    )
  4622            (LabelSpec
  4622 	   (LabelSpec
  4623               label: 'Label:'
  4623 	      label: 'Label:'
  4624               name: 'labelLabel'
  4624 	      name: 'labelLabel'
  4625               layout: (AlignmentOrigin 107 0 51 0 1 0.5)
  4625 	      layout: (AlignmentOrigin 107 0 51 0 1 0.5)
  4626               activeHelpKey: basicsLabel
  4626 	      activeHelpKey: basicsLabel
  4627               translateLabel: true
  4627 	      translateLabel: true
  4628               resizeForLabel: true
  4628 	      resizeForLabel: true
  4629               adjust: right
  4629 	      adjust: right
  4630             )
  4630 	    )
  4631            (InputFieldSpec
  4631 	   (InputFieldSpec
  4632               name: 'labelField'
  4632 	      name: 'labelField'
  4633               layout: (LayoutFrame 110 0 40 0 -5 1.0 62 0)
  4633 	      layout: (LayoutFrame 110 0 40 0 -5 1.0 62 0)
  4634               activeHelpKey: basicsLabel
  4634 	      activeHelpKey: basicsLabel
  4635               tabable: true
  4635 	      tabable: true
  4636               model: rawLabel
  4636 	      model: rawLabel
  4637               group: inputGroup
  4637 	      group: inputGroup
  4638               immediateAccept: false
  4638 	      immediateAccept: false
  4639               acceptOnReturn: true
  4639 	      acceptOnReturn: true
  4640               acceptOnTab: true
  4640 	      acceptOnTab: true
  4641               acceptOnLostFocus: false
  4641 	      acceptOnLostFocus: false
  4642               acceptChannel: acceptChannel
  4642 	      acceptChannel: acceptChannel
  4643               modifiedChannel: modifiedChannel
  4643 	      modifiedChannel: modifiedChannel
  4644               acceptOnPointerLeave: false
  4644 	      acceptOnPointerLeave: false
  4645             )
  4645 	    )
  4646            (LabelSpec
  4646 	   (LabelSpec
  4647               label: 'Action:'
  4647 	      label: 'Action:'
  4648               name: 'valueLabel'
  4648 	      name: 'valueLabel'
  4649               layout: (AlignmentOrigin 107 0 82 0 1 0.5)
  4649 	      layout: (AlignmentOrigin 107 0 82 0 1 0.5)
  4650               activeHelpKey: basicsAction
  4650 	      activeHelpKey: basicsAction
  4651               translateLabel: true
  4651 	      translateLabel: true
  4652               resizeForLabel: true
  4652 	      resizeForLabel: true
  4653               adjust: right
  4653 	      adjust: right
  4654             )
  4654 	    )
  4655            (InputFieldSpec
  4655 	   (InputFieldSpec
  4656               name: 'valueField'
  4656 	      name: 'valueField'
  4657               layout: (LayoutFrame 110 0 71 0 -25 1.0 93 0)
  4657 	      layout: (LayoutFrame 110 0 71 0 -25 1.0 93 0)
  4658               activeHelpKey: basicsAction
  4658 	      activeHelpKey: basicsAction
  4659               tabable: true
  4659 	      tabable: true
  4660               model: itemValue
  4660 	      model: itemValue
  4661               group: inputGroup
  4661 	      group: inputGroup
  4662               type: symbolOrNil
  4662 	      type: symbolOrNil
  4663               immediateAccept: false
  4663 	      immediateAccept: false
  4664               acceptOnLeave: true
  4664 	      acceptOnLeave: true
  4665               acceptOnReturn: true
  4665 	      acceptOnReturn: true
  4666               acceptOnTab: true
  4666 	      acceptOnTab: true
  4667               acceptOnLostFocus: true
  4667 	      acceptOnLostFocus: true
  4668               acceptChannel: acceptChannel
  4668 	      acceptChannel: acceptChannel
  4669               modifiedChannel: modifiedChannel
  4669 	      modifiedChannel: modifiedChannel
  4670               acceptOnPointerLeave: true
  4670 	      acceptOnPointerLeave: true
  4671             )
  4671 	    )
  4672            (ActionButtonSpec
  4672 	   (ActionButtonSpec
  4673               label: 'browseActionImage'
  4673 	      label: 'browseActionImage'
  4674               name: 'Button1'
  4674 	      name: 'Button1'
  4675               layout: (LayoutFrame -25 1 71 0 -5 1 93 0)
  4675 	      layout: (LayoutFrame -25 1 71 0 -5 1 93 0)
  4676               hasCharacterOrientedLabel: false
  4676 	      hasCharacterOrientedLabel: false
  4677               translateLabel: true
  4677 	      translateLabel: true
  4678               resizeForLabel: true
  4678 	      resizeForLabel: true
  4679               tabable: true
  4679 	      tabable: true
  4680               model: doBrowseActionMethod
  4680 	      model: doBrowseActionMethod
  4681               activeHelpKey: browseMethod
  4681 	      activeHelpKey: browseMethod
  4682             )
  4682 	    )
  4683            (LabelSpec
  4683 	   (LabelSpec
  4684               label: 'Argument:'
  4684 	      label: 'Argument:'
  4685               name: 'argumentLabel'
  4685 	      name: 'argumentLabel'
  4686               layout: (AlignmentOrigin 107 0 107 0 1 0.5)
  4686 	      layout: (AlignmentOrigin 107 0 107 0 1 0.5)
  4687               activeHelpKey: basicsArgument
  4687 	      activeHelpKey: basicsArgument
  4688               translateLabel: true
  4688 	      translateLabel: true
  4689               resizeForLabel: true
  4689 	      resizeForLabel: true
  4690               adjust: right
  4690 	      adjust: right
  4691             )
  4691 	    )
  4692            (InputFieldSpec
  4692 	   (InputFieldSpec
  4693               name: 'argumentField'
  4693 	      name: 'argumentField'
  4694               layout: (LayoutFrame 110 0 96 0 -5 1.0 118 0)
  4694 	      layout: (LayoutFrame 110 0 96 0 -5 1.0 118 0)
  4695               activeHelpKey: basicsArgument
  4695 	      activeHelpKey: basicsArgument
  4696               tabable: true
  4696 	      tabable: true
  4697               model: argument
  4697 	      model: argument
  4698               group: inputGroup
  4698 	      group: inputGroup
  4699               type: smalltalkObjectOrNil
  4699 	      type: smalltalkObjectOrNil
  4700               immediateAccept: false
  4700 	      immediateAccept: false
  4701               acceptOnReturn: true
  4701 	      acceptOnReturn: true
  4702               acceptOnTab: true
  4702 	      acceptOnTab: true
  4703               acceptOnLostFocus: false
  4703 	      acceptOnLostFocus: false
  4704               acceptChannel: acceptChannel
  4704 	      acceptChannel: acceptChannel
  4705               modifiedChannel: modifiedChannel
  4705 	      modifiedChannel: modifiedChannel
  4706               acceptOnPointerLeave: false
  4706 	      acceptOnPointerLeave: false
  4707             )
  4707 	    )
  4708            (LabelSpec
  4708 	   (LabelSpec
  4709               label: 'Indication:'
  4709 	      label: 'Indication:'
  4710               name: 'indicationLabel'
  4710 	      name: 'indicationLabel'
  4711               layout: (AlignmentOrigin 107 0 138 0 1 0.5)
  4711 	      layout: (AlignmentOrigin 107 0 138 0 1 0.5)
  4712               activeHelpKey: basicsIndication
  4712 	      activeHelpKey: basicsIndication
  4713               translateLabel: true
  4713 	      translateLabel: true
  4714               resizeForLabel: true
  4714 	      resizeForLabel: true
  4715               adjust: right
  4715 	      adjust: right
  4716             )
  4716 	    )
  4717            (InputFieldSpec
  4717 	   (InputFieldSpec
  4718               name: 'indicationField'
  4718 	      name: 'indicationField'
  4719               layout: (LayoutFrame 110 0 127 0 -5 1.0 149 0)
  4719 	      layout: (LayoutFrame 110 0 127 0 -5 1.0 149 0)
  4720               activeHelpKey: basicsIndication
  4720 	      activeHelpKey: basicsIndication
  4721               enableChannel: indicationEnabled
  4721 	      enableChannel: indicationEnabled
  4722               tabable: true
  4722 	      tabable: true
  4723               model: indication
  4723 	      model: indication
  4724               group: inputGroup
  4724 	      group: inputGroup
  4725               type: symbolOrNil
  4725 	      type: symbolOrNil
  4726               immediateAccept: true
  4726 	      immediateAccept: true
  4727               acceptOnReturn: false
  4727 	      acceptOnReturn: false
  4728               acceptOnTab: false
  4728 	      acceptOnTab: false
  4729               acceptOnLostFocus: false
  4729 	      acceptOnLostFocus: false
  4730               modifiedChannel: modifiedChannel
  4730 	      modifiedChannel: modifiedChannel
  4731               acceptOnPointerLeave: false
  4731 	      acceptOnPointerLeave: false
  4732             )
  4732 	    )
  4733            (LabelSpec
  4733 	   (LabelSpec
  4734               label: 'Choice:'
  4734 	      label: 'Choice:'
  4735               name: 'choiceLabel'
  4735 	      name: 'choiceLabel'
  4736               layout: (AlignmentOrigin 107 0 163 0 1 0.5)
  4736 	      layout: (AlignmentOrigin 107 0 163 0 1 0.5)
  4737               activeHelpKey: basicsChoice
  4737 	      activeHelpKey: basicsChoice
  4738               translateLabel: true
  4738 	      translateLabel: true
  4739               resizeForLabel: true
  4739 	      resizeForLabel: true
  4740               adjust: right
  4740 	      adjust: right
  4741             )
  4741 	    )
  4742            (InputFieldSpec
  4742 	   (InputFieldSpec
  4743               name: 'choiceField'
  4743 	      name: 'choiceField'
  4744               layout: (LayoutFrame 110 0 152 0 -5 1.0 174 0)
  4744 	      layout: (LayoutFrame 110 0 152 0 -5 1.0 174 0)
  4745               activeHelpKey: basicsChoice
  4745 	      activeHelpKey: basicsChoice
  4746               enableChannel: choiceEnabled
  4746 	      enableChannel: choiceEnabled
  4747               tabable: true
  4747 	      tabable: true
  4748               model: choice
  4748 	      model: choice
  4749               group: inputGroup
  4749 	      group: inputGroup
  4750               type: symbolOrNil
  4750 	      type: symbolOrNil
  4751               immediateAccept: true
  4751 	      immediateAccept: true
  4752               acceptOnReturn: false
  4752 	      acceptOnReturn: false
  4753               acceptOnTab: false
  4753 	      acceptOnTab: false
  4754               acceptOnLostFocus: false
  4754 	      acceptOnLostFocus: false
  4755               modifiedChannel: modifiedChannel
  4755 	      modifiedChannel: modifiedChannel
  4756               acceptOnPointerLeave: false
  4756 	      acceptOnPointerLeave: false
  4757             )
  4757 	    )
  4758            (LabelSpec
  4758 	   (LabelSpec
  4759               label: 'Value:'
  4759 	      label: 'Value:'
  4760               name: 'choiceValueLabel'
  4760 	      name: 'choiceValueLabel'
  4761               layout: (AlignmentOrigin 107 0 188 0 1 0.5)
  4761 	      layout: (AlignmentOrigin 107 0 188 0 1 0.5)
  4762               activeHelpKey: basicsChoiceValue
  4762 	      activeHelpKey: basicsChoiceValue
  4763               translateLabel: true
  4763 	      translateLabel: true
  4764               resizeForLabel: true
  4764 	      resizeForLabel: true
  4765               adjust: right
  4765 	      adjust: right
  4766             )
  4766 	    )
  4767            (InputFieldSpec
  4767 	   (InputFieldSpec
  4768               name: 'choiceValueField'
  4768 	      name: 'choiceValueField'
  4769               layout: (LayoutFrame 110 0 177 0 -5 1.0 199 0)
  4769 	      layout: (LayoutFrame 110 0 177 0 -5 1.0 199 0)
  4770               activeHelpKey: basicsChoiceValue
  4770 	      activeHelpKey: basicsChoiceValue
  4771               enableChannel: choiceValueEnabled
  4771 	      enableChannel: choiceValueEnabled
  4772               tabable: true
  4772 	      tabable: true
  4773               model: choiceValue
  4773 	      model: choiceValue
  4774               group: inputGroup
  4774 	      group: inputGroup
  4775               type: smalltalkObjectOrNil
  4775 	      type: smalltalkObjectOrNil
  4776               immediateAccept: false
  4776 	      immediateAccept: false
  4777               acceptOnLeave: false
  4777 	      acceptOnLeave: false
  4778               acceptOnReturn: true
  4778 	      acceptOnReturn: true
  4779               acceptOnTab: true
  4779 	      acceptOnTab: true
  4780               acceptOnLostFocus: false
  4780 	      acceptOnLostFocus: false
  4781               acceptChannel: acceptChannel
  4781 	      acceptChannel: acceptChannel
  4782               modifiedChannel: modifiedChannel
  4782 	      modifiedChannel: modifiedChannel
  4783               acceptOnPointerLeave: false
  4783 	      acceptOnPointerLeave: false
  4784             )
  4784 	    )
  4785            (CheckBoxSpec
  4785 	   (CheckBoxSpec
  4786               label: 'Translate Label'
  4786 	      label: 'Translate Label'
  4787               name: 'translateLabelCheckBox'
  4787 	      name: 'translateLabelCheckBox'
  4788               layout: (AlignmentOrigin 7 0 213 0 0 0)
  4788 	      layout: (AlignmentOrigin 7 0 213 0 0 0)
  4789               activeHelpKey: basicsTranslateLabel
  4789 	      activeHelpKey: basicsTranslateLabel
  4790               tabable: true
  4790 	      tabable: true
  4791               model: translateLabel
  4791 	      model: translateLabel
  4792               translateLabel: true
  4792 	      translateLabel: true
  4793             )
  4793 	    )
  4794            (CheckBoxSpec
  4794 	   (CheckBoxSpec
  4795               label: 'Is Button'
  4795 	      label: 'Is Button'
  4796               name: 'isButtonCheckBox'
  4796 	      name: 'isButtonCheckBox'
  4797               layout: (AlignmentOrigin 7 0 238 0 0 0)
  4797 	      layout: (AlignmentOrigin 7 0 238 0 0 0)
  4798               activeHelpKey: basicsIsButton
  4798 	      activeHelpKey: basicsIsButton
  4799               tabable: true
  4799 	      tabable: true
  4800               model: isButton
  4800 	      model: isButton
  4801               translateLabel: true
  4801 	      translateLabel: true
  4802             )
  4802 	    )
  4803            (CheckBoxSpec
  4803 	   (CheckBoxSpec
  4804               label: 'Hide Menu after Activation'
  4804 	      label: 'Hide Menu after Activation'
  4805               name: 'hideMenuOnActivated'
  4805 	      name: 'hideMenuOnActivated'
  4806               layout: (AlignmentOrigin 7 0 263 0 0 0)
  4806 	      layout: (AlignmentOrigin 7 0 263 0 0 0)
  4807               activeHelpKey: hideMenuOnActivated
  4807 	      activeHelpKey: hideMenuOnActivated
  4808               tabable: true
  4808 	      tabable: true
  4809               model: hideMenuOnActivated
  4809 	      model: hideMenuOnActivated
  4810               translateLabel: true
  4810 	      translateLabel: true
  4811             )
  4811 	    )
  4812            (CheckBoxSpec
  4812 	   (CheckBoxSpec
  4813               label: 'BusyCursor while Active'
  4813 	      label: 'BusyCursor while Active'
  4814               name: 'showBusyCursorWhilePerforming'
  4814 	      name: 'showBusyCursorWhilePerforming'
  4815               layout: (AlignmentOrigin 7 0 288 0 0 0)
  4815 	      layout: (AlignmentOrigin 7 0 288 0 0 0)
  4816               activeHelpKey: showBusyCursorWhilePerforming
  4816 	      activeHelpKey: showBusyCursorWhilePerforming
  4817               tabable: true
  4817 	      tabable: true
  4818               model: showBusyCursorWhilePerforming
  4818 	      model: showBusyCursorWhilePerforming
  4819               translateLabel: true
  4819 	      translateLabel: true
  4820             )
  4820 	    )
  4821            (CheckBoxSpec
  4821 	   (CheckBoxSpec
  4822               label: 'Trigger On Down'
  4822 	      label: 'Trigger On Down'
  4823               name: 'triggerOnDown'
  4823 	      name: 'triggerOnDown'
  4824               layout: (AlignmentOrigin 25 0.5 238 0 0 0)
  4824 	      layout: (AlignmentOrigin 25 0.5 238 0 0 0)
  4825               activeHelpKey: triggerOnDown
  4825 	      activeHelpKey: triggerOnDown
  4826               enableChannel: hasNoDelayedMenuValue
  4826 	      enableChannel: hasNoDelayedMenuValue
  4827               tabable: true
  4827 	      tabable: true
  4828               model: triggerOnDown
  4828 	      model: triggerOnDown
  4829               translateLabel: true
  4829 	      translateLabel: true
  4830             )
  4830 	    )
  4831            (CheckBoxSpec
  4831 	   (CheckBoxSpec
  4832               label: 'Send To Originating Widget'
  4832 	      label: 'Send To Originating Widget'
  4833               name: 'sendToOriginator'
  4833 	      name: 'sendToOriginator'
  4834               layout: (AlignmentOrigin 7 0 313 0 0 0)
  4834 	      layout: (AlignmentOrigin 7 0 313 0 0 0)
  4835               activeHelpKey: sendToOriginator
  4835 	      activeHelpKey: sendToOriginator
  4836               enableChannel: hasItemValue
  4836 	      enableChannel: hasItemValue
  4837               tabable: true
  4837 	      tabable: true
  4838               model: sendToOriginator
  4838 	      model: sendToOriginator
  4839               translateLabel: true
  4839 	      translateLabel: true
  4840             )
  4840 	    )
  4841            )
  4841 	   )
  4842          
  4842 
  4843         )
  4843 	)
  4844       )
  4844       )
  4845 
  4845 
  4846     "Modified: / 21-10-2010 / 14:14:49 / cg"
  4846     "Modified: / 21-10-2010 / 14:14:49 / cg"
  4847 ! !
  4847 ! !
  4848 
  4848 
  4849 !MenuEditor::ActionItem class methodsFor:'interface-editor'!
  4849 !MenuEditor::ActionItem class methodsFor:'interface-editor'!
  4850 
  4850 
  4851 addBindingsTo:aspects for:aMenuEditor
  4851 addBindingsTo:aspects for:aMenuEditor
  4852     "add additional bindings to the aspects
  4852     "add additional bindings to the aspects
  4853     "
  4853     "
  4854     aspects 
  4854     aspects
  4855         at:#indicationEnabled  
  4855 	at:#indicationEnabled
  4856         ifAbsentPut:[ BlockValue with:[:a | a size == 0 ] argument:(aspects at:#choice)].
  4856 	ifAbsentPut:[ BlockValue with:[:a | a size == 0 ] argument:(aspects at:#choice)].
  4857 
  4857 
  4858     aspects 
  4858     aspects
  4859         at:#choiceEnabled 
  4859 	at:#choiceEnabled
  4860         ifAbsentPut:[ BlockValue with:[:a | a size == 0 ] argument:(aspects at:#indication)].
  4860 	ifAbsentPut:[ BlockValue with:[:a | a size == 0 ] argument:(aspects at:#indication)].
  4861 
  4861 
  4862     aspects 
  4862     aspects
  4863         at:#choiceValueEnabled 
  4863 	at:#choiceValueEnabled
  4864         ifAbsentPut:[ BlockValue with:[:a | a size ~~ 0 ] argument:(aspects at:#choice)].
  4864 	ifAbsentPut:[ BlockValue with:[:a | a size ~~ 0 ] argument:(aspects at:#choice)].
  4865 
  4865 
  4866     aspects 
  4866     aspects
  4867         at:#hasNoDelayedMenuValue 
  4867 	at:#hasNoDelayedMenuValue
  4868         ifAbsentPut:[true asValue].
  4868 	ifAbsentPut:[true asValue].
  4869 ! !
  4869 ! !
  4870 
  4870 
  4871 !MenuEditor::ActionItem methodsFor:'accessing'!
  4871 !MenuEditor::ActionItem methodsFor:'accessing'!
  4872 
  4872 
  4873 menuItem
  4873 menuItem
  4936 
  4936 
  4937 aspectAt:aKey put:aValue
  4937 aspectAt:aKey put:aValue
  4938     "set a specific aspect named aKey to the aValue"
  4938     "set a specific aspect named aKey to the aValue"
  4939 
  4939 
  4940     aKey == #argument ifTrue:[
  4940     aKey == #argument ifTrue:[
  4941         self hasDelayedMenu ifTrue:[
  4941 	self hasDelayedMenu ifTrue:[
  4942             children first argument:aValue
  4942 	    children first argument:aValue
  4943         ].
  4943 	].
  4944         menuItem argument:aValue.
  4944 	menuItem argument:aValue.
  4945         ^ self
  4945 	^ self
  4946     ].
  4946     ].
  4947 
  4947 
  4948     aKey == #triggerOnDown ifTrue:[
  4948     aKey == #triggerOnDown ifTrue:[
  4949         |triggerOnDown|
  4949 	|triggerOnDown|
  4950 
  4950 
  4951         self hasDelayedMenu ifTrue:[
  4951 	self hasDelayedMenu ifTrue:[
  4952             triggerOnDown := false
  4952 	    triggerOnDown := false
  4953         ] ifFalse:[
  4953 	] ifFalse:[
  4954             triggerOnDown := aValue
  4954 	    triggerOnDown := aValue
  4955         ].
  4955 	].
  4956         menuItem triggerOnDown:triggerOnDown.
  4956 	menuItem triggerOnDown:triggerOnDown.
  4957         ^ self.
  4957 	^ self.
  4958     ].
  4958     ].
  4959     super aspectAt:aKey put:aValue.
  4959     super aspectAt:aKey put:aValue.
  4960 
  4960 
  4961     "Modified: / 05-09-2006 / 17:47:24 / cg"
  4961     "Modified: / 05-09-2006 / 17:47:24 / cg"
  4962 !
  4962 !
  5032     "Do not manually edit this!! If it is corrupted,
  5032     "Do not manually edit this!! If it is corrupted,
  5033      the UIPainter may not be able to read the specification."
  5033      the UIPainter may not be able to read the specification."
  5034 
  5034 
  5035     "
  5035     "
  5036      UIPainter new openOnClass:MenuEditor::LinkedMenuItem andSelector:#basicsEditSpec
  5036      UIPainter new openOnClass:MenuEditor::LinkedMenuItem andSelector:#basicsEditSpec
  5037     "
       
  5038 
       
  5039     <resource: #canvas>
       
  5040 
       
  5041     ^
       
  5042      #(FullSpec
       
  5043         name: basicsEditSpec
       
  5044         window:
       
  5045        (WindowSpec
       
  5046           label: 'basicsEditSpec'
       
  5047           name: 'basicsEditSpec'
       
  5048           min: (Point 10 10)
       
  5049           bounds: (Rectangle 0 0 340 340)
       
  5050         )
       
  5051         component:
       
  5052        (SpecCollection
       
  5053           collection: (
       
  5054            (LabelSpec
       
  5055               label: 'Name Key:'
       
  5056               name: 'nameKeyLabel'
       
  5057               layout: (AlignmentOrigin 107 0 25 0 1 0.5)
       
  5058               activeHelpKey: basicsKey
       
  5059               visibilityChannel: notDelayedMenu
       
  5060               translateLabel: true
       
  5061               resizeForLabel: true
       
  5062               adjust: right
       
  5063             )
       
  5064            (InputFieldSpec
       
  5065               name: 'nameKeyField'
       
  5066               layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0)
       
  5067               activeHelpKey: basicsKey
       
  5068               visibilityChannel: notDelayedMenu
       
  5069               tabable: true
       
  5070               model: nameKey
       
  5071               group: inputGroup
       
  5072               type: symbolOrNil
       
  5073               immediateAccept: false
       
  5074               acceptOnLeave: false
       
  5075               acceptOnReturn: true
       
  5076               acceptOnTab: true
       
  5077               acceptOnLostFocus: false
       
  5078               acceptChannel: acceptChannel
       
  5079               modifiedChannel: modifiedChannel
       
  5080               acceptOnPointerLeave: false
       
  5081             )
       
  5082            (LabelSpec
       
  5083               label: 'Label:'
       
  5084               name: 'labelLabel'
       
  5085               layout: (AlignmentOrigin 107 0 51 0 1 0.5)
       
  5086               activeHelpKey: basicsLabel
       
  5087               visibilityChannel: notDelayedMenu
       
  5088               translateLabel: true
       
  5089               resizeForLabel: true
       
  5090               adjust: right
       
  5091             )
       
  5092            (InputFieldSpec
       
  5093               name: 'labelField'
       
  5094               layout: (LayoutFrame 110 0 40 0 -5 1.0 62 0)
       
  5095               activeHelpKey: basicsLabel
       
  5096               visibilityChannel: notDelayedMenu
       
  5097               tabable: true
       
  5098               model: rawLabel
       
  5099               group: inputGroup
       
  5100               immediateAccept: false
       
  5101               acceptOnReturn: true
       
  5102               acceptOnTab: true
       
  5103               acceptOnLostFocus: false
       
  5104               acceptChannel: acceptChannel
       
  5105               modifiedChannel: modifiedChannel
       
  5106               acceptOnPointerLeave: false
       
  5107             )
       
  5108            (LabelSpec
       
  5109               label: 'Menu:'
       
  5110               name: 'menuLabel'
       
  5111               layout: (AlignmentOrigin 107 0 90 0 1 0.5)
       
  5112               activeHelpKey: basicsLabel
       
  5113               translateLabel: true
       
  5114               resizeForLabel: true
       
  5115               adjust: right
       
  5116             )
       
  5117            (InputFieldSpec
       
  5118               name: 'menuField'
       
  5119               layout: (LayoutFrame 110 0 79 0 -5 1.0 101 0)
       
  5120               activeHelpKey: basicsMenu
       
  5121               tabable: true
       
  5122               model: submenuChannel
       
  5123               group: inputGroup
       
  5124               type: symbolOrNil
       
  5125               immediateAccept: false
       
  5126               acceptOnReturn: true
       
  5127               acceptOnTab: true
       
  5128               acceptOnLostFocus: false
       
  5129               acceptChannel: acceptChannel
       
  5130               modifiedChannel: modifiedChannel
       
  5131               acceptOnPointerLeave: false
       
  5132             )
       
  5133            (LabelSpec
       
  5134               label: 'Argument:'
       
  5135               name: 'argumentLabel'
       
  5136               layout: (AlignmentOrigin 107 0 115 0 1 0.5)
       
  5137               activeHelpKey: basicsLabel
       
  5138               translateLabel: true
       
  5139               resizeForLabel: true
       
  5140               adjust: right
       
  5141             )
       
  5142            (InputFieldSpec
       
  5143               name: 'argumentField'
       
  5144               layout: (LayoutFrame 110 0 104 0 -5 1.0 126 0)
       
  5145               activeHelpKey: basicsMenuArgument
       
  5146               enableChannel: notDelayedMenu
       
  5147               tabable: true
       
  5148               model: argument
       
  5149               group: inputGroup
       
  5150               type: smalltalkObjectOrNil
       
  5151               immediateAccept: false
       
  5152               acceptOnReturn: true
       
  5153               acceptOnTab: true
       
  5154               acceptOnLostFocus: false
       
  5155               acceptChannel: acceptChannel
       
  5156               modifiedChannel: modifiedChannel
       
  5157               acceptOnPointerLeave: false
       
  5158             )
       
  5159            (CheckBoxSpec
       
  5160               label: 'Translate Label'
       
  5161               name: 'translateLabelCheckBox'
       
  5162               layout: (Point 20 213)
       
  5163               activeHelpKey: basicsTranslateLabel
       
  5164               visibilityChannel: notDelayedMenu
       
  5165               tabable: true
       
  5166               model: translateLabel
       
  5167               translateLabel: true
       
  5168             )
       
  5169            (CheckBoxSpec
       
  5170               label: 'Is Button'
       
  5171               name: 'isButtonCheckBox'
       
  5172               layout: (Point 20 238)
       
  5173               activeHelpKey: basicsIsButton
       
  5174               visibilityChannel: notDelayedMenu
       
  5175               tabable: true
       
  5176               model: isButton
       
  5177               translateLabel: true
       
  5178             )
       
  5179            (CheckBoxSpec
       
  5180               label: 'Horizontal Layout'
       
  5181               name: 'horizontalLayout'
       
  5182               layout: (Point 20 263)
       
  5183               activeHelpKey: horizontalLayout
       
  5184               tabable: true
       
  5185               model: horizontalLayout
       
  5186               translateLabel: true
       
  5187             )
       
  5188            (CheckBoxSpec
       
  5189               label: 'Do not Destroy Linked Menu'
       
  5190               name: 'keepLinkedMenu'
       
  5191               layout: (Point 20 288)
       
  5192               activeHelpKey: keepLinkedMenu
       
  5193               tabable: true
       
  5194               model: keepLinkedMenu
       
  5195               translateLabel: true
       
  5196             )
       
  5197            )
       
  5198 
       
  5199         )
       
  5200       )
       
  5201 ! !
       
  5202 
       
  5203 !MenuEditor::LinkedMenuItem methodsFor:'accessing'!
       
  5204 
       
  5205 argument:aValue
       
  5206     menuItem argument:aValue.
       
  5207 !
       
  5208 
       
  5209 menuItem
       
  5210      "returns self as a MenuItem
       
  5211     "
       
  5212     |item|
       
  5213 
       
  5214     item := super menuItem.
       
  5215     item submenuChannel:(self submenuChannel).
       
  5216   ^ item
       
  5217 !
       
  5218 
       
  5219 slices
       
  5220     self isDelayedMenu ifTrue:[
       
  5221 	^ #(
       
  5222 		(Basics   basicsEditSpec )
       
  5223 	   )
       
  5224     ].
       
  5225 
       
  5226     ^ #(
       
  5227 	    (Basics   basicsEditSpec )
       
  5228 	    (Details  detailsEditSpec)
       
  5229 	    (Image    image  )
       
  5230 	    (Help     help)
       
  5231        )
       
  5232 !
       
  5233 
       
  5234 submenuChannel
       
  5235     ^ menuItem submenuChannel ? #unspecified
       
  5236 !
       
  5237 
       
  5238 submenuChannel:aValue
       
  5239     menuItem submenuChannel:aValue.
       
  5240 ! !
       
  5241 
       
  5242 !MenuEditor::LinkedMenuItem methodsFor:'aspects'!
       
  5243 
       
  5244 aspectAt:aKey put:aValue
       
  5245     "set a specific aspect named aKey to the aValue"
       
  5246 
       
  5247     aKey == #submenuChannel ifTrue:[ ^ self submenuChannel:aValue ].
       
  5248     super aspectAt:aKey put:aValue.
       
  5249 
       
  5250     "Modified: / 05-09-2006 / 17:47:39 / cg"
       
  5251 !
       
  5252 
       
  5253 getDelayedAttributesFrom:anItem
       
  5254 
       
  5255     menuItem rawLabel:'Delayed'.
       
  5256 
       
  5257     menuItem   submenuChannel:(self validateValue:(anItem submenuChannel)).
       
  5258     menuItem horizontalLayout:(self validateValue:(anItem horizontalLayout)).
       
  5259     menuItem   keepLinkedMenu:(self validateValue:(anItem keepLinkedMenu)).
       
  5260 !
       
  5261 
       
  5262 setDelayedAttributesTo:aMenuItem
       
  5263     aMenuItem   submenuChannel:(self submenuChannel).
       
  5264     aMenuItem horizontalLayout:(menuItem horizontalLayout).
       
  5265     aMenuItem   keepLinkedMenu:(menuItem keepLinkedMenu).
       
  5266 ! !
       
  5267 
       
  5268 !MenuEditor::LinkedMenuItem methodsFor:'displaying'!
       
  5269 
       
  5270 displayLabel
       
  5271     "returns the label dependent on is delayed or not
       
  5272     "
       
  5273     self isDelayedMenu ifTrue:[ ^ self submenuChannel ].
       
  5274   ^ menuItem rawLabel
       
  5275 !
       
  5276 
       
  5277 icon
       
  5278     self isDelayedMenu ifTrue:[ ^ self class iconDelayedLinkedMenu ].
       
  5279   ^ self class iconLinkedMenu
       
  5280 ! !
       
  5281 
       
  5282 !MenuEditor::LinkedMenuItem methodsFor:'initialization'!
       
  5283 
       
  5284 initialize
       
  5285     "setup default values on the item
       
  5286     "
       
  5287     super initialize.
       
  5288 
       
  5289     "setting default values
       
  5290     "
       
  5291     "/ CG: Thu, 08 May 2008 11:16:54 GMT
       
  5292     "/     I think having keepLinkedMenu true by default 
       
  5293     "/     will confuse newcomers (even me occasionally)
       
  5294     "/     (will search, why the menu is not updated...)
       
  5295 
       
  5296     "/ menuItem keepLinkedMenu:true.
       
  5297     menuItem keepLinkedMenu:false.
       
  5298 ! !
       
  5299 
       
  5300 !MenuEditor::LinkedMenuItem methodsFor:'queries'!
       
  5301 
       
  5302 isKindOfMenu
       
  5303     ^ true
       
  5304 ! !
       
  5305 
       
  5306 !MenuEditor::MenuSliceItem class methodsFor:'defaults'!
       
  5307 
       
  5308 defaultLabel
       
  5309     ^ 'Menu Slice'
       
  5310 ! !
       
  5311 
       
  5312 !MenuEditor::MenuSliceItem class methodsFor:'interface specs'!
       
  5313 
       
  5314 basicsEditSpec
       
  5315     "This resource specification was automatically generated
       
  5316      by the UIPainter of ST/X."
       
  5317 
       
  5318     "Do not manually edit this!! If it is corrupted,
       
  5319      the UIPainter may not be able to read the specification."
       
  5320 
       
  5321     "
       
  5322      UIPainter new openOnClass:MenuEditor::MenuSliceItem andSelector:#basicsEditSpec
       
  5323     "
       
  5324 
       
  5325     <resource: #canvas>
       
  5326 
       
  5327     ^
       
  5328      #(FullSpec
       
  5329         name: basicsEditSpec
       
  5330         window:
       
  5331        (WindowSpec
       
  5332           label: 'basicsEditSpec'
       
  5333           name: 'basicsEditSpec'
       
  5334           min: (Point 10 10)
       
  5335           bounds: (Rectangle 0 0 344 146)
       
  5336         )
       
  5337         component:
       
  5338        (SpecCollection
       
  5339           collection: (
       
  5340            (LabelSpec
       
  5341               label: 'Name Key:'
       
  5342               name: 'nameKeyLabel'
       
  5343               layout: (AlignmentOrigin 107 0 25 0 1 0.5)
       
  5344               activeHelpKey: basicsKey
       
  5345               visibilityChannel: notDelayedMenu
       
  5346               translateLabel: true
       
  5347               resizeForLabel: true
       
  5348               adjust: right
       
  5349             )
       
  5350            (InputFieldSpec
       
  5351               name: 'nameKeyField'
       
  5352               layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0)
       
  5353               activeHelpKey: basicsKey
       
  5354               visibilityChannel: notDelayedMenu
       
  5355               tabable: true
       
  5356               model: nameKey
       
  5357               group: inputGroup
       
  5358               type: symbolOrNil
       
  5359               immediateAccept: false
       
  5360               acceptOnLeave: false
       
  5361               acceptOnReturn: true
       
  5362               acceptOnTab: true
       
  5363               acceptOnLostFocus: false
       
  5364               acceptChannel: acceptChannel
       
  5365               modifiedChannel: modifiedChannel
       
  5366               acceptOnPointerLeave: false
       
  5367             )
       
  5368            (LabelSpec
       
  5369               label: 'Label:'
       
  5370               name: 'labelLabel'
       
  5371               layout: (AlignmentOrigin 107 0 51 0 1 0.5)
       
  5372               activeHelpKey: basicsLabel
       
  5373               visibilityChannel: notDelayedMenu
       
  5374               translateLabel: true
       
  5375               resizeForLabel: true
       
  5376               adjust: right
       
  5377             )
       
  5378            (InputFieldSpec
       
  5379               name: 'labelField'
       
  5380               layout: (LayoutFrame 110 0 40 0 -5 1.0 62 0)
       
  5381               activeHelpKey: basicsLabel
       
  5382               visibilityChannel: notDelayedMenu
       
  5383               tabable: true
       
  5384               model: rawLabel
       
  5385               group: inputGroup
       
  5386               immediateAccept: false
       
  5387               acceptOnReturn: true
       
  5388               acceptOnTab: true
       
  5389               acceptOnLostFocus: false
       
  5390               acceptChannel: acceptChannel
       
  5391               modifiedChannel: modifiedChannel
       
  5392               acceptOnPointerLeave: false
       
  5393             )
       
  5394            (LabelSpec
       
  5395               label: 'Menu:'
       
  5396               name: 'menuLabel'
       
  5397               layout: (AlignmentOrigin 107 0 90 0 1 0.5)
       
  5398               activeHelpKey: basicsLabel
       
  5399               translateLabel: true
       
  5400               resizeForLabel: true
       
  5401               adjust: right
       
  5402             )
       
  5403            (InputFieldSpec
       
  5404               name: 'menuField'
       
  5405               layout: (LayoutFrame 110 0 79 0 -5 1.0 101 0)
       
  5406               activeHelpKey: basicsMenu
       
  5407               tabable: true
       
  5408               model: submenuChannel
       
  5409               group: inputGroup
       
  5410               type: symbolOrNil
       
  5411               immediateAccept: false
       
  5412               acceptOnReturn: true
       
  5413               acceptOnTab: true
       
  5414               acceptOnLostFocus: false
       
  5415               acceptChannel: acceptChannel
       
  5416               modifiedChannel: modifiedChannel
       
  5417               acceptOnPointerLeave: false
       
  5418             )
       
  5419            (LabelSpec
       
  5420               label: 'Argument:'
       
  5421               name: 'argumentLabel'
       
  5422               layout: (AlignmentOrigin 107 0 115 0 1 0.5)
       
  5423               activeHelpKey: basicsLabel
       
  5424               translateLabel: true
       
  5425               resizeForLabel: true
       
  5426               adjust: right
       
  5427             )
       
  5428            (InputFieldSpec
       
  5429               name: 'argumentField'
       
  5430               layout: (LayoutFrame 110 0 104 0 -5 1.0 126 0)
       
  5431               activeHelpKey: basicsMenuArgument
       
  5432               enableChannel: notDelayedMenu
       
  5433               tabable: true
       
  5434               model: argument
       
  5435               group: inputGroup
       
  5436               type: smalltalkObjectOrNil
       
  5437               immediateAccept: false
       
  5438               acceptOnReturn: true
       
  5439               acceptOnTab: true
       
  5440               acceptOnLostFocus: false
       
  5441               acceptChannel: acceptChannel
       
  5442               modifiedChannel: modifiedChannel
       
  5443               acceptOnPointerLeave: false
       
  5444             )
       
  5445            )
       
  5446 
       
  5447         )
       
  5448       )
       
  5449 ! !
       
  5450 
       
  5451 !MenuEditor::MenuSliceItem methodsFor:'accessing'!
       
  5452 
       
  5453 icon
       
  5454     ^ self class iconSliceMenu
       
  5455 !
       
  5456 
       
  5457 menuItem
       
  5458      "returns self as a MenuItem
       
  5459     "
       
  5460     |item|
       
  5461 
       
  5462     item := super menuItem.
       
  5463     item submenuChannel:(self submenuChannel).
       
  5464     item isMenuSlice:true.
       
  5465   ^ item
       
  5466 !
       
  5467 
       
  5468 slices
       
  5469     ^ #(
       
  5470 	    (Basics   basicsEditSpec)
       
  5471        )
       
  5472 ! !
       
  5473 
       
  5474 !MenuEditor::MenuSliceItem methodsFor:'aspects'!
       
  5475 
       
  5476 argument:aValue
       
  5477     menuItem argument:aValue.
       
  5478 !
       
  5479 
       
  5480 aspectAt:aKey put:aValue
       
  5481     "set a specific aspect named aKey to the aValue"
       
  5482 
       
  5483     aKey == #submenuChannel ifTrue:[ ^ self submenuChannel:aValue ].
       
  5484     aKey == #isSliceMenu    ifTrue:[ ^ self ].
       
  5485 
       
  5486     super aspectAt:aKey put:aValue.
       
  5487 
       
  5488     "Modified: / 05-09-2006 / 17:47:42 / cg"
       
  5489 !
       
  5490 
       
  5491 submenuChannel
       
  5492     ^ menuItem submenuChannel ? #unspecified
       
  5493 !
       
  5494 
       
  5495 submenuChannel:aValue
       
  5496     menuItem submenuChannel:aValue.
       
  5497 ! !
       
  5498 
       
  5499 !MenuEditor::RegularMenuItem class methodsFor:'defaults'!
       
  5500 
       
  5501 defaultDelayedLabel
       
  5502     ^ 'delayed'
       
  5503 !
       
  5504 
       
  5505 defaultLabel
       
  5506     ^ 'Menu'
       
  5507 ! !
       
  5508 
       
  5509 !MenuEditor::RegularMenuItem class methodsFor:'instance creation'!
       
  5510 
       
  5511 menu:aMenu labeled:aString
       
  5512     |item|
       
  5513 
       
  5514     item := self new.
       
  5515     item menu:aMenu labeled:aString.
       
  5516     ^ item
       
  5517 !
       
  5518 
       
  5519 menu:aMenu labeled:aString translateLabel:translateLabel
       
  5520     |item|
       
  5521 
       
  5522     item := self new.
       
  5523     item menu:aMenu labeled:aString.
       
  5524     item translateLabel:translateLabel.
       
  5525     ^ item
       
  5526 ! !
       
  5527 
       
  5528 !MenuEditor::RegularMenuItem class methodsFor:'interface specs'!
       
  5529 
       
  5530 basicsEditSpec
       
  5531     "This resource specification was automatically generated
       
  5532      by the UIPainter of ST/X."
       
  5533 
       
  5534     "Do not manually edit this!! If it is corrupted,
       
  5535      the UIPainter may not be able to read the specification."
       
  5536 
       
  5537     "
       
  5538      UIPainter new openOnClass:MenuEditor::RegularMenuItem andSelector:#basicsEditSpec
       
  5539     "
  5037     "
  5540 
  5038 
  5541     <resource: #canvas>
  5039     <resource: #canvas>
  5542 
  5040 
  5543     ^
  5041     ^
  5605 	      acceptOnLostFocus: false
  5103 	      acceptOnLostFocus: false
  5606 	      acceptChannel: acceptChannel
  5104 	      acceptChannel: acceptChannel
  5607 	      modifiedChannel: modifiedChannel
  5105 	      modifiedChannel: modifiedChannel
  5608 	      acceptOnPointerLeave: false
  5106 	      acceptOnPointerLeave: false
  5609 	    )
  5107 	    )
       
  5108 	   (LabelSpec
       
  5109 	      label: 'Menu:'
       
  5110 	      name: 'menuLabel'
       
  5111 	      layout: (AlignmentOrigin 107 0 90 0 1 0.5)
       
  5112 	      activeHelpKey: basicsLabel
       
  5113 	      translateLabel: true
       
  5114 	      resizeForLabel: true
       
  5115 	      adjust: right
       
  5116 	    )
       
  5117 	   (InputFieldSpec
       
  5118 	      name: 'menuField'
       
  5119 	      layout: (LayoutFrame 110 0 79 0 -5 1.0 101 0)
       
  5120 	      activeHelpKey: basicsMenu
       
  5121 	      tabable: true
       
  5122 	      model: submenuChannel
       
  5123 	      group: inputGroup
       
  5124 	      type: symbolOrNil
       
  5125 	      immediateAccept: false
       
  5126 	      acceptOnReturn: true
       
  5127 	      acceptOnTab: true
       
  5128 	      acceptOnLostFocus: false
       
  5129 	      acceptChannel: acceptChannel
       
  5130 	      modifiedChannel: modifiedChannel
       
  5131 	      acceptOnPointerLeave: false
       
  5132 	    )
       
  5133 	   (LabelSpec
       
  5134 	      label: 'Argument:'
       
  5135 	      name: 'argumentLabel'
       
  5136 	      layout: (AlignmentOrigin 107 0 115 0 1 0.5)
       
  5137 	      activeHelpKey: basicsLabel
       
  5138 	      translateLabel: true
       
  5139 	      resizeForLabel: true
       
  5140 	      adjust: right
       
  5141 	    )
       
  5142 	   (InputFieldSpec
       
  5143 	      name: 'argumentField'
       
  5144 	      layout: (LayoutFrame 110 0 104 0 -5 1.0 126 0)
       
  5145 	      activeHelpKey: basicsMenuArgument
       
  5146 	      enableChannel: notDelayedMenu
       
  5147 	      tabable: true
       
  5148 	      model: argument
       
  5149 	      group: inputGroup
       
  5150 	      type: smalltalkObjectOrNil
       
  5151 	      immediateAccept: false
       
  5152 	      acceptOnReturn: true
       
  5153 	      acceptOnTab: true
       
  5154 	      acceptOnLostFocus: false
       
  5155 	      acceptChannel: acceptChannel
       
  5156 	      modifiedChannel: modifiedChannel
       
  5157 	      acceptOnPointerLeave: false
       
  5158 	    )
  5610 	   (CheckBoxSpec
  5159 	   (CheckBoxSpec
  5611 	      label: 'Translate Label'
  5160 	      label: 'Translate Label'
  5612 	      name: 'translateLabelCheckBox'
  5161 	      name: 'translateLabelCheckBox'
  5613 	      layout: (Point 20 213)
  5162 	      layout: (Point 20 213)
  5614 	      activeHelpKey: basicsTranslateLabel
  5163 	      activeHelpKey: basicsTranslateLabel
  5634 	      activeHelpKey: horizontalLayout
  5183 	      activeHelpKey: horizontalLayout
  5635 	      tabable: true
  5184 	      tabable: true
  5636 	      model: horizontalLayout
  5185 	      model: horizontalLayout
  5637 	      translateLabel: true
  5186 	      translateLabel: true
  5638 	    )
  5187 	    )
       
  5188 	   (CheckBoxSpec
       
  5189 	      label: 'Do not Destroy Linked Menu'
       
  5190 	      name: 'keepLinkedMenu'
       
  5191 	      layout: (Point 20 288)
       
  5192 	      activeHelpKey: keepLinkedMenu
       
  5193 	      tabable: true
       
  5194 	      model: keepLinkedMenu
       
  5195 	      translateLabel: true
       
  5196 	    )
  5639 	   )
  5197 	   )
  5640 
  5198 
  5641 	)
  5199 	)
  5642       )
  5200       )
  5643 ! !
  5201 ! !
  5644 
  5202 
       
  5203 !MenuEditor::LinkedMenuItem methodsFor:'accessing'!
       
  5204 
       
  5205 argument:aValue
       
  5206     menuItem argument:aValue.
       
  5207 !
       
  5208 
       
  5209 menuItem
       
  5210      "returns self as a MenuItem
       
  5211     "
       
  5212     |item|
       
  5213 
       
  5214     item := super menuItem.
       
  5215     item submenuChannel:(self submenuChannel).
       
  5216   ^ item
       
  5217 !
       
  5218 
       
  5219 slices
       
  5220     self isDelayedMenu ifTrue:[
       
  5221 	^ #(
       
  5222 		(Basics   basicsEditSpec )
       
  5223 	   )
       
  5224     ].
       
  5225 
       
  5226     ^ #(
       
  5227 	    (Basics   basicsEditSpec )
       
  5228 	    (Details  detailsEditSpec)
       
  5229 	    (Image    image  )
       
  5230 	    (Help     help)
       
  5231        )
       
  5232 !
       
  5233 
       
  5234 submenuChannel
       
  5235     ^ menuItem submenuChannel ? #unspecified
       
  5236 !
       
  5237 
       
  5238 submenuChannel:aValue
       
  5239     menuItem submenuChannel:aValue.
       
  5240 ! !
       
  5241 
       
  5242 !MenuEditor::LinkedMenuItem methodsFor:'aspects'!
       
  5243 
       
  5244 aspectAt:aKey put:aValue
       
  5245     "set a specific aspect named aKey to the aValue"
       
  5246 
       
  5247     aKey == #submenuChannel ifTrue:[ ^ self submenuChannel:aValue ].
       
  5248     super aspectAt:aKey put:aValue.
       
  5249 
       
  5250     "Modified: / 05-09-2006 / 17:47:39 / cg"
       
  5251 !
       
  5252 
       
  5253 getDelayedAttributesFrom:anItem
       
  5254 
       
  5255     menuItem rawLabel:'Delayed'.
       
  5256 
       
  5257     menuItem   submenuChannel:(self validateValue:(anItem submenuChannel)).
       
  5258     menuItem horizontalLayout:(self validateValue:(anItem horizontalLayout)).
       
  5259     menuItem   keepLinkedMenu:(self validateValue:(anItem keepLinkedMenu)).
       
  5260 !
       
  5261 
       
  5262 setDelayedAttributesTo:aMenuItem
       
  5263     aMenuItem   submenuChannel:(self submenuChannel).
       
  5264     aMenuItem horizontalLayout:(menuItem horizontalLayout).
       
  5265     aMenuItem   keepLinkedMenu:(menuItem keepLinkedMenu).
       
  5266 ! !
       
  5267 
       
  5268 !MenuEditor::LinkedMenuItem methodsFor:'displaying'!
       
  5269 
       
  5270 displayLabel
       
  5271     "returns the label dependent on is delayed or not
       
  5272     "
       
  5273     self isDelayedMenu ifTrue:[ ^ self submenuChannel ].
       
  5274   ^ menuItem rawLabel
       
  5275 !
       
  5276 
       
  5277 icon
       
  5278     self isDelayedMenu ifTrue:[ ^ self class iconDelayedLinkedMenu ].
       
  5279   ^ self class iconLinkedMenu
       
  5280 ! !
       
  5281 
       
  5282 !MenuEditor::LinkedMenuItem methodsFor:'initialization'!
       
  5283 
       
  5284 initialize
       
  5285     "setup default values on the item
       
  5286     "
       
  5287     super initialize.
       
  5288 
       
  5289     "setting default values
       
  5290     "
       
  5291     "/ CG: Thu, 08 May 2008 11:16:54 GMT
       
  5292     "/     I think having keepLinkedMenu true by default
       
  5293     "/     will confuse newcomers (even me occasionally)
       
  5294     "/     (will search, why the menu is not updated...)
       
  5295 
       
  5296     "/ menuItem keepLinkedMenu:true.
       
  5297     menuItem keepLinkedMenu:false.
       
  5298 ! !
       
  5299 
       
  5300 !MenuEditor::LinkedMenuItem methodsFor:'queries'!
       
  5301 
       
  5302 isKindOfMenu
       
  5303     ^ true
       
  5304 ! !
       
  5305 
       
  5306 !MenuEditor::MenuSliceItem class methodsFor:'defaults'!
       
  5307 
       
  5308 defaultLabel
       
  5309     ^ 'Menu Slice'
       
  5310 ! !
       
  5311 
       
  5312 !MenuEditor::MenuSliceItem class methodsFor:'interface specs'!
       
  5313 
       
  5314 basicsEditSpec
       
  5315     "This resource specification was automatically generated
       
  5316      by the UIPainter of ST/X."
       
  5317 
       
  5318     "Do not manually edit this!! If it is corrupted,
       
  5319      the UIPainter may not be able to read the specification."
       
  5320 
       
  5321     "
       
  5322      UIPainter new openOnClass:MenuEditor::MenuSliceItem andSelector:#basicsEditSpec
       
  5323     "
       
  5324 
       
  5325     <resource: #canvas>
       
  5326 
       
  5327     ^
       
  5328      #(FullSpec
       
  5329 	name: basicsEditSpec
       
  5330 	window:
       
  5331        (WindowSpec
       
  5332 	  label: 'basicsEditSpec'
       
  5333 	  name: 'basicsEditSpec'
       
  5334 	  min: (Point 10 10)
       
  5335 	  bounds: (Rectangle 0 0 344 146)
       
  5336 	)
       
  5337 	component:
       
  5338        (SpecCollection
       
  5339 	  collection: (
       
  5340 	   (LabelSpec
       
  5341 	      label: 'Name Key:'
       
  5342 	      name: 'nameKeyLabel'
       
  5343 	      layout: (AlignmentOrigin 107 0 25 0 1 0.5)
       
  5344 	      activeHelpKey: basicsKey
       
  5345 	      visibilityChannel: notDelayedMenu
       
  5346 	      translateLabel: true
       
  5347 	      resizeForLabel: true
       
  5348 	      adjust: right
       
  5349 	    )
       
  5350 	   (InputFieldSpec
       
  5351 	      name: 'nameKeyField'
       
  5352 	      layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0)
       
  5353 	      activeHelpKey: basicsKey
       
  5354 	      visibilityChannel: notDelayedMenu
       
  5355 	      tabable: true
       
  5356 	      model: nameKey
       
  5357 	      group: inputGroup
       
  5358 	      type: symbolOrNil
       
  5359 	      immediateAccept: false
       
  5360 	      acceptOnLeave: false
       
  5361 	      acceptOnReturn: true
       
  5362 	      acceptOnTab: true
       
  5363 	      acceptOnLostFocus: false
       
  5364 	      acceptChannel: acceptChannel
       
  5365 	      modifiedChannel: modifiedChannel
       
  5366 	      acceptOnPointerLeave: false
       
  5367 	    )
       
  5368 	   (LabelSpec
       
  5369 	      label: 'Label:'
       
  5370 	      name: 'labelLabel'
       
  5371 	      layout: (AlignmentOrigin 107 0 51 0 1 0.5)
       
  5372 	      activeHelpKey: basicsLabel
       
  5373 	      visibilityChannel: notDelayedMenu
       
  5374 	      translateLabel: true
       
  5375 	      resizeForLabel: true
       
  5376 	      adjust: right
       
  5377 	    )
       
  5378 	   (InputFieldSpec
       
  5379 	      name: 'labelField'
       
  5380 	      layout: (LayoutFrame 110 0 40 0 -5 1.0 62 0)
       
  5381 	      activeHelpKey: basicsLabel
       
  5382 	      visibilityChannel: notDelayedMenu
       
  5383 	      tabable: true
       
  5384 	      model: rawLabel
       
  5385 	      group: inputGroup
       
  5386 	      immediateAccept: false
       
  5387 	      acceptOnReturn: true
       
  5388 	      acceptOnTab: true
       
  5389 	      acceptOnLostFocus: false
       
  5390 	      acceptChannel: acceptChannel
       
  5391 	      modifiedChannel: modifiedChannel
       
  5392 	      acceptOnPointerLeave: false
       
  5393 	    )
       
  5394 	   (LabelSpec
       
  5395 	      label: 'Menu:'
       
  5396 	      name: 'menuLabel'
       
  5397 	      layout: (AlignmentOrigin 107 0 90 0 1 0.5)
       
  5398 	      activeHelpKey: basicsLabel
       
  5399 	      translateLabel: true
       
  5400 	      resizeForLabel: true
       
  5401 	      adjust: right
       
  5402 	    )
       
  5403 	   (InputFieldSpec
       
  5404 	      name: 'menuField'
       
  5405 	      layout: (LayoutFrame 110 0 79 0 -5 1.0 101 0)
       
  5406 	      activeHelpKey: basicsMenu
       
  5407 	      tabable: true
       
  5408 	      model: submenuChannel
       
  5409 	      group: inputGroup
       
  5410 	      type: symbolOrNil
       
  5411 	      immediateAccept: false
       
  5412 	      acceptOnReturn: true
       
  5413 	      acceptOnTab: true
       
  5414 	      acceptOnLostFocus: false
       
  5415 	      acceptChannel: acceptChannel
       
  5416 	      modifiedChannel: modifiedChannel
       
  5417 	      acceptOnPointerLeave: false
       
  5418 	    )
       
  5419 	   (LabelSpec
       
  5420 	      label: 'Argument:'
       
  5421 	      name: 'argumentLabel'
       
  5422 	      layout: (AlignmentOrigin 107 0 115 0 1 0.5)
       
  5423 	      activeHelpKey: basicsLabel
       
  5424 	      translateLabel: true
       
  5425 	      resizeForLabel: true
       
  5426 	      adjust: right
       
  5427 	    )
       
  5428 	   (InputFieldSpec
       
  5429 	      name: 'argumentField'
       
  5430 	      layout: (LayoutFrame 110 0 104 0 -5 1.0 126 0)
       
  5431 	      activeHelpKey: basicsMenuArgument
       
  5432 	      enableChannel: notDelayedMenu
       
  5433 	      tabable: true
       
  5434 	      model: argument
       
  5435 	      group: inputGroup
       
  5436 	      type: smalltalkObjectOrNil
       
  5437 	      immediateAccept: false
       
  5438 	      acceptOnReturn: true
       
  5439 	      acceptOnTab: true
       
  5440 	      acceptOnLostFocus: false
       
  5441 	      acceptChannel: acceptChannel
       
  5442 	      modifiedChannel: modifiedChannel
       
  5443 	      acceptOnPointerLeave: false
       
  5444 	    )
       
  5445 	   )
       
  5446 
       
  5447 	)
       
  5448       )
       
  5449 ! !
       
  5450 
       
  5451 !MenuEditor::MenuSliceItem methodsFor:'accessing'!
       
  5452 
       
  5453 icon
       
  5454     ^ self class iconSliceMenu
       
  5455 !
       
  5456 
       
  5457 menuItem
       
  5458      "returns self as a MenuItem
       
  5459     "
       
  5460     |item|
       
  5461 
       
  5462     item := super menuItem.
       
  5463     item submenuChannel:(self submenuChannel).
       
  5464     item isMenuSlice:true.
       
  5465   ^ item
       
  5466 !
       
  5467 
       
  5468 slices
       
  5469     ^ #(
       
  5470 	    (Basics   basicsEditSpec)
       
  5471        )
       
  5472 ! !
       
  5473 
       
  5474 !MenuEditor::MenuSliceItem methodsFor:'aspects'!
       
  5475 
       
  5476 argument:aValue
       
  5477     menuItem argument:aValue.
       
  5478 !
       
  5479 
       
  5480 aspectAt:aKey put:aValue
       
  5481     "set a specific aspect named aKey to the aValue"
       
  5482 
       
  5483     aKey == #submenuChannel ifTrue:[ ^ self submenuChannel:aValue ].
       
  5484     aKey == #isSliceMenu    ifTrue:[ ^ self ].
       
  5485 
       
  5486     super aspectAt:aKey put:aValue.
       
  5487 
       
  5488     "Modified: / 05-09-2006 / 17:47:42 / cg"
       
  5489 !
       
  5490 
       
  5491 submenuChannel
       
  5492     ^ menuItem submenuChannel ? #unspecified
       
  5493 !
       
  5494 
       
  5495 submenuChannel:aValue
       
  5496     menuItem submenuChannel:aValue.
       
  5497 ! !
       
  5498 
       
  5499 !MenuEditor::RegularMenuItem class methodsFor:'defaults'!
       
  5500 
       
  5501 defaultDelayedLabel
       
  5502     ^ 'delayed'
       
  5503 !
       
  5504 
       
  5505 defaultLabel
       
  5506     ^ 'Menu'
       
  5507 ! !
       
  5508 
       
  5509 !MenuEditor::RegularMenuItem class methodsFor:'instance creation'!
       
  5510 
       
  5511 menu:aMenu labeled:aString
       
  5512     |item|
       
  5513 
       
  5514     item := self new.
       
  5515     item menu:aMenu labeled:aString.
       
  5516     ^ item
       
  5517 !
       
  5518 
       
  5519 menu:aMenu labeled:aString translateLabel:translateLabel
       
  5520     |item|
       
  5521 
       
  5522     item := self new.
       
  5523     item menu:aMenu labeled:aString.
       
  5524     item translateLabel:translateLabel.
       
  5525     ^ item
       
  5526 ! !
       
  5527 
       
  5528 !MenuEditor::RegularMenuItem class methodsFor:'interface specs'!
       
  5529 
       
  5530 basicsEditSpec
       
  5531     "This resource specification was automatically generated
       
  5532      by the UIPainter of ST/X."
       
  5533 
       
  5534     "Do not manually edit this!! If it is corrupted,
       
  5535      the UIPainter may not be able to read the specification."
       
  5536 
       
  5537     "
       
  5538      UIPainter new openOnClass:MenuEditor::RegularMenuItem andSelector:#basicsEditSpec
       
  5539     "
       
  5540 
       
  5541     <resource: #canvas>
       
  5542 
       
  5543     ^
       
  5544      #(FullSpec
       
  5545 	name: basicsEditSpec
       
  5546 	window:
       
  5547        (WindowSpec
       
  5548 	  label: 'basicsEditSpec'
       
  5549 	  name: 'basicsEditSpec'
       
  5550 	  min: (Point 10 10)
       
  5551 	  bounds: (Rectangle 0 0 340 340)
       
  5552 	)
       
  5553 	component:
       
  5554        (SpecCollection
       
  5555 	  collection: (
       
  5556 	   (LabelSpec
       
  5557 	      label: 'Name Key:'
       
  5558 	      name: 'nameKeyLabel'
       
  5559 	      layout: (AlignmentOrigin 107 0 25 0 1 0.5)
       
  5560 	      activeHelpKey: basicsKey
       
  5561 	      visibilityChannel: notDelayedMenu
       
  5562 	      translateLabel: true
       
  5563 	      resizeForLabel: true
       
  5564 	      adjust: right
       
  5565 	    )
       
  5566 	   (InputFieldSpec
       
  5567 	      name: 'nameKeyField'
       
  5568 	      layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0)
       
  5569 	      activeHelpKey: basicsKey
       
  5570 	      visibilityChannel: notDelayedMenu
       
  5571 	      tabable: true
       
  5572 	      model: nameKey
       
  5573 	      group: inputGroup
       
  5574 	      type: symbolOrNil
       
  5575 	      immediateAccept: false
       
  5576 	      acceptOnLeave: false
       
  5577 	      acceptOnReturn: true
       
  5578 	      acceptOnTab: true
       
  5579 	      acceptOnLostFocus: false
       
  5580 	      acceptChannel: acceptChannel
       
  5581 	      modifiedChannel: modifiedChannel
       
  5582 	      acceptOnPointerLeave: false
       
  5583 	    )
       
  5584 	   (LabelSpec
       
  5585 	      label: 'Label:'
       
  5586 	      name: 'labelLabel'
       
  5587 	      layout: (AlignmentOrigin 107 0 51 0 1 0.5)
       
  5588 	      activeHelpKey: basicsLabel
       
  5589 	      visibilityChannel: notDelayedMenu
       
  5590 	      translateLabel: true
       
  5591 	      resizeForLabel: true
       
  5592 	      adjust: right
       
  5593 	    )
       
  5594 	   (InputFieldSpec
       
  5595 	      name: 'labelField'
       
  5596 	      layout: (LayoutFrame 110 0 40 0 -5 1.0 62 0)
       
  5597 	      activeHelpKey: basicsLabel
       
  5598 	      visibilityChannel: notDelayedMenu
       
  5599 	      tabable: true
       
  5600 	      model: rawLabel
       
  5601 	      group: inputGroup
       
  5602 	      immediateAccept: false
       
  5603 	      acceptOnReturn: true
       
  5604 	      acceptOnTab: true
       
  5605 	      acceptOnLostFocus: false
       
  5606 	      acceptChannel: acceptChannel
       
  5607 	      modifiedChannel: modifiedChannel
       
  5608 	      acceptOnPointerLeave: false
       
  5609 	    )
       
  5610 	   (CheckBoxSpec
       
  5611 	      label: 'Translate Label'
       
  5612 	      name: 'translateLabelCheckBox'
       
  5613 	      layout: (Point 20 213)
       
  5614 	      activeHelpKey: basicsTranslateLabel
       
  5615 	      visibilityChannel: notDelayedMenu
       
  5616 	      tabable: true
       
  5617 	      model: translateLabel
       
  5618 	      translateLabel: true
       
  5619 	    )
       
  5620 	   (CheckBoxSpec
       
  5621 	      label: 'Is Button'
       
  5622 	      name: 'isButtonCheckBox'
       
  5623 	      layout: (Point 20 238)
       
  5624 	      activeHelpKey: basicsIsButton
       
  5625 	      visibilityChannel: notDelayedMenu
       
  5626 	      tabable: true
       
  5627 	      model: isButton
       
  5628 	      translateLabel: true
       
  5629 	    )
       
  5630 	   (CheckBoxSpec
       
  5631 	      label: 'Horizontal Layout'
       
  5632 	      name: 'horizontalLayout'
       
  5633 	      layout: (Point 20 263)
       
  5634 	      activeHelpKey: horizontalLayout
       
  5635 	      tabable: true
       
  5636 	      model: horizontalLayout
       
  5637 	      translateLabel: true
       
  5638 	    )
       
  5639 	   )
       
  5640 
       
  5641 	)
       
  5642       )
       
  5643 ! !
       
  5644 
  5645 !MenuEditor::RegularMenuItem methodsFor:'accessing'!
  5645 !MenuEditor::RegularMenuItem methodsFor:'accessing'!
  5646 
  5646 
  5647 argument:aValue
  5647 argument:aValue
  5648     "/ ignorred.
  5648     "/ ignorred.
  5649 !
  5649 !
  5650 
  5650 
  5651 menu:aMenu labeled:aString
  5651 menu:aMenu labeled:aString
  5652     |expanded item menu|
  5652     |expanded item menu|
  5653 
  5653 
  5654     self criticalDo:[
  5654     self criticalDo:[
  5655         self isRootItem ifTrue:[ expanded := true ]
  5655 	self isRootItem ifTrue:[ expanded := true ]
  5656                        ifFalse:[ expanded := isExpanded ].
  5656 		       ifFalse:[ expanded := isExpanded ].
  5657 
  5657 
  5658         self removeAll.
  5658 	self removeAll.
  5659         self rawLabel:aString.
  5659 	self rawLabel:aString.
  5660 
  5660 
  5661         menu := aMenu value.
  5661 	menu := aMenu value.
  5662 
  5662 
  5663         (menu isNil or:[menu isString]) ifTrue:[
  5663 	(menu isNil or:[menu isString]) ifTrue:[
  5664             menu := nil
  5664 	    menu := nil
  5665         ] ifFalse:[
  5665 	] ifFalse:[
  5666             aMenu isCollection ifTrue:[ menu := Menu decodeFromLiteralArray:aMenu ]
  5666 	    aMenu isCollection ifTrue:[ menu := Menu decodeFromLiteralArray:aMenu ]
  5667                               ifFalse:[ menu := aMenu ].
  5667 			      ifFalse:[ menu := aMenu ].
  5668 
  5668 
  5669             menu hasItems ifFalse:[
  5669 	    menu hasItems ifFalse:[
  5670                 menu := nil
  5670 		menu := nil
  5671             ].
  5671 	    ].
  5672         ].
  5672 	].
  5673         menu notNil ifTrue:[
  5673 	menu notNil ifTrue:[
  5674             isExpanded := false.        "/ discard change notifications
  5674 	    isExpanded := false.        "/ discard change notifications
  5675             children   := OrderedCollection new.
  5675 	    children   := OrderedCollection new.
  5676 
  5676 
  5677             menu itemsDo:[:el|
  5677 	    menu itemsDo:[:el|
  5678                 item := self class menuItem:el.
  5678 		item := self class menuItem:el.
  5679                 item parent:self.
  5679 		item parent:self.
  5680                 children add:item.
  5680 		children add:item.
  5681             ].
  5681 	    ].
  5682             expanded ifTrue:[ self expand ].
  5682 	    expanded ifTrue:[ self expand ].
  5683         ].
  5683 	].
  5684         isExpanded := expanded.
  5684 	isExpanded := expanded.
  5685     ].
  5685     ].
  5686     self changed
  5686     self changed
  5687 
  5687 
  5688     "Modified: / 29-11-2011 / 11:28:33 / cg"
  5688     "Modified: / 29-11-2011 / 11:28:33 / cg"
  5689 !
  5689 !
  6112 
  6112 
  6113 rawLabel:aValue
  6113 rawLabel:aValue
  6114     |value|
  6114     |value|
  6115 
  6115 
  6116     aValue isString ifTrue:[
  6116     aValue isString ifTrue:[
  6117         value := aValue withoutSeparators.
  6117 	value := aValue withoutSeparators.
  6118 
  6118 
  6119         (self class separatorTypeOf:value) notNil ifTrue:[
  6119 	(self class separatorTypeOf:value) notNil ifTrue:[
  6120             menuItem rawLabel:value
  6120 	    menuItem rawLabel:value
  6121         ]
  6121 	]
  6122     ].
  6122     ].
  6123 
  6123 
  6124     "Modified: / 29-11-2011 / 11:28:39 / cg"
  6124     "Modified: / 29-11-2011 / 11:28:39 / cg"
  6125 !
  6125 !
  6126 
  6126