MenuEditor.st
changeset 1189 0e7e286f864c
parent 1155 512913ffbdd9
child 1199 5460de03e215
equal deleted inserted replaced
1188:4805027d9d33 1189:0e7e286f864c
   356         #name: #basicsItemSpec
   356         #name: #basicsItemSpec
   357         #window: 
   357         #window: 
   358        #(#WindowSpec
   358        #(#WindowSpec
   359           #label: 'Basics Item'
   359           #label: 'Basics Item'
   360           #name: 'Basics Item'
   360           #name: 'Basics Item'
   361           #layout: #(#LayoutFrame 40 0 116 0 306 0 434 0)
       
   362           #level: 0
       
   363           #min: #(#Point 10 10)
   361           #min: #(#Point 10 10)
   364           #max: #(#Point 1160 870)
   362           #max: #(#Point 1160 870)
   365           #bounds: #(#Rectangle 40 116 307 435)
   363           #bounds: #(#Rectangle 220 200 487 519)
   366           #usePreferredExtent: false
       
   367           #returnIsOKInDialog: true
       
   368           #escapeIsCancelInDialog: true
       
   369         )
   364         )
   370         #component: 
   365         #component: 
   371        #(#SpecCollection
   366        #(#SpecCollection
   372           #collection: #(
   367           #collection: #(
   373            #(#LabelSpec
   368            #(#LabelSpec
   452               #layout: #(#LayoutFrame 110 0 104 0 -5 1.0 126 0)
   447               #layout: #(#LayoutFrame 110 0 104 0 -5 1.0 126 0)
   453               #activeHelpKey: #basicsArgument
   448               #activeHelpKey: #basicsArgument
   454               #tabable: true
   449               #tabable: true
   455               #model: #argument
   450               #model: #argument
   456               #group: #inputGroup
   451               #group: #inputGroup
   457               #type: #string
   452               #type: #smalltalkObject
   458               #acceptOnReturn: true
   453               #acceptOnReturn: true
   459               #acceptOnTab: true
   454               #acceptOnTab: true
   460               #acceptOnLostFocus: false
   455               #acceptOnLostFocus: false
   461               #acceptChannel: #acceptChannel
   456               #acceptChannel: #acceptChannel
   462               #modifiedChannel: #modifiedChannel
   457               #modifiedChannel: #modifiedChannel
  2081 updateChannels
  2076 updateChannels
  2082     "update channels"
  2077     "update channels"
  2083 
  2078 
  2084     |node parent next state|
  2079     |node parent next state|
  2085 
  2080 
  2086     self modifiedChannel value:false.
  2081     self clearModifiedFlag.
  2087     state := false.   
  2082     state := false.   
  2088     self updateSelectionOfImage.
  2083     self updateSelectionOfImage.
  2089 
  2084 
  2090     (node  := self treeView selectedNode) notNil
  2085     (node  := self treeView selectedNode) notNil
  2091     ifTrue:
  2086     ifTrue:
  2275     self helpTool helpKey: self helpKey.
  2270     self helpTool helpKey: self helpKey.
  2276     "Next line helps me to preserve myself against unnecessary settings of
  2271     "Next line helps me to preserve myself against unnecessary settings of
  2277      valueOfEnablingCommitButtons to true in the help tool."
  2272      valueOfEnablingCommitButtons to true in the help tool."
  2278 
  2273 
  2279     self valueOfEnablingCommitButtons value: false.
  2274     self valueOfEnablingCommitButtons value: false.
  2280     self modifiedChannel value: false.
  2275     self clearModifiedFlag.
  2281 
  2276 
  2282     slc ~= slices  ifTrue:[
  2277     slc ~= slices  ifTrue:[
  2283         tabSelection ~~ 0 ifTrue:[
  2278         tabSelection ~~ 0 ifTrue:[
  2284             old := (slices at:tabSelection) first
  2279             old := (slices at:tabSelection) first
  2285         ].
  2280         ].
  2391     (node := self treeView selectedNode) notNil ifTrue:[
  2386     (node := self treeView selectedNode) notNil ifTrue:[
  2392         self isHelpToolSelected ifTrue:[
  2387         self isHelpToolSelected ifTrue:[
  2393             self helpTool accept.
  2388             self helpTool accept.
  2394             node contents activeHelpKey: self helpTool helpKey.
  2389             node contents activeHelpKey: self helpTool helpKey.
  2395             self valueOfEnablingCommitButtons value: false.
  2390             self valueOfEnablingCommitButtons value: false.
  2396             self modifiedChannel value: false.
  2391             self clearModifiedFlag.
  2397         ] ifFalse:[
  2392         ] ifFalse:[
  2398             node contents buildFromAspects: aspects.
  2393             node contents buildFromAspects: aspects.
  2399             node changed.
  2394             node changed.
  2400             specSelector := self treeView selectorName.
  2395             specSelector := self treeView selectorName.
  2401         ]
  2396         ]
  2414         self helpTool helpKey:(self helpKey).
  2409         self helpTool helpKey:(self helpKey).
  2415         aspects do:[:anAspect| anAspect value:'' ].
  2410         aspects do:[:anAspect| anAspect value:'' ].
  2416         node contents toAspects:aspects
  2411         node contents toAspects:aspects
  2417     ].
  2412     ].
  2418     self valueOfEnablingCommitButtons value: false.
  2413     self valueOfEnablingCommitButtons value: false.
  2419     self modifiedChannel value: false.
  2414     self clearModifiedFlag.
  2420     modified := false
  2415     modified := false
  2421 !
  2416 !
  2422 
  2417 
  2423 doBrowseForImageResource
  2418 doBrowseForImageResource
  2424     "opens a browser on image-resource methods"
  2419     "opens a browser on image-resource methods"
  2911     "get the label of the menu item for the tree view"
  2906     "get the label of the menu item for the tree view"
  2912 
  2907 
  2913     ^label asBoldText, 
  2908     ^label asBoldText, 
  2914         (value notNil ifTrue: [': [', 
  2909         (value notNil ifTrue: [': [', 
  2915                 value ,
  2910                 value ,
  2916                 (argument notNil ifTrue: [' ', (Text string: argument emphasis: #italic)] ifFalse: ['']),
  2911                 (argument isString ifTrue: [' ', (Text string: argument emphasis: #italic)] ifFalse: ['']),
  2917                  ']'] ifFalse: [''])
  2912                  ']'] ifFalse: [''])
  2918 ! !
  2913 ! !
  2919 
  2914 
  2920 !MenuEditor::TreeView class methodsFor:'documentation'!
  2915 !MenuEditor::TreeView class methodsFor:'documentation'!
  2921 
  2916