# HG changeset patch # User Claus Gittinger # Date 1192821253 -7200 # Node ID 4b6ba51643917c2d922440f53b613784df0ca746 # Parent 39825ff916b8cf562c2cd410d89245f0f31ee865 *** empty log message *** diff -r 39825ff916b8 -r 4b6ba5164391 MenuEditor.st --- a/MenuEditor.st Fri Oct 19 15:23:18 2007 +0200 +++ b/MenuEditor.st Fri Oct 19 21:14:13 2007 +0200 @@ -108,43 +108,43 @@ [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 " ! ! !MenuEditor class methodsFor:'initialization'! initialize - ImageRetrieverClasses := #( + ImageRetrieverClasses := #( Icon - SystemBrowser + SystemBrowser ToolbarIconLibrary - ). + ). " self initialize @@ -196,34 +196,34 @@ "get the aspects for the attributes of the menu components" ^#( - rawLabel - accessCharacterPosition - showBusyCursorWhilePerforming - horizontalLayout - triggerOnDown - font - argument - submenuChannel - keepLinkedMenu - enabled - itemValue - nameKey - indication - choice - choiceValue - translateLabel - isButton - shortcutKeyCharacter - startGroup - isVisible - hideMenuOnActivated - auxValue - activeHelpKey - resourceRetriever - sendToOriginator - ignoreMnemonicKeys - ignoreShortcutKeys - isMenuSlice + rawLabel + accessCharacterPosition + showBusyCursorWhilePerforming + horizontalLayout + triggerOnDown + font + argument + submenuChannel + keepLinkedMenu + enabled + itemValue + nameKey + indication + choice + choiceValue + translateLabel + isButton + shortcutKeyCharacter + startGroup + isVisible + hideMenuOnActivated + auxValue + activeHelpKey + resourceRetriever + sendToOriginator + ignoreMnemonicKeys + ignoreShortcutKeys + isMenuSlice ) ! ! @@ -256,7 +256,7 @@ the UIHelpTool may not be able to read the specification." " - UIHelpTool openOnClass:MenuEditor + UIHelpTool openOnClass:MenuEditor " @@ -423,7 +423,7 @@ the UIHelpTool may not be able to read the specification." " - UIHelpTool openOnClass:MenuEditor + UIHelpTool openOnClass:MenuEditor " @@ -507,108 +507,108 @@ - ^ + ^ #(FullSpec - name: windowSpec - window: + name: windowSpec + window: (WindowSpec - label: 'Menu Editor' - name: 'Menu Editor' - min: (Point 550 385) - bounds: (Rectangle 0 0 574 473) - menu: menu - icon: defaultIcon - returnIsOKInDialog: false - escapeIsCancelInDialog: false - ) - component: + label: 'Menu Editor' + name: 'Menu Editor' + min: (Point 550 385) + bounds: (Rectangle 0 0 574 473) + menu: menu + icon: defaultIcon + returnIsOKInDialog: false + escapeIsCancelInDialog: false + ) + component: (SpecCollection - collection: ( - (MenuPanelSpec - name: 'toolbar' - layout: (LayoutFrame 0 0.0 0 0 0 1.0 32 0) - tabable: true - menu: toolbar - showSeparatingLines: true - ) - (VariableHorizontalPanelSpec - name: 'mainPanel' - layout: (LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0) - component: - (SpecCollection - collection: ( - (HierarchicalListViewSpec - name: 'ListOfItemsView' - model: selectionHolder - menu: editMenu - hasHorizontalScrollBar: true - hasVerticalScrollBar: true - miniScrollerHorizontal: true - miniScrollerVertical: true - listModel: listOfItems - multipleSelectOk: true - useIndex: false - highlightMode: label - doubleClickSelector: indicatorClickedAt: - selectConditionSelector: canSelect: - showLeftIndicators: false - indicatorSelector: indicatorClickedAt: - properties: - (PropertyListDictionary - dropSelector: doDrop: - dragArgument: nil - dropObjectSelector: dropObjects - overSelector: dropOver: - dropArgument: nil - leaveSelector: dropLeave: - canDropSelector: canDrop: - enterSelector: dropEnter: - ) - postBuildCallback: postBuildListOfItemsView: - ) - (ViewSpec - name: 'Box' - level: -1 - component: - (SpecCollection - collection: ( - (NoteBookViewSpec - name: 'NoteBook' - layout: (LayoutFrame 1 0.0 0 0.0 1 1.0 -30 1.0) - enableChannel: hasSingleSelectionChannel - tabable: true - model: tabHolder - menu: listOfTabs - fitLastRow: false - translateLabel: true - canvas: wizardHolder - keepCanvasAlive: true - postBuildCallback: postBuildNoteBook: - ) - (UISubSpecification - name: 'SubSpecification' - layout: (LayoutFrame 2 0.0 -26 1 -2 1.0 -2 1.0) - majorKey: ToolApplicationModel - minorKey: windowSpecForCommit - ) - ) - - ) - ) - ) - - ) - handles: (Any 0.300493 1.0) - ) - (UISubSpecification - name: 'infoBarSubSpec' - layout: (LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) - majorKey: ToolApplicationModel - minorKey: windowSpecForInfoBar - ) - ) - - ) + collection: ( + (MenuPanelSpec + name: 'toolbar' + layout: (LayoutFrame 0 0.0 0 0 0 1.0 32 0) + tabable: true + menu: toolbar + showSeparatingLines: true + ) + (VariableHorizontalPanelSpec + name: 'mainPanel' + layout: (LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0) + component: + (SpecCollection + collection: ( + (HierarchicalListViewSpec + name: 'ListOfItemsView' + model: selectionHolder + menu: editMenu + hasHorizontalScrollBar: true + hasVerticalScrollBar: true + miniScrollerHorizontal: true + miniScrollerVertical: true + listModel: listOfItems + multipleSelectOk: true + useIndex: false + highlightMode: label + doubleClickSelector: indicatorClickedAt: + selectConditionSelector: canSelect: + showLeftIndicators: false + indicatorSelector: indicatorClickedAt: + properties: + (PropertyListDictionary + dropSelector: doDrop: + dragArgument: nil + dropObjectSelector: dropObjects + overSelector: dropOver: + dropArgument: nil + leaveSelector: dropLeave: + canDropSelector: canDrop: + enterSelector: dropEnter: + ) + postBuildCallback: postBuildListOfItemsView: + ) + (ViewSpec + name: 'Box' + level: -1 + component: + (SpecCollection + collection: ( + (NoteBookViewSpec + name: 'NoteBook' + layout: (LayoutFrame 1 0.0 0 0.0 1 1.0 -30 1.0) + enableChannel: hasSingleSelectionChannel + tabable: true + model: tabHolder + menu: listOfTabs + fitLastRow: false + translateLabel: true + canvas: wizardHolder + keepCanvasAlive: true + postBuildCallback: postBuildNoteBook: + ) + (UISubSpecification + name: 'SubSpecification' + layout: (LayoutFrame 2 0.0 -26 1 -2 1.0 -2 1.0) + majorKey: ToolApplicationModel + minorKey: windowSpecForCommit + ) + ) + + ) + ) + ) + + ) + handles: (Any 0.300493 1.0) + ) + (UISubSpecification + name: 'infoBarSubSpec' + layout: (LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0) + majorKey: ToolApplicationModel + minorKey: windowSpecForInfoBar + ) + ) + + ) ) ! ! @@ -628,77 +628,77 @@ - ^ + ^ #(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 - ) - ) - nil - nil + ( + (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 ) ! @@ -716,97 +716,97 @@ - ^ + ^ #(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 - argument: up - shortcutKey: CtrlCursorUp - labelImage: (ResourceRetriever Icon upIcon 'Move Up') + ( + (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 + argument: up + shortcutKey: CtrlCursorUp + labelImage: (ResourceRetriever Icon upIcon 'Move Up') "/ labelImage: (ResourceRetriever ToolbarIconLibrary up16x16Icon 'Move 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: 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 ) ! @@ -824,95 +824,89 @@ - ^ + ^ #(Menu - ( - (MenuItem - activeHelpKey: editCut - enabled: hasSelectionChannel - label: 'Cut' - itemValue: doCut - translateLabel: true - ) - (MenuItem - activeHelpKey: editCopy - enabled: hasSelectionChannel - label: 'Copy' - itemValue: doCopy - translateLabel: true - shortcutKey: #'' - ) - (MenuItem - activeHelpKey: editPaste - enabled: canPasteHolder - label: 'Paste' - itemValue: doPaste - translateLabel: true - shortcutKey: #'' - ) - (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: #'' - labelImage: (ResourceRetriever Icon upIcon 'Move Up') - argument: up - ) - (MenuItem - activeHelpKey: editMoveDown - enabled: enableMovingUpOrDownHolder - label: 'Move Down' - itemValue: doMoveUpOrDown: - translateLabel: true - shortcutKey: #'' - labelImage: (ResourceRetriever Icon downIcon 'Move Down') - argument: down - ) - (MenuItem - activeHelpKey: editMoveIn - enabled: enableMovingInHolder - label: 'Move Into Next' - itemValue: doMoveIn: - translateLabel: true - shortcutKey: #'' - 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: #'' - labelImage: (ResourceRetriever Icon leftDownIcon 'Move Out') - ) - ) - nil - nil + ( + (MenuItem + activeHelpKey: editCut + enabled: hasSelectionChannel + label: 'Cut' + itemValue: doCut + translateLabel: true + ) + (MenuItem + activeHelpKey: editCopy + enabled: hasSelectionChannel + label: 'Copy' + itemValue: doCopy + translateLabel: true + ) + (MenuItem + activeHelpKey: editPaste + enabled: canPasteHolder + label: 'Paste' + itemValue: doPaste + translateLabel: true + ) + (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 + labelImage: (ResourceRetriever Icon upIcon 'Move Up') + argument: up + ) + (MenuItem + activeHelpKey: editMoveDown + enabled: enableMovingUpOrDownHolder + label: 'Move Down' + itemValue: doMoveUpOrDown: + translateLabel: true + labelImage: (ResourceRetriever Icon downIcon 'Move Down') + argument: down + ) + (MenuItem + activeHelpKey: editMoveIn + enabled: enableMovingInHolder + label: 'Move Into Next' + itemValue: doMoveIn: + translateLabel: true + 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 + labelImage: (ResourceRetriever Icon leftDownIcon 'Move Out') + ) + ) + nil + nil ) ! @@ -930,81 +924,81 @@ - ^ + ^ #(Menu - ( - (MenuItem - activeHelpKey: fileNew - label: 'New' - itemValue: doNew - translateLabel: true - ) - (MenuItem - label: '-' - ) - (MenuItem - activeHelpKey: fileLoad - label: 'Load...' - itemValue: doLoad - translateLabel: true - ) - (MenuItem - label: '-' - ) - (MenuItem - activeHelpKey: fileSave - label: 'Save' - itemValue: doSave - translateLabel: true - ) - (MenuItem - activeHelpKey: fileSaveAs - label: 'Save As...' - itemValue: doSaveAs - translateLabel: true - ) - (MenuItem - label: '-' - ) - (MenuItem - activeHelpKey: filePickAMenu - label: 'Pick a Menu...' - itemValue: doPickAMenu - 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 + activeHelpKey: fileNew + label: 'New' + itemValue: doNew + translateLabel: true + ) + (MenuItem + label: '-' + ) + (MenuItem + activeHelpKey: fileLoad + label: 'Load...' + itemValue: doLoad + translateLabel: true + ) + (MenuItem + label: '-' + ) + (MenuItem + activeHelpKey: fileSave + label: 'Save' + itemValue: doSave + translateLabel: true + ) + (MenuItem + activeHelpKey: fileSaveAs + label: 'Save As...' + itemValue: doSaveAs + translateLabel: true + ) + (MenuItem + label: '-' + ) + (MenuItem + activeHelpKey: filePickAMenu + label: 'Pick a Menu...' + itemValue: doPickAMenu + 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 ) ! @@ -1022,19 +1016,19 @@ - ^ + ^ #(#Menu - #( - #(#MenuItem - #activeHelpKey: #generateAspectMethods - #enabled: #hasValidSpecClass - #label: 'Aspect Methods' - #itemValue: #doGenerateAspectMethods - #translateLabel: true - ) - ) - nil - nil + #( + #(#MenuItem + #activeHelpKey: #generateAspectMethods + #enabled: #hasValidSpecClass + #label: 'Aspect Methods' + #itemValue: #doGenerateAspectMethods + #translateLabel: true + ) + ) + nil + nil ) ! @@ -1052,47 +1046,47 @@ - ^ + ^ #(#Menu - #( - #(#MenuItem - #activeHelpKey: #helpTutorial - #label: 'Documentation' - #itemValue: #openHTMLDocument: - #translateLabel: true - #argument: 'tools/uipainter/MenuEditor.html' - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #activeHelpKey: #helpHelpTool - #label: 'Help Tool' - #itemValue: #openHTMLDocument: - #translateLabel: true - #argument: 'tools/uipainter/HelpTool.html' - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #activeHelpKey: #helpShowHelp - #label: 'Show Help Texts' - #translateLabel: true - #indication: #showingHelp: - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #activeHelpKey: #aboutThisAppliaction - #label: 'About MenuEditor...' - #itemValue: #openAboutThisApplication - #translateLabel: true - ) - ) - nil - nil + #( + #(#MenuItem + #activeHelpKey: #helpTutorial + #label: 'Documentation' + #itemValue: #openHTMLDocument: + #translateLabel: true + #argument: 'tools/uipainter/MenuEditor.html' + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #activeHelpKey: #helpHelpTool + #label: 'Help Tool' + #itemValue: #openHTMLDocument: + #translateLabel: true + #argument: 'tools/uipainter/HelpTool.html' + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #activeHelpKey: #helpShowHelp + #label: 'Show Help Texts' + #translateLabel: true + #indication: #showingHelp: + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #activeHelpKey: #aboutThisAppliaction + #label: 'About MenuEditor...' + #itemValue: #openAboutThisApplication + #translateLabel: true + ) + ) + nil + nil ) ! @@ -1110,61 +1104,61 @@ - ^ + ^ #(Menu - ( - (MenuItem - label: '&File' - translateLabel: true - submenuChannel: fileMenu - keepLinkedMenu: true - ) - (MenuItem - label: '&Edit' - translateLabel: true - submenuChannel: editMenuForMainMenuWithoutAccelerators - keepLinkedMenu: true - ) - (MenuItem - enabled: hasSingleSelectionChannel - label: 'Item' - translateLabel: true - submenuChannel: addMenu - keepLinkedMenu: true - ) - (MenuItem - label: 'Generate' - translateLabel: true - submenuChannel: generateMenu - keepLinkedMenu: true - ) - (MenuItem - label: 'Test' - translateLabel: true - submenuChannel: submenuTest - ) - (MenuItem - label: 'Settings' - translateLabel: true - submenuChannel: settingsMenu - keepLinkedMenu: true - ) - (MenuItem - label: 'History' - translateLabel: true - isVisible: isStandAlone - submenuChannel: menuHistory - ) - (MenuItem - label: 'MENU_Help' - translateLabel: true - startGroup: conditionalRight - submenuChannel: helpMenu - keepLinkedMenu: true - ) - ) - nil - nil + ( + (MenuItem + label: '&File' + translateLabel: true + submenuChannel: fileMenu + keepLinkedMenu: true + ) + (MenuItem + label: '&Edit' + translateLabel: true + submenuChannel: editMenuForMainMenuWithoutAccelerators + keepLinkedMenu: true + ) + (MenuItem + enabled: hasSingleSelectionChannel + label: 'Item' + translateLabel: true + submenuChannel: addMenu + keepLinkedMenu: true + ) + (MenuItem + label: 'Generate' + translateLabel: true + submenuChannel: generateMenu + keepLinkedMenu: true + ) + (MenuItem + label: 'Test' + translateLabel: true + submenuChannel: submenuTest + ) + (MenuItem + label: 'Settings' + translateLabel: true + submenuChannel: settingsMenu + keepLinkedMenu: true + ) + (MenuItem + label: 'History' + translateLabel: true + isVisible: isStandAlone + submenuChannel: menuHistory + ) + (MenuItem + label: 'MENU_Help' + translateLabel: true + startGroup: conditionalRight + submenuChannel: helpMenu + keepLinkedMenu: true + ) + ) + nil + nil ) ! @@ -1182,27 +1176,27 @@ - ^ + ^ #(#Menu - #( - #(#MenuItem - #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 + #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 ) ! @@ -1220,27 +1214,27 @@ - ^ + ^ #(#Menu - #( - #(#MenuItem - #label: 'Standard Menu: File' - #itemValue: #doCreateStandardFileMenu - #translateLabel: true - ) - #(#MenuItem - #label: 'Standard Menu: Edit' - #itemValue: #doCreateStandardEditMenu - #translateLabel: true - ) - #(#MenuItem - #label: 'Standard Menu: Help' - #itemValue: #doCreateStandardHelpMenu - #translateLabel: true - ) - ) - nil - nil + #( + #(#MenuItem + #label: 'Standard Menu: File' + #itemValue: #doCreateStandardFileMenu + #translateLabel: true + ) + #(#MenuItem + #label: 'Standard Menu: Edit' + #itemValue: #doCreateStandardEditMenu + #translateLabel: true + ) + #(#MenuItem + #label: 'Standard Menu: Help' + #itemValue: #doCreateStandardHelpMenu + #translateLabel: true + ) + ) + nil + nil ) ! @@ -1258,190 +1252,190 @@ - ^ + ^ #(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 - submenuChannel: menuHistory - labelImage: (ResourceRetriever ToolbarIconLibrary loadFromMethodIcon) - keepLinkedMenu: true - ) - (MenuItem - activeHelpKey: fileSave - label: 'Save' - itemValue: doSave - translateLabel: true - isButton: true - labelImage: (ResourceRetriever ToolbarIconLibrary saveAsMethodIcon) - ) - (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 + submenuChannel: menuHistory + labelImage: (ResourceRetriever ToolbarIconLibrary loadFromMethodIcon) + keepLinkedMenu: true + ) + (MenuItem + activeHelpKey: fileSave + label: 'Save' + itemValue: doSave + translateLabel: true + isButton: true + labelImage: (ResourceRetriever ToolbarIconLibrary saveAsMethodIcon) + ) + (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 ) ! ! @@ -1461,27 +1455,27 @@ - ^ + ^ #(#Menu - #( - #(#MenuItem - #label: 'Cut' - #translateLabel: true - #value: #cutSelection - ) - #(#MenuItem - #label: 'Copy' - #translateLabel: true - #value: #copySelection - ) - #(#MenuItem - #label: 'Paste' - #translateLabel: true - #value: #paste - ) - ) - nil - nil + #( + #(#MenuItem + #label: 'Cut' + #translateLabel: true + #value: #cutSelection + ) + #(#MenuItem + #label: 'Copy' + #translateLabel: true + #value: #copySelection + ) + #(#MenuItem + #label: 'Paste' + #translateLabel: true + #value: #paste + ) + ) + nil + nil ) ! @@ -1499,7 +1493,7 @@ - ^ + ^ #(#Menu #( #(#MenuItem @@ -1556,25 +1550,25 @@ - ^ + ^ #(#Menu - #( - #(#MenuItem - #label: 'Documentation' - #translateLabel: true - #value: #openDocumentation - ) - #(#MenuItem - #label: '-' - ) - #(#MenuItem - #label: 'About this Application...' - #translateLabel: true - #value: #openAboutThisApplication - ) - ) - nil - nil + #( + #(#MenuItem + #label: 'Documentation' + #translateLabel: true + #value: #openDocumentation + ) + #(#MenuItem + #label: '-' + ) + #(#MenuItem + #label: 'About this Application...' + #translateLabel: true + #value: #openAboutThisApplication + ) + ) + nil + nil ) ! ! @@ -1587,13 +1581,13 @@ t := spec at:#detailsStartGroup. g := (aspects at:#startGroup ifAbsent:nil) value. g == #conditionalRight ifTrue:[ - t := t , ' #conditionalRight means: "right on non-win32 systems"' + t := t , ' #conditionalRight means: "right on non-win32 systems"' ]. g == #right ifTrue:[ - t := t , ' #right means: "right align from here"' + t := t , ' #right means: "right align from here"' ]. g == #left ifTrue:[ - t := t , ' #left means: "left align group"' + t := t , ' #left means: "left align group"' ]. spec at:#detailsStartGroup put:t. @@ -1608,12 +1602,12 @@ "get the help tool application " ^ wizards at:#help ifAbsentPut:[ |tool| - tool := UIHelpTool new. - tool masterApplication:self. - tool modifiedHolder: self enablingCommitButtonsHolder. - tool builder window:(ApplicationSubView new client:tool spec:#innerSpec). - tool masterApplication:self. - tool + tool := UIHelpTool new. + tool masterApplication:self. + tool modifiedHolder: self enablingCommitButtonsHolder. + tool builder window:(ApplicationSubView new client:tool spec:#innerSpec). + tool masterApplication:self. + tool ] ! @@ -1621,11 +1615,11 @@ "get the image tool application " ^ wizards at:#image ifAbsentPut:[ |tool| - tool := ResourceEditor new createBuilder. - tool masterApplication:self. - tool modifiedChannel: self enablingCommitButtonsHolder. - tool builder window:(ApplicationSubView new client:tool). - tool + tool := ResourceEditor new createBuilder. + tool masterApplication:self. + tool modifiedChannel: self enablingCommitButtonsHolder. + tool builder window:(ApplicationSubView new client:tool). + tool ] ! @@ -1652,32 +1646,32 @@ selectedItem := self selectedItem. selectedItem ifNotNil:[ - 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. @@ -1703,10 +1697,10 @@ item := listOfItems at:atLine ifAbsent:nil. item ifNotNil:[ - item toggleExpand. - self hasSelection ifFalse:[ - self selectedItem:item - ] + item toggleExpand. + self hasSelection ifFalse:[ + self selectedItem:item + ] ]. ! ! @@ -1721,9 +1715,9 @@ hasItemValue "boolean holder, true if any item is selected " - ^ BlockValue - with:[:holder | holder size > 0] - argument:(self aspectFor:#itemValue) + ^ BlockValue + with:[:holder | holder size > 0] + argument:(self aspectFor:#itemValue) "Modified: / 08-03-2007 / 22:59:42 / cg" ! @@ -1754,7 +1748,7 @@ ! redefineAspectMethodsChannel - "boolean holder, true if aspects should be generated in only implemented + "boolean holder, true if aspects should be generated in only implemented in superClass by calling #super ... " ^ builder booleanValueAspectFor:#redefineAspectMethodsChannel @@ -1780,8 +1774,8 @@ holder := builder bindingAt:#wizardHolder. holder isNil ifTrue:[ - holder := nil asValue. - builder aspectAt:#wizardHolder put:holder. + holder := nil asValue. + builder aspectAt:#wizardHolder put:holder. ]. ^ holder ! ! @@ -1794,14 +1788,14 @@ |root menu| aMenu isCollection ifTrue:[menu := aMenu decodeAsLiteralArray] - ifFalse:[menu := aMenu]. + ifFalse:[menu := aMenu]. self enablingCommitButtonsHolder value:false. root := listOfItems root. self withoutNotifyDo:[ - selectionHolder setValue:#(). - root menu:aMenu labeled:(aSelector ? specSelector). + selectionHolder setValue:#(). + root menu:aMenu labeled:(aSelector ? specSelector). ]. self selectedItem:root. self updateHistory. @@ -1822,25 +1816,25 @@ menu := nil. - self isStandAlone ifTrue:[ self helpTool loadFromClass:aClass ]. + self isStandAlone ifTrue:[ self helpTool loadFromClass:aClass ]. specClass := aClass. 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. - ]. - - menu notNil ifTrue:[ - (menu isCollection) ifTrue:[ - menu := Menu decodeFromLiteralArray:menu - ]. - ] - ]. + aClass notNil ifTrue:[ + cls := aClass isBehavior ifTrue:[ aClass ] ifFalse:[ self resolveName:aClass]. + + (cls respondsTo:aSelector) ifTrue:[ + menu := cls perform: aSelector. + ]. + + menu notNil ifTrue:[ + (menu isCollection) ifTrue:[ + menu := Menu decodeFromLiteralArray:menu + ]. + ] + ]. ]. self buildFromMenu:menu selector:aSelector. self clearModified. @@ -1861,21 +1855,21 @@ size := selection size. size <= 1 ifTrue:[ - selectedSuperItems := selection ? #(). + selectedSuperItems := selection ? #(). ^ selectedSuperItems ]. root := listOfItems root. (selection includesIdentical:root) ifTrue:[ - selectedSuperItems := Array with:root. - ^ selectedSuperItems + 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 ! @@ -1888,16 +1882,16 @@ selection := selectionHolder value. selection size == 1 ifTrue:[ - selectedSuperItems := selection. - - newTabList := selection first slices collect:[:el| el first ]. - newTabList = listOfTabs ifFalse:[ - listOfTabs contents:newTabList. - ]. + selectedSuperItems := selection. + + newTabList := selection first slices collect:[:el| el first ]. + newTabList = listOfTabs ifFalse:[ + listOfTabs contents:newTabList. + ]. ] ifFalse:[ - "must compute selected super items on request - " - selectedSuperItems := nil. + "must compute selected super items on request + " + selectedSuperItems := nil. ]. self cancel. self tabChanged. @@ -1916,10 +1910,10 @@ 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 ) + ^ tabHolder value:( listOfTabs at:1 ifAbsent:nil ) ]. selector := tab last. @@ -1927,10 +1921,10 @@ selector == #image ifTrue:[ ^ wizardHolder value:(self imageTool window) ]. canvas := wizards at:(item class name, selector) asSymbol - ifAbsentPut:[ SimpleView new client:self - spec:(item class perform:selector) - builder:(self builder) - ]. + ifAbsentPut:[ SimpleView new client:self + spec:(item class perform:selector) + builder:(self builder) + ]. wizardHolder value:canvas. ! @@ -1944,9 +1938,9 @@ changedObject == tabHolder ifTrue:[ ^ self tabChanged ]. changedObject == self autoAcceptOnSelectionChange ifTrue:[ - lbl := changedObject value ifTrue:['Apply'] ifFalse:['OK']. - (builder componentAt:'okButton') label:(resources string:lbl). - ^ self + lbl := changedObject value ifTrue:['Apply'] ifFalse:['OK']. + (builder componentAt:'okButton') label:(resources string:lbl). + ^ self ]. super update:something with:aParameter from:changedObject @@ -1963,23 +1957,23 @@ sizeOfSel := selection size. sizeOfSel == 1 ifTrue:[selectedItem := selection at:1] - ifFalse:[selectedItem := nil]. + ifFalse:[selectedItem := nil]. self hasSelectionChannel value:(sizeOfSel ~~ 0). self hasSingleSelectionChannel value:(selectedItem notNil). selectedItem isNil ifTrue:[ - self enableMovingInHolder value:false. - self enableMovingOutHolder value:false. - self enableMovingUpOrDownHolder value:false. - self enableMovingInAboveHolder value:false. - self canCreateDelayedMenuChannel value:false. + self enableMovingInHolder value:false. + self enableMovingOutHolder value:false. + self enableMovingUpOrDownHolder value:false. + self enableMovingInAboveHolder value:false. + self canCreateDelayedMenuChannel value:false. ] ifFalse:[ - self enableMovingUpOrDownHolder value:(selectedItem canMoveUpOrDown). - self enableMovingOutHolder value:(selectedItem canMoveOut). - self enableMovingInHolder value:(selectedItem canMoveInNext). - self enableMovingInAboveHolder value:(selectedItem canMoveInAbove). - self canCreateDelayedMenuChannel value:(selectedItem canAddDelayedMenu). + self enableMovingUpOrDownHolder value:(selectedItem canMoveUpOrDown). + self enableMovingOutHolder value:(selectedItem canMoveOut). + self enableMovingInHolder value:(selectedItem canMoveInNext). + self enableMovingInAboveHolder value:(selectedItem canMoveInAbove). + self canCreateDelayedMenuChannel value:(selectedItem canAddDelayedMenu). ]. ! ! @@ -1989,28 +1983,28 @@ |alreadyInSuperclass numArgs method code| (aClass includesSelector:aSelector) ifTrue:[ - ^ nil + ^ nil ]. alreadyInSuperclass := aClass superclass canUnderstand:aSelector. (alreadyInSuperclass and:[redefine not]) ifTrue:[ - ^ nil + ^ nil ]. numArgs := aSelector numArgs. numArgs == 1 ifTrue:[ - method := aSelector, 'anArgument'. + method := aSelector, 'anArgument'. ] ifFalse:[ - numArgs == 0 ifTrue:[ - method := aSelector - ] ifFalse:[ - method := ''. - aSelector keywords keysAndValuesDo:[:i :key| - method := method, key, 'arg', i printString, ' '. - ]. - ] + numArgs == 0 ifTrue:[ + method := aSelector + ] ifFalse:[ + method := ''. + aSelector keywords keysAndValuesDo:[:i :key| + method := method, key, 'arg', i printString, ' '. + ]. + ] ]. code := '%1 @@ -2024,10 +2018,10 @@ "action to be added ..." Transcript showCR:self class name, '': action for #%2 ...''. -' bindWith:method with:aSelector. +' bindWith:method with:aSelector. alreadyInSuperclass ifTrue:[ - code := code, (('\ super %1\' bindWith:method) withCRs). + code := code, (('\ super %1\' bindWith:method) withCRs). ]. CodeGeneratorTool compile:code forClass:aClass inCategory:(aCategory ? 'actions'). ^ code @@ -2037,28 +2031,28 @@ |alreadyInSuperclass numArgs method code text| (aClass includesSelector:anAspect) ifTrue:[ - ^ nil + ^ nil ]. alreadyInSuperclass := aClass superclass canUnderstand:anAspect. (alreadyInSuperclass and:[redefine not]) ifTrue:[ - ^ nil + ^ nil ]. numArgs := anAspect numArgs. numArgs == 1 ifTrue:[ - method := anAspect, 'anArgument'. + method := anAspect, 'anArgument'. ] ifFalse:[ - numArgs == 0 ifTrue:[ - method := anAspect - ] ifFalse:[ - method := ''. - anAspect keywords keysAndValuesDo:[:i :key| - method := method, key, 'arg', i printString, ' '. - ]. - ] + numArgs == 0 ifTrue:[ + method := anAspect + ] ifFalse:[ + method := ''. + anAspect keywords keysAndValuesDo:[:i :key| + method := method, key, 'arg', i printString, ' '. + ]. + ] ]. code := '%1 @@ -2073,12 +2067,12 @@ Transcript showCR:self class name, '': aspect for #%2 ...''. -' bindWith:method with:anAspect. +' bindWith:method with:anAspect. alreadyInSuperclass ifTrue:[ - text := ' ^ super %1\' bindWith:method. + text := ' ^ super %1\' bindWith:method. ] ifFalse:[ - text := ' ^ builder valueAspectFor:#''%1'' initialValue:true\' bindWith:anAspect. + text := ' ^ builder valueAspectFor:#''%1'' initialValue:true\' bindWith:anAspect. ]. code := code, (text withCRs). CodeGeneratorTool compile:code forClass:aClass inCategory:(aCategory ? 'actions'). @@ -2111,7 +2105,7 @@ |x0 x1 y0| aLineOrNil == dropOverLine ifTrue:[ - ^ self. "/ nothing changed + ^ self. "/ nothing changed ]. x0 := listOfItemsView margin + 2. x1 := listOfItemsView width - x0. @@ -2120,26 +2114,26 @@ aContext contentsWillChange. (dropOverLine notNil and:[dropOverLine ~~ 0]) ifTrue:[ - "/ restore old draw - y0 := listOfItemsView yVisibleOfLine:(dropOverLine + 1). - y0 := y0 - 3. - - listOfItemsView invalidate:(Rectangle left:x0 top:y0 width:(x1-x0+1) height:2) - repairNow:true. + "/ restore old draw + y0 := listOfItemsView yVisibleOfLine:(dropOverLine + 1). + y0 := y0 - 3. + + listOfItemsView invalidate:(Rectangle left:x0 top:y0 width:(x1-x0+1) height:2) + repairNow:true. ]. dropOverLine := aLineOrNil. (dropOverLine notNil and:[dropOverLine ~~ 0]) ifTrue:[ - "/ highlight new drop target - y0 := listOfItemsView yVisibleOfLine:(dropOverLine + 1). - y0 := y0 - 3. - - listOfItemsView paint:(Color white). - listOfItemsView displayLineFromX:x0 y:y0 toX:x1 y:y0. - y0 := y0 + 1. - listOfItemsView paint:(Color black). - listOfItemsView displayLineFromX:x0 y:y0 toX:x1 y:y0. + "/ highlight new drop target + y0 := listOfItemsView yVisibleOfLine:(dropOverLine + 1). + y0 := y0 - 3. + + listOfItemsView paint:(Color white). + listOfItemsView displayLineFromX:x0 y:y0 toX:x1 y:y0. + y0 := y0 + 1. + listOfItemsView paint:(Color black). + listOfItemsView displayLineFromX:x0 y:y0 toX:x1 y:y0. ]. ! @@ -2159,8 +2153,8 @@ done := false. self addAndSelectValueOf:[ - done := true. - aDropContext dropObjects collect:[:el| Item menuItem:(el theObject) ] + done := true. + aDropContext dropObjects collect:[:el| Item menuItem:(el theObject) ] ]. ^ done @@ -2177,16 +2171,16 @@ dropOverLine := nil. self enablingCommitButtonsHolder value ifTrue:[ - "/ current editing spec is modified (couldn't accept operation) - ^ self + "/ current editing spec is modified (couldn't accept operation) + ^ self ]. objects := aDropContext dropObjects. objects isEmpty ifTrue:[ ^ self ]. "/ nothing to drop ??? "/ test whether all objects are dropable (kind of MenuItem) (objects conform:[:el | (el theObject askFor:#isMenuItem)]) ifTrue:[ - "/ ok, the contents is dropable - dropOverLine := 0. + "/ ok, the contents is dropable + dropOverLine := 0. ] "Modified: / 13-10-2006 / 16:04:14 / cg" @@ -2209,9 +2203,9 @@ items isEmpty ifTrue:[ ^ nil ]. ^ items collect:[:el| - obj := DropObject new:(el menuItem). - obj displayObject:(el rawLabel). - obj + obj := DropObject new:(el menuItem). + obj displayObject:(el rawLabel). + obj ]. ! @@ -2226,12 +2220,12 @@ item := nil. lnNr ifNotNil:[ - item := listOfItems at:lnNr ifAbsent:nil. - item ifNotNil:[ - (item isAction and:[item hasDelayedMenu]) ifTrue:[ - item := nil - ] - ] + item := listOfItems at:lnNr ifAbsent:nil. + item ifNotNil:[ + (item isAction and:[item hasDelayedMenu]) ifTrue:[ + item := nil + ] + ] ]. item isNil ifTrue:[ lnNr := 0 ]. "/ not dropable for item @@ -2264,28 +2258,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. + (rawKey == #CtrlCursorUp) ifTrue:[ + self doMoveUp. + ^ true. ]. - (rawKey == #CtrlCursorDown) ifTrue:[ - self doMoveDown. - ^ true. + (rawKey == #CtrlCursorDown) ifTrue:[ + self doMoveDown. + ^ true. ]. - (rawKey == #CtrlCursorLeft) ifTrue:[ - self doMoveOut. - ^ true. + (rawKey == #CtrlCursorLeft) ifTrue:[ + self doMoveOut. + ^ true. ]. - (rawKey == #CtrlCursorRight) ifTrue:[ - self doMoveInNext. - ^ true. + (rawKey == #CtrlCursorRight) ifTrue:[ + self doMoveInNext. + ^ true. ]. ^ false. @@ -2312,13 +2306,13 @@ commonPostBuild self autoAcceptOnSelectionChange addDependent:self. self autoAcceptOnSelectionChange value ifTrue:[ - (builder componentAt:'okButton') label:(resources string:'Apply') + (builder componentAt:'okButton') label:(resources string:'Apply') ]. "/ using masters infoHolder ? (builder aspectAt:#useAlienInfoLabelHolder) == true ifTrue:[ - (builder componentAt:#mainPanel) layout bottomOffset:0. - (builder componentAt:#infoBarSubSpec) beInvisible + (builder componentAt:#mainPanel) layout bottomOffset:0. + (builder componentAt:#infoBarSubSpec) beInvisible ] ! @@ -2329,7 +2323,7 @@ notifyDisabledCounter := 0. Item withAllSubclasses do:[:aClass| - aClass addBindingsTo:aspects for:self. + aClass addBindingsTo:aspects for:self. ]. selectionHolder := #() asValue. @@ -2384,29 +2378,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 ifNotNil:[ - 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 ! @@ -2441,39 +2435,39 @@ menu isNil ifTrue:[^ nil ]. menu allItemsDo:[:anItem| - 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 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 @@ -2485,12 +2479,12 @@ |blockResult| - [ - notifyDisabledCounter := notifyDisabledCounter + 1. - blockResult := aBlock value. + [ + notifyDisabledCounter := notifyDisabledCounter + 1. + blockResult := aBlock value. ] ensure:[ - notifyDisabledCounter := notifyDisabledCounter - 1 - ]. + notifyDisabledCounter := notifyDisabledCounter - 1 + ]. ^ blockResult ! ! @@ -2515,22 +2509,22 @@ |oldSelectedItem newSelectedItem anythingChanged| self enablingCommitButtonsHolder value ifFalse:[ - ^ true + ^ true ]. oldSelectedItem := self selectedItem. oldSelectedItem isNil ifTrue:[^ true]. newSelectedItem := listOfItems at:anIndex ifAbsent:nil. oldSelectedItem == newSelectedItem ifTrue:[ - ^ true + ^ true ]. anythingChanged := self enablingCommitButtonsHolder value. - anythingChanged ifTrue:[ - self autoAcceptOnSelectionChange value ifTrue:[ - self accept. - ^ true - ]. + anythingChanged ifTrue:[ + self autoAcceptOnSelectionChange value ifTrue:[ + self accept. + ^ true + ]. ]. ^ self askForItemModification @@ -2571,7 +2565,7 @@ selectors := IdentitySet new. listOfItems root recursiveDo:[:el| - el actionSelectors do:[:s| selectors add:s ]. + el actionSelectors do:[:s| selectors add:s ]. ]. ^ selectors asOrderedCollection ! @@ -2582,7 +2576,7 @@ selectors := IdentitySet new. listOfItems root recursiveDo:[:el| - el aspectSelectors do:[:s| selectors add:s ]. + el aspectSelectors do:[:s| selectors add:s ]. ]. ^ selectors asOrderedCollection ! @@ -2593,31 +2587,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| - self - createActionMethodFor:aSelector in:cls - category:category - redefine:redefineAspectMethods. + self + createActionMethodFor:aSelector in:cls + category:category + redefine:redefineAspectMethods. ]. self collectAspectSelectors do:[:anAspect| - self - createAspectMethodFor:anAspect in:cls - category:category - redefine:redefineAspectMethods + self + createAspectMethodFor:anAspect in:cls + category:category + redefine:redefineAspectMethods ]. ! ! @@ -2635,21 +2629,21 @@ |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 spec mthd category code excla| @@ -2663,35 +2657,35 @@ category := 'menu specs'. (mthd := cls class compiledMethodAt:specSelector) notNil ifTrue:[ - category := mthd category. + category := mthd category. ]. excla := Character excla asString. code := excla - , (cls name , ' class methodsFor:' , category storeString) - , excla , '\\' - - , specSelector , '\' - , (self class codeGenerationComment replChar:$!! withString:'!!!!') - , '\\ "\' - , (' MenuEditor new openOnClass:' , cls name , ' andSelector:#' , specSelector , '\') - , (' (Menu new fromLiteralArrayEncoding:(' , cls name , ' ' , specSelector , ')) startUp\') - , ' "\'. - - code := code - , '\' - , ' \\' - , ' ^ ' , spec - , '\' - , (excla , ' ' , excla) - , '\\'. + , (cls name , ' class methodsFor:' , category storeString) + , excla , '\\' + + , specSelector , '\' + , (self class codeGenerationComment replChar:$!! withString:'!!!!') + , '\\ "\' + , (' MenuEditor new openOnClass:' , cls name , ' andSelector:#' , specSelector , '\') + , (' (Menu new fromLiteralArrayEncoding:(' , cls name , ' ' , specSelector , ')) startUp\') + , ' "\'. + + code := code + , '\' + , ' \\' + , ' ^ ' , spec + , '\' + , (excla , ' ' , excla) + , '\\'. code := code withCRs. (ReadStream on:code) fileIn. self isStandAlone ifTrue:[ - self helpTool doSave + self helpTool doSave ]. self updateHistory. @@ -2716,7 +2710,7 @@ spec := self generateMenuSpec. spec ifNotNil:[ - CodeView openWith:spec title: 'Menu Spec' + CodeView openWith:spec title: 'Menu Spec' ]. ! @@ -2736,13 +2730,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 ifNotNil:[ - self selectedItem:delayedItem. + self selectedItem:delayedItem. ]. ! @@ -2762,12 +2756,12 @@ "create a new Menu " self addAndSelectValueOf: - [ |item| - item := RegularMenuItem new. - "/ --- do not add it expanded - because that makes it hard to add multipe menus - "/ item expand. - item - ]. + [ |item| + item := RegularMenuItem new. + "/ --- do not add it expanded - because that makes it hard to add multipe menus + "/ item expand. + item + ]. ! doCreateMenuSliceItem @@ -2786,7 +2780,7 @@ "create a standart edit menu " self addAndSelectValueOf:[ - RegularMenuItem menu:(self class standardEditMenu) labeled:'Edit' translateLabel:true + RegularMenuItem menu:(self class standardEditMenu) labeled:'Edit' translateLabel:true ]. ! @@ -2794,7 +2788,7 @@ "create a standart file menu " self addAndSelectValueOf:[ - RegularMenuItem menu:(self class standardFileMenu) labeled:'File' translateLabel:true + RegularMenuItem menu:(self class standardFileMenu) labeled:'File' translateLabel:true ]. ! @@ -2804,9 +2798,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" @@ -2849,7 +2843,7 @@ selectedItem := toDelete first. selectedItem isRootItem ifTrue:[ - ^ selectedItem removeAll. + ^ selectedItem removeAll. ]. "/ compute the new selection @@ -2857,19 +2851,19 @@ nextItem := nil. parent children size ~~ 1 ifTrue:[ - behind := false. - - parent do:[:el| - behind ifTrue:[ - (nextItem notNil or:[toDelete includesIdentical:el]) ifFalse:[ nextItem := el ]. - ] ifFalse:[ - behind := el == selectedItem. - (behind or:[toDelete includesIdentical:el]) ifFalse:[ prevItem := el ]. - ] - ] + behind := false. + + parent do:[:el| + behind ifTrue:[ + (nextItem notNil or:[toDelete includesIdentical:el]) ifFalse:[ nextItem := el ]. + ] ifFalse:[ + behind := el == selectedItem. + (behind or:[toDelete includesIdentical:el]) ifFalse:[ prevItem := el ]. + ] + ] ]. self withoutNotifyDo:[ - toDelete do:[:el| el remove ]. + toDelete do:[:el| el remove ]. ]. self selectedItem:(nextItem ? prevItem). self setModified. @@ -2894,12 +2888,12 @@ loMenuItems := OrderedCollection new. aCollection do:[:el| - (el askFor:#isMenuItem) ifTrue:[ loMenuItems add:el ]. + (el askFor:#isMenuItem) ifTrue:[ loMenuItems add:el ]. ]. loMenuItems isEmpty ifTrue:[ ^ self ]. self addAndSelectValueOf:[ - loMenuItems collect:[:el| Item menuItem:el ] + loMenuItems collect:[:el| Item menuItem:el ] ]. ! ! @@ -2920,7 +2914,7 @@ item isNil ifTrue:[^ self]. aDirection == #inNext ifTrue:[ item canMoveInNext ifFalse:[^ self] ] - ifFalse:[ item canMoveInAbove ifFalse:[^ self] ]. + ifFalse:[ item canMoveInAbove ifFalse:[^ self] ]. self askForItemModification ifFalse:[ ^ self ]. @@ -2928,15 +2922,15 @@ idx := parent identityIndexOf:item. aDirection == #inNext ifTrue:[ toParent := parent at:(idx + 1) ifAbsent:nil ] - ifFalse:[ toParent := parent at:(idx - 1) ifAbsent:nil ]. + ifFalse:[ toParent := parent at:(idx - 1) ifAbsent:nil ]. self withoutNotifyDo:[ - selectionHolder setValue:#(). - parent removeIndex:idx. - - aDirection == #inNext ifTrue:[ toParent addFirst:item ] - ifFalse:[ toParent addLast:item ]. - item makeVisible. + selectionHolder setValue:#(). + parent removeIndex:idx. + + aDirection == #inNext ifTrue:[ toParent addFirst:item ] + ifFalse:[ toParent addLast:item ]. + item makeVisible. ]. self selectedItem:item. self setModified. @@ -2970,10 +2964,10 @@ index := grandParent identityIndexOf:parent. self withoutNotifyDo:[ - selectionHolder setValue:#(). - parent remove:item. - index > grandParent size ifTrue:[ grandParent add:item ] - ifFalse:[ grandParent add:item afterIndex:index ] + selectionHolder setValue:#(). + parent remove:item. + index > grandParent size ifTrue:[ grandParent add:item ] + ifFalse:[ grandParent add:item afterIndex:index ] ]. self selectedItem:item. self setModified. @@ -2997,21 +2991,21 @@ self askForItemModification ifFalse:[ ^ self ]. self withoutNotifyDo:[ - parent := item parent. - children := parent children. - index := children identityIndexOf:item. - - selectionHolder setValue:#(). - children removeIndex:index. - - aDirection == #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. + parent := item parent. + children := parent children. + index := children identityIndexOf:item. + + selectionHolder setValue:#(). + children removeIndex:index. + + aDirection == #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 selectedItem:item. self setModified. @@ -3041,9 +3035,9 @@ ^Icon - 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@@@@@@ADPQDQDQ@DQD + 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@@@@@@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] ! @@ -3063,8 +3057,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 @@ -3165,8 +3159,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'! @@ -3176,13 +3170,13 @@ aMenuItem isNil ifTrue:[ ^ nil ]. aMenuItem itemValue isNil ifTrue:[ - aMenuItem isMenuSlice ifTrue:[ ^ MenuEditor::MenuSliceItem ]. - aMenuItem submenu notNil ifTrue:[ ^ MenuEditor::RegularMenuItem ]. - aMenuItem submenuChannel notNil ifTrue:[ ^ MenuEditor::LinkedMenuItem ]. - - (self separatorTypeOf:(aMenuItem rawLabel)) notNil ifTrue:[ - ^ MenuEditor::SeparatorItem - ] + aMenuItem isMenuSlice ifTrue:[ ^ MenuEditor::MenuSliceItem ]. + aMenuItem submenu notNil ifTrue:[ ^ MenuEditor::RegularMenuItem ]. + aMenuItem submenuChannel notNil ifTrue:[ ^ MenuEditor::LinkedMenuItem ]. + + (self separatorTypeOf:(aMenuItem rawLabel)) notNil ifTrue:[ + ^ MenuEditor::SeparatorItem + ] ]. ^ MenuEditor::ActionItem ! @@ -3213,207 +3207,207 @@ - ^ + ^ #(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 -5 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 - ) - (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 -5 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 - ) - (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: smalltalkObject - 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: (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 - attributes: - (tabable - true - ) - name: 'fontMenu' - layout: (LayoutFrame 110 0 260 0 -5 1.0 282 0) - activeHelpKey: fontMenu - model: font - ) - ) - - ) + 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 -5 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 + ) + (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 -5 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 + ) + (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: smalltalkObject + 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: (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 + attributes: + (tabable + true + ) + name: 'fontMenu' + layout: (LayoutFrame 110 0 260 0 -5 1.0 282 0) + activeHelpKey: fontMenu + model: font + ) + ) + + ) ) "Modified: / 16-10-2006 / 12:48:12 / cg" @@ -3425,13 +3419,13 @@ "add additional bindings to the aspects " aspects at:#notDelayedMenu ifAbsentPut:[ - true asValue + true asValue ]. aspects at:#hasSubmenu ifAbsentPut:[ - false asValue + false asValue ]. aspects at:#hasNoSubmenu ifAbsentPut:[ - true asValue + true asValue ]. ! ! @@ -3477,11 +3471,11 @@ menuItem := MenuItem labeled:(self rawLabel). MenuEditor aspects do:[:aKey| - value := self validateValue:(aMenuItem perform:aKey). - - value notNil ifTrue:[ - self aspectAt:aKey put:value. - ]. + value := self validateValue:(aMenuItem perform:aKey). + + value notNil ifTrue:[ + self aspectAt:aKey put:value. + ]. ]. ! @@ -3495,12 +3489,12 @@ "set the label assigned to the item " aValue isString ifTrue:[ - "/ KLUDGE alarm: '-' and '' indicate a separator - "/ (there is no separate menuItem class for them) - - (self isKindOfMenu or:[(self class separatorTypeOf:aValue) isNil]) ifTrue:[ - menuItem rawLabel:aValue - ] + "/ KLUDGE alarm: '-' and '' indicate a separator + "/ (there is no separate menuItem class for them) + + (self isKindOfMenu or:[(self class separatorTypeOf:aValue) isNil]) ifTrue:[ + menuItem rawLabel:aValue + ] ]. ! @@ -3545,7 +3539,7 @@ "write values to aspects " MenuEditor aspects do:[:aKey| - (aspects at:aKey) value:(menuItem perform:aKey) + (aspects at:aKey) value:(menuItem perform:aKey) ]. (aspects at:#notDelayedMenu) value:(self isDelayedMenu not). (aspects at:#hasSubmenu) value:(self isKindOfMenu or:[self children size ~~ 0]). @@ -3612,8 +3606,8 @@ a block model, .... " aValue notNil ifTrue:[ - aValue isBlock ifTrue:[ ^ #block ]. - aValue isValueModel ifTrue:[ ^ #valueModel ]. + aValue isBlock ifTrue:[ ^ #block ]. + aValue isValueModel ifTrue:[ ^ #valueModel ]. ]. ^ aValue ! ! @@ -3668,9 +3662,9 @@ 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 ! ! @@ -3755,256 +3749,256 @@ - ^ + ^ #(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 -5 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 - ) - (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: smalltalkObject - 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 -5 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 + ) + (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: smalltalkObject + 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 + ) + ) + + ) ) ! ! @@ -4036,11 +4030,11 @@ item := super menuItem. self hasDelayedMenu ifTrue:[ - children first setDelayedAttributesTo:item. - - menuItem value isNil ifTrue:[ - menuItem value:#unspecified - ] + children first setDelayedAttributesTo:item. + + menuItem value isNil ifTrue:[ + menuItem value:#unspecified + ] ]. ^ item ! @@ -4052,12 +4046,12 @@ submenu := anItem submenu. submenu notNil ifTrue:[ - item := MenuEditor::RegularMenuItem new + item := MenuEditor::RegularMenuItem new ] ifFalse:[ - anItem submenuChannel isNil ifTrue:[ - ^ self - ]. - item := MenuEditor::LinkedMenuItem new + anItem submenuChannel isNil ifTrue:[ + ^ self + ]. + item := MenuEditor::LinkedMenuItem new ]. item getDelayedAttributesFrom:anItem. self add:item. @@ -4074,14 +4068,14 @@ !MenuEditor::ActionItem methodsFor:'adding & removing'! -add:anItem +add:anItem "add an item; test whether the item is a delayed menu and not already a delayed menu exists." - + (anItem isKindOfMenu and:[ self canAddDelayedMenu ]) ifFalse:[ - ^ nil + ^ nil ]. - + menuItem triggerOnDown:false. anItem argument:(menuItem argument). isExpanded := false. @@ -4099,23 +4093,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. @@ -4133,7 +4127,7 @@ (aspects at:#hasNoDelayedMenuValue) value:(hasDelayedMenu not). hasDelayedMenu ifTrue:[ - (aspects at:#triggerOnDown) value:false + (aspects at:#triggerOnDown) value:false ]. ! ! @@ -4199,165 +4193,165 @@ - ^ + ^ #(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: smalltalkObject - 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: smalltalkObject + 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 + ) + ) + + ) ) ! ! @@ -4379,16 +4373,16 @@ slices self isDelayedMenu ifTrue:[ - ^ #( - (Basics basicsEditSpec ) - ) + ^ #( + (Basics basicsEditSpec ) + ) ]. ^ #( - (Basics basicsEditSpec ) - (Details detailsEditSpec) - (Image image ) - (Help help) + (Basics basicsEditSpec ) + (Details detailsEditSpec) + (Image image ) + (Help help) ) ! @@ -4479,127 +4473,127 @@ - ^ + ^ #(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: smalltalkObject - 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: smalltalkObject + immediateAccept: false + acceptOnReturn: true + acceptOnTab: true + acceptOnLostFocus: false + acceptChannel: acceptChannel + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + ) + + ) ) ! ! @@ -4622,7 +4616,7 @@ slices ^ #( - (Basics basicsEditSpec) + (Basics basicsEditSpec) ) ! ! @@ -4695,105 +4689,105 @@ - ^ + ^ #(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 - ) - (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 - ) - ) - - ) + 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 + ) + (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 + ) + ) + + ) ) ! ! @@ -4807,37 +4801,37 @@ |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 numberOfItems == 0 ifTrue:[ - menu := nil - ]. - ]. - menu ifNotNil:[ - 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 numberOfItems == 0 ifTrue:[ + menu := nil + ]. + ]. + menu ifNotNil:[ + 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 "Modified: / 27-03-2007 / 08:43:07 / cg" @@ -4861,16 +4855,16 @@ slices self isDelayedMenu ifTrue:[ - ^ #( - (Basics basicsEditSpec ) - ) + ^ #( + (Basics basicsEditSpec ) + ) ]. ^ #( - (Basics basicsEditSpec ) - (Details detailsEditSpec) - (Image image ) - (Help help) + (Basics basicsEditSpec ) + (Details detailsEditSpec) + (Image image ) + (Help help) ) ! @@ -4955,120 +4949,120 @@ - ^ + ^ #(FullSpec - name: windowSpec - window: + name: windowSpec + window: (WindowSpec - label: 'Image Item' - name: 'Image Item' - min: (Point 10 10) - bounds: (Rectangle 0 0 288 295) - ) - component: + label: 'Image Item' + name: 'Image Item' + min: (Point 10 10) + bounds: (Rectangle 0 0 288 295) + ) + 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 -20 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 -42 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 -40 1 40 0 -20 1 62 0) - activeHelpKey: browseResource - tabable: true - model: doBrowseForImageResource - ) - (HierarchicalListViewSpec - name: 'imageList' - layout: (LayoutFrame 20 0.0 67 0 -20 1.0 -30 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 -30 1.0 -20 1.0 0 1.0) - level: 0 - component: - (SpecCollection - collection: ( - (CheckBoxSpec - label: 'Image & Label' - name: 'iconAndLabelCheckBox' - layout: (AlignmentOrigin 0 0 0 0.5 0 0.5) - activeHelpKey: imageImageAndLabel - tabable: true - model: iconAndLabelHolder - translateLabel: true - ) - (ActionButtonSpec - label: 'Image Editor' - name: 'imageEditorButton' - layout: (AlignmentOrigin 0 1.0 0 0.5 1 0.5) - activeHelpKey: imageImageEditor - hasCharacterOrientedLabel: false - tabable: true - model: doEditImage - ) - ) - - ) - ) - ) - - ) + 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 -20 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 -42 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 -40 1 40 0 -20 1 62 0) + activeHelpKey: browseResource + tabable: true + model: doBrowseForImageResource + ) + (HierarchicalListViewSpec + name: 'imageList' + layout: (LayoutFrame 20 0.0 67 0 -20 1.0 -30 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 -30 1.0 -20 1.0 0 1.0) + level: 0 + component: + (SpecCollection + collection: ( + (CheckBoxSpec + label: 'Image & Label' + name: 'iconAndLabelCheckBox' + layout: (AlignmentOrigin 0 0 0 0.5 0 0.5) + activeHelpKey: imageImageAndLabel + tabable: true + model: iconAndLabelHolder + translateLabel: true + ) + (ActionButtonSpec + label: 'Image Editor' + name: 'imageEditorButton' + layout: (AlignmentOrigin 0 1.0 0 0.5 1 0.5) + activeHelpKey: imageImageEditor + hasCharacterOrientedLabel: false + tabable: true + model: doEditImage + ) + ) + + ) + ) + ) + + ) ) ! ! @@ -5133,11 +5127,11 @@ |classAndSelector| classAndSelector := ResourceSelectionBrowser - request:'Use Image From Class' - onSuperclass:nil - andClass:(self retrieverClass) - andSelector:(selectorHolder value) - withResourceTypes:#(image fileImage programImage). + request:'Use Image From Class' + onSuperclass:nil + andClass:(self retrieverClass) + andSelector:(selectorHolder value) + withResourceTypes:#(image fileImage programImage). classAndSelector isNil ifTrue:[ ^ self ]. @@ -5149,23 +5143,23 @@ |sel cls item| item := imageHolder value. - item notNil ifTrue:[ - item doEdit + item notNil ifTrue:[ + item doEdit ] ifFalse:[ - (sel := selectorHolder value) isNil ifTrue:[ - Dialog warn:'No selector is defined.'. - ] ifFalse:[ - (cls := retrieverHolder value) isNil ifTrue:[ - Dialog warn:'No resource retriever is defined.'. - ] ifFalse:[ - cls := Smalltalk classNamed:cls. - cls isNil ifTrue:[ - Dialog warn:'No such resource retriever class.'. - ] ifFalse:[ - ImageEditor openOnClass:cls andSelector:sel - ] - ] - ] + (sel := selectorHolder value) isNil ifTrue:[ + Dialog warn:'No selector is defined.'. + ] ifFalse:[ + (cls := retrieverHolder value) isNil ifTrue:[ + Dialog warn:'No resource retriever is defined.'. + ] ifFalse:[ + cls := Smalltalk classNamed:cls. + cls isNil ifTrue:[ + Dialog warn:'No such resource retriever class.'. + ] ifFalse:[ + ImageEditor openOnClass:cls andSelector:sel + ] + ] + ] ]. ! ! @@ -5207,8 +5201,8 @@ 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. ]. ^ list ! @@ -5231,12 +5225,12 @@ self updateImageHolder. (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). + ] ]. ! @@ -5253,9 +5247,9 @@ aModel == selectorHolder ifTrue:[ ^ self selectorChanged ]. aModel == imageHolder ifTrue:[ - item := imageHolder value. - item ifNotNil:[ selectorHolder value:(item label) ]. - ^ self + item := imageHolder value. + item ifNotNil:[ selectorHolder value:(item label) ]. + ^ self ]. super update:what with:aPara from:aModel ! @@ -5272,20 +5266,20 @@ 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 ] - ] + sel := anItem selector. + selector == sel ifTrue:[ + imageHolder value:anItem. + ^ self + ]. + item isNil ifTrue:[ + (sel startsWith:selector) ifTrue:[ item := anItem ] + ] ]. imageHolder value:nil. item ifNotNil:[ - line := imageList identityIndexOf:item. - imageViewer scrollToLine:line + line := imageList identityIndexOf:item. + imageViewer scrollToLine:line ]. ! ! @@ -5360,7 +5354,7 @@ self application withWaitCursorDo:[ aClass withAllSuperclassesDo:[:aClass| - aClass class selectorsAndMethodsDo:[:sel :m| + aClass class selectorsAndMethodsDo:[:sel :m| ((r := m resourceType) == #image or:[r == #programImage]) ifTrue:[ item := self class fromClass:aClass selector:sel. item parent:self. @@ -5384,11 +5378,11 @@ 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. ! @@ -5433,46 +5427,46 @@ - ^ + ^ #(FullSpec - name: basicsEditSpec - window: + name: basicsEditSpec + window: (WindowSpec - label: 'basicsEditSpec' - name: 'basicsEditSpec' - min: (Point 10 10) - bounds: (Rectangle 0 0 260 46) - ) - component: + label: 'basicsEditSpec' + name: 'basicsEditSpec' + min: (Point 10 10) + bounds: (Rectangle 0 0 260 46) + ) + component: (SpecCollection - collection: ( - (LabelSpec - label: 'Selector:' - name: 'selectorLabel' - layout: (AlignmentOrigin 107 0 26 0 1 0.5) - activeHelpKey: basicsSelector - translateLabel: true - resizeForLabel: true - adjust: right - ) - (InputFieldSpec - name: 'selectorField' - layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0) - activeHelpKey: basicsSelector - tabable: true - model: rawLabel - group: inputGroup - type: string - immediateAccept: false - acceptOnReturn: true - acceptOnTab: true - acceptChannel: acceptChannel - modifiedChannel: modifiedChannel - acceptOnPointerLeave: false - ) - ) - - ) + collection: ( + (LabelSpec + label: 'Selector:' + name: 'selectorLabel' + layout: (AlignmentOrigin 107 0 26 0 1 0.5) + activeHelpKey: basicsSelector + translateLabel: true + resizeForLabel: true + adjust: right + ) + (InputFieldSpec + name: 'selectorField' + layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0) + activeHelpKey: basicsSelector + tabable: true + model: rawLabel + group: inputGroup + type: string + immediateAccept: false + acceptOnReturn: true + acceptOnTab: true + acceptChannel: acceptChannel + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + ) + + ) ) ! ! @@ -5505,11 +5499,11 @@ |value| aValue isString ifTrue:[ - value := aValue withoutSeparators. - - (value notEmpty and:[value first isLetter]) ifTrue:[ - menuItem rawLabel:(value asSymbol) - ]. + value := aValue withoutSeparators. + + (value notEmpty and:[value first isLetter]) ifTrue:[ + menuItem rawLabel:(value asSymbol) + ]. ]. ! @@ -5616,79 +5610,79 @@ - ^ + ^ #(FullSpec - name: basicsEditSpec - window: + name: basicsEditSpec + window: (WindowSpec - label: 'basicsEditSpec' - name: 'basicsEditSpec' - min: (Point 10 10) - bounds: (Rectangle 0 0 260 245) - ) - component: + label: 'basicsEditSpec' + name: 'basicsEditSpec' + min: (Point 10 10) + bounds: (Rectangle 0 0 260 245) + ) + component: (SpecCollection - collection: ( - (LabelSpec - label: 'Separator:' - name: 'separatorLabel' - layout: (AlignmentOrigin 107 0 26 0 1 0.5) - translateLabel: true - resizeForLabel: true - adjust: right - ) - (ComboListSpec - name: 'seperatorList' - layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0) - activeHelpKey: basicsSeparatorType - tabable: true - model: seperatorSelection - comboList: seperatorList - useIndex: true - ) - (LabelSpec - label: 'Visibility:' - name: 'visibilityLabel' - layout: (AlignmentOrigin 107 0 51 0 1 0.5) - translateLabel: true - resizeForLabel: true - adjust: right - ) - (InputFieldSpec - name: 'visibilityInputField' - layout: (LayoutFrame 110 0 40 0 -5 1.0 62 0) - activeHelpKey: detailsVisibility - tabable: true - model: isVisible - group: inputGroup - type: symbolOrBooleanOrNil - immediateAccept: false - acceptOnReturn: true - acceptOnTab: true - acceptChannel: acceptChannel - modifiedChannel: modifiedChannel - acceptOnPointerLeave: false - ) - (LabelSpec - label: 'Start Group:' - name: 'startGroupLabel' - layout: (AlignmentOrigin 107 0 88 0 1 0.5) - translateLabel: true - resizeForLabel: true - adjust: right - ) - (PopUpListSpec - label: 'left' - name: 'startGroupPopUp' - layout: (LayoutFrame 110 0 77 0 -5 1.0 99 0) - activeHelpKey: detailsStartGroup - tabable: true - model: startGroup - menu: (left right conditionalRight) - ) - ) - - ) + collection: ( + (LabelSpec + label: 'Separator:' + name: 'separatorLabel' + layout: (AlignmentOrigin 107 0 26 0 1 0.5) + translateLabel: true + resizeForLabel: true + adjust: right + ) + (ComboListSpec + name: 'seperatorList' + layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0) + activeHelpKey: basicsSeparatorType + tabable: true + model: seperatorSelection + comboList: seperatorList + useIndex: true + ) + (LabelSpec + label: 'Visibility:' + name: 'visibilityLabel' + layout: (AlignmentOrigin 107 0 51 0 1 0.5) + translateLabel: true + resizeForLabel: true + adjust: right + ) + (InputFieldSpec + name: 'visibilityInputField' + layout: (LayoutFrame 110 0 40 0 -5 1.0 62 0) + activeHelpKey: detailsVisibility + tabable: true + model: isVisible + group: inputGroup + type: symbolOrBooleanOrNil + immediateAccept: false + acceptOnReturn: true + acceptOnTab: true + acceptChannel: acceptChannel + modifiedChannel: modifiedChannel + acceptOnPointerLeave: false + ) + (LabelSpec + label: 'Start Group:' + name: 'startGroupLabel' + layout: (AlignmentOrigin 107 0 88 0 1 0.5) + translateLabel: true + resizeForLabel: true + adjust: right + ) + (PopUpListSpec + label: 'left' + name: 'startGroupPopUp' + layout: (LayoutFrame 110 0 77 0 -5 1.0 99 0) + activeHelpKey: detailsStartGroup + tabable: true + model: startGroup + menu: (left right conditionalRight) + ) + ) + + ) ) "Modified: / 16-10-2006 / 12:48:30 / cg" @@ -5701,21 +5695,21 @@ " |holder| - aspects - at:#seperatorList - ifAbsentPut: - [ - |l| - - l := self separatorSlices collect:[:el| el last ]. - l := l collect:[:s | self classResources string:s ]. - l - ]. + aspects + at:#seperatorList + ifAbsentPut: + [ + |l| + + l := self separatorSlices collect:[:el| el last ]. + l := l collect:[:s | self classResources string:s ]. + l + ]. aspects at:#seperatorSelection ifAbsentPut:[ - holder := 0 asValue. - holder addDependent:aMenuEditor. - holder + holder := 0 asValue. + holder addDependent:aMenuEditor. + holder ]. !