# HG changeset patch # User Claus Gittinger # Date 1370349112 -7200 # Node ID 4aa95683c0fcead39f8a3c22bc46ba936c7e9549 # Parent 27eb0659e5f0ae3e4e5c639ab45a5d2b9dd19c56 *** empty log message *** diff -r 27eb0659e5f0 -r 4aa95683c0fc MenuEditor.st --- a/MenuEditor.st Tue Jun 04 12:59:34 2013 +0200 +++ b/MenuEditor.st Tue Jun 04 14:31:52 2013 +0200 @@ -112,32 +112,32 @@ [Instance variables:] - listOfItemsView the view which shows the list of items - listOfItems hierarchical list of menu items - listOfTabs list of current shown tab-labels - - selectionHolder collection of current selected items - selectedSuperItems collection of superItems derived from selection - - tabHolder selected tab label holder - notifyDisabledCounter ~~ 0 than change notifications are discard - wizards keeps all created wizard dialogs - - dropOverLine nil: drop context not dropabel. - = 0: drop context dropable but no item specified - ~ 0: drop context dropable for item at lineNumber - used t6o restore drop indication drawings + listOfItemsView the view which shows the list of items + listOfItems hierarchical list of menu items + listOfTabs list of current shown tab-labels + + selectionHolder collection of current selected items + selectedSuperItems collection of superItems derived from selection + + tabHolder selected tab label holder + notifyDisabledCounter ~~ 0 than change notifications are discard + wizards keeps all created wizard dialogs + + dropOverLine nil: drop context not dropabel. + = 0: drop context dropable but no item specified + ~ 0: drop context dropable for item at lineNumber + used t6o restore drop indication drawings [Class variables:] - ImageRetrieverClasses sorted collection of image receivers + ImageRetrieverClasses sorted collection of image receivers [start with:] - MenuEditor open - MenuEditor openOnClass:MenuEditor andSelector:#menu + MenuEditor open + MenuEditor openOnClass:MenuEditor andSelector:#menu [author:] - Claus Atzkern, eXept Software AG - Thomas Zwick, eXept Software AG + Claus Atzkern, eXept Software AG + Thomas Zwick, eXept Software AG " ! ! @@ -402,7 +402,7 @@ 'If on, the menu hides itself after the item was activated (PopUp/PullDown-Menus only).' #horizontalLayout -'If on, the submenu organizes its items horizontal insteat of vertical (default).' +'If on, the submenu organizes its items horizontal instead of vertical (default).' #imageImageAndLabel 'Toggle display of both image and textual label.' @@ -606,73 +606,73 @@ ^ #(Menu - ( - (MenuItem - activeHelpKey: addMenuSeparator - label: 'Separator' - itemValue: doCreateSep - translateLabel: true - labelImage: (ResourceRetriever #'MenuEditor::Item' iconSeparator '') - ) - (MenuItem - activeHelpKey: addMenuItem - label: 'Item' - itemValue: doCreateItem - translateLabel: true - labelImage: (ResourceRetriever #'MenuEditor::Item' iconItem '') - ) - (MenuItem - activeHelpKey: addMenuSliceItem - label: 'Menu Slice' - itemValue: doCreateMenuSliceItem - translateLabel: true - labelImage: (ResourceRetriever #'MenuEditor::Item' iconSliceMenu '') - ) - (MenuItem - activeHelpKey: addMenuItem - label: 'Menu' - itemValue: doCreateMenu - translateLabel: true - labelImage: (ResourceRetriever #'MenuEditor::Item' iconMenu '') - ) - (MenuItem - activeHelpKey: addSubMenuLink - label: 'Linked Menu' - itemValue: doCreateLinkedMenu - translateLabel: true - labelImage: (ResourceRetriever #'MenuEditor::Item' iconLinkedMenu '') - ) - (MenuItem - label: '-' - ) - (MenuItem - activeHelpKey: addDelayedMenu - enabled: canCreateDelayedMenuChannel - label: 'Delayed Menu' - itemValue: doCreateDelayedMenu: - translateLabel: true - labelImage: (ResourceRetriever #'MenuEditor::Item' iconDelayedMenu '') - argument: menu - ) - (MenuItem - activeHelpKey: addDelayedSubMenuLink - enabled: canCreateDelayedMenuChannel - label: 'Delayed Linked Menu' - itemValue: doCreateDelayedMenu: - translateLabel: true - labelImage: (ResourceRetriever #'MenuEditor::Item' iconDelayedLinkedMenu '') - argument: linkedMenu - ) - (MenuItem - label: '-' - ) - (MenuItem - label: 'Standard Menus' - translateLabel: true - submenuChannel: standardMenus - keepLinkedMenu: true - ) - ) + ( + (MenuItem + activeHelpKey: addMenuSeparator + label: 'Separator' + itemValue: doCreateSep + translateLabel: true + labelImage: (ResourceRetriever #'MenuEditor::Item' iconSeparator '') + ) + (MenuItem + activeHelpKey: addMenuItem + label: 'Item' + itemValue: doCreateItem + translateLabel: true + labelImage: (ResourceRetriever #'MenuEditor::Item' iconItem '') + ) + (MenuItem + activeHelpKey: addMenuSliceItem + label: 'Menu Slice' + itemValue: doCreateMenuSliceItem + translateLabel: true + labelImage: (ResourceRetriever #'MenuEditor::Item' iconSliceMenu '') + ) + (MenuItem + activeHelpKey: addMenuItem + label: 'Menu' + itemValue: doCreateMenu + translateLabel: true + labelImage: (ResourceRetriever #'MenuEditor::Item' iconMenu '') + ) + (MenuItem + activeHelpKey: addSubMenuLink + label: 'Linked Menu' + itemValue: doCreateLinkedMenu + translateLabel: true + labelImage: (ResourceRetriever #'MenuEditor::Item' iconLinkedMenu '') + ) + (MenuItem + label: '-' + ) + (MenuItem + activeHelpKey: addDelayedMenu + enabled: canCreateDelayedMenuChannel + label: 'Delayed Menu' + itemValue: doCreateDelayedMenu: + translateLabel: true + labelImage: (ResourceRetriever #'MenuEditor::Item' iconDelayedMenu '') + argument: menu + ) + (MenuItem + activeHelpKey: addDelayedSubMenuLink + enabled: canCreateDelayedMenuChannel + label: 'Delayed Linked Menu' + itemValue: doCreateDelayedMenu: + translateLabel: true + labelImage: (ResourceRetriever #'MenuEditor::Item' iconDelayedLinkedMenu '') + argument: linkedMenu + ) + (MenuItem + label: '-' + ) + (MenuItem + label: 'Standard Menus' + translateLabel: true + submenuChannel: standardMenus + keepLinkedMenu: true + ) + ) "/ nil "/ nil ) @@ -692,96 +692,96 @@ - ^ + ^ #(Menu - ( - (MenuItem - activeHelpKey: editCut - enabled: hasSelectionChannel - label: 'Cut' - itemValue: doCut - translateLabel: true - shortcutKey: Cut - ) - (MenuItem - activeHelpKey: editCopy - enabled: hasSelectionChannel - label: 'Copy' - itemValue: doCopy - translateLabel: true - shortcutKey: Copy - ) - (MenuItem - activeHelpKey: editPaste - enabled: canPasteHolder - label: 'Paste' - itemValue: doPaste - translateLabel: true - shortcutKey: Paste - ) - (MenuItem - activeHelpKey: editDelete - enabled: hasSelectionChannel - label: 'Delete' - itemValue: doDelete - translateLabel: true - isVisible: false - ) - (MenuItem - label: '-' - ) - (MenuItem - activeHelpKey: editMoveUp - enabled: enableMovingUpOrDownHolder - label: 'Move Up' - itemValue: doMoveUpOrDown: - translateLabel: true - startGroup: right - shortcutKey: CtrlCursorUp - labelImage: (ResourceRetriever Icon upIcon 'Move Up') - argument: up - ) - (MenuItem - activeHelpKey: editMoveDown - enabled: enableMovingUpOrDownHolder - label: 'Move Down' - itemValue: doMoveUpOrDown: - translateLabel: true - shortcutKey: CtrlCursorDown - labelImage: (ResourceRetriever Icon downIcon 'Move Down') - argument: down - ) - (MenuItem - activeHelpKey: editMoveIn - enabled: enableMovingInHolder - label: 'Move Into Next' - itemValue: doMoveIn: - translateLabel: true - shortcutKey: CtrlCursorRight - labelImage: (ResourceRetriever Icon downRightIcon 'Move Into Next') - argument: inNext - ) - (MenuItem - activeHelpKey: editMoveInAbove - enabled: enableMovingInAboveHolder - label: 'Move Into Previous' - itemValue: doMoveIn: - translateLabel: true - labelImage: (ResourceRetriever Icon upRightIcon 'Move Into Previous' ) - argument: inPrev - ) - (MenuItem - activeHelpKey: editMoveOut - enabled: enableMovingOutHolder - label: 'Move Out' - itemValue: doMoveOut - translateLabel: true - shortcutKey: CtrlCursorLeft - labelImage: (ResourceRetriever Icon leftDownIcon 'Move Out' ) - ) - ) - nil - nil + ( + (MenuItem + activeHelpKey: editCut + enabled: hasSelectionChannel + label: 'Cut' + itemValue: doCut + translateLabel: true + shortcutKey: Cut + ) + (MenuItem + activeHelpKey: editCopy + enabled: hasSelectionChannel + label: 'Copy' + itemValue: doCopy + translateLabel: true + shortcutKey: Copy + ) + (MenuItem + activeHelpKey: editPaste + enabled: canPasteHolder + label: 'Paste' + itemValue: doPaste + translateLabel: true + shortcutKey: Paste + ) + (MenuItem + activeHelpKey: editDelete + enabled: hasSelectionChannel + label: 'Delete' + itemValue: doDelete + translateLabel: true + isVisible: false + ) + (MenuItem + label: '-' + ) + (MenuItem + activeHelpKey: editMoveUp + enabled: enableMovingUpOrDownHolder + label: 'Move Up' + itemValue: doMoveUpOrDown: + translateLabel: true + startGroup: right + shortcutKey: CtrlCursorUp + labelImage: (ResourceRetriever Icon upIcon 'Move Up') + argument: up + ) + (MenuItem + activeHelpKey: editMoveDown + enabled: enableMovingUpOrDownHolder + label: 'Move Down' + itemValue: doMoveUpOrDown: + translateLabel: true + shortcutKey: CtrlCursorDown + labelImage: (ResourceRetriever Icon downIcon 'Move Down') + argument: down + ) + (MenuItem + activeHelpKey: editMoveIn + enabled: enableMovingInHolder + label: 'Move Into Next' + itemValue: doMoveIn: + translateLabel: true + shortcutKey: CtrlCursorRight + labelImage: (ResourceRetriever Icon downRightIcon 'Move Into Next') + argument: inNext + ) + (MenuItem + activeHelpKey: editMoveInAbove + enabled: enableMovingInAboveHolder + label: 'Move Into Previous' + itemValue: doMoveIn: + translateLabel: true + labelImage: (ResourceRetriever Icon upRightIcon 'Move Into Previous' ) + argument: inPrev + ) + (MenuItem + activeHelpKey: editMoveOut + enabled: enableMovingOutHolder + label: 'Move Out' + itemValue: doMoveOut + translateLabel: true + shortcutKey: CtrlCursorLeft + labelImage: (ResourceRetriever Icon leftDownIcon 'Move Out' ) + ) + ) + nil + nil ) ! @@ -899,100 +899,100 @@ - ^ + ^ #(Menu - ( - (MenuItem - isVisible: isNotEditingSpecOnlyAndNotEmbeddedInBrowser - activeHelpKey: fileNew - label: 'New' - itemValue: doNew - translateLabel: true - ) - (MenuItem - isVisible: isNotEditingSpecOnlyAndNotEmbeddedInBrowser - label: '-' - ) - (MenuItem - isVisible: isNotEditingSpecOnlyAndNotEmbeddedInBrowser - activeHelpKey: fileLoad - label: 'Load...' - itemValue: doLoad - translateLabel: true - ) - (MenuItem - isVisible: isNotEditingSpecOnlyAndNotEmbeddedInBrowser - label: '-' - ) - (MenuItem - isVisible: isEditingSpecOnly - activeHelpKey: fileSaveSpec - label: 'Save' - itemValue: doSave - translateLabel: true - ) - (MenuItem - isVisible: isNotEditingSpecOnly - activeHelpKey: fileSave - label: 'Save' - itemValue: doSave - translateLabel: true - ) - (MenuItem - isVisible: isNotEditingSpecOnlyAndNotEmbeddedInBrowser - activeHelpKey: fileSaveAs - label: 'Save As...' - itemValue: doSaveAs - translateLabel: true - ) - (MenuItem - label: '-' - ) - (MenuItem - activeHelpKey: filePickAMenu - label: 'Pick a Menu...' - itemValue: doPickAMenu - translateLabel: true - ) - (MenuItem - activeHelpKey: fileChooseAMenu - label: 'Choose a Menu...' - itemValue: doChooseAMenu - translateLabel: true - ) - (MenuItem - label: '-' - isVisible: isStandAlone - ) - (MenuItem - activeHelpKey: fileBrowseClass - enabled: hasValidSpecClass - label: 'Browse Class' - itemValue: doBrowseClass - translateLabel: true - isVisible: isStandAlone - ) - (MenuItem - activeHelpKey: fileShowMenuSpec - label: 'Show Menu Spec' - itemValue: doShowMenuSpec - translateLabel: true - isVisible: isStandAlone - ) - (MenuItem - label: '-' - isVisible: isStandAlone - ) - (MenuItem - activeHelpKey: fileExit - label: 'Exit' - itemValue: closeRequest - translateLabel: true - isVisible: isStandAlone - ) - ) - nil - nil + ( + (MenuItem + isVisible: isNotEditingSpecOnlyAndNotEmbeddedInBrowser + activeHelpKey: fileNew + label: 'New' + itemValue: doNew + translateLabel: true + ) + (MenuItem + isVisible: isNotEditingSpecOnlyAndNotEmbeddedInBrowser + label: '-' + ) + (MenuItem + isVisible: isNotEditingSpecOnlyAndNotEmbeddedInBrowser + activeHelpKey: fileLoad + label: 'Load...' + itemValue: doLoad + translateLabel: true + ) + (MenuItem + isVisible: isNotEditingSpecOnlyAndNotEmbeddedInBrowser + label: '-' + ) + (MenuItem + isVisible: isEditingSpecOnly + activeHelpKey: fileSaveSpec + label: 'Save' + itemValue: doSave + translateLabel: true + ) + (MenuItem + isVisible: isNotEditingSpecOnly + activeHelpKey: fileSave + label: 'Save' + itemValue: doSave + translateLabel: true + ) + (MenuItem + isVisible: isNotEditingSpecOnlyAndNotEmbeddedInBrowser + activeHelpKey: fileSaveAs + label: 'Save As...' + itemValue: doSaveAs + translateLabel: true + ) + (MenuItem + label: '-' + ) + (MenuItem + activeHelpKey: filePickAMenu + label: 'Pick a Menu...' + itemValue: doPickAMenu + translateLabel: true + ) + (MenuItem + activeHelpKey: fileChooseAMenu + label: 'Choose a Menu...' + itemValue: doChooseAMenu + translateLabel: true + ) + (MenuItem + label: '-' + isVisible: isStandAlone + ) + (MenuItem + activeHelpKey: fileBrowseClass + enabled: hasValidSpecClass + label: 'Browse Class' + itemValue: doBrowseClass + translateLabel: true + isVisible: isStandAlone + ) + (MenuItem + activeHelpKey: fileShowMenuSpec + label: 'Show Menu Spec' + itemValue: doShowMenuSpec + translateLabel: true + isVisible: isStandAlone + ) + (MenuItem + label: '-' + isVisible: isStandAlone + ) + (MenuItem + activeHelpKey: fileExit + label: 'Exit' + itemValue: closeRequest + translateLabel: true + isVisible: isStandAlone + ) + ) + nil + nil ) ! @@ -1098,76 +1098,76 @@ - ^ + ^ #(Menu - ( - (MenuItem - label: '&File' - translateLabel: true - submenuChannel: fileMenu - keepLinkedMenu: true - ignoreMnemonicKeys: true - ignoreShortcutKeys: true - ) - (MenuItem - label: '&Edit' - translateLabel: true - submenuChannel: editMenuForMainMenuWithoutAccelerators - keepLinkedMenu: true - ) - (MenuItem - enabled: hasSingleSelectionChannel - label: 'Item' - translateLabel: true - submenuChannel: addMenu - keepLinkedMenu: true - ignoreMnemonicKeys: true - ignoreShortcutKeys: true - ) - (MenuItem - isVisible: isNotEditingSpecOnly - label: 'Generate' - translateLabel: true - submenuChannel: generateMenu - keepLinkedMenu: true - ignoreMnemonicKeys: true - ignoreShortcutKeys: true - ) - (MenuItem - label: 'Test' - translateLabel: true - submenuChannel: submenuTest - ignoreMnemonicKeys: true - ignoreShortcutKeys: true - ) - (MenuItem - label: 'Settings' - translateLabel: true - submenuChannel: settingsMenu - keepLinkedMenu: true - ignoreMnemonicKeys: true - ignoreShortcutKeys: true - ) - (MenuItem - label: 'History' - translateLabel: true - isVisible: isStandAlone - submenuChannel: menuHistory - ignoreMnemonicKeys: true - ignoreShortcutKeys: true - ) - (MenuItem - label: 'MENU_Help' - translateLabel: true - startGroup: conditionalRight - submenuChannel: helpMenu - keepLinkedMenu: true - ignoreMnemonicKeys: true - ignoreShortcutKeys: true - ) - ) - nil - nil + ( + (MenuItem + label: '&File' + translateLabel: true + submenuChannel: fileMenu + keepLinkedMenu: true + ignoreMnemonicKeys: true + ignoreShortcutKeys: true + ) + (MenuItem + label: '&Edit' + translateLabel: true + submenuChannel: editMenuForMainMenuWithoutAccelerators + keepLinkedMenu: true + ) + (MenuItem + enabled: hasSingleSelectionChannel + label: 'Item' + translateLabel: true + submenuChannel: addMenu + keepLinkedMenu: true + ignoreMnemonicKeys: true + ignoreShortcutKeys: true + ) + (MenuItem + isVisible: isNotEditingSpecOnly + label: 'Generate' + translateLabel: true + submenuChannel: generateMenu + keepLinkedMenu: true + ignoreMnemonicKeys: true + ignoreShortcutKeys: true + ) + (MenuItem + label: 'Test' + translateLabel: true + submenuChannel: submenuTest + ignoreMnemonicKeys: true + ignoreShortcutKeys: true + ) + (MenuItem + label: 'Settings' + translateLabel: true + submenuChannel: settingsMenu + keepLinkedMenu: true + ignoreMnemonicKeys: true + ignoreShortcutKeys: true + ) + (MenuItem + label: 'History' + translateLabel: true + isVisible: isStandAlone + submenuChannel: menuHistory + ignoreMnemonicKeys: true + ignoreShortcutKeys: true + ) + (MenuItem + label: 'MENU_Help' + translateLabel: true + startGroup: conditionalRight + submenuChannel: helpMenu + keepLinkedMenu: true + ignoreMnemonicKeys: true + ignoreShortcutKeys: true + ) + ) + nil + nil ) ! @@ -1187,26 +1187,26 @@ ^ #(#Menu - #( - #(#MenuItem - isVisible: isNotEditingSpecOnly - #activeHelpKey: #settingsRedefineAspectMethods - #enabled: #hasValidSpecClass - #label: 'Redefine Aspect Methods' - #translateLabel: true - #hideMenuOnActivated: false - #indication: #redefineAspectMethodsChannel - ) - #(#MenuItem - #activeHelpKey: #settingsRedefineAspectMethods - #label: 'AutoAccept on Selection-Change' - #translateLabel: true - #hideMenuOnActivated: false - #indication: #autoAcceptOnSelectionChange - ) - ) - nil - nil + #( + #(#MenuItem + isVisible: isNotEditingSpecOnly + #activeHelpKey: #settingsRedefineAspectMethods + #enabled: #hasValidSpecClass + #label: 'Redefine Aspect Methods' + #translateLabel: true + #hideMenuOnActivated: false + #indication: #redefineAspectMethodsChannel + ) + #(#MenuItem + #activeHelpKey: #settingsRedefineAspectMethods + #label: 'AutoAccept on Selection-Change' + #translateLabel: true + #hideMenuOnActivated: false + #indication: #autoAcceptOnSelectionChange + ) + ) + nil + nil ) ! @@ -1262,201 +1262,201 @@ - ^ + ^ #(Menu - ( - (MenuItem - activeHelpKey: fileNew - label: 'New' - itemValue: doNew - translateLabel: true - isButton: true - labelImage: (ResourceRetriever ToolbarIconLibrary newMenuIcon) - ) - (MenuItem - label: '-' - ) - (MenuItem - activeHelpKey: fileLoad - label: 'Load' - itemValue: doLoad - translateLabel: true - isButton: true - isVisible: isNotEditingSpecOnly - submenuChannel: menuHistory - labelImage: (ResourceRetriever ToolbarIconLibrary loadFromMethodIcon) - keepLinkedMenu: true - ) - (MenuItem - activeHelpKey: fileSave - label: 'Save' - itemValue: doSave - translateLabel: true - isButton: true - isVisible: isNotEditingSpecOnly - labelImage: (ResourceRetriever ToolbarIconLibrary saveAsMethodIcon) - ) - (MenuItem - activeHelpKey: fileSaveSpec - label: 'Save' - itemValue: doSave - translateLabel: true - isButton: true - isVisible: isEditingSpecOnly - labelImage: (ResourceRetriever XPToolbarIconLibrary saveImageIcon) - ) - (MenuItem - label: '-' - ) - (MenuItem - activeHelpKey: editCut - enabled: hasSelectionChannel - label: 'Cut' - itemValue: doCut - translateLabel: true - isButton: true - labelImage: (ResourceRetriever ToolbarIconLibrary cutMenuItemIcon) - ) - (MenuItem - activeHelpKey: editCopy - enabled: hasSelectionChannel - label: 'Copy' - itemValue: doCopy - translateLabel: true - isButton: true - labelImage: (ResourceRetriever ToolbarIconLibrary copyMenuItemIcon) - ) - (MenuItem - activeHelpKey: editPaste - enabled: canPasteHolder - label: 'Paste' - itemValue: doPaste - translateLabel: true - isButton: true - labelImage: (ResourceRetriever ToolbarIconLibrary pasteMenuItemIcon) - ) - (MenuItem - label: '-' - ) - (MenuItem - activeHelpKey: addMenuItem - enabled: hasSingleSelectionChannel - label: 'Add Item' - itemValue: doCreateItem - translateLabel: true - isButton: true - labelImage: (ResourceRetriever #'MenuEditor::Item' iconItem) - ) - (MenuItem - activeHelpKey: addMenuSeparator - enabled: hasSingleSelectionChannel - label: 'Add Separator' - itemValue: doCreateSep - translateLabel: true - isButton: true - labelImage: (ResourceRetriever #'MenuEditor::Item' iconSeparator) - ) - (MenuItem - activeHelpKey: addMenuSlice - enabled: hasSingleSelectionChannel - label: 'Menu Slice' - itemValue: doCreateMenuSliceItem - translateLabel: true - isButton: true - labelImage: (ResourceRetriever #'MenuEditor::Item' iconSliceMenu) - ) - (MenuItem - activeHelpKey: addSubMenu - enabled: hasSingleSelectionChannel - label: 'Add Menu' - itemValue: doCreateMenu - translateLabel: true - isButton: true - submenuChannel: standardMenus - labelImage: (ResourceRetriever #'MenuEditor::Item' iconMenu) - keepLinkedMenu: true - ) - (MenuItem - activeHelpKey: addSubMenuLink - enabled: hasSingleSelectionChannel - label: 'Add Linked Menu' - itemValue: doCreateLinkedMenu - translateLabel: true - isButton: true - labelImage: (ResourceRetriever #'MenuEditor::Item' iconLinkedMenu) - ) - (MenuItem - activeHelpKey: addDelayedMenu - enabled: canCreateDelayedMenuChannel - label: 'Add Delayed Menu' - itemValue: doCreateDelayedMenu: - translateLabel: true - isButton: true - labelImage: (ResourceRetriever #'MenuEditor::Item' iconDelayedMenu) - argument: menu - ) - (MenuItem - activeHelpKey: addDelayedSubMenuLink - enabled: canCreateDelayedMenuChannel - label: 'Add Delayed Linked Menu' - itemValue: doCreateDelayedMenu: - translateLabel: true - isButton: true - labelImage: (ResourceRetriever #'MenuEditor::Item' iconDelayedLinkedMenu) - argument: linkedMenu - ) - (MenuItem - label: '' - ) - (MenuItem - activeHelpKey: editMoveUp - enabled: enableMovingUpOrDownHolder - label: 'Move Up' - itemValue: doMoveUp - translateLabel: true - isButton: true - startGroup: right - labelImage: (ResourceRetriever Icon upIcon) - ) - (MenuItem - activeHelpKey: editMoveDown - enabled: enableMovingUpOrDownHolder - label: 'Move Down' - itemValue: doMoveDown - translateLabel: true - isButton: true - labelImage: (ResourceRetriever Icon downIcon) - ) - (MenuItem - activeHelpKey: editMoveIn - enabled: enableMovingInHolder - label: 'Move Into Next' - itemValue: doMoveInNext - translateLabel: true - isButton: true - labelImage: (ResourceRetriever Icon downRightIcon) - ) - (MenuItem - activeHelpKey: editMoveInAbove - enabled: enableMovingInAboveHolder - label: 'Move Into Previous' - itemValue: doMoveInPrevious - translateLabel: true - isButton: true - labelImage: (ResourceRetriever Icon upRightIcon) - ) - (MenuItem - activeHelpKey: editMoveOut - enabled: enableMovingOutHolder - label: 'Move Out' - itemValue: doMoveOut - translateLabel: true - isButton: true - labelImage: (ResourceRetriever Icon leftDownIcon) - ) - ) - nil - nil + ( + (MenuItem + activeHelpKey: fileNew + label: 'New' + itemValue: doNew + translateLabel: true + isButton: true + labelImage: (ResourceRetriever ToolbarIconLibrary newMenuIcon) + ) + (MenuItem + label: '-' + ) + (MenuItem + activeHelpKey: fileLoad + label: 'Load' + itemValue: doLoad + translateLabel: true + isButton: true + isVisible: isNotEditingSpecOnly + submenuChannel: menuHistory + labelImage: (ResourceRetriever ToolbarIconLibrary loadFromMethodIcon) + keepLinkedMenu: true + ) + (MenuItem + activeHelpKey: fileSave + label: 'Save' + itemValue: doSave + translateLabel: true + isButton: true + isVisible: isNotEditingSpecOnly + labelImage: (ResourceRetriever ToolbarIconLibrary saveAsMethodIcon) + ) + (MenuItem + activeHelpKey: fileSaveSpec + label: 'Save' + itemValue: doSave + translateLabel: true + isButton: true + isVisible: isEditingSpecOnly + labelImage: (ResourceRetriever XPToolbarIconLibrary saveImageIcon) + ) + (MenuItem + label: '-' + ) + (MenuItem + activeHelpKey: editCut + enabled: hasSelectionChannel + label: 'Cut' + itemValue: doCut + translateLabel: true + isButton: true + labelImage: (ResourceRetriever ToolbarIconLibrary cutMenuItemIcon) + ) + (MenuItem + activeHelpKey: editCopy + enabled: hasSelectionChannel + label: 'Copy' + itemValue: doCopy + translateLabel: true + isButton: true + labelImage: (ResourceRetriever ToolbarIconLibrary copyMenuItemIcon) + ) + (MenuItem + activeHelpKey: editPaste + enabled: canPasteHolder + label: 'Paste' + itemValue: doPaste + translateLabel: true + isButton: true + labelImage: (ResourceRetriever ToolbarIconLibrary pasteMenuItemIcon) + ) + (MenuItem + label: '-' + ) + (MenuItem + activeHelpKey: addMenuItem + enabled: hasSingleSelectionChannel + label: 'Add Item' + itemValue: doCreateItem + translateLabel: true + isButton: true + labelImage: (ResourceRetriever #'MenuEditor::Item' iconItem) + ) + (MenuItem + activeHelpKey: addMenuSeparator + enabled: hasSingleSelectionChannel + label: 'Add Separator' + itemValue: doCreateSep + translateLabel: true + isButton: true + labelImage: (ResourceRetriever #'MenuEditor::Item' iconSeparator) + ) + (MenuItem + activeHelpKey: addMenuSlice + enabled: hasSingleSelectionChannel + label: 'Menu Slice' + itemValue: doCreateMenuSliceItem + translateLabel: true + isButton: true + labelImage: (ResourceRetriever #'MenuEditor::Item' iconSliceMenu) + ) + (MenuItem + activeHelpKey: addSubMenu + enabled: hasSingleSelectionChannel + label: 'Add Menu' + itemValue: doCreateMenu + translateLabel: true + isButton: true + submenuChannel: standardMenus + labelImage: (ResourceRetriever #'MenuEditor::Item' iconMenu) + keepLinkedMenu: true + ) + (MenuItem + activeHelpKey: addSubMenuLink + enabled: hasSingleSelectionChannel + label: 'Add Linked Menu' + itemValue: doCreateLinkedMenu + translateLabel: true + isButton: true + labelImage: (ResourceRetriever #'MenuEditor::Item' iconLinkedMenu) + ) + (MenuItem + activeHelpKey: addDelayedMenu + enabled: canCreateDelayedMenuChannel + label: 'Add Delayed Menu' + itemValue: doCreateDelayedMenu: + translateLabel: true + isButton: true + labelImage: (ResourceRetriever #'MenuEditor::Item' iconDelayedMenu) + argument: menu + ) + (MenuItem + activeHelpKey: addDelayedSubMenuLink + enabled: canCreateDelayedMenuChannel + label: 'Add Delayed Linked Menu' + itemValue: doCreateDelayedMenu: + translateLabel: true + isButton: true + labelImage: (ResourceRetriever #'MenuEditor::Item' iconDelayedLinkedMenu) + argument: linkedMenu + ) + (MenuItem + label: '' + ) + (MenuItem + activeHelpKey: editMoveUp + enabled: enableMovingUpOrDownHolder + label: 'Move Up' + itemValue: doMoveUp + translateLabel: true + isButton: true + startGroup: right + labelImage: (ResourceRetriever Icon upIcon) + ) + (MenuItem + activeHelpKey: editMoveDown + enabled: enableMovingUpOrDownHolder + label: 'Move Down' + itemValue: doMoveDown + translateLabel: true + isButton: true + labelImage: (ResourceRetriever Icon downIcon) + ) + (MenuItem + activeHelpKey: editMoveIn + enabled: enableMovingInHolder + label: 'Move Into Next' + itemValue: doMoveInNext + translateLabel: true + isButton: true + labelImage: (ResourceRetriever Icon downRightIcon) + ) + (MenuItem + activeHelpKey: editMoveInAbove + enabled: enableMovingInAboveHolder + label: 'Move Into Previous' + itemValue: doMoveInPrevious + translateLabel: true + isButton: true + labelImage: (ResourceRetriever Icon upRightIcon) + ) + (MenuItem + activeHelpKey: editMoveOut + enabled: enableMovingOutHolder + label: 'Move Out' + itemValue: doMoveOut + translateLabel: true + isButton: true + labelImage: (ResourceRetriever Icon leftDownIcon) + ) + ) + nil + nil ) ! ! @@ -1635,17 +1635,17 @@ imageTool "get the image tool application" - ^ wizards - at:#image - ifAbsentPut:[ - |tool| - - tool := ImageResourceEditor new createBuilder. - tool masterApplication:self. - tool modifiedChannel: self enablingCommitButtonsHolder. - tool builder window:(ApplicationSubView new client:tool). - tool - ] + ^ wizards + at:#image + ifAbsentPut:[ + |tool| + + tool := ImageResourceEditor new createBuilder. + tool masterApplication:self. + tool modifiedChannel: self enablingCommitButtonsHolder. + tool builder window:(ApplicationSubView new client:tool). + tool + ] "Modified: / 03-08-2011 / 10:03:08 / cg" ! @@ -1677,32 +1677,32 @@ selectedItem := self selectedItem. selectedItem notNil ifTrue:[ - self withoutNotifyDo:[ - rscRetrHolder := aspects at:#resourceRetriever. - helpKeyHolder := aspects at:#activeHelpKey. - imageTool := self imageTool. - helpTool := self helpTool. - acceptChannel := self acceptChannel. - - acceptChannel triggerValue:true. - acceptChannel setValue:false. - - ok ifTrue:[ - helpTool accept. - rscRetrHolder value:(imageTool resourceRetriever). - helpKeyHolder value:(helpTool helpKey). - selectedItem fromAspects:aspects. - self setModified. - - selectedItem isRootItem ifTrue:[ - "/ update specSelector - specSelector := selectedItem rawLabel. - ]. - ]. - selectedItem toAspects:aspects. - helpTool helpKey:(helpKeyHolder value). - imageTool resourceRetriever:(rscRetrHolder value). - ] + self withoutNotifyDo:[ + rscRetrHolder := aspects at:#resourceRetriever. + helpKeyHolder := aspects at:#activeHelpKey. + imageTool := self imageTool. + helpTool := self helpTool. + acceptChannel := self acceptChannel. + + acceptChannel triggerValue:true. + acceptChannel setValue:false. + + ok ifTrue:[ + helpTool accept. + rscRetrHolder value:(imageTool resourceRetriever). + helpKeyHolder value:(helpTool helpKey). + selectedItem fromAspects:aspects. + self setModified. + + selectedItem isRootItem ifTrue:[ + "/ update specSelector + specSelector := selectedItem rawLabel. + ]. + ]. + selectedItem toAspects:aspects. + helpTool helpKey:(helpKeyHolder value). + imageTool resourceRetriever:(rscRetrHolder value). + ] ]. self updateChannels. "/ self clearModified. @@ -1728,10 +1728,10 @@ item := listOfItems at:atLine ifAbsent:nil. item notNil ifTrue:[ - item toggleExpand. - self hasSelection ifFalse:[ - self selectedItem:item - ] + item toggleExpand. + self hasSelection ifFalse:[ + self selectedItem:item + ] ]. "Modified: / 29-11-2011 / 11:28:20 / cg" @@ -1855,13 +1855,13 @@ specSelector := aSelector. aSelector notNil ifTrue:[ - aClass notNil ifTrue:[ - cls := aClass isBehavior ifTrue:[ aClass ] ifFalse:[ self resolveName:aClass]. - - (cls respondsTo:aSelector) ifTrue:[ - menu := cls perform: aSelector. - ]. - ]. + aClass notNil ifTrue:[ + cls := aClass isBehavior ifTrue:[ aClass ] ifFalse:[ self resolveName:aClass]. + + (cls respondsTo:aSelector) ifTrue:[ + menu := cls perform: aSelector. + ]. + ]. ]. self loadFromMenu:menu selector:aSelector. ! @@ -1873,9 +1873,9 @@ menu := menuArg. menu notNil ifTrue:[ - (menu isCollection) ifTrue:[ - menu := Menu decodeFromLiteralArray:menu - ]. + (menu isCollection) ifTrue:[ + menu := Menu decodeFromLiteralArray:menu + ]. ]. self buildFromMenu:menu selector:selectorOrNil. self clearModified. @@ -1896,21 +1896,21 @@ size := selection size. size <= 1 ifTrue:[ - selectedSuperItems := selection ? #(). + selectedSuperItems := selection ? #(). ^ selectedSuperItems ]. root := listOfItems root. (selection includesIdentical:root) ifTrue:[ - selectedSuperItems := Array with:root. + selectedSuperItems := Array with:root. ^ selectedSuperItems ]. selectedSuperItems := OrderedCollection new. selection do:[:anItem| - anItem parentsDetect:[:el| selection includesIdentical:el ] - ifNone:[ selectedSuperItems add:anItem ]. + anItem parentsDetect:[:el| selection includesIdentical:el ] + ifNone:[ selectedSuperItems add:anItem ]. ]. ^ selectedSuperItems @@ -1948,39 +1948,39 @@ wizardHolder := self wizardHolder. item := self selectedItem. - item isNil ifTrue:[ - wizardHolder value:nil. - ^ self + item isNil ifTrue:[ + wizardHolder value:nil. + ^ self ]. tab := tabHolder value. tab notNil ifTrue:[ - tab := item slices detect:[:el| el first = tab ] ifNone:nil. + tab := item slices detect:[:el| el first = tab ] ifNone:nil. ]. tab isNil ifTrue:[ - tabHolder value:( listOfTabs at:1 ifAbsent:nil ). - ^ self. + tabHolder value:( listOfTabs at:1 ifAbsent:nil ). + ^ self. ]. selector := tab last. - selector == #help ifTrue:[ - wizardHolder value:(self helpTool window). - ^ self + selector == #help ifTrue:[ + wizardHolder value:(self helpTool window). + ^ self ]. - selector == #image ifTrue:[ - wizardHolder value:(self imageTool window). - ^ self + selector == #image ifTrue:[ + wizardHolder value:(self imageTool window). + ^ self ]. - canvas := wizards - at:(item class name, selector) asSymbol - ifAbsentPut:[ - SimpleView new - client:self - spec:(item class perform:selector) - builder:(self builder) - ]. + canvas := wizards + at:(item class name, selector) asSymbol + ifAbsentPut:[ + SimpleView new + client:self + spec:(item class perform:selector) + builder:(self builder) + ]. wizardHolder value:canvas. ! @@ -2014,23 +2014,23 @@ hasSelection := sizeOfSel ~~ 0. sizeOfSel == 1 ifTrue:[selectedItem := selection at:1] - ifFalse:[selectedItem := nil]. + ifFalse:[selectedItem := nil]. self hasSelectionChannel value:hasSelection. self hasSingleSelectionChannel value:(selectedItem notNil). selectedItem isNil ifTrue:[ "/ self enableMovingUpOrDownHolder value:false. - self enableMovingInHolder value:false. - self enableMovingOutHolder value:false. - self enableMovingInAboveHolder value:false. - self canCreateDelayedMenuChannel value:false. + self enableMovingInHolder value:false. + self enableMovingOutHolder value:false. + self enableMovingInAboveHolder value:false. + self canCreateDelayedMenuChannel value:false. ] ifFalse:[ "/ self enableMovingUpOrDownHolder value:(selectedItem canMoveUpOrDown). - self enableMovingInHolder value:(selectedItem canMoveInNext). - self enableMovingOutHolder value:(selectedItem canMoveOut). - self enableMovingInAboveHolder value:(selectedItem canMoveInAbove). - self canCreateDelayedMenuChannel value:(selectedItem canAddDelayedMenu). + self enableMovingInHolder value:(selectedItem canMoveInNext). + self enableMovingOutHolder value:(selectedItem canMoveOut). + self enableMovingInAboveHolder value:(selectedItem canMoveInAbove). + self canCreateDelayedMenuChannel value:(selectedItem canAddDelayedMenu). ]. self enableMovingUpOrDownHolder value:(selection conform:[:i | i canMoveUpOrDown]). @@ -2169,12 +2169,12 @@ item := nil. lnNr notNil ifTrue:[ - item := listOfItems at:lnNr ifAbsent:nil. - item notNil ifTrue:[ - (item isAction and:[item hasDelayedMenu]) ifTrue:[ - item := nil - ] - ] + item := listOfItems at:lnNr ifAbsent:nil. + item notNil ifTrue:[ + (item isAction and:[item hasDelayedMenu]) ifTrue:[ + item := nil + ] + ] ]. item isNil ifTrue:[ lnNr := 0 ]. "/ not dropable for item @@ -2191,7 +2191,7 @@ Return true, if I have eaten the event" + #CtrlCursorLeft #CtrlCursorRight )> |evView rawKey key| @@ -2211,28 +2211,28 @@ or:[key == #BackSpace or:[key == #Cut]] ) ifTrue:[ - self doCut. - ^ true. + self doCut. + ^ true. ]. key == #Copy ifTrue:[ self doCopy. ^ true ]. key == #Paste ifTrue:[ self doPaste. ^ true ]. (rawKey == #CtrlCursorUp) ifTrue:[ - self doMoveUp. - ^ true. + self doMoveUp. + ^ true. ]. (rawKey == #CtrlCursorDown) ifTrue:[ - self doMoveDown. - ^ true. + self doMoveDown. + ^ true. ]. (rawKey == #CtrlCursorLeft) ifTrue:[ - self doMoveOut. - ^ true. + self doMoveOut. + ^ true. ]. (rawKey == #CtrlCursorRight) ifTrue:[ - self doMoveInNext. - ^ true. + self doMoveInNext. + ^ true. ]. ^ false. @@ -2330,40 +2330,40 @@ menu isNil ifTrue:[^ nil ]. menu allItemsDo:[:anItem| - anItem ignoreShortcutKeys:true. - anItem isVisible:true. - anItem enabled:true. - anItem translateLabel:false. - - anItem itemValue notNil ifTrue:[ - anItem itemValue:[ Transcript showCR:(anItem label) ]. - ]. - anItem indication notNil ifTrue:[ - indication isNil ifTrue:[ indication := true asValue ]. - anItem indication:indication - ]. - anItem choice notNil ifTrue:[ - choice isNil ifTrue:[ choice := anItem choiceValue asValue ]. - anItem choice:choice - ]. - anItem isMenuSlice ifTrue:[ - anItem submenuChannel:nil. - anItem label:'... Slice Menu ...'. - ]. - anItem submenuChannel notNil ifTrue:[ - anItem submenuChannel:nil. - anItem submenu isNil ifTrue:[ - submenu isNil ifTrue:[ - submenu := Menu new. - submenu addItem:(MenuItem labeled:'Linked Menu...'). - ]. - anItem submenu:submenu. - ]. - ]. - retriever := anItem resourceRetriever. - retriever notNil ifTrue:[ - retriever labelText notNil ifTrue:[ retriever labelText:(anItem label) ] - ]. + anItem ignoreShortcutKeys:true. + anItem isVisible:true. + anItem enabled:true. + anItem translateLabel:false. + + anItem itemValue notNil ifTrue:[ + anItem itemValue:[ Transcript showCR:(anItem label) ]. + ]. + anItem indication notNil ifTrue:[ + indication isNil ifTrue:[ indication := true asValue ]. + anItem indication:indication + ]. + anItem choice notNil ifTrue:[ + choice isNil ifTrue:[ choice := anItem choiceValue asValue ]. + anItem choice:choice + ]. + anItem isMenuSlice ifTrue:[ + anItem submenuChannel:nil. + anItem label:'... Slice Menu ...'. + ]. + anItem submenuChannel notNil ifTrue:[ + anItem submenuChannel:nil. + anItem submenu isNil ifTrue:[ + submenu isNil ifTrue:[ + submenu := Menu new. + submenu addItem:(MenuItem labeled:'Linked Menu...'). + ]. + anItem submenu:submenu. + ]. + ]. + retriever := anItem resourceRetriever. + retriever notNil ifTrue:[ + retriever labelText notNil ifTrue:[ retriever labelText:(anItem label) ] + ]. ]. menu findGuiResourcesIn:(self resolveName:specClass). ^ menu @@ -2385,29 +2385,29 @@ index := 1. (intoItem canAddChildren and:[intoItem isExpanded]) ifFalse:[ - intoItem parent notNil ifTrue:[ - [ intoItem parent canAddChildren ] whileFalse:[ - intoItem := intoItem parent. - ]. - index := intoItem parent identityIndexOf:intoItem. - index := index + 1. - intoItem := intoItem parent. - ]. + intoItem parent notNil ifTrue:[ + [ intoItem parent canAddChildren ] whileFalse:[ + intoItem := intoItem parent. + ]. + index := intoItem parent identityIndexOf:intoItem. + index := index + 1. + intoItem := intoItem parent. + ]. ]. newItem := aBlockOrItem value. newItem notNil ifTrue:[ - selectionHolder setValue:nil. - intoItem expand. - - newItem isCollection ifTrue:[ - intoItem addAll:newItem beforeIndex:index. - selectionHolder value:newItem. - ] ifFalse:[ - intoItem add:newItem beforeIndex:index. - selectionHolder value:(Array with:newItem). - ]. - self setModified. + selectionHolder setValue:nil. + intoItem expand. + + newItem isCollection ifTrue:[ + intoItem addAll:newItem beforeIndex:index. + selectionHolder value:newItem. + ] ifFalse:[ + intoItem add:newItem beforeIndex:index. + selectionHolder value:(Array with:newItem). + ]. + self setModified. ]. ^ newItem @@ -2580,7 +2580,7 @@ selectors := IdentitySet new. listOfItems root recursiveDo:[:el| - selectors addAll:(el aspectSelectors). + selectors addAll:(el aspectSelectors). ]. ^ selectors asOrderedCollection ! @@ -2597,14 +2597,14 @@ |selector cls category| specClass isNil ifTrue:[ - self warn:(resources string:'Please define the application class first.'). - ^ self + self warn:(resources string:'Please define the application class first.'). + ^ self ]. selector := (self aspectFor:aspect) value. selector isEmptyOrNil ifTrue:[ - Dialog information:(resources string:'Please enter an action method name.'). - ^ self + Dialog information:(resources string:'Please enter an action method name.'). + ^ self ]. (selector = 'true' or:[selector = 'false']) ifTrue:[^ self]. (selector == true or:[selector == false]) ifTrue:[^ self]. @@ -2613,17 +2613,17 @@ cls := self resolveName:specClass. cls isNil ifTrue:[ - self warn:(resources string:'Class %1 does not exist!!' with:specClass asString). - ^ self + self warn:(resources string:'Class %1 does not exist!!' with:specClass asString). + ^ self ]. (cls includesSelector:selector) ifFalse:[ - category := UserPreferences current categoryForMenuActionsMethods. - - SmalltalkCodeGeneratorTool - createActionMethodFor:selector in:cls - category:category - redefine:(self redefineAspectMethodsChannel value). + category := UserPreferences current categoryForMenuActionsMethods. + + SmalltalkCodeGeneratorTool + createActionMethodFor:selector in:cls + category:category + redefine:(self redefineAspectMethodsChannel value). ]. UserPreferences current systemBrowserClass openInClass:cls selector:selector @@ -2654,31 +2654,31 @@ |cls redefineAspectMethods category| specClass isNil ifTrue:[ - self warn:'Define the class first !!'. - ^ self + self warn:'Define the class first !!'. + ^ self ]. redefineAspectMethods := self redefineAspectMethodsChannel value. cls := self resolveName:specClass. cls isNil ifTrue:[ - self warn:'Class ', specClass asString, ' does not exist!!'. - ^ self + self warn:'Class ', specClass asString, ' does not exist!!'. + ^ self ]. category := UserPreferences current categoryForMenuActionsMethods. self collectActionSelectors do:[:aSelector| - SmalltalkCodeGeneratorTool - createActionMethodFor:aSelector in:cls - category:category - redefine:redefineAspectMethods. + SmalltalkCodeGeneratorTool + createActionMethodFor:aSelector in:cls + category:category + redefine:redefineAspectMethods. ]. self collectAspectSelectors do:[:anAspect| - SmalltalkCodeGeneratorTool - createAspectMethodFor:anAspect in:cls - category:category - redefine:redefineAspectMethods + SmalltalkCodeGeneratorTool + createAspectMethodFor:anAspect in:cls + category:category + redefine:redefineAspectMethods ]. "Modified: / 31-01-2011 / 18:29:06 / cg" @@ -2692,54 +2692,54 @@ |view subSpec app bldr spec menuSelector1 menuSelector2 info| self askForModification ifTrue:[ - view := Screen current viewFromUser. - (view isNil or:[view == Screen current rootView]) ifTrue:[ - ^ self - ]. - view specClass == MenuPanelSpec ifTrue:[ - (app := view application) isNil ifTrue:[ - info := 'Could not figure out the application class.' - ] ifFalse:[ - (bldr := app builder) isNil ifTrue:[ - info := 'Application has no builder.' - ] ifFalse:[ - menuSelector1 := bldr namedComponents keyAtValue:view ifAbsent:nil. - (spec := bldr spec) isNil ifTrue:[ - info := 'Cannot fetch spec from applications builder.' - ] ifFalse:[ - subSpec := spec findSpecForWhich:[:subSpec | subSpec name = view name]. - subSpec isNil ifTrue:[ - info := 'Cannot find view-spec for ',view name asString,'.' - ] ifFalse:[ - menuSelector2 := subSpec menu. - ] - ]. - (menuSelector1 isNil and:[ menuSelector2 isNil ]) ifTrue:[ - info := 'menu is probably not provided by a menuSelector.' - ] ifFalse:[ - (app class respondsTo:menuSelector1) ifTrue:[ - self loadFromClass:app class andSelector:menuSelector1. - ^ self. - ]. - (app class respondsTo:menuSelector2) ifTrue:[ - self loadFromClass:app class andSelector:menuSelector2. - ^ self. - ]. - info := 'menu is probably not provided by a menuSelector.' - ]. - ] - ]. - info notNil ifTrue:[ - app notNil ifTrue:[ - (Dialog confirm:(info,'\\Browse ?' withCRs)) ifTrue:[ - app browse. - ]. - ] ifFalse:[ - Dialog information:info. - ]. - ]. - ^ self. - ]. + view := Screen current viewFromUser. + (view isNil or:[view == Screen current rootView]) ifTrue:[ + ^ self + ]. + view specClass == MenuPanelSpec ifTrue:[ + (app := view application) isNil ifTrue:[ + info := 'Could not figure out the application class.' + ] ifFalse:[ + (bldr := app builder) isNil ifTrue:[ + info := 'Application has no builder.' + ] ifFalse:[ + menuSelector1 := bldr namedComponents keyAtValue:view ifAbsent:nil. + (spec := bldr spec) isNil ifTrue:[ + info := 'Cannot fetch spec from applications builder.' + ] ifFalse:[ + subSpec := spec findSpecForWhich:[:subSpec | subSpec name = view name]. + subSpec isNil ifTrue:[ + info := 'Cannot find view-spec for ',view name asString,'.' + ] ifFalse:[ + menuSelector2 := subSpec menu. + ] + ]. + (menuSelector1 isNil and:[ menuSelector2 isNil ]) ifTrue:[ + info := 'menu is probably not provided by a menuSelector.' + ] ifFalse:[ + (app class respondsTo:menuSelector1) ifTrue:[ + self loadFromClass:app class andSelector:menuSelector1. + ^ self. + ]. + (app class respondsTo:menuSelector2) ifTrue:[ + self loadFromClass:app class andSelector:menuSelector2. + ^ self. + ]. + info := 'menu is probably not provided by a menuSelector.' + ]. + ] + ]. + info notNil ifTrue:[ + app notNil ifTrue:[ + (Dialog confirm:(info,'\\Browse ?' withCRs)) ifTrue:[ + app browse. + ]. + ] ifFalse:[ + Dialog information:info. + ]. + ]. + ^ self. + ]. ]. ! @@ -2755,29 +2755,29 @@ |view| self askForModification ifTrue:[ - view := Screen current viewFromUser. - (view isNil or:[view == Screen current rootView]) ifTrue:[ - ^ self - ]. - view specClass == MenuPanelSpec ifTrue:[ - specSelector := #pickedMenu. - self buildFromMenu:(view asMenu) selector:specSelector. - ]. + view := Screen current viewFromUser. + (view isNil or:[view == Screen current rootView]) ifTrue:[ + ^ self + ]. + view specClass == MenuPanelSpec ifTrue:[ + specSelector := #pickedMenu. + self buildFromMenu:(view asMenu) selector:specSelector. + ]. ]. ! doSave "save current editing menu to - class: specClass - selector: specSelector + class: specClass + selector: specSelector " |cls specCode mthd category code excla s| self isEditingSpecOnly ifTrue:[ - savedSpec := self generateMenuSpec. - hasSaved := true. - self clearModified. - ^ self + savedSpec := self generateMenuSpec. + hasSaved := true. + self clearModified. + ^ self ]. super doSave ifFalse: [^nil]. @@ -2790,7 +2790,7 @@ category := 'menu specs'. (mthd := cls class compiledMethodAt:specSelector) notNil ifTrue:[ - category := mthd category. + category := mthd category. ]. s := '' writeStream. @@ -2804,7 +2804,7 @@ nextPutAll:specSelector; cr; nextPutAllAsChunk:(self class codeGenerationComment) withCRs; - cr; cr; + cr; cr; nextPutLine:' "'; nextPutLine:(' MenuEditor new openOnClass:' , cls name , ' andSelector:#' , specSelector); nextPutLine:(' (Menu new fromLiteralArrayEncoding:(' , cls name , ' ' , specSelector , ')) startUp'); @@ -2821,7 +2821,7 @@ (ReadStream on:s contents) fileIn. self isStandAlone ifTrue:[ - self helpTool doSave + self helpTool doSave ]. self updateHistory. @@ -2848,7 +2848,7 @@ code := self generateMenuSpecString. code notNil ifTrue:[ - CodeView openWith:code title: 'Menu Spec' + CodeView openWith:code title: 'Menu Spec' ]. "Modified: / 29-11-2011 / 11:28:12 / cg" @@ -2870,13 +2870,13 @@ self askForItemModification ifFalse:[ ^ self ]. what == #menu ifTrue:[ delayedItem := RegularMenuItem new ] - ifFalse:[ delayedItem := LinkedMenuItem new ]. + ifFalse:[ delayedItem := LinkedMenuItem new ]. delayedItem setExpanded:true. delayedItem := selectedItem add:delayedItem. delayedItem notNil ifTrue:[ - self selectedItem:delayedItem. + self selectedItem:delayedItem. ]. "Modified: / 29-11-2011 / 11:28:09 / cg" @@ -2922,7 +2922,7 @@ "create a standard edit menu " self addAndSelectValueOf:[ - RegularMenuItem menu:(self class standardEditMenu) labeled:'Edit' translateLabel:true + RegularMenuItem menu:(self class standardEditMenu) labeled:'Edit' translateLabel:true ]. ! @@ -2930,7 +2930,7 @@ "create a standard file menu " self addAndSelectValueOf:[ - RegularMenuItem menu:(self class standardFileMenu) labeled:'File' translateLabel:true + RegularMenuItem menu:(self class standardFileMenu) labeled:'File' translateLabel:true ]. ! @@ -2940,9 +2940,9 @@ |item| self addAndSelectValueOf:[ - item := RegularMenuItem menu:(self class standardHelpMenu) labeled:'Help' translateLabel:true. - item aspectAt:#startGroup put:#conditionalRight. - item + item := RegularMenuItem menu:(self class standardHelpMenu) labeled:'Help' translateLabel:true. + item aspectAt:#startGroup put:#conditionalRight. + item ]. "Modified: / 16-10-2006 / 12:49:27 / cg" @@ -3133,30 +3133,30 @@ self askForItemModification ifFalse:[ ^ self ]. self withoutNotifyDo:[ - itemsSortedByIndex := items copy. - (items collect:[:i | listOfItems identityIndexOf:i]) - sortWith:itemsSortedByIndex. - - aDirectionSymbol == #down ifTrue:[ - itemsSortedByIndex := itemsSortedByIndex reversed - ]. - itemsSortedByIndex do:[:item | - parent := item parent. - children := parent children. - index := children identityIndexOf:item. - - selectionHolder setValue:#(). - children removeIndex:index. - - aDirectionSymbol == #up ifTrue:[ - index == 1 ifTrue:[ children add:item ] - ifFalse:[ children add:item beforeIndex:index - 1 ] - ] ifFalse:[ - index > children size ifTrue:[ children addFirst:item ] - ifFalse:[ children add:item afterIndex:index ] - ]. - parent childrenOrderChanged. - ] + itemsSortedByIndex := items copy. + (items collect:[:i | listOfItems identityIndexOf:i]) + sortWith:itemsSortedByIndex. + + aDirectionSymbol == #down ifTrue:[ + itemsSortedByIndex := itemsSortedByIndex reversed + ]. + itemsSortedByIndex do:[:item | + parent := item parent. + children := parent children. + index := children identityIndexOf:item. + + selectionHolder setValue:#(). + children removeIndex:index. + + aDirectionSymbol == #up ifTrue:[ + index == 1 ifTrue:[ children add:item ] + ifFalse:[ children add:item beforeIndex:index - 1 ] + ] ifFalse:[ + index > children size ifTrue:[ children addFirst:item ] + ifFalse:[ children add:item afterIndex:index ] + ]. + parent childrenOrderChanged. + ] ]. self selectedItems:items. self setModified. @@ -3188,8 +3188,8 @@ ^Icon - constantNamed:'MenuEditor::Item class iconDelayedLinkedMenu' - ifAbsentPut:[(Depth4Image new) width: 20; height: 16; photometric:(#palette); bitsPerSample:(#(4)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' + constantNamed:'MenuEditor::Item class iconDelayedLinkedMenu' + ifAbsentPut:[(Depth4Image new) width: 20; height: 16; photometric:(#palette); bitsPerSample:(#(4)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' @@@@@@@@@@@@@@DQDQDQDQDQDR@AH"H"H"H"H"H0@@@BH"H"@@@BL@QDPBH"H"@@H#@DQDPBH@H"@"H0ADQDPBA@H"H"L@@@QDP@Q@@@@C@ADPQDQDQ@DQD: @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] ! @@ -3210,8 +3210,8 @@ ^Icon - constantNamed:'MenuEditor::Item class iconDelayedMenu' - 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] + constantNamed:'MenuEditor::Item class iconDelayedMenu' + 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] ! iconItem @@ -3230,8 +3230,8 @@ ^Icon - constantNamed:'MenuEditor::Item class iconItem' - 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] + constantNamed:'MenuEditor::Item class iconItem' + 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] ! iconLinkedMenu @@ -3250,8 +3250,8 @@ ^Icon - constantNamed:'MenuEditor::Item class iconLinkedMenu' - ifAbsentPut:[(Depth4Image new) width: 20; height: 16; photometric:(#palette); bitsPerSample:(#(4)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' + constantNamed:'MenuEditor::Item class iconLinkedMenu' + ifAbsentPut:[(Depth4Image new) width: 20; height: 16; photometric:(#palette); bitsPerSample:(#(4)); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' @@@@@@@@@@@@@@QDQDQDQDQDQA@DH"H"H"H"H"HPABH@@@H"H"H"D@PQ@3L0DQDQDQ@D@@L3L0@@@@@PADPCL3L0PCADD@P"@@@3L0@3@!!@DH"H"@3L3L3@P 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] ! @@ -3272,8 +3272,8 @@ ^Icon - constantNamed:'MenuEditor::Item class iconMenu' - 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] + constantNamed:'MenuEditor::Item class iconMenu' + 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] ! iconSeparator @@ -3292,8 +3292,8 @@ ^Icon - constantNamed:'MenuEditor::Item class iconSeparator' - 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] + constantNamed:'MenuEditor::Item class iconSeparator' + 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] ! iconSliceMenu @@ -3312,8 +3312,8 @@ ^Icon - constantNamed:'MenuEditor::Item class iconSliceMenu' - 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] + constantNamed:'MenuEditor::Item class iconSliceMenu' + 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] ! ! !MenuEditor::Item class methodsFor:'instance creation'! @@ -3360,230 +3360,230 @@ - ^ + ^ #(FullSpec - name: detailsEditSpec - window: + name: detailsEditSpec + window: (WindowSpec - label: 'Details Edit' - name: 'Details Edit' - min: (Point 10 10) - bounds: (Rectangle 0 0 407 291) - ) - component: + label: 'Details Edit' + name: 'Details Edit' + min: (Point 10 10) + bounds: (Rectangle 0 0 407 291) + ) + component: (SpecCollection - collection: ( - (LabelSpec - label: 'Accelerator:' - name: 'shortcutKeyLabel' - layout: (AlignmentOrigin 107 0 26 0 1 0.5) - activeHelpKey: detailsAccelerator - translateLabel: true - resizeForLabel: true - adjust: right - ) - (InputFieldSpec - name: 'shortcutKeyField' - layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0) - activeHelpKey: detailsAccelerator - tabable: true - model: shortcutKeyCharacter - group: inputGroup - type: symbolOrNil - immediateAccept: false - acceptOnReturn: true - acceptOnTab: true - acceptChannel: acceptChannel - modifiedChannel: modifiedChannel - acceptOnPointerLeave: false - ) - (LabelSpec - label: 'Enabled:' - name: 'enabledLabel' - layout: (AlignmentOrigin 107 0 51 0 1 0.5) - activeHelpKey: detailsEnabled - translateLabel: true - resizeForLabel: true - adjust: right - ) - (InputFieldSpec - name: 'enabledField' - layout: (LayoutFrame 110 0 40 0 -25 1.0 62 0) - activeHelpKey: detailsEnabled - tabable: true - model: enabled - group: inputGroup - type: symbolOrBooleanOrNil - immediateAccept: false - acceptOnReturn: true - acceptOnTab: true - acceptChannel: acceptChannel - modifiedChannel: modifiedChannel - acceptOnPointerLeave: false - ) - (ActionButtonSpec - label: 'browseActionImage' - name: 'Button1' - layout: (LayoutFrame -25 1 40 0 -5 1 62 0) - activeHelpKey: browseMethod - hasCharacterOrientedLabel: false - translateLabel: true - resizeForLabel: true - tabable: true - model: doBrowseEnabledMethod - ) - (LabelSpec - label: 'Visibility:' - name: 'visibilityLabel' - layout: (AlignmentOrigin 107 0 76 0 1 0.5) - activeHelpKey: detailsVisibility - translateLabel: true - resizeForLabel: true - adjust: right - ) - (InputFieldSpec - name: 'isVisibleInputField' - layout: (LayoutFrame 110 0 65 0 -25 1.0 87 0) - activeHelpKey: detailsVisibility - tabable: true - model: isVisible - group: inputGroup - type: symbolOrBooleanOrNil - immediateAccept: false - acceptOnReturn: true - acceptOnTab: true - acceptChannel: acceptChannel - modifiedChannel: modifiedChannel - acceptOnPointerLeave: false - ) - (ActionButtonSpec - label: 'browseActionImage' - name: 'Button2' - layout: (LayoutFrame -25 1 65 0 -5 1 87 0) - activeHelpKey: browseMethod - hasCharacterOrientedLabel: false - translateLabel: true - resizeForLabel: true - tabable: true - model: doBrowseVisibilityMethod - ) - (LabelSpec - label: 'Aux Value' - name: 'auxLabel' - layout: (AlignmentOrigin 107 0 101 0 1 0.5) - activeHelpKey: detailsAuxValue - translateLabel: true - resizeForLabel: true - adjust: right - ) - (InputFieldSpec - name: 'auxInputField' - layout: (LayoutFrame 110 0 90 0 -5 1.0 112 0) - activeHelpKey: detailsAuxValue - tabable: true - model: auxValue - group: inputGroup - type: smalltalkObjectOrNil - immediateAccept: false - acceptOnReturn: true - acceptOnTab: true - acceptChannel: acceptChannel - modifiedChannel: modifiedChannel - acceptOnPointerLeave: false - ) - (LabelSpec - label: 'Start Group:' - name: 'StartGroupLabel' - layout: (AlignmentOrigin 107 0 139 0 1 0.5) - activeHelpKey: detailsStartGroup - translateLabel: true - resizeForLabel: true - adjust: right - ) - (PopUpListSpec - label: 'left' - name: 'StartGroupPopUp' - layout: (LayoutFrame 110 0 128 0 -5 1.0 150 0) - activeHelpKey: detailsStartGroup - tabable: true - model: startGroup - menu: - (Array - left right - conditionalRight - ) - ) - (LabelSpec - label: 'Access Character Position:' - name: 'accessCharLabel' - layout: (AlignmentOrigin 217 0 170 0 1 0.5) - translateLabel: true - resizeForLabel: true - adjust: right - ) - (InputFieldSpec - name: 'accessCharField' - layout: (LayoutFrame 220 0 159 0 -5 1.0 181 0) - activeHelpKey: detailsAccessCharaterPosition - tabable: true - model: accessCharacterPosition - group: inputGroup - type: numberOrNil - immediateAccept: false - acceptOnReturn: true - acceptOnTab: true - acceptChannel: acceptChannel - modifiedChannel: modifiedChannel - acceptOnPointerLeave: false - ) - (CheckBoxSpec - label: 'Ignore Accelerator (i.e. Display Only)' - name: 'ignoreShortcutKeysInItem' - layout: (AlignmentOrigin 42 0 204 0 0 0.5) - activeHelpKey: detailsIgnoreAcceleratorKeys - visibilityChannel: hasNoSubmenu - model: ignoreShortcutKeys - translateLabel: true - resizeForLabel: true - ) - (CheckBoxSpec - label: 'Ignore Accelerators in Submenu' - name: 'ignoreShortcutKeys' - layout: (AlignmentOrigin 42 0 204 0 0 0.5) - activeHelpKey: detailsIgnoreAcceleratorKeys - visibilityChannel: hasSubmenu - model: ignoreShortcutKeys - translateLabel: true - resizeForLabel: true - ) - (CheckBoxSpec - label: 'Ignore Mnemonics in Submenu' - name: 'ignoreMnemonicKeys' - layout: (AlignmentOrigin 42 0 232 0 0 0.5) - activeHelpKey: detailsIgnoreMnemonicKeys - visibilityChannel: hasSubmenu - model: ignoreMnemonicKeys - translateLabel: true - resizeForLabel: true - ) - (LabelSpec - label: 'Font:' - name: 'fontLabel' - layout: (AlignmentOrigin 107 0 271 0 1 0.5) - translateLabel: true - resizeForLabel: true - adjust: right - ) - (FontMenuSpec - name: 'fontMenu' - layout: (LayoutFrame 110 0 260 0 -5 1.0 282 0) - activeHelpKey: fontMenu - model: font - allowSymbolicFonts: true - ) - ) - - ) + collection: ( + (LabelSpec + label: 'Accelerator:' + name: 'shortcutKeyLabel' + layout: (AlignmentOrigin 107 0 26 0 1 0.5) + activeHelpKey: detailsAccelerator + translateLabel: true + resizeForLabel: true + adjust: right + ) + (InputFieldSpec + name: 'shortcutKeyField' + layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0) + activeHelpKey: detailsAccelerator + tabable: true + model: shortcutKeyCharacter + group: inputGroup + type: symbolOrNil + immediateAccept: false + acceptOnReturn: true + acceptOnTab: true + acceptChannel: acceptChannel + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + (LabelSpec + label: 'Enabled:' + name: 'enabledLabel' + layout: (AlignmentOrigin 107 0 51 0 1 0.5) + activeHelpKey: detailsEnabled + translateLabel: true + resizeForLabel: true + adjust: right + ) + (InputFieldSpec + name: 'enabledField' + layout: (LayoutFrame 110 0 40 0 -25 1.0 62 0) + activeHelpKey: detailsEnabled + tabable: true + model: enabled + group: inputGroup + type: symbolOrBooleanOrNil + immediateAccept: false + acceptOnReturn: true + acceptOnTab: true + acceptChannel: acceptChannel + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + (ActionButtonSpec + label: 'browseActionImage' + name: 'Button1' + layout: (LayoutFrame -25 1 40 0 -5 1 62 0) + activeHelpKey: browseMethod + hasCharacterOrientedLabel: false + translateLabel: true + resizeForLabel: true + tabable: true + model: doBrowseEnabledMethod + ) + (LabelSpec + label: 'Visibility:' + name: 'visibilityLabel' + layout: (AlignmentOrigin 107 0 76 0 1 0.5) + activeHelpKey: detailsVisibility + translateLabel: true + resizeForLabel: true + adjust: right + ) + (InputFieldSpec + name: 'isVisibleInputField' + layout: (LayoutFrame 110 0 65 0 -25 1.0 87 0) + activeHelpKey: detailsVisibility + tabable: true + model: isVisible + group: inputGroup + type: symbolOrBooleanOrNil + immediateAccept: false + acceptOnReturn: true + acceptOnTab: true + acceptChannel: acceptChannel + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + (ActionButtonSpec + label: 'browseActionImage' + name: 'Button2' + layout: (LayoutFrame -25 1 65 0 -5 1 87 0) + activeHelpKey: browseMethod + hasCharacterOrientedLabel: false + translateLabel: true + resizeForLabel: true + tabable: true + model: doBrowseVisibilityMethod + ) + (LabelSpec + label: 'Aux Value' + name: 'auxLabel' + layout: (AlignmentOrigin 107 0 101 0 1 0.5) + activeHelpKey: detailsAuxValue + translateLabel: true + resizeForLabel: true + adjust: right + ) + (InputFieldSpec + name: 'auxInputField' + layout: (LayoutFrame 110 0 90 0 -5 1.0 112 0) + activeHelpKey: detailsAuxValue + tabable: true + model: auxValue + group: inputGroup + type: smalltalkObjectOrNil + immediateAccept: false + acceptOnReturn: true + acceptOnTab: true + acceptChannel: acceptChannel + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + (LabelSpec + label: 'Start Group:' + name: 'StartGroupLabel' + layout: (AlignmentOrigin 107 0 139 0 1 0.5) + activeHelpKey: detailsStartGroup + translateLabel: true + resizeForLabel: true + adjust: right + ) + (PopUpListSpec + label: 'left' + name: 'StartGroupPopUp' + layout: (LayoutFrame 110 0 128 0 -5 1.0 150 0) + activeHelpKey: detailsStartGroup + tabable: true + model: startGroup + menu: + (Array + left right + conditionalRight + ) + ) + (LabelSpec + label: 'Access Character Position:' + name: 'accessCharLabel' + layout: (AlignmentOrigin 217 0 170 0 1 0.5) + translateLabel: true + resizeForLabel: true + adjust: right + ) + (InputFieldSpec + name: 'accessCharField' + layout: (LayoutFrame 220 0 159 0 -5 1.0 181 0) + activeHelpKey: detailsAccessCharaterPosition + tabable: true + model: accessCharacterPosition + group: inputGroup + type: numberOrNil + immediateAccept: false + acceptOnReturn: true + acceptOnTab: true + acceptChannel: acceptChannel + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + (CheckBoxSpec + label: 'Ignore Accelerator (i.e. Display Only)' + name: 'ignoreShortcutKeysInItem' + layout: (AlignmentOrigin 42 0 204 0 0 0.5) + activeHelpKey: detailsIgnoreAcceleratorKeys + visibilityChannel: hasNoSubmenu + model: ignoreShortcutKeys + translateLabel: true + resizeForLabel: true + ) + (CheckBoxSpec + label: 'Ignore Accelerators in Submenu' + name: 'ignoreShortcutKeys' + layout: (AlignmentOrigin 42 0 204 0 0 0.5) + activeHelpKey: detailsIgnoreAcceleratorKeys + visibilityChannel: hasSubmenu + model: ignoreShortcutKeys + translateLabel: true + resizeForLabel: true + ) + (CheckBoxSpec + label: 'Ignore Mnemonics in Submenu' + name: 'ignoreMnemonicKeys' + layout: (AlignmentOrigin 42 0 232 0 0 0.5) + activeHelpKey: detailsIgnoreMnemonicKeys + visibilityChannel: hasSubmenu + model: ignoreMnemonicKeys + translateLabel: true + resizeForLabel: true + ) + (LabelSpec + label: 'Font:' + name: 'fontLabel' + layout: (AlignmentOrigin 107 0 271 0 1 0.5) + translateLabel: true + resizeForLabel: true + adjust: right + ) + (FontMenuSpec + name: 'fontMenu' + layout: (LayoutFrame 110 0 260 0 -5 1.0 282 0) + activeHelpKey: fontMenu + model: font + allowSymbolicFonts: true + ) + ) + + ) ) "Modified: / 21-10-2010 / 14:15:09 / cg" @@ -3700,7 +3700,7 @@ "read values from aspects " MenuEditor aspects do:[:aKey| - self aspectAt:aKey put:((aspects at:aKey) value). + self aspectAt:aKey put:((aspects at:aKey) value). ]. self validateMenuItem. self changed. @@ -3723,8 +3723,8 @@ menuItem isNil ifTrue:[^ self]. menuItem choice isEmptyOrNil ifTrue:[ - menuItem choice:nil. - menuItem choiceValue:nil. + menuItem choice:nil. + menuItem choiceValue:nil. ]. ! ! @@ -3844,8 +3844,8 @@ aspects := OrderedCollection new. #( indication choice enabled isVisible ) do:[:aKey| |sel| - sel := menuItem perform:aKey. - sel isSymbol ifTrue:[ aspects add:sel ] + sel := menuItem perform:aKey. + sel isSymbol ifTrue:[ aspects add:sel ] ]. ^ aspects ! ! @@ -3927,166 +3927,166 @@ - ^ + ^ #(FullSpec - name: windowSpec - window: + name: windowSpec + window: (WindowSpec - label: 'Image Item' - name: 'Image Item' - min: (Point 10 10) - bounds: (Rectangle 0 0 303 304) - ) - component: + label: 'Image Item' + name: 'Image Item' + min: (Point 10 10) + bounds: (Rectangle 0 0 303 304) + ) + component: (SpecCollection - collection: ( - (LabelSpec - label: 'Retriever:' - name: 'retrieverLabel' - layout: (AlignmentOrigin 107 0 26 0 1 0.5) - activeHelpKey: imageRetriever - translateLabel: true - resizeForLabel: true - adjust: right - ) - (ComboBoxSpec - name: 'retrieverHolder' - layout: (LayoutFrame 110 0 15 0 -2 1.0 37 0) - activeHelpKey: imageRetriever - tabable: true - model: retrieverHolder - type: symbolOrNil - immediateAccept: true - acceptOnReturn: false - acceptOnTab: false - acceptOnPointerLeave: false - entryCompletionBlock: entryCompletionForRetriever - comboList: retrieverList - isFilenameBox: false - ) - (LabelSpec - label: 'Selector:' - name: 'iconLabel' - layout: (AlignmentOrigin 107 0 51 0 1 0.5) - activeHelpKey: imageSelector - translateLabel: true - resizeForLabel: true - adjust: right - ) - (InputFieldSpec - name: 'selectorHolder' - layout: (LayoutFrame 110 0 40 0 -24 1.0 62 0) - activeHelpKey: imageSelector - tabable: true - model: selectorHolder - group: inputGroup - type: symbolOrNil - immediateAccept: true - acceptOnReturn: false - acceptOnTab: false - modifiedChannel: modifiedChannel - acceptOnPointerLeave: false - ) - (ActionButtonSpec - label: '...' - name: 'browseButton' - layout: (LayoutFrame -22 1 40 0 -2 1 62 0) - activeHelpKey: browseResource - tabable: true - model: doBrowseForImageResource - ) - (DividerSpec - name: 'Separator1' - layout: (LayoutFrame 0 0.0 66 0 0 1.0 70 0) - ) - (ViewSpec - name: 'SelectorFilterBox2' - layout: (LayoutFrame 0 0.0 74 0 0 1.0 96 0) - activeHelpKey: selectorFilter - component: - (SpecCollection - collection: ( - (LabelSpec - label: 'Filter:' - name: 'Label1' - layout: (AlignmentOrigin 107 0 11 0 1 0.5) - activeHelpKey: selectorFilter - translateLabel: true - resizeForLabel: true - adjust: right - ) - (InputFieldSpec - name: 'EntryField1' - layout: (LayoutFrame 110 0 0 0 -2 1 22 0) - model: selectorFilterHolder - immediateAccept: true - acceptOnLeave: true - acceptOnReturn: false - acceptOnTab: false - acceptOnPointerLeave: false - activeHelpKey: selectorFilter - ) - ) - - ) - ) - (HierarchicalListViewSpec - name: 'imageList' - layout: (LayoutFrame 2 0.0 100 0 -2 1.0 -60 1.0) - activeHelpKey: imageImageList - model: imageHolder - menu: menuEditImage - hasHorizontalScrollBar: true - hasVerticalScrollBar: true - miniScrollerHorizontal: true - listModel: imageList - useIndex: false - highlightMode: label - postBuildCallback: postBuildImageViewer: - ) - (ViewSpec - name: 'Box1' - layout: (LayoutFrame 20 0.0 -60 1.0 -20 1.0 0 1.0) - level: 0 - component: - (SpecCollection - collection: ( - (CheckBoxSpec - label: 'Image & Label' - name: 'iconAndLabelCheckBox' - layout: (AlignmentOrigin 0 0 17 0 0 0.5) - activeHelpKey: imageImageAndLabel - tabable: true - model: iconAndLabelHolder - translateLabel: true - ) - (ActionButtonSpec - label: 'Image Editor' - name: 'imageEditorButton' - layout: (AlignmentOrigin -69 1.0 17 0 0 0.5) - activeHelpKey: imageImageEditor - hasCharacterOrientedLabel: false - foregroundColor: (Color 0.0 0.0 66.9993133440146) - tabable: true - model: doEditImage - ) - (ActionButtonSpec - label: 'Browse' - name: 'Button1' - layout: (AlignmentOrigin -69 1.0 41 0 0 0.5) - activeHelpKey: imageBrowseImageClass - hasCharacterOrientedLabel: false - foregroundColor: (Color 0.0 0.0 66.9993133440146) - tabable: true - model: doBrowseImageClass - ) - ) - - ) - ) - ) - - ) + collection: ( + (LabelSpec + label: 'Retriever:' + name: 'retrieverLabel' + layout: (AlignmentOrigin 107 0 26 0 1 0.5) + activeHelpKey: imageRetriever + translateLabel: true + resizeForLabel: true + adjust: right + ) + (ComboBoxSpec + name: 'retrieverHolder' + layout: (LayoutFrame 110 0 15 0 -2 1.0 37 0) + activeHelpKey: imageRetriever + tabable: true + model: retrieverHolder + type: symbolOrNil + immediateAccept: true + acceptOnReturn: false + acceptOnTab: false + acceptOnPointerLeave: false + entryCompletionBlock: entryCompletionForRetriever + comboList: retrieverList + isFilenameBox: false + ) + (LabelSpec + label: 'Selector:' + name: 'iconLabel' + layout: (AlignmentOrigin 107 0 51 0 1 0.5) + activeHelpKey: imageSelector + translateLabel: true + resizeForLabel: true + adjust: right + ) + (InputFieldSpec + name: 'selectorHolder' + layout: (LayoutFrame 110 0 40 0 -24 1.0 62 0) + activeHelpKey: imageSelector + tabable: true + model: selectorHolder + group: inputGroup + type: symbolOrNil + immediateAccept: true + acceptOnReturn: false + acceptOnTab: false + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + (ActionButtonSpec + label: '...' + name: 'browseButton' + layout: (LayoutFrame -22 1 40 0 -2 1 62 0) + activeHelpKey: browseResource + tabable: true + model: doBrowseForImageResource + ) + (DividerSpec + name: 'Separator1' + layout: (LayoutFrame 0 0.0 66 0 0 1.0 70 0) + ) + (ViewSpec + name: 'SelectorFilterBox2' + layout: (LayoutFrame 0 0.0 74 0 0 1.0 96 0) + activeHelpKey: selectorFilter + component: + (SpecCollection + collection: ( + (LabelSpec + label: 'Filter:' + name: 'Label1' + layout: (AlignmentOrigin 107 0 11 0 1 0.5) + activeHelpKey: selectorFilter + translateLabel: true + resizeForLabel: true + adjust: right + ) + (InputFieldSpec + name: 'EntryField1' + layout: (LayoutFrame 110 0 0 0 -2 1 22 0) + model: selectorFilterHolder + immediateAccept: true + acceptOnLeave: true + acceptOnReturn: false + acceptOnTab: false + acceptOnPointerLeave: false + activeHelpKey: selectorFilter + ) + ) + + ) + ) + (HierarchicalListViewSpec + name: 'imageList' + layout: (LayoutFrame 2 0.0 100 0 -2 1.0 -60 1.0) + activeHelpKey: imageImageList + model: imageHolder + menu: menuEditImage + hasHorizontalScrollBar: true + hasVerticalScrollBar: true + miniScrollerHorizontal: true + listModel: imageList + useIndex: false + highlightMode: label + postBuildCallback: postBuildImageViewer: + ) + (ViewSpec + name: 'Box1' + layout: (LayoutFrame 20 0.0 -60 1.0 -20 1.0 0 1.0) + level: 0 + component: + (SpecCollection + collection: ( + (CheckBoxSpec + label: 'Image & Label' + name: 'iconAndLabelCheckBox' + layout: (AlignmentOrigin 0 0 17 0 0 0.5) + activeHelpKey: imageImageAndLabel + tabable: true + model: iconAndLabelHolder + translateLabel: true + ) + (ActionButtonSpec + label: 'Image Editor' + name: 'imageEditorButton' + layout: (AlignmentOrigin -69 1.0 17 0 0 0.5) + activeHelpKey: imageImageEditor + hasCharacterOrientedLabel: false + foregroundColor: (Color 0.0 0.0 66.9993133440146) + tabable: true + model: doEditImage + ) + (ActionButtonSpec + label: 'Browse' + name: 'Button1' + layout: (AlignmentOrigin -69 1.0 41 0 0 0.5) + activeHelpKey: imageBrowseImageClass + hasCharacterOrientedLabel: false + foregroundColor: (Color 0.0 0.0 66.9993133440146) + tabable: true + model: doBrowseImageClass + ) + ) + + ) + ) + ) + + ) ) "Modified: / 03-08-2011 / 10:16:13 / cg" @@ -4100,12 +4100,12 @@ sel := selectorHolder value. sel size == 0 ifTrue:[ ^ nil ]. cls := self retrieverClass. - cls notNil ifTrue:[ - clsName := retrieverHolder value. - clsName isEmptyOrNil ifTrue:[ - clsName := cls name. - ]. - clsName := clsName asSymbol. + cls notNil ifTrue:[ + clsName := retrieverHolder value. + clsName isEmptyOrNil ifTrue:[ + clsName := cls name. + ]. + clsName := clsName asSymbol. ]. rcv := ResourceRetriever new. @@ -4120,15 +4120,15 @@ |className sel isOn| aResourceRetriever notNil ifTrue:[ - className := aResourceRetriever className. - className isBehavior ifTrue:[ - className := className name asSymbol - ]. - sel := aResourceRetriever selector. - isOn := aResourceRetriever labelText notNil. + className := aResourceRetriever className. + className isBehavior ifTrue:[ + className := className name asSymbol + ]. + sel := aResourceRetriever selector. + isOn := aResourceRetriever labelText notNil. ] ifFalse:[ - className := sel := nil. - isOn := false. + className := sel := nil. + isOn := false. ]. retrieverHolder value:className. @@ -4141,10 +4141,10 @@ clsName := retrieverHolder value. clsName notEmptyOrNil ifTrue:[ - cls := Smalltalk at:clsName ifAbsent:nil. - (cls isBehavior) ifTrue:[ - ^ cls - ]. + cls := Smalltalk at:clsName ifAbsent:nil. + (cls isBehavior) ifTrue:[ + ^ cls + ]. ]. ^ nil ! ! @@ -4173,23 +4173,23 @@ |cls sel image| (cls := retrieverHolder value) isNil ifTrue:[ - Dialog warn:'No resource retriever is defined.'. + Dialog warn:'No resource retriever is defined.'. ] ifFalse:[ - sel := selectorHolder value. - - cls := Smalltalk classNamed:cls. - cls isNil ifTrue:[ - Dialog warn:'No such resource retriever class.'. - ] ifFalse:[ - (cls respondsTo:#visualFor:) ifTrue:[ - image := cls visualFor:sel. - image ~~ (cls perform:sel) ifTrue:[ - self warn:'The image is resolved via #visualFor: from some unknown class'. - sel := #visualFor:. - ]. - ]. - UserPreferences current systemBrowserClass openInClass:cls class selector:sel - ] + sel := selectorHolder value. + + cls := Smalltalk classNamed:cls. + cls isNil ifTrue:[ + Dialog warn:'No such resource retriever class.'. + ] ifFalse:[ + (cls respondsTo:#visualFor:) ifTrue:[ + image := cls visualFor:sel. + image ~~ (cls perform:sel) ifTrue:[ + self warn:'The image is resolved via #visualFor: from some unknown class'. + sel := #visualFor:. + ]. + ]. + UserPreferences current systemBrowserClass openInClass:cls class selector:sel + ] ] "Created: / 20-09-2010 / 13:27:34 / cg" @@ -4200,34 +4200,34 @@ item := imageHolder value. item notNil ifTrue:[ - item doEdit. - ^ self. + item doEdit. + ^ self. ]. - sel := selectorHolder value. + sel := selectorHolder value. sel isNil ifTrue:[ - Dialog warn:'No selector is defined.'. - ^ self. + Dialog warn:'No selector is defined.'. + ^ self. ]. cls := retrieverHolder value. cls isNil ifTrue:[ - Dialog warn:'No resource retriever is defined.'. - ^ self. + Dialog warn:'No resource retriever is defined.'. + ^ self. ]. cls := Smalltalk classNamed:cls. cls isNil ifTrue:[ - Dialog warn:'No such resource retriever class.'. - ^ self. + Dialog warn:'No such resource retriever class.'. + ^ self. ]. (cls respondsTo:#visualFor:) ifTrue:[ - image := cls visualFor:sel. - image ~~ (cls perform:sel ifNotUnderstood:nil) ifTrue:[ - self warn:'The image is resolved via #visualFor: from some unknown class'. - image notNil ifTrue:[ - ImageEditor openOnImage:image. - ]. - ^ self. - ]. + image := cls visualFor:sel. + image ~~ (cls perform:sel ifNotUnderstood:nil) ifTrue:[ + self warn:'The image is resolved via #visualFor: from some unknown class'. + image notNil ifTrue:[ + ImageEditor openOnImage:image. + ]. + ^ self. + ]. ]. ImageEditor openOnClass:cls andSelector:sel @@ -4270,12 +4270,12 @@ list := builder bindingAt:#retrieverList. list isNil ifTrue:[ - list := MenuEditor imageRetrieverClasses asList. - builder aspectAt:#retrieverList put:list. + list := MenuEditor imageRetrieverClasses asList. + builder aspectAt:#retrieverList put:list. ]. - (masterApplication notNil + (masterApplication notNil and:[(cls := masterApplication specClass) notNil]) ifTrue:[ - list := list copyWithFirst:cls. + list := list copyWithFirst:cls. ]. ^ list ! @@ -4302,12 +4302,12 @@ self updateSelectedImage. (retriever notNil and:[imageList size ~~ 0]) ifTrue:[ - list := self retrieverList. - name := retriever name. - - (list includes:name) ifFalse:[ - list add:(name asSymbol). - ] + list := self retrieverList. + name := retriever name. + + (list includes:name) ifFalse:[ + list add:(name asSymbol). + ] ]. "Modified: / 03-08-2011 / 10:56:58 / cg" @@ -4336,11 +4336,11 @@ aModel == selectorFilterHolder ifTrue:[ self selectorFilterChanged. ^ self ]. aModel == imageHolder ifTrue:[ - item := imageHolder value. - item notNil ifTrue:[ - selectorHolder value:(item label) - ]. - ^ self + item := imageHolder value. + item notNil ifTrue:[ + selectorHolder value:(item label) + ]. + ^ self ]. super update:what with:aPara from:aModel @@ -4354,11 +4354,11 @@ filter := [:sel | true]. (selectorFilterString := selectorFilterHolder value) notEmptyOrNil ifTrue:[ - selectorFilterString includesMatchCharacters ifTrue:[ - filter := [:sel | selectorFilterString match:sel ignoreCase:true]. - ] ifFalse:[ - filter := [:sel | sel includesString:selectorFilterString]. - ]. + selectorFilterString includesMatchCharacters ifTrue:[ + filter := [:sel | selectorFilterString match:sel ignoreCase:true]. + ] ifFalse:[ + filter := [:sel | sel includesString:selectorFilterString]. + ]. ]. imageList root updateFromClass:retriever selectorFilter:filter. @@ -4374,34 +4374,34 @@ imageList isEmpty ifTrue:[^ self]. selector := selectorHolder value. - selector isEmptyOrNil ifTrue:[ - imageHolder value:nil. - ^ self + selector isEmptyOrNil ifTrue:[ + imageHolder value:nil. + ^ self ]. item := nil. selector := selector asSymbol. - imageList do:[:anItem| - |sel| - - sel := anItem selector. - selector == sel ifTrue:[ - imageHolder value:anItem. - ^ self - ]. - item isNil ifTrue:[ - (sel startsWith:selector) ifTrue:[ item := anItem ] - ] + imageList do:[:anItem| + |sel| + + sel := anItem selector. + selector == sel ifTrue:[ + imageHolder value:anItem. + ^ self + ]. + item isNil ifTrue:[ + (sel startsWith:selector) ifTrue:[ item := anItem ] + ] ]. imageHolder value:nil. item notNil ifTrue:[ - line := imageList identityIndexOf:item. - line ~~ 0 ifTrue:[ - "/ imageListView scrollToLine:line - imageListView makeLineVisible:line - ] + line := imageList identityIndexOf:item. + line ~~ 0 ifTrue:[ + "/ imageListView scrollToLine:line + imageListView makeLineVisible:line + ] ]. "Created: / 03-08-2011 / 10:55:45 / cg" @@ -4465,28 +4465,28 @@ "do what the ResourceRetriever will do" (aClass respondsTo:#visualFor:) ifTrue:[ - iconOrSymbol := aClass visualFor:selector. + iconOrSymbol := aClass visualFor:selector. ]. iconOrSymbol isNil ifTrue:[ - iconOrSymbol := aClass perform:selector. + iconOrSymbol := aClass perform:selector. ]. iconOrSymbol isNil ifTrue:[^ self]. iconOrSymbol isSymbol ifTrue:[ - icon := ToolbarIconLibrary perform:iconOrSymbol. + icon := ToolbarIconLibrary perform:iconOrSymbol. ] ifFalse:[ - icon := iconOrSymbol. + icon := iconOrSymbol. ]. w := icon width. h := icon height. w > 32 ifTrue:[ - magnify := 32 / w. - h > 32 ifTrue:[ magnify := (32 / h) max:magnify ]. + magnify := 32 / w. + h > 32 ifTrue:[ magnify := (32 / h) max:magnify ]. ] ifFalse:[ - h > 32 ifFalse:[^ self]. - magnify := 32 / h. + h > 32 ifFalse:[^ self]. + magnify := 32 / h. ]. icon := icon magnifiedBy: magnify. @@ -4503,7 +4503,7 @@ |r item| (aClass notNil and:[aClass isBehavior]) ifFalse:[ - ^ self collapse. + ^ self collapse. ]. "/ aClass == selector ifTrue:[ "/ ^ self expand @@ -4514,24 +4514,24 @@ children := OrderedCollection new. self application withWaitCursorDo:[ - aClass withAllSuperclassesDo:[:aClass| - aClass class selectorsAndMethodsDo:[:sel :m| - (aFilterBlock value:sel) ifTrue:[ - m hasResource ifTrue:[ - r := m resources. - r notEmptyOrNil ifTrue:[ - ((r includesKey:#image) or:[r includesKey:#programImage]) ifTrue:[ - item := self class new forClass:aClass selector:sel. - item parent:self. - children add:item - ] - ] - ] - ] - ] - ]. - children sort:[:a :b | a label < b label ]. - self expand + aClass withAllSuperclassesDo:[:aClass| + aClass class selectorsAndMethodsDo:[:sel :m| + (aFilterBlock value:sel) ifTrue:[ + m hasResource ifTrue:[ + r := m resources. + r notEmptyOrNil ifTrue:[ + ((r includesKey:#image) or:[r includesKey:#programImage]) ifTrue:[ + item := self class new forClass:aClass selector:sel. + item parent:self. + children add:item + ] + ] + ] + ] + ] + ]. + children sort:[:a :b | a label < b label ]. + self expand ]. "Created: / 03-08-2011 / 10:48:10 / cg" @@ -4546,16 +4546,16 @@ parent := self parent. parent notNil ifTrue:[ - aClass := parent selector. - (aClass respondsTo:#visualFor:) ifTrue:[ - image := aClass visualFor:selector. - image ~~ (aClass perform:selector) ifTrue:[ - self warn:'The image is resolved via #visualFor: from some unknown class'. - ImageEditor openOnImage:image. - ^ self. - ]. - ]. - ImageEditor openOnClass:aClass andSelector:selector. + aClass := parent selector. + (aClass respondsTo:#visualFor:) ifTrue:[ + image := aClass visualFor:selector. + image ~~ (aClass perform:selector) ifTrue:[ + self warn:'The image is resolved via #visualFor: from some unknown class'. + ImageEditor openOnImage:image. + ^ self. + ]. + ]. + ImageEditor openOnClass:aClass andSelector:selector. ]. ! ! @@ -4580,267 +4580,267 @@ - ^ + ^ #(FullSpec - name: basicsEditSpec - window: + name: basicsEditSpec + window: (WindowSpec - label: 'basicsEditSpec' - name: 'basicsEditSpec' - min: (Point 10 10) - bounds: (Rectangle 0 0 340 340) - ) - component: + label: 'basicsEditSpec' + name: 'basicsEditSpec' + min: (Point 10 10) + bounds: (Rectangle 0 0 340 340) + ) + component: (SpecCollection - collection: ( - (LabelSpec - label: 'Name Key:' - name: 'nameKeyLabel' - layout: (AlignmentOrigin 107 0 25 0 1 0.5) - activeHelpKey: basicsKey - translateLabel: true - resizeForLabel: true - adjust: right - ) - (InputFieldSpec - name: 'nameKeyField' - layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0) - activeHelpKey: basicsKey - tabable: true - model: nameKey - group: inputGroup - type: symbolOrNil - immediateAccept: false - acceptOnLeave: false - acceptOnReturn: true - acceptOnTab: true - acceptOnLostFocus: false - acceptChannel: acceptChannel - modifiedChannel: modifiedChannel - acceptOnPointerLeave: false - ) - (LabelSpec - label: 'Label:' - name: 'labelLabel' - layout: (AlignmentOrigin 107 0 51 0 1 0.5) - activeHelpKey: basicsLabel - translateLabel: true - resizeForLabel: true - adjust: right - ) - (InputFieldSpec - name: 'labelField' - layout: (LayoutFrame 110 0 40 0 -5 1.0 62 0) - activeHelpKey: basicsLabel - tabable: true - model: rawLabel - group: inputGroup - immediateAccept: false - acceptOnReturn: true - acceptOnTab: true - acceptOnLostFocus: false - acceptChannel: acceptChannel - modifiedChannel: modifiedChannel - acceptOnPointerLeave: false - ) - (LabelSpec - label: 'Action:' - name: 'valueLabel' - layout: (AlignmentOrigin 107 0 82 0 1 0.5) - activeHelpKey: basicsAction - translateLabel: true - resizeForLabel: true - adjust: right - ) - (InputFieldSpec - name: 'valueField' - layout: (LayoutFrame 110 0 71 0 -25 1.0 93 0) - activeHelpKey: basicsAction - tabable: true - model: itemValue - group: inputGroup - type: symbolOrNil - immediateAccept: false - acceptOnLeave: true - acceptOnReturn: true - acceptOnTab: true - acceptOnLostFocus: true - acceptChannel: acceptChannel - modifiedChannel: modifiedChannel - acceptOnPointerLeave: true - ) - (ActionButtonSpec - label: 'browseActionImage' - name: 'Button1' - layout: (LayoutFrame -25 1 71 0 -5 1 93 0) - hasCharacterOrientedLabel: false - translateLabel: true - resizeForLabel: true - tabable: true - model: doBrowseActionMethod - activeHelpKey: browseMethod - ) - (LabelSpec - label: 'Argument:' - name: 'argumentLabel' - layout: (AlignmentOrigin 107 0 107 0 1 0.5) - activeHelpKey: basicsArgument - translateLabel: true - resizeForLabel: true - adjust: right - ) - (InputFieldSpec - name: 'argumentField' - layout: (LayoutFrame 110 0 96 0 -5 1.0 118 0) - activeHelpKey: basicsArgument - tabable: true - model: argument - group: inputGroup - type: smalltalkObjectOrNil - immediateAccept: false - acceptOnReturn: true - acceptOnTab: true - acceptOnLostFocus: false - acceptChannel: acceptChannel - modifiedChannel: modifiedChannel - acceptOnPointerLeave: false - ) - (LabelSpec - label: 'Indication:' - name: 'indicationLabel' - layout: (AlignmentOrigin 107 0 138 0 1 0.5) - activeHelpKey: basicsIndication - translateLabel: true - resizeForLabel: true - adjust: right - ) - (InputFieldSpec - name: 'indicationField' - layout: (LayoutFrame 110 0 127 0 -5 1.0 149 0) - activeHelpKey: basicsIndication - enableChannel: indicationEnabled - tabable: true - model: indication - group: inputGroup - type: symbolOrNil - immediateAccept: true - acceptOnReturn: false - acceptOnTab: false - acceptOnLostFocus: false - modifiedChannel: modifiedChannel - acceptOnPointerLeave: false - ) - (LabelSpec - label: 'Choice:' - name: 'choiceLabel' - layout: (AlignmentOrigin 107 0 163 0 1 0.5) - activeHelpKey: basicsChoice - translateLabel: true - resizeForLabel: true - adjust: right - ) - (InputFieldSpec - name: 'choiceField' - layout: (LayoutFrame 110 0 152 0 -5 1.0 174 0) - activeHelpKey: basicsChoice - enableChannel: choiceEnabled - tabable: true - model: choice - group: inputGroup - type: symbolOrNil - immediateAccept: true - acceptOnReturn: false - acceptOnTab: false - acceptOnLostFocus: false - modifiedChannel: modifiedChannel - acceptOnPointerLeave: false - ) - (LabelSpec - label: 'Value:' - name: 'choiceValueLabel' - layout: (AlignmentOrigin 107 0 188 0 1 0.5) - activeHelpKey: basicsChoiceValue - translateLabel: true - resizeForLabel: true - adjust: right - ) - (InputFieldSpec - name: 'choiceValueField' - layout: (LayoutFrame 110 0 177 0 -5 1.0 199 0) - activeHelpKey: basicsChoiceValue - enableChannel: choiceValueEnabled - tabable: true - model: choiceValue - group: inputGroup - type: smalltalkObjectOrNil - immediateAccept: false - acceptOnLeave: false - acceptOnReturn: true - acceptOnTab: true - acceptOnLostFocus: false - acceptChannel: acceptChannel - modifiedChannel: modifiedChannel - acceptOnPointerLeave: false - ) - (CheckBoxSpec - label: 'Translate Label' - name: 'translateLabelCheckBox' - layout: (AlignmentOrigin 7 0 213 0 0 0) - activeHelpKey: basicsTranslateLabel - tabable: true - model: translateLabel - translateLabel: true - ) - (CheckBoxSpec - label: 'Is Button' - name: 'isButtonCheckBox' - layout: (AlignmentOrigin 7 0 238 0 0 0) - activeHelpKey: basicsIsButton - tabable: true - model: isButton - translateLabel: true - ) - (CheckBoxSpec - label: 'Hide Menu after Activation' - name: 'hideMenuOnActivated' - layout: (AlignmentOrigin 7 0 263 0 0 0) - activeHelpKey: hideMenuOnActivated - tabable: true - model: hideMenuOnActivated - translateLabel: true - ) - (CheckBoxSpec - label: 'BusyCursor while Active' - name: 'showBusyCursorWhilePerforming' - layout: (AlignmentOrigin 7 0 288 0 0 0) - activeHelpKey: showBusyCursorWhilePerforming - tabable: true - model: showBusyCursorWhilePerforming - translateLabel: true - ) - (CheckBoxSpec - label: 'Trigger On Down' - name: 'triggerOnDown' - layout: (AlignmentOrigin 25 0.5 238 0 0 0) - activeHelpKey: triggerOnDown - enableChannel: hasNoDelayedMenuValue - tabable: true - model: triggerOnDown - translateLabel: true - ) - (CheckBoxSpec - label: 'Send To Originating Widget' - name: 'sendToOriginator' - layout: (AlignmentOrigin 7 0 313 0 0 0) - activeHelpKey: sendToOriginator - enableChannel: hasItemValue - tabable: true - model: sendToOriginator - translateLabel: true - ) - ) - - ) + collection: ( + (LabelSpec + label: 'Name Key:' + name: 'nameKeyLabel' + layout: (AlignmentOrigin 107 0 25 0 1 0.5) + activeHelpKey: basicsKey + translateLabel: true + resizeForLabel: true + adjust: right + ) + (InputFieldSpec + name: 'nameKeyField' + layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0) + activeHelpKey: basicsKey + tabable: true + model: nameKey + group: inputGroup + type: symbolOrNil + immediateAccept: false + acceptOnLeave: false + acceptOnReturn: true + acceptOnTab: true + acceptOnLostFocus: false + acceptChannel: acceptChannel + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + (LabelSpec + label: 'Label:' + name: 'labelLabel' + layout: (AlignmentOrigin 107 0 51 0 1 0.5) + activeHelpKey: basicsLabel + translateLabel: true + resizeForLabel: true + adjust: right + ) + (InputFieldSpec + name: 'labelField' + layout: (LayoutFrame 110 0 40 0 -5 1.0 62 0) + activeHelpKey: basicsLabel + tabable: true + model: rawLabel + group: inputGroup + immediateAccept: false + acceptOnReturn: true + acceptOnTab: true + acceptOnLostFocus: false + acceptChannel: acceptChannel + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + (LabelSpec + label: 'Action:' + name: 'valueLabel' + layout: (AlignmentOrigin 107 0 82 0 1 0.5) + activeHelpKey: basicsAction + translateLabel: true + resizeForLabel: true + adjust: right + ) + (InputFieldSpec + name: 'valueField' + layout: (LayoutFrame 110 0 71 0 -25 1.0 93 0) + activeHelpKey: basicsAction + tabable: true + model: itemValue + group: inputGroup + type: symbolOrNil + immediateAccept: false + acceptOnLeave: true + acceptOnReturn: true + acceptOnTab: true + acceptOnLostFocus: true + acceptChannel: acceptChannel + modifiedChannel: modifiedChannel + acceptOnPointerLeave: true + ) + (ActionButtonSpec + label: 'browseActionImage' + name: 'Button1' + layout: (LayoutFrame -25 1 71 0 -5 1 93 0) + hasCharacterOrientedLabel: false + translateLabel: true + resizeForLabel: true + tabable: true + model: doBrowseActionMethod + activeHelpKey: browseMethod + ) + (LabelSpec + label: 'Argument:' + name: 'argumentLabel' + layout: (AlignmentOrigin 107 0 107 0 1 0.5) + activeHelpKey: basicsArgument + translateLabel: true + resizeForLabel: true + adjust: right + ) + (InputFieldSpec + name: 'argumentField' + layout: (LayoutFrame 110 0 96 0 -5 1.0 118 0) + activeHelpKey: basicsArgument + tabable: true + model: argument + group: inputGroup + type: smalltalkObjectOrNil + immediateAccept: false + acceptOnReturn: true + acceptOnTab: true + acceptOnLostFocus: false + acceptChannel: acceptChannel + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + (LabelSpec + label: 'Indication:' + name: 'indicationLabel' + layout: (AlignmentOrigin 107 0 138 0 1 0.5) + activeHelpKey: basicsIndication + translateLabel: true + resizeForLabel: true + adjust: right + ) + (InputFieldSpec + name: 'indicationField' + layout: (LayoutFrame 110 0 127 0 -5 1.0 149 0) + activeHelpKey: basicsIndication + enableChannel: indicationEnabled + tabable: true + model: indication + group: inputGroup + type: symbolOrNil + immediateAccept: true + acceptOnReturn: false + acceptOnTab: false + acceptOnLostFocus: false + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + (LabelSpec + label: 'Choice:' + name: 'choiceLabel' + layout: (AlignmentOrigin 107 0 163 0 1 0.5) + activeHelpKey: basicsChoice + translateLabel: true + resizeForLabel: true + adjust: right + ) + (InputFieldSpec + name: 'choiceField' + layout: (LayoutFrame 110 0 152 0 -5 1.0 174 0) + activeHelpKey: basicsChoice + enableChannel: choiceEnabled + tabable: true + model: choice + group: inputGroup + type: symbolOrNil + immediateAccept: true + acceptOnReturn: false + acceptOnTab: false + acceptOnLostFocus: false + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + (LabelSpec + label: 'Value:' + name: 'choiceValueLabel' + layout: (AlignmentOrigin 107 0 188 0 1 0.5) + activeHelpKey: basicsChoiceValue + translateLabel: true + resizeForLabel: true + adjust: right + ) + (InputFieldSpec + name: 'choiceValueField' + layout: (LayoutFrame 110 0 177 0 -5 1.0 199 0) + activeHelpKey: basicsChoiceValue + enableChannel: choiceValueEnabled + tabable: true + model: choiceValue + group: inputGroup + type: smalltalkObjectOrNil + immediateAccept: false + acceptOnLeave: false + acceptOnReturn: true + acceptOnTab: true + acceptOnLostFocus: false + acceptChannel: acceptChannel + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + (CheckBoxSpec + label: 'Translate Label' + name: 'translateLabelCheckBox' + layout: (AlignmentOrigin 7 0 213 0 0 0) + activeHelpKey: basicsTranslateLabel + tabable: true + model: translateLabel + translateLabel: true + ) + (CheckBoxSpec + label: 'Is Button' + name: 'isButtonCheckBox' + layout: (AlignmentOrigin 7 0 238 0 0 0) + activeHelpKey: basicsIsButton + tabable: true + model: isButton + translateLabel: true + ) + (CheckBoxSpec + label: 'Hide Menu after Activation' + name: 'hideMenuOnActivated' + layout: (AlignmentOrigin 7 0 263 0 0 0) + activeHelpKey: hideMenuOnActivated + tabable: true + model: hideMenuOnActivated + translateLabel: true + ) + (CheckBoxSpec + label: 'BusyCursor while Active' + name: 'showBusyCursorWhilePerforming' + layout: (AlignmentOrigin 7 0 288 0 0 0) + activeHelpKey: showBusyCursorWhilePerforming + tabable: true + model: showBusyCursorWhilePerforming + translateLabel: true + ) + (CheckBoxSpec + label: 'Trigger On Down' + name: 'triggerOnDown' + layout: (AlignmentOrigin 25 0.5 238 0 0 0) + activeHelpKey: triggerOnDown + enableChannel: hasNoDelayedMenuValue + tabable: true + model: triggerOnDown + translateLabel: true + ) + (CheckBoxSpec + label: 'Send To Originating Widget' + name: 'sendToOriginator' + layout: (AlignmentOrigin 7 0 313 0 0 0) + activeHelpKey: sendToOriginator + enableChannel: hasItemValue + tabable: true + model: sendToOriginator + translateLabel: true + ) + ) + + ) ) "Modified: / 21-10-2010 / 14:14:49 / cg" @@ -4851,21 +4851,21 @@ addBindingsTo:aspects for:aMenuEditor "add additional bindings to the aspects " - aspects - at:#indicationEnabled - ifAbsentPut:[ BlockValue with:[:a | a size == 0 ] argument:(aspects at:#choice)]. - - aspects - at:#choiceEnabled - ifAbsentPut:[ BlockValue with:[:a | a size == 0 ] argument:(aspects at:#indication)]. - - aspects - at:#choiceValueEnabled - ifAbsentPut:[ BlockValue with:[:a | a size ~~ 0 ] argument:(aspects at:#choice)]. - - aspects - at:#hasNoDelayedMenuValue - ifAbsentPut:[true asValue]. + aspects + at:#indicationEnabled + ifAbsentPut:[ BlockValue with:[:a | a size == 0 ] argument:(aspects at:#choice)]. + + aspects + at:#choiceEnabled + ifAbsentPut:[ BlockValue with:[:a | a size == 0 ] argument:(aspects at:#indication)]. + + aspects + at:#choiceValueEnabled + ifAbsentPut:[ BlockValue with:[:a | a size ~~ 0 ] argument:(aspects at:#choice)]. + + aspects + at:#hasNoDelayedMenuValue + ifAbsentPut:[true asValue]. ! ! !MenuEditor::ActionItem methodsFor:'accessing'! @@ -4938,23 +4938,23 @@ "set a specific aspect named aKey to the aValue" aKey == #argument ifTrue:[ - self hasDelayedMenu ifTrue:[ - children first argument:aValue - ]. - menuItem argument:aValue. - ^ self + self hasDelayedMenu ifTrue:[ + children first argument:aValue + ]. + menuItem argument:aValue. + ^ self ]. aKey == #triggerOnDown ifTrue:[ - |triggerOnDown| - - self hasDelayedMenu ifTrue:[ - triggerOnDown := false - ] ifFalse:[ - triggerOnDown := aValue - ]. - menuItem triggerOnDown:triggerOnDown. - ^ self. + |triggerOnDown| + + self hasDelayedMenu ifTrue:[ + triggerOnDown := false + ] ifFalse:[ + triggerOnDown := aValue + ]. + menuItem triggerOnDown:triggerOnDown. + ^ self. ]. super aspectAt:aKey put:aValue. @@ -5040,163 +5040,163 @@ ^ #(FullSpec - name: basicsEditSpec - window: + name: basicsEditSpec + window: (WindowSpec - label: 'basicsEditSpec' - name: 'basicsEditSpec' - min: (Point 10 10) - bounds: (Rectangle 0 0 340 340) - ) - component: + label: 'basicsEditSpec' + name: 'basicsEditSpec' + min: (Point 10 10) + bounds: (Rectangle 0 0 340 340) + ) + component: (SpecCollection - collection: ( - (LabelSpec - label: 'Name Key:' - name: 'nameKeyLabel' - layout: (AlignmentOrigin 107 0 25 0 1 0.5) - activeHelpKey: basicsKey - visibilityChannel: notDelayedMenu - translateLabel: true - resizeForLabel: true - adjust: right - ) - (InputFieldSpec - name: 'nameKeyField' - layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0) - activeHelpKey: basicsKey - visibilityChannel: notDelayedMenu - tabable: true - model: nameKey - group: inputGroup - type: symbolOrNil - immediateAccept: false - acceptOnLeave: false - acceptOnReturn: true - acceptOnTab: true - acceptOnLostFocus: false - acceptChannel: acceptChannel - modifiedChannel: modifiedChannel - acceptOnPointerLeave: false - ) - (LabelSpec - label: 'Label:' - name: 'labelLabel' - layout: (AlignmentOrigin 107 0 51 0 1 0.5) - activeHelpKey: basicsLabel - visibilityChannel: notDelayedMenu - translateLabel: true - resizeForLabel: true - adjust: right - ) - (InputFieldSpec - name: 'labelField' - layout: (LayoutFrame 110 0 40 0 -5 1.0 62 0) - activeHelpKey: basicsLabel - visibilityChannel: notDelayedMenu - tabable: true - model: rawLabel - group: inputGroup - immediateAccept: false - acceptOnReturn: true - acceptOnTab: true - acceptOnLostFocus: false - acceptChannel: acceptChannel - modifiedChannel: modifiedChannel - acceptOnPointerLeave: false - ) - (LabelSpec - label: 'Menu:' - name: 'menuLabel' - layout: (AlignmentOrigin 107 0 90 0 1 0.5) - activeHelpKey: basicsLabel - translateLabel: true - resizeForLabel: true - adjust: right - ) - (InputFieldSpec - name: 'menuField' - layout: (LayoutFrame 110 0 79 0 -5 1.0 101 0) - activeHelpKey: basicsMenu - tabable: true - model: submenuChannel - group: inputGroup - type: symbolOrNil - immediateAccept: false - acceptOnReturn: true - acceptOnTab: true - acceptOnLostFocus: false - acceptChannel: acceptChannel - modifiedChannel: modifiedChannel - acceptOnPointerLeave: false - ) - (LabelSpec - label: 'Argument:' - name: 'argumentLabel' - layout: (AlignmentOrigin 107 0 115 0 1 0.5) - activeHelpKey: basicsLabel - translateLabel: true - resizeForLabel: true - adjust: right - ) - (InputFieldSpec - name: 'argumentField' - layout: (LayoutFrame 110 0 104 0 -5 1.0 126 0) - activeHelpKey: basicsMenuArgument - enableChannel: notDelayedMenu - tabable: true - model: argument - group: inputGroup - type: smalltalkObjectOrNil - immediateAccept: false - acceptOnReturn: true - acceptOnTab: true - acceptOnLostFocus: false - acceptChannel: acceptChannel - modifiedChannel: modifiedChannel - acceptOnPointerLeave: false - ) - (CheckBoxSpec - label: 'Translate Label' - name: 'translateLabelCheckBox' - layout: (Point 20 213) - activeHelpKey: basicsTranslateLabel - visibilityChannel: notDelayedMenu - tabable: true - model: translateLabel - translateLabel: true - ) - (CheckBoxSpec - label: 'Is Button' - name: 'isButtonCheckBox' - layout: (Point 20 238) - activeHelpKey: basicsIsButton - visibilityChannel: notDelayedMenu - tabable: true - model: isButton - translateLabel: true - ) - (CheckBoxSpec - label: 'Horizontal Layout' - name: 'horizontalLayout' - layout: (Point 20 263) - activeHelpKey: horizontalLayout - tabable: true - model: horizontalLayout - translateLabel: true - ) - (CheckBoxSpec - label: 'Do not Destroy Linked Menu' - name: 'keepLinkedMenu' - layout: (Point 20 288) - activeHelpKey: keepLinkedMenu - tabable: true - model: keepLinkedMenu - translateLabel: true - ) - ) - - ) + collection: ( + (LabelSpec + label: 'Name Key:' + name: 'nameKeyLabel' + layout: (AlignmentOrigin 107 0 25 0 1 0.5) + activeHelpKey: basicsKey + visibilityChannel: notDelayedMenu + translateLabel: true + resizeForLabel: true + adjust: right + ) + (InputFieldSpec + name: 'nameKeyField' + layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0) + activeHelpKey: basicsKey + visibilityChannel: notDelayedMenu + tabable: true + model: nameKey + group: inputGroup + type: symbolOrNil + immediateAccept: false + acceptOnLeave: false + acceptOnReturn: true + acceptOnTab: true + acceptOnLostFocus: false + acceptChannel: acceptChannel + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + (LabelSpec + label: 'Label:' + name: 'labelLabel' + layout: (AlignmentOrigin 107 0 51 0 1 0.5) + activeHelpKey: basicsLabel + visibilityChannel: notDelayedMenu + translateLabel: true + resizeForLabel: true + adjust: right + ) + (InputFieldSpec + name: 'labelField' + layout: (LayoutFrame 110 0 40 0 -5 1.0 62 0) + activeHelpKey: basicsLabel + visibilityChannel: notDelayedMenu + tabable: true + model: rawLabel + group: inputGroup + immediateAccept: false + acceptOnReturn: true + acceptOnTab: true + acceptOnLostFocus: false + acceptChannel: acceptChannel + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + (LabelSpec + label: 'Menu:' + name: 'menuLabel' + layout: (AlignmentOrigin 107 0 90 0 1 0.5) + activeHelpKey: basicsLabel + translateLabel: true + resizeForLabel: true + adjust: right + ) + (InputFieldSpec + name: 'menuField' + layout: (LayoutFrame 110 0 79 0 -5 1.0 101 0) + activeHelpKey: basicsMenu + tabable: true + model: submenuChannel + group: inputGroup + type: symbolOrNil + immediateAccept: false + acceptOnReturn: true + acceptOnTab: true + acceptOnLostFocus: false + acceptChannel: acceptChannel + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + (LabelSpec + label: 'Argument:' + name: 'argumentLabel' + layout: (AlignmentOrigin 107 0 115 0 1 0.5) + activeHelpKey: basicsLabel + translateLabel: true + resizeForLabel: true + adjust: right + ) + (InputFieldSpec + name: 'argumentField' + layout: (LayoutFrame 110 0 104 0 -5 1.0 126 0) + activeHelpKey: basicsMenuArgument + enableChannel: notDelayedMenu + tabable: true + model: argument + group: inputGroup + type: smalltalkObjectOrNil + immediateAccept: false + acceptOnReturn: true + acceptOnTab: true + acceptOnLostFocus: false + acceptChannel: acceptChannel + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + (CheckBoxSpec + label: 'Translate Label' + name: 'translateLabelCheckBox' + layout: (Point 20 213) + activeHelpKey: basicsTranslateLabel + visibilityChannel: notDelayedMenu + tabable: true + model: translateLabel + translateLabel: true + ) + (CheckBoxSpec + label: 'Is Button' + name: 'isButtonCheckBox' + layout: (Point 20 238) + activeHelpKey: basicsIsButton + visibilityChannel: notDelayedMenu + tabable: true + model: isButton + translateLabel: true + ) + (CheckBoxSpec + label: 'Horizontal Layout' + name: 'horizontalLayout' + layout: (Point 20 263) + activeHelpKey: horizontalLayout + tabable: true + model: horizontalLayout + translateLabel: true + ) + (CheckBoxSpec + label: 'Do not Destroy Linked Menu' + name: 'keepLinkedMenu' + layout: (Point 20 288) + activeHelpKey: keepLinkedMenu + tabable: true + model: keepLinkedMenu + translateLabel: true + ) + ) + + ) ) ! ! @@ -5289,7 +5289,7 @@ "setting default values " "/ CG: Thu, 08 May 2008 11:16:54 GMT - "/ I think having keepLinkedMenu true by default + "/ I think having keepLinkedMenu true by default "/ will confuse newcomers (even me occasionally) "/ (will search, why the menu is not updated...) @@ -5326,125 +5326,125 @@ ^ #(FullSpec - name: basicsEditSpec - window: + name: basicsEditSpec + window: (WindowSpec - label: 'basicsEditSpec' - name: 'basicsEditSpec' - min: (Point 10 10) - bounds: (Rectangle 0 0 344 146) - ) - component: + label: 'basicsEditSpec' + name: 'basicsEditSpec' + min: (Point 10 10) + bounds: (Rectangle 0 0 344 146) + ) + component: (SpecCollection - collection: ( - (LabelSpec - label: 'Name Key:' - name: 'nameKeyLabel' - layout: (AlignmentOrigin 107 0 25 0 1 0.5) - activeHelpKey: basicsKey - visibilityChannel: notDelayedMenu - translateLabel: true - resizeForLabel: true - adjust: right - ) - (InputFieldSpec - name: 'nameKeyField' - layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0) - activeHelpKey: basicsKey - visibilityChannel: notDelayedMenu - tabable: true - model: nameKey - group: inputGroup - type: symbolOrNil - immediateAccept: false - acceptOnLeave: false - acceptOnReturn: true - acceptOnTab: true - acceptOnLostFocus: false - acceptChannel: acceptChannel - modifiedChannel: modifiedChannel - acceptOnPointerLeave: false - ) - (LabelSpec - label: 'Label:' - name: 'labelLabel' - layout: (AlignmentOrigin 107 0 51 0 1 0.5) - activeHelpKey: basicsLabel - visibilityChannel: notDelayedMenu - translateLabel: true - resizeForLabel: true - adjust: right - ) - (InputFieldSpec - name: 'labelField' - layout: (LayoutFrame 110 0 40 0 -5 1.0 62 0) - activeHelpKey: basicsLabel - visibilityChannel: notDelayedMenu - tabable: true - model: rawLabel - group: inputGroup - immediateAccept: false - acceptOnReturn: true - acceptOnTab: true - acceptOnLostFocus: false - acceptChannel: acceptChannel - modifiedChannel: modifiedChannel - acceptOnPointerLeave: false - ) - (LabelSpec - label: 'Menu:' - name: 'menuLabel' - layout: (AlignmentOrigin 107 0 90 0 1 0.5) - activeHelpKey: basicsLabel - translateLabel: true - resizeForLabel: true - adjust: right - ) - (InputFieldSpec - name: 'menuField' - layout: (LayoutFrame 110 0 79 0 -5 1.0 101 0) - activeHelpKey: basicsMenu - tabable: true - model: submenuChannel - group: inputGroup - type: symbolOrNil - immediateAccept: false - acceptOnReturn: true - acceptOnTab: true - acceptOnLostFocus: false - acceptChannel: acceptChannel - modifiedChannel: modifiedChannel - acceptOnPointerLeave: false - ) - (LabelSpec - label: 'Argument:' - name: 'argumentLabel' - layout: (AlignmentOrigin 107 0 115 0 1 0.5) - activeHelpKey: basicsLabel - translateLabel: true - resizeForLabel: true - adjust: right - ) - (InputFieldSpec - name: 'argumentField' - layout: (LayoutFrame 110 0 104 0 -5 1.0 126 0) - activeHelpKey: basicsMenuArgument - enableChannel: notDelayedMenu - tabable: true - model: argument - group: inputGroup - type: smalltalkObjectOrNil - immediateAccept: false - acceptOnReturn: true - acceptOnTab: true - acceptOnLostFocus: false - acceptChannel: acceptChannel - modifiedChannel: modifiedChannel - acceptOnPointerLeave: false - ) - ) - - ) + collection: ( + (LabelSpec + label: 'Name Key:' + name: 'nameKeyLabel' + layout: (AlignmentOrigin 107 0 25 0 1 0.5) + activeHelpKey: basicsKey + visibilityChannel: notDelayedMenu + translateLabel: true + resizeForLabel: true + adjust: right + ) + (InputFieldSpec + name: 'nameKeyField' + layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0) + activeHelpKey: basicsKey + visibilityChannel: notDelayedMenu + tabable: true + model: nameKey + group: inputGroup + type: symbolOrNil + immediateAccept: false + acceptOnLeave: false + acceptOnReturn: true + acceptOnTab: true + acceptOnLostFocus: false + acceptChannel: acceptChannel + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + (LabelSpec + label: 'Label:' + name: 'labelLabel' + layout: (AlignmentOrigin 107 0 51 0 1 0.5) + activeHelpKey: basicsLabel + visibilityChannel: notDelayedMenu + translateLabel: true + resizeForLabel: true + adjust: right + ) + (InputFieldSpec + name: 'labelField' + layout: (LayoutFrame 110 0 40 0 -5 1.0 62 0) + activeHelpKey: basicsLabel + visibilityChannel: notDelayedMenu + tabable: true + model: rawLabel + group: inputGroup + immediateAccept: false + acceptOnReturn: true + acceptOnTab: true + acceptOnLostFocus: false + acceptChannel: acceptChannel + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + (LabelSpec + label: 'Menu:' + name: 'menuLabel' + layout: (AlignmentOrigin 107 0 90 0 1 0.5) + activeHelpKey: basicsLabel + translateLabel: true + resizeForLabel: true + adjust: right + ) + (InputFieldSpec + name: 'menuField' + layout: (LayoutFrame 110 0 79 0 -5 1.0 101 0) + activeHelpKey: basicsMenu + tabable: true + model: submenuChannel + group: inputGroup + type: symbolOrNil + immediateAccept: false + acceptOnReturn: true + acceptOnTab: true + acceptOnLostFocus: false + acceptChannel: acceptChannel + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + (LabelSpec + label: 'Argument:' + name: 'argumentLabel' + layout: (AlignmentOrigin 107 0 115 0 1 0.5) + activeHelpKey: basicsLabel + translateLabel: true + resizeForLabel: true + adjust: right + ) + (InputFieldSpec + name: 'argumentField' + layout: (LayoutFrame 110 0 104 0 -5 1.0 126 0) + activeHelpKey: basicsMenuArgument + enableChannel: notDelayedMenu + tabable: true + model: argument + group: inputGroup + type: smalltalkObjectOrNil + immediateAccept: false + acceptOnReturn: true + acceptOnTab: true + acceptOnLostFocus: false + acceptChannel: acceptChannel + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + ) + + ) ) ! ! @@ -5652,36 +5652,36 @@ |expanded item menu| self criticalDo:[ - self isRootItem ifTrue:[ expanded := true ] - ifFalse:[ expanded := isExpanded ]. - - self removeAll. - self rawLabel:aString. - - menu := aMenu value. - - (menu isNil or:[menu isString]) ifTrue:[ - menu := nil - ] ifFalse:[ - aMenu isCollection ifTrue:[ menu := Menu decodeFromLiteralArray:aMenu ] - ifFalse:[ menu := aMenu ]. - - menu hasItems ifFalse:[ - menu := nil - ]. - ]. - menu notNil ifTrue:[ - isExpanded := false. "/ discard change notifications - children := OrderedCollection new. - - menu itemsDo:[:el| - item := self class menuItem:el. - item parent:self. - children add:item. - ]. - expanded ifTrue:[ self expand ]. - ]. - isExpanded := expanded. + self isRootItem ifTrue:[ expanded := true ] + ifFalse:[ expanded := isExpanded ]. + + self removeAll. + self rawLabel:aString. + + menu := aMenu value. + + (menu isNil or:[menu isString]) ifTrue:[ + menu := nil + ] ifFalse:[ + aMenu isCollection ifTrue:[ menu := Menu decodeFromLiteralArray:aMenu ] + ifFalse:[ menu := aMenu ]. + + menu hasItems ifFalse:[ + menu := nil + ]. + ]. + menu notNil ifTrue:[ + isExpanded := false. "/ discard change notifications + children := OrderedCollection new. + + menu itemsDo:[:el| + item := self class menuItem:el. + item parent:self. + children add:item. + ]. + expanded ifTrue:[ self expand ]. + ]. + isExpanded := expanded. ]. self changed @@ -6114,11 +6114,11 @@ |value| aValue isString ifTrue:[ - value := aValue withoutSeparators. - - (self class separatorTypeOf:value) notNil ifTrue:[ - menuItem rawLabel:value - ] + value := aValue withoutSeparators. + + (self class separatorTypeOf:value) notNil ifTrue:[ + menuItem rawLabel:value + ] ]. "Modified: / 29-11-2011 / 11:28:39 / cg"