equal
deleted
inserted
replaced
395 |
395 |
396 #imageSelector |
396 #imageSelector |
397 'Selector returning an image (sent to above or the application).' |
397 'Selector returning an image (sent to above or the application).' |
398 |
398 |
399 #keepLinkedMenu |
399 #keepLinkedMenu |
400 'Keep the linked menu after activation (do not destroy; rebuild menu for every activation).' |
400 'Keep the linked menu after activation (do not destroy).' |
401 |
401 |
402 #sendToOriginator |
402 #sendToOriginator |
403 'Send action-Message to widget (instead of application); only valid for PopUpMenus.' |
403 'Send action-Message to widget (instead of application); only valid for PopUpMenus.' |
404 |
404 |
405 #settingsRedefineAspectMethods |
405 #settingsRedefineAspectMethods |
1434 |
1434 |
1435 <resource: #menu> |
1435 <resource: #menu> |
1436 |
1436 |
1437 ^ |
1437 ^ |
1438 #(#Menu |
1438 #(#Menu |
1439 #( |
1439 #( |
1440 #(#MenuItem |
1440 #(#MenuItem |
1441 #label: 'Documentation' |
1441 #label: 'Documentation' |
1442 #translateLabel: true |
1442 #translateLabel: true |
1443 #value: #openDocumentation |
1443 #value: #openDocumentation |
1444 ) |
1444 ) |
1445 #(#MenuItem |
1445 #(#MenuItem |
1446 #label: '-' |
1446 #label: '-' |
1447 ) |
1447 ) |
1448 #(#MenuItem |
1448 #(#MenuItem |
1449 #label: 'About this Application...' |
1449 #label: 'About this Application' |
1450 #translateLabel: true |
1450 #translateLabel: true |
1451 #value: #openAboutThisApplication |
1451 #value: #openAboutThisApplication |
1452 ) |
1452 ) |
1453 ) |
1453 ) |
1454 nil |
1454 nil |
1455 nil |
1455 nil |
1456 ) |
1456 ) |
1457 ! ! |
1457 ! ! |
1458 |
1458 |
1459 !MenuEditor methodsFor:'accessing'! |
1459 !MenuEditor methodsFor:'accessing'! |
1460 |
1460 |
1463 " |
1463 " |
1464 ^ wizards at:#help ifAbsentPut:[ |tool| |
1464 ^ wizards at:#help ifAbsentPut:[ |tool| |
1465 tool := UIHelpTool new. |
1465 tool := UIHelpTool new. |
1466 tool masterApplication:self. |
1466 tool masterApplication:self. |
1467 tool modifiedHolder: self enablingCommitButtonsHolder. |
1467 tool modifiedHolder: self enablingCommitButtonsHolder. |
1468 tool builder window:(ApplicationSubView new client:tool spec:#innerSpec). |
1468 tool builder window:(ApplicationSubView new client:tool). |
1469 tool masterApplication:self. |
1469 tool masterApplication:self. |
1470 tool |
1470 tool |
1471 ] |
1471 ] |
1472 ! |
1472 ! |
1473 |
1473 |
1654 ]. |
1654 ]. |
1655 self selectedItem:root. |
1655 self selectedItem:root. |
1656 self updateHistory. |
1656 self updateHistory. |
1657 ! |
1657 ! |
1658 |
1658 |
|
1659 buildFromResourceSpec:aResourceSpec |
|
1660 "rebuild the menu from a resource spec" |
|
1661 |
|
1662 self buildFromMenu:aResourceSpec selector:nil |
|
1663 ! |
|
1664 |
1659 loadFromClass:aClass andSelector:aSelector |
1665 loadFromClass:aClass andSelector:aSelector |
1660 "rebuild menu from a class and selector" |
1666 "rebuild menu from a class and selector" |
1661 |
1667 |
1662 |cls menu| |
1668 |cls menu| |
1663 |
1669 |
1685 ] |
1691 ] |
1686 ]. |
1692 ]. |
1687 ]. |
1693 ]. |
1688 self buildFromMenu:menu selector:aSelector. |
1694 self buildFromMenu:menu selector:aSelector. |
1689 self clearModified. |
1695 self clearModified. |
1690 ! |
|
1691 |
|
1692 loadFromResourceSpec:aResourceSpec |
|
1693 "rebuild the menu from a resource spec" |
|
1694 |
|
1695 self buildFromMenu:aResourceSpec selector:nil |
|
1696 ! ! |
1696 ! ! |
1697 |
1697 |
1698 !MenuEditor methodsFor:'change & update'! |
1698 !MenuEditor methodsFor:'change & update'! |
1699 |
1699 |
1700 selectedSuperItems |
1700 selectedSuperItems |
2134 ! ! |
2134 ! ! |
2135 |
2135 |
2136 !MenuEditor methodsFor:'initialization & release'! |
2136 !MenuEditor methodsFor:'initialization & release'! |
2137 |
2137 |
2138 closeRequest |
2138 closeRequest |
2139 "asks for permission before closing" |
2139 "ask for modification |
2140 |
2140 " |
2141 self enablingCommitButtonsHolder value ifTrue:[ |
2141 self enablingCommitButtonsHolder value ifTrue:[ |
2142 self setModified. |
2142 self setModified. |
2143 self askForListModification. |
2143 self askForListModification. |
2144 modified ifTrue:[^ self]. |
2144 modified ifTrue:[^ self]. |
2145 self clearModified. |
2145 self clearModified. |
2146 ]. |
2146 ]. |
2147 super closeRequest |
2147 ^ super closeRequest |
2148 ! |
2148 ! |
2149 |
2149 |
2150 commonPostBuild |
2150 commonPostBuild |
2151 self autoAcceptOnSelectionChange addDependent:self. |
2151 self autoAcceptOnSelectionChange addDependent:self. |
2152 self autoAcceptOnSelectionChange value ifTrue:[ |
2152 self autoAcceptOnSelectionChange value ifTrue:[ |
2197 postBuildNoteBook:aNoteBook |
2197 postBuildNoteBook:aNoteBook |
2198 aNoteBook tabLabelInset:16@4. |
2198 aNoteBook tabLabelInset:16@4. |
2199 ! |
2199 ! |
2200 |
2200 |
2201 postOpenWith:aBuilder |
2201 postOpenWith:aBuilder |
2202 "reset keyboardProcessor for menuBar" |
2202 "reset keyboardProcessor for menuBar |
2203 |
2203 " |
2204 super postOpenWith: aBuilder. |
2204 super postOpenWith: aBuilder. |
2205 aBuilder keyboardProcessor menuBar:nil. |
2205 aBuilder keyboardProcessor menuBar:nil. |
2206 self windowGroup addPreEventHook:self. |
2206 self windowGroup addPreEventHook:self. |
2207 ! ! |
2207 ! ! |
2208 |
2208 |
5636 widthOn:aGC |
5636 widthOn:aGC |
5637 width ifNil:[ width := 60 ]. |
5637 width ifNil:[ width := 60 ]. |
5638 ^ width |
5638 ^ width |
5639 ! ! |
5639 ! ! |
5640 |
5640 |
5641 !MenuE Vù Vùass methodsFor:'documentation'! |
5641 !MenuEditor class methodsFor:'documentation'! |
5642 |
5642 |
5643 version |
5643 version |
5644 ^ '$Header$' |
5644 ^ '$Header$' |
5645 ! ! |
5645 ! ! |
5646 |
5646 |