MenuEditor.st
changeset 1062 15184a3a00e1
parent 1033 21b3bc025e0c
child 1067 08d5c0a01e56
equal deleted inserted replaced
1061:7400e3e3daf6 1062:15184a3a00e1
   384                     #model: #nameKey
   384                     #model: #nameKey
   385                     #group: #inputGroup
   385                     #group: #inputGroup
   386                     #type: #symbolOrNil
   386                     #type: #symbolOrNil
   387                     #acceptOnReturn: false
   387                     #acceptOnReturn: false
   388                     #acceptOnTab: false
   388                     #acceptOnTab: false
       
   389                     #acceptOnLostFocus: true
       
   390                     #modifiedChannel: #modifiedChannel
       
   391                     #acceptChannel: #acceptChannel
   389                 )
   392                 )
   390                  #(#LabelSpec
   393                  #(#LabelSpec
   391                     #name: 'labelLabel'
   394                     #name: 'labelLabel'
   392                     #layout: #(#AlignmentOrigin 107 0 51 0 1 0.5)
   395                     #layout: #(#AlignmentOrigin 107 0 51 0 1 0.5)
   393                     #activeHelpKey: #basicsLabel
   396                     #activeHelpKey: #basicsLabel
   402                     #tabable: true
   405                     #tabable: true
   403                     #model: #label
   406                     #model: #label
   404                     #group: #inputGroup
   407                     #group: #inputGroup
   405                     #acceptOnReturn: false
   408                     #acceptOnReturn: false
   406                     #acceptOnTab: false
   409                     #acceptOnTab: false
       
   410                     #acceptOnLostFocus: true
       
   411                     #modifiedChannel: #modifiedChannel
       
   412                     #acceptChannel: #acceptChannel
   407                 )
   413                 )
   408                  #(#LabelSpec
   414                  #(#LabelSpec
   409                     #name: 'valueLabel'
   415                     #name: 'valueLabel'
   410                     #layout: #(#AlignmentOrigin 107 0 90 0 1 0.5)
   416                     #layout: #(#AlignmentOrigin 107 0 90 0 1 0.5)
   411                     #activeHelpKey: #basicsAction
   417                     #activeHelpKey: #basicsAction
   421                     #model: #value
   427                     #model: #value
   422                     #group: #inputGroup
   428                     #group: #inputGroup
   423                     #type: #symbolOrNil
   429                     #type: #symbolOrNil
   424                     #acceptOnReturn: false
   430                     #acceptOnReturn: false
   425                     #acceptOnTab: false
   431                     #acceptOnTab: false
       
   432                     #acceptOnLostFocus: true
       
   433                     #modifiedChannel: #modifiedChannel
       
   434                     #acceptChannel: #acceptChannel
   426                 )
   435                 )
   427                  #(#LabelSpec
   436                  #(#LabelSpec
   428                     #name: 'argumentLabel'
   437                     #name: 'argumentLabel'
   429                     #layout: #(#AlignmentOrigin 107 0 115 0 1 0.5)
   438                     #layout: #(#AlignmentOrigin 107 0 115 0 1 0.5)
   430                     #activeHelpKey: #basicsArgument
   439                     #activeHelpKey: #basicsArgument
   440                     #model: #argument
   449                     #model: #argument
   441                     #group: #inputGroup
   450                     #group: #inputGroup
   442                     #type: #string
   451                     #type: #string
   443                     #acceptOnReturn: false
   452                     #acceptOnReturn: false
   444                     #acceptOnTab: false
   453                     #acceptOnTab: false
       
   454                     #acceptOnLostFocus: true
       
   455                     #modifiedChannel: #modifiedChannel
       
   456                     #acceptChannel: #acceptChannel
   445                 )
   457                 )
   446                  #(#LabelSpec
   458                  #(#LabelSpec
   447                     #name: 'indicationLabel'
   459                     #name: 'indicationLabel'
   448                     #layout: #(#AlignmentOrigin 107 0 155 0 1 0.5)
   460                     #layout: #(#AlignmentOrigin 107 0 155 0 1 0.5)
   449                     #activeHelpKey: #basicsIndication
   461                     #activeHelpKey: #basicsIndication
   460                     #model: #indication
   472                     #model: #indication
   461                     #group: #inputGroup
   473                     #group: #inputGroup
   462                     #type: #symbolOrNil
   474                     #type: #symbolOrNil
   463                     #acceptOnReturn: false
   475                     #acceptOnReturn: false
   464                     #acceptOnTab: false
   476                     #acceptOnTab: false
       
   477                     #acceptOnLostFocus: true
       
   478                     #modifiedChannel: #modifiedChannel
       
   479                     #acceptChannel: #acceptChannel
   465                 )
   480                 )
   466                  #(#LabelSpec
   481                  #(#LabelSpec
   467                     #name: 'choiceLabel'
   482                     #name: 'choiceLabel'
   468                     #layout: #(#AlignmentOrigin 107 0 180 0 1 0.5)
   483                     #layout: #(#AlignmentOrigin 107 0 180 0 1 0.5)
   469                     #activeHelpKey: #basicsChoice
   484                     #activeHelpKey: #basicsChoice
   481                     #model: #choice
   496                     #model: #choice
   482                     #group: #inputGroup
   497                     #group: #inputGroup
   483                     #type: #symbolOrNil
   498                     #type: #symbolOrNil
   484                     #acceptOnReturn: false
   499                     #acceptOnReturn: false
   485                     #acceptOnTab: false
   500                     #acceptOnTab: false
       
   501                     #acceptOnLostFocus: true
       
   502                     #modifiedChannel: #modifiedChannel
       
   503                     #acceptChannel: #acceptChannel
   486                 )
   504                 )
   487                  #(#LabelSpec
   505                  #(#LabelSpec
   488                     #name: 'choiceValueLabel'
   506                     #name: 'choiceValueLabel'
   489                     #layout: #(#AlignmentOrigin 107 0 205 0 1 0.5)
   507                     #layout: #(#AlignmentOrigin 107 0 205 0 1 0.5)
   490                     #activeHelpKey: #basicsChoiceValue
   508                     #activeHelpKey: #basicsChoiceValue
   505                     #immediateAccept: false
   523                     #immediateAccept: false
   506                     #acceptOnLeave: true
   524                     #acceptOnLeave: true
   507                     #acceptOnReturn: true
   525                     #acceptOnReturn: true
   508                     #acceptOnTab: true
   526                     #acceptOnTab: true
   509                     #acceptOnLostFocus: true
   527                     #acceptOnLostFocus: true
       
   528                     #modifiedChannel: #modifiedChannel
       
   529                     #acceptChannel: #acceptChannel
   510                 )
   530                 )
   511                  #(#CheckBoxSpec
   531                  #(#CheckBoxSpec
   512                     #name: 'translateLabelCheckBox'
   532                     #name: 'translateLabelCheckBox'
   513                     #layout: #(#Point 20 230)
   533                     #layout: #(#Point 20 230)
   514                     #activeHelpKey: #basicsTranslateLabel
   534                     #activeHelpKey: #basicsTranslateLabel
   576                     #model: #nameKey
   596                     #model: #nameKey
   577                     #type: #symbolOrNil
   597                     #type: #symbolOrNil
   578                     #acceptOnReturn: false
   598                     #acceptOnReturn: false
   579                     #acceptOnTab: false
   599                     #acceptOnTab: false
   580                     #group: #inputGroup
   600                     #group: #inputGroup
       
   601                     #modifiedChannel: #modifiedChannel
       
   602                     #acceptChannel: #acceptChannel
   581                 )
   603                 )
   582                  #(#LabelSpec
   604                  #(#LabelSpec
   583                     #name: 'labelLabel'
   605                     #name: 'labelLabel'
   584                     #layout: #(#AlignmentOrigin 107 0 51 0 1 0.5)
   606                     #layout: #(#AlignmentOrigin 107 0 51 0 1 0.5)
   585                     #label: 'Label:'
   607                     #label: 'Label:'
   592                     #tabable: true
   614                     #tabable: true
   593                     #model: #label
   615                     #model: #label
   594                     #acceptOnReturn: false
   616                     #acceptOnReturn: false
   595                     #acceptOnTab: false
   617                     #acceptOnTab: false
   596                     #group: #inputGroup
   618                     #group: #inputGroup
       
   619                     #modifiedChannel: #modifiedChannel
       
   620                     #acceptChannel: #acceptChannel
   597                 )
   621                 )
   598                  #(#LabelSpec
   622                  #(#LabelSpec
   599                     #name: 'menuLabel'
   623                     #name: 'menuLabel'
   600                     #layout: #(#AlignmentOrigin 107 0 76 0 1 0.5)
   624                     #layout: #(#AlignmentOrigin 107 0 76 0 1 0.5)
   601                     #label: 'Menu:'
   625                     #label: 'Menu:'
   609                     #model: #submenuChannel
   633                     #model: #submenuChannel
   610                     #type: #symbolOrNil
   634                     #type: #symbolOrNil
   611                     #acceptOnReturn: false
   635                     #acceptOnReturn: false
   612                     #acceptOnTab: false
   636                     #acceptOnTab: false
   613                     #group: #inputGroup
   637                     #group: #inputGroup
       
   638                     #modifiedChannel: #modifiedChannel
       
   639                     #acceptChannel: #acceptChannel
   614                 )
   640                 )
   615                  #(#LabelSpec
   641                  #(#LabelSpec
   616                     #name: 'ArgumentLabel'
   642                     #name: 'ArgumentLabel'
   617                     #layout: #(#AlignmentOrigin 107 0 100 0 1 0.5)
   643                     #layout: #(#AlignmentOrigin 107 0 100 0 1 0.5)
   618                     #label: 'Argument:'
   644                     #label: 'Argument:'
   625                     #tabable: true
   651                     #tabable: true
   626                     #model: #argument
   652                     #model: #argument
   627                     #acceptOnReturn: false
   653                     #acceptOnReturn: false
   628                     #acceptOnTab: false
   654                     #acceptOnTab: false
   629                     #group: #inputGroup
   655                     #group: #inputGroup
       
   656                     #modifiedChannel: #modifiedChannel
       
   657                     #acceptChannel: #acceptChannel
   630                 )
   658                 )
   631                  #(#CheckBoxSpec
   659                  #(#CheckBoxSpec
   632                     #name: 'translateLabelCheckBox'
   660                     #name: 'translateLabelCheckBox'
   633                     #layout: #(#Point 20 190)
   661                     #layout: #(#Point 20 190)
   634                     #activeHelpKey: #basicsTranslateLabel
   662                     #activeHelpKey: #basicsTranslateLabel
   689                     #model: #nameKey
   717                     #model: #nameKey
   690                     #type: #symbolOrNil
   718                     #type: #symbolOrNil
   691                     #acceptOnReturn: false
   719                     #acceptOnReturn: false
   692                     #acceptOnTab: false
   720                     #acceptOnTab: false
   693                     #group: #inputGroup
   721                     #group: #inputGroup
       
   722                     #modifiedChannel: #modifiedChannel
       
   723                     #acceptChannel: #acceptChannel
   694                 )
   724                 )
   695                  #(#LabelSpec
   725                  #(#LabelSpec
   696                     #name: 'labelLabel'
   726                     #name: 'labelLabel'
   697                     #layout: #(#AlignmentOrigin 107 0 51 0 1 0.5)
   727                     #layout: #(#AlignmentOrigin 107 0 51 0 1 0.5)
   698                     #label: 'Label:'
   728                     #label: 'Label:'
   706                     #tabable: true
   736                     #tabable: true
   707                     #model: #label
   737                     #model: #label
   708                     #acceptOnReturn: false
   738                     #acceptOnReturn: false
   709                     #acceptOnTab: false
   739                     #acceptOnTab: false
   710                     #group: #inputGroup
   740                     #group: #inputGroup
       
   741                     #modifiedChannel: #modifiedChannel
       
   742                     #acceptChannel: #acceptChannel
   711                 )
   743                 )
   712                  #(#CheckBoxSpec
   744                  #(#CheckBoxSpec
   713                     #name: 'translateLabelCheckBox'
   745                     #name: 'translateLabelCheckBox'
   714                     #layout: #(#Point 20 190)
   746                     #layout: #(#Point 20 190)
   715                     #activeHelpKey: #basicsTranslateLabel
   747                     #activeHelpKey: #basicsTranslateLabel
   769                     #tabable: true
   801                     #tabable: true
   770                     #model: #label
   802                     #model: #label
   771                     #acceptOnReturn: false
   803                     #acceptOnReturn: false
   772                     #acceptOnTab: false
   804                     #acceptOnTab: false
   773                     #group: #inputGroup
   805                     #group: #inputGroup
       
   806                     #modifiedChannel: #modifiedChannel
       
   807                     #acceptChannel: #acceptChannel
   774                 )
   808                 )
   775               )
   809               )
   776           )
   810           )
   777       )
   811       )
   778 
   812 
   840                     #model: #isVisible
   874                     #model: #isVisible
   841                     #type: #symbolOrNil
   875                     #type: #symbolOrNil
   842                     #acceptOnReturn: false
   876                     #acceptOnReturn: false
   843                     #acceptOnTab: false
   877                     #acceptOnTab: false
   844                     #group: #inputGroup
   878                     #group: #inputGroup
       
   879                     #modifiedChannel: #modifiedChannel
       
   880                     #acceptChannel: #acceptChannel
   845                 )
   881                 )
   846               )
   882               )
   847           )
   883           )
   848       )
   884       )
   849 
   885 
   897                     #model: #shortcutKey
   933                     #model: #shortcutKey
   898                     #type: #symbolOrNil
   934                     #type: #symbolOrNil
   899                     #acceptOnReturn: false
   935                     #acceptOnReturn: false
   900                     #acceptOnTab: false
   936                     #acceptOnTab: false
   901                     #group: #inputGroup
   937                     #group: #inputGroup
       
   938                     #modifiedChannel: #modifiedChannel
       
   939                     #acceptChannel: #acceptChannel
   902                 )
   940                 )
   903                  #(#LabelSpec
   941                  #(#LabelSpec
   904                     #name: 'enabledLabel'
   942                     #name: 'enabledLabel'
   905                     #layout: #(#AlignmentOrigin 107 0 51 0 1 0.5)
   943                     #layout: #(#AlignmentOrigin 107 0 51 0 1 0.5)
   906                     #activeHelpKey: #detailsEnabled
   944                     #activeHelpKey: #detailsEnabled
   916                     #model: #enabled
   954                     #model: #enabled
   917                     #type: #symbolOrNil
   955                     #type: #symbolOrNil
   918                     #acceptOnReturn: false
   956                     #acceptOnReturn: false
   919                     #acceptOnTab: false
   957                     #acceptOnTab: false
   920                     #group: #inputGroup
   958                     #group: #inputGroup
       
   959                     #modifiedChannel: #modifiedChannel
       
   960                     #acceptChannel: #acceptChannel
   921                 )
   961                 )
   922                  #(#LabelSpec
   962                  #(#LabelSpec
   923                     #name: 'visibilityLabel'
   963                     #name: 'visibilityLabel'
   924                     #layout: #(#AlignmentOrigin 107 0 76 0 1 0.5)
   964                     #layout: #(#AlignmentOrigin 107 0 76 0 1 0.5)
   925                     #activeHelpKey: #detailsVisibility
   965                     #activeHelpKey: #detailsVisibility
   935                     #model: #isVisible
   975                     #model: #isVisible
   936                     #type: #symbolOrNil
   976                     #type: #symbolOrNil
   937                     #acceptOnReturn: false
   977                     #acceptOnReturn: false
   938                     #acceptOnTab: false
   978                     #acceptOnTab: false
   939                     #group: #inputGroup
   979                     #group: #inputGroup
       
   980                     #modifiedChannel: #modifiedChannel
       
   981                     #acceptChannel: #acceptChannel
   940                 )
   982                 )
   941                  #(#LabelSpec
   983                  #(#LabelSpec
   942                     #name: 'StartGroupLabel'
   984                     #name: 'StartGroupLabel'
   943                     #layout: #(#AlignmentOrigin 107 0 111 0 1 0.5)
   985                     #layout: #(#AlignmentOrigin 107 0 111 0 1 0.5)
   944                     #activeHelpKey: #detailsStartGroup
   986                     #activeHelpKey: #detailsStartGroup
   975                     #model: #accessCharacterPos
  1017                     #model: #accessCharacterPos
   976                     #type: #numberOrNil
  1018                     #type: #numberOrNil
   977                     #acceptOnReturn: false
  1019                     #acceptOnReturn: false
   978                     #acceptOnTab: false
  1020                     #acceptOnTab: false
   979                     #group: #inputGroup
  1021                     #group: #inputGroup
       
  1022                     #modifiedChannel: #modifiedChannel
       
  1023                     #acceptChannel: #acceptChannel
   980                 )
  1024                 )
   981               )
  1025               )
   982           )
  1026           )
   983       )
  1027       )
   984 
  1028 
  1058                     #tabable: true
  1102                     #tabable: true
  1059                     #model: #icon
  1103                     #model: #icon
  1060                     #group: #inputGroup
  1104                     #group: #inputGroup
  1061                     #type: #symbolOrNil
  1105                     #type: #symbolOrNil
  1062                     #acceptOnReturn: false
  1106                     #acceptOnReturn: false
       
  1107                     #modifiedChannel: #modifiedChannel
  1063                     #acceptOnTab: false
  1108                     #acceptOnTab: false
       
  1109                     #acceptChannel: #acceptChannel
  1064                 )
  1110                 )
  1065                  #(#ActionButtonSpec
  1111                  #(#ActionButtonSpec
  1066                     #name: 'imageEditorButton'
  1112                     #name: 'imageEditorButton'
  1067                     #layout: #(#LayoutFrame 19 0.6 128 0 -5 1 152 0)
  1113                     #layout: #(#LayoutFrame 19 0.6 128 0 -5 1 152 0)
  1068                     #activeHelpKey: #imageImageEditor
  1114                     #activeHelpKey: #imageImageEditor
  2188     ].
  2234     ].
  2189 
  2235 
  2190     self helpTool helpKey: self helpKey.
  2236     self helpTool helpKey: self helpKey.
  2191     "Next line helps me to preserve myself against unnecessary settings of
  2237     "Next line helps me to preserve myself against unnecessary settings of
  2192      valueOfEnablingCommitButtons to true in the help tool."
  2238      valueOfEnablingCommitButtons to true in the help tool."
       
  2239 
  2193     self valueOfEnablingCommitButtons value: false.
  2240     self valueOfEnablingCommitButtons value: false.
       
  2241     self modifiedChannel value: false.
  2194 
  2242 
  2195     slc ~= slices  ifTrue:[
  2243     slc ~= slices  ifTrue:[
  2196         tabSelection ~~ 0 ifTrue:[
  2244         tabSelection ~~ 0 ifTrue:[
  2197             old := (slices at:tabSelection) first
  2245             old := (slices at:tabSelection) first
  2198         ].
  2246         ].
  2300 
  2348 
  2301     |node|
  2349     |node|
  2302 
  2350 
  2303     super accept.
  2351     super accept.
  2304 
  2352 
  2305     (node := self treeView selectedNode) notNil
  2353     (node := self treeView selectedNode) notNil ifTrue:[
  2306     ifTrue:
  2354         self isHelpToolSelected ifTrue:[
  2307     [
       
  2308         self isHelpToolSelected
       
  2309         ifTrue:
       
  2310         [
       
  2311             self helpTool accept.
  2355             self helpTool accept.
  2312             node contents activeHelpKey: self helpTool helpKey.
  2356             node contents activeHelpKey: self helpTool helpKey.
  2313             self valueOfEnablingCommitButtons value: false.
  2357             self valueOfEnablingCommitButtons value: false.
  2314         ]
  2358             self modifiedChannel value: false.
  2315         ifFalse:
  2359         ] ifFalse:[
  2316         [
       
  2317             node contents buildFromAspects: aspects.
  2360             node contents buildFromAspects: aspects.
  2318             node changed.
  2361             node changed.
  2319             specSelector := self treeView selectorName.
  2362             specSelector := self treeView selectorName.
  2320         ]
  2363         ]
  2321     ].   
  2364     ].   
  2325 
  2368 
  2326 cancel
  2369 cancel
  2327     "invoked by button 'Cancel'"
  2370     "invoked by button 'Cancel'"
  2328 
  2371 
  2329     |node|
  2372     |node|
  2330     (node := self treeView selectedNode) notNil
  2373 
  2331     ifTrue:
  2374     (node := self treeView selectedNode) notNil ifTrue:[          
  2332     [          
       
  2333         self helpTool helpKey:(self helpKey).
  2375         self helpTool helpKey:(self helpKey).
  2334         aspects do:[:anAspect| anAspect value:nil].
  2376         aspects do:[:anAspect| anAspect value:nil].
  2335         node contents toAspects:aspects
  2377         node contents toAspects:aspects
  2336     ].
  2378     ].
  2337     self valueOfEnablingCommitButtons value: false.
  2379     self valueOfEnablingCommitButtons value: false.
       
  2380     self modifiedChannel value: false.
  2338     modified := false
  2381     modified := false
  2339 !
  2382 !
  2340 
  2383 
  2341 doBrowseForImageResource
  2384 doBrowseForImageResource
  2342     "opens a browser on image-resource methods"
  2385     "opens a browser on image-resource methods"