UIPainter.st
changeset 966 bbea01c1de98
parent 964 476235fbb312
child 973 59d86476798a
equal deleted inserted replaced
965:4f786b46a569 966:bbea01c1de98
   871           
   871           
   872            #(
   872            #(
   873              #(#MenuItem
   873              #(#MenuItem
   874                 #label: 'About'
   874                 #label: 'About'
   875                 #translateLabel: true
   875                 #translateLabel: true
       
   876                 #activeHelpKey: #about
   876                 #labelImage: #(#ResourceRetriever nil #menuIcon)
   877                 #labelImage: #(#ResourceRetriever nil #menuIcon)
   877                 #activeHelpKey: #about
       
   878                 #submenuChannel: #menuAbout
   878                 #submenuChannel: #menuAbout
   879             )
   879             )
   880              #(#MenuItem
   880              #(#MenuItem
   881                 #label: 'File'
   881                 #label: 'File'
   882                 #translateLabel: true
   882                 #translateLabel: true
       
   883                 #activeHelpKey: #file
   883                 #enabled: #enableChannel
   884                 #enabled: #enableChannel
   884                 #activeHelpKey: #file
       
   885                 #submenu: 
   885                 #submenu: 
   886                  #(#Menu
   886                  #(#Menu
   887                     
   887                     
   888                      #(
   888                      #(
   889                        #(#MenuItem
   889                        #(#MenuItem
   974                 )
   974                 )
   975             )
   975             )
   976              #(#MenuItem
   976              #(#MenuItem
   977                 #label: 'Edit'
   977                 #label: 'Edit'
   978                 #translateLabel: true
   978                 #translateLabel: true
       
   979                 #activeHelpKey: #edit
   979                 #submenuChannel: #menuEdit
   980                 #submenuChannel: #menuEdit
   980                 #activeHelpKey: #edit
       
   981             )
   981             )
   982              #(#MenuItem
   982              #(#MenuItem
   983                 #label: 'Align'
   983                 #label: 'Align'
   984                 #translateLabel: true
   984                 #translateLabel: true
       
   985                 #activeHelpKey: #align
   985                 #submenuChannel: #menuAlign
   986                 #submenuChannel: #menuAlign
   986                 #activeHelpKey: #align
       
   987             )
   987             )
   988              #(#MenuItem
   988              #(#MenuItem
   989                 #label: 'Generate'
   989                 #label: 'Generate'
   990                 #translateLabel: true
   990                 #translateLabel: true
   991                 #activeHelpKey: #generate
   991                 #activeHelpKey: #generate
   997                           #label: 'Aspect Methods'
   997                           #label: 'Aspect Methods'
   998                           #translateLabel: true
   998                           #translateLabel: true
   999                           #value: #doGenerateAspectMethods
   999                           #value: #doGenerateAspectMethods
  1000                           #activeHelpKey: #generateAspectMethods
  1000                           #activeHelpKey: #generateAspectMethods
  1001                           #enabled: #hasSpecClass
  1001                           #enabled: #hasSpecClass
       
  1002                       )
       
  1003                        #(#MenuItem
       
  1004                           #label: 'Menu Stub Methods'
       
  1005                           #translateLabel: true
       
  1006                           #value: #doGenerateMenuMethods
  1002                       )
  1007                       )
  1003                        #(#MenuItem
  1008                        #(#MenuItem
  1004                           #label: '-'
  1009                           #label: '-'
  1005                       )
  1010                       )
  1006                        #(#MenuItem
  1011                        #(#MenuItem
  1185             )
  1190             )
  1186           ) nil
  1191           ) nil
  1187           nil
  1192           nil
  1188       )
  1193       )
  1189 
  1194 
  1190     "Modified: / 31.7.1998 / 19:23:26 / cg"
  1195     "Modified: / 23.8.1998 / 16:09:22 / cg"
  1191 !
  1196 !
  1192 
  1197 
  1193 menuAlign
  1198 menuAlign
  1194     "This resource specification was automatically generated
  1199     "This resource specification was automatically generated
  1195      by the MenuEditor of ST/X."
  1200      by the MenuEditor of ST/X."
  2880     |painter settings gridPara hspace vspace cls sel|
  2885     |painter settings gridPara hspace vspace cls sel|
  2881 
  2886 
  2882     super postOpenWith:aBuilder.
  2887     super postOpenWith:aBuilder.
  2883 
  2888 
  2884     cls := specClass.
  2889     cls := specClass.
       
  2890     cls isString ifTrue:[
       
  2891         cls := Smalltalk at:(cls string asSymbol)
       
  2892     ].
  2885     sel := specSelector.
  2893     sel := specSelector.
  2886     specSelector := nil.
  2894     specSelector := nil.
  2887     specClass    := nil.
  2895     specClass    := nil.
  2888 
  2896 
  2889     painter  := self painter.
  2897     painter  := self painter.
  2904             painter setupFromSpec:(cls perform:sel).
  2912             painter setupFromSpec:(cls perform:sel).
  2905         ]
  2913         ]
  2906     ].
  2914     ].
  2907     treeView selection: #(1).
  2915     treeView selection: #(1).
  2908 
  2916 
       
  2917     "Modified: / 22.8.1998 / 17:41:34 / cg"
  2909 ! !
  2918 ! !
  2910 
  2919 
  2911 !UIPainter methodsFor:'user actions'!
  2920 !UIPainter methodsFor:'user actions'!
  2912 
  2921 
  2913 accept
  2922 accept
  3143 
  3152 
  3144     self askForSectionModification.
  3153     self askForSectionModification.
  3145 
  3154 
  3146     (ReadStream on:self painter generateHookMethods) fileIn.
  3155     (ReadStream on:self painter generateHookMethods) fileIn.
  3147 
  3156 
       
  3157 !
       
  3158 
       
  3159 doGenerateMenuMethods
       
  3160     "generates menu stub methods for the application class"
       
  3161 
       
  3162     self askForSectionModification.
       
  3163 
       
  3164     (ReadStream on:self painter generateMenuMethods) fileIn.
       
  3165 
       
  3166     "Created: / 23.8.1998 / 16:10:04 / cg"
  3148 !
  3167 !
  3149 
  3168 
  3150 doInspectSpec
  3169 doInspectSpec
  3151     "opens an inspector on the spec of the selected widget"
  3170     "opens an inspector on the spec of the selected widget"
  3152 
  3171