--- a/MenuEditor.st Mon Mar 30 14:34:43 1998 +0200
+++ b/MenuEditor.st Mon Mar 30 14:36:23 1998 +0200
@@ -974,11 +974,11 @@
#window:
#(#WindowSpec
#name: 'Menu Editor'
- #layout: #(#LayoutFrame 473 0 301 0 1052 0 684 0)
+ #layout: #(#LayoutFrame 88 0 294 0 627 0 673 0)
#label: 'Menu Editor'
- #min: #(#Point 10 10)
+ #min: #(#Point 510 390)
#max: #(#Point 1152 900)
- #bounds: #(#Rectangle 473 301 1053 685)
+ #bounds: #(#Rectangle 88 294 628 674)
#menu: #menu
#usePreferredExtent: false
)
@@ -1015,7 +1015,7 @@
#(
#(#NoteBookViewSpec
#name: 'NoteBook'
- #layout: #(#LayoutFrame 1 0.0 0 0.0 1 1.0 -26 1.0)
+ #layout: #(#LayoutFrame 1 0.0 0 0.0 1 1.0 -30 1.0)
#tabable: true
#model: #tabModel
#menu: #tabList
@@ -1070,7 +1070,6 @@
#(
#(#MenuItem
#label: 'About'
- #activeHelpKey: #about
#accessCharacterPosition: 1
#labelImage: #(#ResourceRetriever nil #menuIcon)
#submenuChannel: #menuAbout
@@ -1154,11 +1153,6 @@
#submenuChannel: #submenuTest
)
#(#MenuItem
- #label: 'History'
- #activeHelpKey: #history
- #submenuChannel: #menuHistory
- )
- #(#MenuItem
#label: 'Settings'
#submenu:
#(#Menu
@@ -1173,10 +1167,43 @@
)
)
#(#MenuItem
+ #label: 'History'
+ #activeHelpKey: #history
+ #submenuChannel: #menuHistory
+ )
+ #(#MenuItem
#label: 'Help'
#startGroup: #right
- #activeHelpKey: #help
- #submenuChannel: #menuHelp
+ #submenu:
+ #(#Menu
+
+ #(
+ #(#MenuItem
+ #label: 'Documentation'
+ #value: #openHTMLDocument:
+ #activeHelpKey: #helpTutorial
+ #argument: 'tools/MenuEditor/TOP.html'
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Help Tool'
+ #value: #openHTMLDocument:
+ #activeHelpKey: #helpHelpTool
+ #argument: 'tools/uipainter/HelpTool.html'
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Show Help Texts'
+ #activeHelpKey: #helpShowHelp
+ #indication: #showHelp:
+ )
+ ) nil
+ nil
+ )
)
) nil
nil
@@ -1553,9 +1580,9 @@
self noteBookView.
- self helpTool helpSpecFrom: aHelpTool specClass.
- self helpTool dictionaries: aHelpTool dictionaries.
- self helpTool dictionary: aHelpTool dictionary
+ self helpTool buildFromClass: aHelpTool specClass.
+ self helpTool dictionaries: aHelpTool dictionaries.
+ self helpTool dictionary: aHelpTool dictionary
! !
!MenuEditor methodsFor:'aspects'!
@@ -1626,7 +1653,7 @@
buildFromClass:aClass andSelector:aSelector
self isStandAlone ifTrue:[
- self helpTool helpSpecFrom:specClass
+ self helpTool buildFromClass:specClass
].
self treeView buildFromClass: aClass andSelector: aSelector.
@@ -1645,8 +1672,8 @@
!MenuEditor methodsFor:'change & update'!
-updateEnabledChannels
- "update enabled channels"
+updateChannels
+ "update channels"
|node parent next state|
@@ -1664,8 +1691,8 @@
self valueOfEnableMovingUpOrDown value:(parent children size > 1).
self valueOfEnableMovingOut value:parent parent notNil.
self hasValidSingleSelection value:true.
- self hasValidSelection value:true.
- self valueOfCanPaste value: true & self valueOfCanPaste value.
+ self hasValidSelection value:true.
+ self valueOfCanPaste value:true & self valueOfCanPaste value.
^self
]
]
@@ -1680,8 +1707,8 @@
self valueOfEnableMovingIn value:false.
self valueOfEnableMovingOut value:false.
self hasValidSingleSelection value:false.
- self hasValidSelection value:state.
- self valueOfCanPaste value: false.
+ self hasValidSelection value:state.
+ self valueOfCanPaste value:(self hasValidSingleSelection value or: [node == self treeView root]) & self valueOfCanPaste value.
! !
!MenuEditor methodsFor:'event handling'!
@@ -1796,7 +1823,7 @@
self tabSelection:0.
]
].
- self updateEnabledChannels.
+ self updateChannels.
aspects do: [:holder| holder addDependent:self].
!
@@ -1858,7 +1885,8 @@
self isHelpToolSelected
ifTrue: [helpCanvas raise]
- ifFalse: [specCanvas raise]
+ ifFalse: [specCanvas raise]
+
! !
!MenuEditor methodsFor:'user actions'!
@@ -1907,7 +1935,7 @@
doNew
- super doNew ifTrue: [self helpTool reset]
+ super doNew ifTrue: [self helpTool doNew]
!
doPickAMenu
@@ -1972,6 +2000,8 @@
self helpTool installHelpSpecsOnClass:self specClass.
self updateHistory.
+ self updateInfoLabel.
+
hasSaved := true.
modified := false.
@@ -2507,7 +2537,7 @@
<resource: #keyboard (#Delete #BackSpace #Cut #Copy #Paste)>
(key == #Delete or:[key == #BackSpace]) ifTrue: [^self doDelete].
- key == #Cut ifTrue:[^self doCut].
+ key == #Cut ifTrue:[^self doCut].
key == #Copy ifTrue:[^self doCopy].
key == #Paste ifTrue:[^self doPaste].
@@ -2537,7 +2567,8 @@
self hasSelection ifTrue:[
self application clipboard: OrderedCollection new.
- self selectionDo:[:i| self application clipboard add:((listOfNodes at:i) copy)]
+ self selectionDo:[:i| self application clipboard add:((listOfNodes at:i) copy)].
+ self topView application updateAllToolInstances.
]
!
@@ -2584,6 +2615,7 @@
self selectedNodesRemove.
self selection: selectedNodes first - 1.
self setModified.
+ self topView application updateAllToolInstances.
]
!
@@ -2681,7 +2713,7 @@
self topView application modified: true.
- self topView application updateEnabledChannels
+ self topView application updateChannels
! !
!MenuEditor class methodsFor:'documentation'!