UIPainter.st
changeset 1710 4d81ff7b3412
parent 1698 28250498a2b3
child 1712 4badda593e48
equal deleted inserted replaced
1709:f5bb3fc6e05a 1710:4d81ff7b3412
    13 
    13 
    14 "{ Package: 'stx:libtool2' }"
    14 "{ Package: 'stx:libtool2' }"
    15 
    15 
    16 ToolApplicationModel subclass:#UIPainter
    16 ToolApplicationModel subclass:#UIPainter
    17 	instanceVariableNames:'specClass specSelector specSuperclass aspects treeView
    17 	instanceVariableNames:'specClass specSelector specSuperclass aspects treeView
    18 		selectionPanel tabSelection modified specTool layoutTool helpTool'
    18 		selectionPanel tabSelection modified specTool layoutTool helpTool
       
    19 		autoAcceptOnSelectionChange'
    19 	classVariableNames:''
    20 	classVariableNames:''
    20 	poolDictionaries:''
    21 	poolDictionaries:''
    21 	category:'Interface-UIPainter'
    22 	category:'Interface-UIPainter'
    22 !
    23 !
    23 
    24 
   965      (Menu new fromLiteralArrayEncoding:(UIPainter menu)) startUp
   966      (Menu new fromLiteralArrayEncoding:(UIPainter menu)) startUp
   966     "
   967     "
   967 
   968 
   968     <resource: #menu>
   969     <resource: #menu>
   969 
   970 
   970     ^
   971     ^ 
   971      
   972      #(#Menu
   972        #(#Menu
   973         #(
   973           
   974          #(#MenuItem
   974            #(
   975             #activeHelpKey: #file
   975              #(#MenuItem
   976             #enabled: #enableChannel
   976                 #label: '&File'
   977             #label: '&File'
   977                 #translateLabel: true
   978             #translateLabel: true
   978                 #activeHelpKey: #file
   979             #submenu: 
   979                 #enabled: #enableChannel
   980            #(#Menu
   980                 #submenu: 
   981               #(
   981                  #(#Menu
   982                #(#MenuItem
   982                     
   983                   #activeHelpKey: #fileNew
   983                      #(
   984                   #label: 'New'
   984                        #(#MenuItem
   985                   #itemValue: #doNew
   985                           #label: 'New'
   986                   #translateLabel: true
   986                           #translateLabel: true
       
   987                           #value: #doNew
       
   988                           #activeHelpKey: #fileNew
       
   989                       )
       
   990                        #(#MenuItem
       
   991                           #label: '-'
       
   992                       )
       
   993                        #(#MenuItem
       
   994                           #label: 'Load...'
       
   995                           #translateLabel: true
       
   996                           #value: #doLoad
       
   997                           #activeHelpKey: #fileLoad
       
   998                       )
       
   999                        #(#MenuItem
       
  1000                           #label: 'Load Subspec...'
       
  1001                           #translateLabel: true
       
  1002                           #value: #doLoadSubspec
       
  1003                           #activeHelpKey: #fileLoadSubspec
       
  1004                       )
       
  1005                        #(#MenuItem
       
  1006                           #label: '-'
       
  1007                       )
       
  1008                        #(#MenuItem
       
  1009                           #label: 'Save'
       
  1010                           #translateLabel: true
       
  1011                           #value: #doSave
       
  1012                           #activeHelpKey: #fileSave
       
  1013                       )
       
  1014                        #(#MenuItem
       
  1015                           #label: 'Save As...'
       
  1016                           #translateLabel: true
       
  1017                           #value: #doSaveAs
       
  1018                           #activeHelpKey: #fileSaveAs
       
  1019                       )
       
  1020                        #(#MenuItem
       
  1021                           #label: 'Define Class and Selector...'
       
  1022                           #translateLabel: true
       
  1023                           #value: #doDefineClassAndSelector
       
  1024                           #activeHelpKey: #fileSaveAs
       
  1025                       )
       
  1026                        #(#MenuItem
       
  1027                           #label: '-'
       
  1028                       )
       
  1029                        #(#MenuItem
       
  1030                           #label: 'Pick a Window Spec...'
       
  1031                           #translateLabel: true
       
  1032                           #value: #doPickAView
       
  1033                           #activeHelpKey: #filePickAnInterface
       
  1034                       )
       
  1035                        #(#MenuItem
       
  1036                           #label: '-'
       
  1037                       )
       
  1038                        #(#MenuItem
       
  1039                           #label: 'Show Window Spec'
       
  1040                           #translateLabel: true
       
  1041                           #value: #doWindowSpec
       
  1042                           #activeHelpKey: #fileShowWindowSpec
       
  1043                       )
       
  1044                        #(#MenuItem
       
  1045                           #label: 'Browse Class'
       
  1046                           #translateLabel: true
       
  1047                           #value: #doBrowseClass
       
  1048                           #activeHelpKey: #fileBrowseClass
       
  1049                           #enabled: #hasSpecClass
       
  1050                       )
       
  1051                        #(#MenuItem
       
  1052                           #label: 'Browse Aspect Methods'
       
  1053                           #translateLabel: true
       
  1054                           #value: #doBrowseAspectMethods
       
  1055                           #activeHelpKey: #fileBrowseAspectMethods
       
  1056                           #enabled: #hasSpecClass
       
  1057                       )
       
  1058                        #(#MenuItem
       
  1059                           #label: '-'
       
  1060                       )
       
  1061                        #(#MenuItem
       
  1062                           #label: 'Exit'
       
  1063                           #translateLabel: true
       
  1064                           #value: #closeRequest
       
  1065                           #activeHelpKey: #fileExit
       
  1066                       )
       
  1067                     ) nil
       
  1068                     nil
       
  1069                 )
   987                 )
       
   988                #(#MenuItem
       
   989                   #label: '-'
       
   990                 )
       
   991                #(#MenuItem
       
   992                   #activeHelpKey: #fileLoad
       
   993                   #label: 'Load...'
       
   994                   #itemValue: #doLoad
       
   995                   #translateLabel: true
       
   996                 )
       
   997                #(#MenuItem
       
   998                   #activeHelpKey: #fileLoadSubspec
       
   999                   #label: 'Load Subspec...'
       
  1000                   #itemValue: #doLoadSubspec
       
  1001                   #translateLabel: true
       
  1002                 )
       
  1003                #(#MenuItem
       
  1004                   #label: '-'
       
  1005                 )
       
  1006                #(#MenuItem
       
  1007                   #activeHelpKey: #fileSave
       
  1008                   #label: 'Save'
       
  1009                   #itemValue: #doSave
       
  1010                   #translateLabel: true
       
  1011                 )
       
  1012                #(#MenuItem
       
  1013                   #activeHelpKey: #fileSaveAs
       
  1014                   #label: 'Save As...'
       
  1015                   #itemValue: #doSaveAs
       
  1016                   #translateLabel: true
       
  1017                 )
       
  1018                #(#MenuItem
       
  1019                   #activeHelpKey: #fileSaveAs
       
  1020                   #label: 'Define Class and Selector...'
       
  1021                   #itemValue: #doDefineClassAndSelector
       
  1022                   #translateLabel: true
       
  1023                 )
       
  1024                #(#MenuItem
       
  1025                   #label: '-'
       
  1026                 )
       
  1027                #(#MenuItem
       
  1028                   #activeHelpKey: #filePickAnInterface
       
  1029                   #label: 'Pick a Window Spec...'
       
  1030                   #itemValue: #doPickAView
       
  1031                   #translateLabel: true
       
  1032                 )
       
  1033                #(#MenuItem
       
  1034                   #label: '-'
       
  1035                 )
       
  1036                #(#MenuItem
       
  1037                   #activeHelpKey: #fileShowWindowSpec
       
  1038                   #label: 'Show Window Spec'
       
  1039                   #itemValue: #doWindowSpec
       
  1040                   #translateLabel: true
       
  1041                 )
       
  1042                #(#MenuItem
       
  1043                   #activeHelpKey: #fileBrowseClass
       
  1044                   #enabled: #hasSpecClass
       
  1045                   #label: 'Browse Class'
       
  1046                   #itemValue: #doBrowseClass
       
  1047                   #translateLabel: true
       
  1048                 )
       
  1049                #(#MenuItem
       
  1050                   #activeHelpKey: #fileBrowseAspectMethods
       
  1051                   #enabled: #hasSpecClass
       
  1052                   #label: 'Browse Aspect Methods'
       
  1053                   #itemValue: #doBrowseAspectMethods
       
  1054                   #translateLabel: true
       
  1055                 )
       
  1056                #(#MenuItem
       
  1057                   #label: '-'
       
  1058                 )
       
  1059                #(#MenuItem
       
  1060                   #activeHelpKey: #fileExit
       
  1061                   #label: 'Exit'
       
  1062                   #itemValue: #closeRequest
       
  1063                   #translateLabel: true
       
  1064                 )
       
  1065                )
       
  1066               nil
       
  1067               nil
  1070             )
  1068             )
  1071              #(#MenuItem
  1069           )
  1072                 #label: 'Edit'
  1070          #(#MenuItem
  1073                 #translateLabel: true
  1071             #activeHelpKey: #edit
  1074                 #activeHelpKey: #edit
  1072             #label: 'Edit'
  1075                 #submenuChannel: #menuEdit
  1073             #translateLabel: true
       
  1074             #submenuChannel: #menuEdit
       
  1075           )
       
  1076          #(#MenuItem
       
  1077             #activeHelpKey: #align
       
  1078             #label: 'Align'
       
  1079             #translateLabel: true
       
  1080             #submenuChannel: #menuAlign
       
  1081           )
       
  1082          #(#MenuItem
       
  1083             #activeHelpKey: #generate
       
  1084             #label: 'Generate'
       
  1085             #translateLabel: true
       
  1086             #submenu: 
       
  1087            #(#Menu
       
  1088               #(
       
  1089                #(#MenuItem
       
  1090                   #activeHelpKey: #generateAspectMethods
       
  1091                   #enabled: #hasSpecClass
       
  1092                   #label: 'Aspect Methods'
       
  1093                   #itemValue: #doGenerateAspectMethods
       
  1094                   #translateLabel: true
       
  1095                 )
       
  1096                #(#MenuItem
       
  1097                   #activeHelpKey: #generateAspectMethodFor
       
  1098                   #enabled: #hasSpecClass
       
  1099                   #label: 'Aspect Method For...'
       
  1100                   #itemValue: #doGenerateAspectMethodFor
       
  1101                   #translateLabel: true
       
  1102                 )
       
  1103                #(#MenuItem
       
  1104                   #enabled: #hasSpecClass
       
  1105                   #label: 'Menu Stub Methods'
       
  1106                   #itemValue: #doGenerateMenuMethods
       
  1107                   #translateLabel: true
       
  1108                 )
       
  1109                #(#MenuItem
       
  1110                   #label: '-'
       
  1111                 )
       
  1112                #(#MenuItem
       
  1113                   #activeHelpKey: #generateHookMethods
       
  1114                   #enabled: #hasSpecClass
       
  1115                   #label: 'Hook Methods'
       
  1116                   #itemValue: #doGenerateHookMethods
       
  1117                   #translateLabel: true
       
  1118                 )
       
  1119                )
       
  1120               nil
       
  1121               nil
  1076             )
  1122             )
  1077              #(#MenuItem
  1123           )
  1078                 #label: 'Align'
  1124          #(#MenuItem
  1079                 #translateLabel: true
  1125             #activeHelpKey: #test
  1080                 #activeHelpKey: #align
  1126             #label: 'Test'
  1081                 #submenuChannel: #menuAlign
  1127             #translateLabel: true
       
  1128             #submenu: 
       
  1129            #(#Menu
       
  1130               #(
       
  1131                #(#MenuItem
       
  1132                   #activeHelpKey: #testStartApplication
       
  1133                   #label: 'Start Application'
       
  1134                   #itemValue: #doStartApplication
       
  1135                   #translateLabel: true
       
  1136                 )
       
  1137                #(#MenuItem
       
  1138                   #label: '-'
       
  1139                 )
       
  1140                #(#MenuItem
       
  1141                   #activeHelpKey: #testGeometryTestMode
       
  1142                   #label: 'Geometry Test Mode'
       
  1143                   #translateLabel: true
       
  1144                   #indication: #testMode:
       
  1145                 )
       
  1146                )
       
  1147               nil
       
  1148               nil
  1082             )
  1149             )
  1083              #(#MenuItem
  1150           )
  1084                 #label: 'Generate'
  1151          #(#MenuItem
  1085                 #translateLabel: true
  1152             #activeHelpKey: #settings
  1086                 #activeHelpKey: #generate
  1153             #label: 'Settings'
  1087                 #submenu: 
  1154             #translateLabel: true
  1088                  #(#Menu
  1155             #submenu: 
  1089                     
  1156            #(#Menu
  1090                      #(
  1157               #(
  1091                        #(#MenuItem
  1158                #(#MenuItem
  1092                           #label: 'Aspect Methods'
  1159                   #activeHelpKey: #settingsCanvas
  1093                           #translateLabel: true
  1160                   #label: 'Canvas'
  1094                           #value: #doGenerateAspectMethods
  1161                   #translateLabel: true
  1095                           #activeHelpKey: #generateAspectMethods
  1162                   #indication: #painterShown
  1096                           #enabled: #hasSpecClass
       
  1097                       )
       
  1098                        #(#MenuItem
       
  1099                           #label: 'Aspect Method For...'
       
  1100                           #translateLabel: true
       
  1101                           #value: #doGenerateAspectMethodFor
       
  1102                           #activeHelpKey: #generateAspectMethodFor
       
  1103                           #enabled: #hasSpecClass
       
  1104                       )
       
  1105                        #(#MenuItem
       
  1106                           #label: 'Menu Stub Methods'
       
  1107                           #translateLabel: true
       
  1108                           #value: #doGenerateMenuMethods
       
  1109                           #enabled: #hasSpecClass
       
  1110                       )
       
  1111                        #(#MenuItem
       
  1112                           #label: '-'
       
  1113                       )
       
  1114                        #(#MenuItem
       
  1115                           #label: 'Hook Methods'
       
  1116                           #translateLabel: true
       
  1117                           #value: #doGenerateHookMethods
       
  1118                           #activeHelpKey: #generateHookMethods
       
  1119                           #enabled: #hasSpecClass
       
  1120                       )
       
  1121                     ) nil
       
  1122                     nil
       
  1123                 )
  1163                 )
       
  1164                #(#MenuItem
       
  1165                   #activeHelpKey: #settingsGallery
       
  1166                   #label: 'Gallery'
       
  1167                   #translateLabel: true
       
  1168                   #indication: #galleryShown
       
  1169                 )
       
  1170                #(#MenuItem
       
  1171                   #label: '-'
       
  1172                 )
       
  1173                #(#MenuItem
       
  1174                   #activeHelpKey: #settingsRedefineAspectMethods
       
  1175                   #enabled: #hasSpecClass
       
  1176                   #label: 'Redefine Aspect Methods'
       
  1177                   #translateLabel: true
       
  1178                   #indication: #redefineAspectMethods:
       
  1179                 )
       
  1180                #(#MenuItem
       
  1181                   #activeHelpKey: #settingsAspectsAsInstances
       
  1182                   #enabled: #hasSpecClass
       
  1183                   #label: 'Aspects as InstanceVariables'
       
  1184                   #translateLabel: true
       
  1185                   #indication: #generateAspectsAsInstanceVariables:
       
  1186                 )
       
  1187                #(#MenuItem
       
  1188                   #label: 'AutoAccept on Selection-Change '
       
  1189                   #translateLabel: true
       
  1190                   #indication: #autoAcceptOnSelectionChange
       
  1191                 )
       
  1192                #(#MenuItem
       
  1193                   #label: '-'
       
  1194                 )
       
  1195                #(#MenuItem
       
  1196                   #activeHelpKey: #settingsUndoManager
       
  1197                   #enabled: #hasUndoHistory
       
  1198                   #label: 'Undo Manager...'
       
  1199                   #itemValue: #openUndoMenu
       
  1200                   #translateLabel: true
       
  1201                 )
       
  1202                #(#MenuItem
       
  1203                   #activeHelpKey: #settingsGridManager
       
  1204                   #label: 'Grid Manager...'
       
  1205                   #itemValue: #doDefineGrid
       
  1206                   #translateLabel: true
       
  1207                 )
       
  1208                )
       
  1209               nil
       
  1210               nil
  1124             )
  1211             )
  1125              #(#MenuItem
  1212           )
  1126                 #label: 'Test'
  1213          #(#MenuItem
  1127                 #translateLabel: true
  1214             #activeHelpKey: #history
  1128                 #activeHelpKey: #test
  1215             #label: 'History'
  1129                 #submenu: 
  1216             #translateLabel: true
  1130                  #(#Menu
  1217             #submenuChannel: #menuHistory
  1131                     
  1218           )
  1132                      #(
  1219          #(#MenuItem
  1133                        #(#MenuItem
  1220             #activeHelpKey: #help
  1134                           #label: 'Start Application'
  1221             #label: 'Help'
  1135                           #translateLabel: true
  1222             #translateLabel: true
  1136                           #value: #doStartApplication
  1223             #startGroup: #right
  1137                           #activeHelpKey: #testStartApplication
  1224             #submenu: 
  1138                       )
  1225            #(#Menu
  1139                        #(#MenuItem
  1226               #(
  1140                           #label: '-'
  1227                #(#MenuItem
  1141                       )
  1228                   #activeHelpKey: #helpTutorial
  1142                        #(#MenuItem
  1229                   #label: 'Tutorial'
  1143                           #label: 'Geometry Test Mode'
  1230                   #itemValue: #openHTMLDocument:
  1144                           #translateLabel: true
  1231                   #translateLabel: true
  1145                           #activeHelpKey: #testGeometryTestMode
  1232                   #argument: 'tools/uipainter/TOP.html'
  1146                           #indication: #testMode:
       
  1147                       )
       
  1148                     ) nil
       
  1149                     nil
       
  1150                 )
  1233                 )
       
  1234                #(#MenuItem
       
  1235                   #label: '-'
       
  1236                 )
       
  1237                #(#MenuItem
       
  1238                   #activeHelpKey: #helpFunctions
       
  1239                   #label: 'Functions'
       
  1240                   #itemValue: #openHTMLDocument:
       
  1241                   #translateLabel: true
       
  1242                   #argument: 'tools/uipainter/Functions.html'
       
  1243                 )
       
  1244                #(#MenuItem
       
  1245                   #activeHelpKey: #helpExamples
       
  1246                   #label: 'Examples'
       
  1247                   #itemValue: #openHTMLDocument:
       
  1248                   #translateLabel: true
       
  1249                   #argument: 'tools/uipainter/Examples.html'
       
  1250                 )
       
  1251                #(#MenuItem
       
  1252                   #label: '-'
       
  1253                 )
       
  1254                #(#MenuItem
       
  1255                   #activeHelpKey: #helpHelpTool
       
  1256                   #label: 'Help Tool'
       
  1257                   #itemValue: #openHTMLDocument:
       
  1258                   #translateLabel: true
       
  1259                   #argument: 'tools/uipainter/HelpTool.html'
       
  1260                 )
       
  1261                #(#MenuItem
       
  1262                   #activeHelpKey: #helpLayoutTool
       
  1263                   #label: 'Layout Tool'
       
  1264                   #itemValue: #openHTMLDocument:
       
  1265                   #translateLabel: true
       
  1266                   #argument: 'tools/uipainter/LayoutTool.html'
       
  1267                 )
       
  1268                #(#MenuItem
       
  1269                   #label: '-'
       
  1270                 )
       
  1271                #(#MenuItem
       
  1272                   #activeHelpKey: #helpSelectedWidget
       
  1273                   #label: 'Selected Widget'
       
  1274                   #itemValue: #doOpenWidgetDocumentation
       
  1275                   #translateLabel: true
       
  1276                 )
       
  1277                #(#MenuItem
       
  1278                   #label: '-'
       
  1279                 )
       
  1280                #(#MenuItem
       
  1281                   #activeHelpKey: #helpShowHelp
       
  1282                   #label: 'Show Help Texts'
       
  1283                   #translateLabel: true
       
  1284                   #indication: #showingHelp:
       
  1285                 )
       
  1286                #(#MenuItem
       
  1287                   #label: '-'
       
  1288                 )
       
  1289                #(#MenuItem
       
  1290                   #activeHelpKey: #aboutThisAppliaction
       
  1291                   #label: 'About this Application...'
       
  1292                   #itemValue: #openAboutThisApplication
       
  1293                   #translateLabel: true
       
  1294                 )
       
  1295                )
       
  1296               nil
       
  1297               nil
  1151             )
  1298             )
  1152              #(#MenuItem
  1299           )
  1153                 #label: 'Settings'
  1300          )
  1154                 #translateLabel: true
  1301         nil
  1155                 #activeHelpKey: #settings
  1302         nil
  1156                 #submenu: 
       
  1157                  #(#Menu
       
  1158                     
       
  1159                      #(
       
  1160                        #(#MenuItem
       
  1161                           #label: 'Canvas'
       
  1162                           #translateLabel: true
       
  1163                           #activeHelpKey: #settingsCanvas
       
  1164                           #indication: #painterShown
       
  1165                       )
       
  1166                        #(#MenuItem
       
  1167                           #label: 'Gallery'
       
  1168                           #translateLabel: true
       
  1169                           #activeHelpKey: #settingsGallery
       
  1170                           #indication: #galleryShown
       
  1171                       )
       
  1172                        #(#MenuItem
       
  1173                           #label: '-'
       
  1174                       )
       
  1175                        #(#MenuItem
       
  1176                           #label: 'Redefine Aspect Methods'
       
  1177                           #translateLabel: true
       
  1178                           #activeHelpKey: #settingsRedefineAspectMethods
       
  1179                           #enabled: #hasSpecClass
       
  1180                           #indication: #redefineAspectMethods:
       
  1181                       )
       
  1182                        #(#MenuItem
       
  1183                           #label: 'Aspects as InstanceVariables'
       
  1184                           #translateLabel: true
       
  1185                           #activeHelpKey: #settingsAspectsAsInstances
       
  1186                           #enabled: #hasSpecClass
       
  1187                           #indication: #generateAspectsAsInstanceVariables:
       
  1188                       )
       
  1189                        #(#MenuItem
       
  1190                           #label: '-'
       
  1191                       )
       
  1192 "/                       #(#MenuItem
       
  1193 "/                          #label: 'Fonts'
       
  1194 "/                          #submenuChannel: #menuFont
       
  1195 "/                      )
       
  1196 "/                       #(#MenuItem
       
  1197 "/                          #label: '-'
       
  1198 "/                      )
       
  1199                        #(#MenuItem
       
  1200                           #label: 'Undo Manager...'
       
  1201                           #translateLabel: true
       
  1202                           #value: #openUndoMenu
       
  1203                           #activeHelpKey: #settingsUndoManager
       
  1204                           #enabled: #hasUndoHistory
       
  1205                       )
       
  1206                        #(#MenuItem
       
  1207                           #label: 'Grid Manager...'
       
  1208                           #translateLabel: true
       
  1209                           #value: #doDefineGrid
       
  1210                           #activeHelpKey: #settingsGridManager
       
  1211                       )
       
  1212                     ) nil
       
  1213                     nil
       
  1214                 )
       
  1215             )
       
  1216              #(#MenuItem
       
  1217                 #label: 'History'
       
  1218                 #translateLabel: true
       
  1219                 #activeHelpKey: #history
       
  1220                 #submenuChannel: #menuHistory
       
  1221             )
       
  1222              #(#MenuItem
       
  1223                 #label: 'Help'
       
  1224                 #translateLabel: true
       
  1225                 #startGroup: #right
       
  1226                 #activeHelpKey: #help
       
  1227                 #submenu: 
       
  1228                  #(#Menu
       
  1229                     
       
  1230                      #(
       
  1231                        #(#MenuItem
       
  1232                           #label: 'Tutorial'
       
  1233                           #translateLabel: true
       
  1234                           #value: #openHTMLDocument:
       
  1235                           #activeHelpKey: #helpTutorial
       
  1236                           #argument: 'tools/uipainter/TOP.html'
       
  1237                       )
       
  1238                        #(#MenuItem
       
  1239                           #label: '-'
       
  1240                       )
       
  1241                        #(#MenuItem
       
  1242                           #label: 'Functions'
       
  1243                           #translateLabel: true
       
  1244                           #value: #openHTMLDocument:
       
  1245                           #activeHelpKey: #helpFunctions
       
  1246                           #argument: 'tools/uipainter/Functions.html'
       
  1247                       )
       
  1248                        #(#MenuItem
       
  1249                           #label: 'Examples'
       
  1250                           #translateLabel: true
       
  1251                           #value: #openHTMLDocument:
       
  1252                           #activeHelpKey: #helpExamples
       
  1253                           #argument: 'tools/uipainter/Examples.html'
       
  1254                       )
       
  1255                        #(#MenuItem
       
  1256                           #label: '-'
       
  1257                       )
       
  1258                        #(#MenuItem
       
  1259                           #label: 'Help Tool'
       
  1260                           #translateLabel: true
       
  1261                           #value: #openHTMLDocument:
       
  1262                           #activeHelpKey: #helpHelpTool
       
  1263                           #argument: 'tools/uipainter/HelpTool.html'
       
  1264                       )
       
  1265                        #(#MenuItem
       
  1266                           #label: 'Layout Tool'
       
  1267                           #translateLabel: true
       
  1268                           #value: #openHTMLDocument:
       
  1269                           #activeHelpKey: #helpLayoutTool
       
  1270                           #argument: 'tools/uipainter/LayoutTool.html'
       
  1271                       )
       
  1272                        #(#MenuItem
       
  1273                           #label: '-'
       
  1274                       )
       
  1275                        #(#MenuItem
       
  1276                           #label: 'Selected Widget'
       
  1277                           #translateLabel: true
       
  1278                           #value: #doOpenWidgetDocumentation
       
  1279                           #activeHelpKey: #helpSelectedWidget
       
  1280                       )
       
  1281                        #(#MenuItem
       
  1282                           #label: '-'
       
  1283                       )
       
  1284                        #(#MenuItem
       
  1285                           #label: 'Show Help Texts'
       
  1286                           #translateLabel: true
       
  1287                           #activeHelpKey: #helpShowHelp
       
  1288                           #indication: #showingHelp:
       
  1289                       )
       
  1290              #(#MenuItem
       
  1291                 #label: '-'
       
  1292             )
       
  1293              #(#MenuItem
       
  1294                 #label: 'About this Application...'
       
  1295                 #translateLabel: true
       
  1296                 #value: #openAboutThisApplication
       
  1297                 #activeHelpKey: #aboutThisAppliaction
       
  1298             )
       
  1299                     ) nil
       
  1300                     nil
       
  1301                 )
       
  1302             )
       
  1303           ) nil
       
  1304           nil
       
  1305       )
  1303       )
  1306 
       
  1307     "Modified: / 23.8.1998 / 16:09:22 / cg"
       
  1308 !
  1304 !
  1309 
  1305 
  1310 menuAlign
  1306 menuAlign
  1311     "This resource specification was automatically generated
  1307     "This resource specification was automatically generated
  1312      by the MenuEditor of ST/X."
  1308      by the MenuEditor of ST/X."
  1973     "returns the aspect for aKey"
  1969     "returns the aspect for aKey"
  1974 
  1970 
  1975     ^aspects at:aKey ifAbsent:[ super aspectFor:aKey ]
  1971     ^aspects at:aKey ifAbsent:[ super aspectFor:aKey ]
  1976 !
  1972 !
  1977 
  1973 
       
  1974 autoAcceptOnSelectionChange
       
  1975     ^ builder valueAspectFor:#autoAcceptOnSelectionChange initialValue:true
       
  1976 !
       
  1977 
  1978 canChangeOrderInContainer
  1978 canChangeOrderInContainer
  1979     "returns a boolean value holder which is true if the widget order can be changed 
  1979     "returns a boolean value holder which is true if the widget order can be changed 
  1980      within their container"
  1980      within their container"
  1981 
  1981 
  1982     ^ builder booleanValueAspectFor:#canChangeOrderInContainer
  1982     ^ builder booleanValueAspectFor:#canChangeOrderInContainer
  2384         self setViewInLayoutTool:(property view) spec:spec.
  2384         self setViewInLayoutTool:(property view) spec:spec.
  2385         self clearModifiedFlag
  2385         self clearModifiedFlag
  2386     ] ifFalse:[
  2386     ] ifFalse:[
  2387         self layoutTool layoutView notNil ifTrue:[
  2387         self layoutTool layoutView notNil ifTrue:[
  2388             self clearModifiedFlag.
  2388             self clearModifiedFlag.
  2389             self treeSelection
  2389             self treeSelectionChanged
  2390         ]
  2390         ]
  2391     ]
  2391     ]
  2392 !
  2392 !
  2393 
  2393 
  2394 update:something with:aParameter from:someObject
  2394 update:something with:aParameter from:someObject
  2395     "catches change notifications"
  2395     "catches change notifications"
  2396 
  2396 
  2397     |window|
  2397     |window lbl|
  2398 
  2398 
  2399     someObject == treeView model ifTrue:[
  2399     someObject == treeView model ifTrue:[
  2400 	(something == #selection
  2400         (something == #selection
  2401 	or:[something == #selectionIndex]) ifTrue:[self treeSelection].
  2401         or:[something == #selectionIndex]) ifTrue:[self treeSelectionChanged].
  2402       ^ self
  2402       ^ self
  2403     ].
  2403     ].
  2404 
  2404 
  2405     someObject == self galleryShown ifTrue:[
  2405     someObject == self galleryShown ifTrue:[
  2406 	"/ galleryShown toggle changed
  2406         "/ galleryShown toggle changed
  2407 	window := selectionPanel window.
  2407         window := selectionPanel window.
  2408 	(someObject value) ifTrue:[
  2408         (someObject value) ifTrue:[
  2409 	    self raiseUIView:window
  2409             self raiseUIView:window
  2410 	] ifFalse:[
  2410         ] ifFalse:[
  2411 	    self hideUIView:window
  2411             self hideUIView:window
  2412 	].
  2412         ].
  2413       ^ self
  2413       ^ self
  2414     ].
  2414     ].
  2415 
  2415 
  2416     someObject == self painterShown ifTrue:[
  2416     someObject == self painterShown ifTrue:[
  2417 	"/ canvasShown toggle changed
  2417         "/ canvasShown toggle changed
  2418 	window := self painter topView.
  2418         window := self painter topView.
  2419 	(someObject value) ifTrue:[
  2419         (someObject value) ifTrue:[
  2420 	    self raiseUIView:window
  2420             self raiseUIView:window
  2421 	] ifFalse:[
  2421         ] ifFalse:[
  2422 	    self hideUIView:window
  2422             self hideUIView:window
  2423 	].
  2423         ].
  2424       ^ self
  2424       ^ self
       
  2425     ].
       
  2426 
       
  2427     someObject == self autoAcceptOnSelectionChange ifTrue:[
       
  2428         lbl := someObject value ifTrue:['Apply'] ifFalse:['OK'].
       
  2429         (builder componentAt:'acceptButton') label:(resources string:lbl).
       
  2430         ^ self
  2425     ].
  2431     ].
  2426 
  2432 
  2427     "Modified: / 16.7.1998 / 19:09:57 / cg"
  2433     "Modified: / 16.7.1998 / 19:09:57 / cg"
  2428 !
  2434 !
  2429 
  2435 
  2535     |painter|
  2541     |painter|
  2536 
  2542 
  2537     painter := self painter.
  2543     painter := self painter.
  2538 
  2544 
  2539     self askForSectionModification.    
  2545     self askForSectionModification.    
  2540 
       
  2541 
  2546 
  2542     (modified or: [painter isModified or: [self helpTool modified]])
  2547     (modified or: [painter isModified or: [self helpTool modified]])
  2543     ifTrue:[
  2548     ifTrue:[
  2544         ((YesNoBox title:(resources string:'Window Spec was modified !!'))        
  2549         ((YesNoBox title:(resources string:'Window Spec was modified !!'))        
  2545             noText:(resources string:'Cancel');
  2550             noText:(resources string:'Cancel');
  2862     self painter copySelection.
  2867     self painter copySelection.
  2863     self updateChannels.
  2868     self updateChannels.
  2864 !
  2869 !
  2865 
  2870 
  2866 selectionChangeAllowed:newSelection
  2871 selectionChangeAllowed:newSelection
  2867     self askForUnsavedModifications ifFalse:[^ false].
  2872     self isModified ifFalse:[^ true].
       
  2873 
       
  2874     self autoAcceptOnSelectionChange value ifTrue:[
       
  2875         self accept
       
  2876     ] ifFalse:[
       
  2877         self askForUnsavedModifications ifFalse:[^ false].
       
  2878     ].
  2868     ^ true
  2879     ^ true
  2869 !
  2880 !
  2870 
  2881 
  2871 tabSelection
  2882 tabSelection
  2872     "returns the label of the current section in the notebook"
  2883     "returns the label of the current section in the notebook"
  2879 
  2890 
  2880     (something isNil or:[tabSelection = something]) ifTrue:[
  2891     (something isNil or:[tabSelection = something]) ifTrue:[
  2881         ^ self
  2892         ^ self
  2882     ].
  2893     ].
  2883 
  2894 
  2884     self askForUnsavedModifications ifFalse:[^ self].
  2895     self autoAcceptOnSelectionChange value ifTrue:[
       
  2896         self accept
       
  2897     ] ifFalse:[
       
  2898         self askForUnsavedModifications ifFalse:[^ self].
       
  2899     ].
  2885 
  2900 
  2886     tabSelection := something.
  2901     tabSelection := something.
  2887     self raiseTabView.
  2902     self raiseTabView.
  2888     self cancel.
  2903     self cancel.
  2889 !
  2904 !
  2890 
  2905 
  2891 treeSelection
  2906 treeSelectionChanged
  2892     "called whenever the selection of the treeview has changed"
  2907     "called whenever the selection of the treeview has changed"
  2893 
  2908 
  2894     |view spec property|
  2909     |view spec property|
  2895 
  2910 
  2896     self askForUnsavedModifications ifFalse:[^ self].
  2911     self askForUnsavedModifications ifFalse:[^ self].
  3213         self setClass:cls selector:sel.
  3228         self setClass:cls selector:sel.
  3214 
  3229 
  3215         (cls respondsTo:sel) ifTrue:[  
  3230         (cls respondsTo:sel) ifTrue:[  
  3216             painter setupFromSpec:(cls perform:sel).
  3231             painter setupFromSpec:(cls perform:sel).
  3217         ]
  3232         ]
       
  3233     ].
       
  3234 
       
  3235     self autoAcceptOnSelectionChange addDependent:self.
       
  3236     self autoAcceptOnSelectionChange value ifTrue:[
       
  3237         (builder componentAt:'acceptButton') label:(resources string:'Apply')
  3218     ].
  3238     ].
  3219 
  3239 
  3220     "Modified: / 22.8.1998 / 17:41:34 / cg"
  3240     "Modified: / 22.8.1998 / 17:41:34 / cg"
  3221 !
  3241 !
  3222 
  3242 
  3365         self helpTool helpKey:key.
  3385         self helpTool helpKey:key.
  3366 
  3386 
  3367         treeView isCanvasSelected ifTrue: [
  3387         treeView isCanvasSelected ifTrue: [
  3368             spec := treeView canvasSpec.
  3388             spec := treeView canvasSpec.
  3369         ].
  3389         ].
       
  3390 
  3370         self specTool specification:spec.
  3391         self specTool specification:spec.
  3371         view := self layoutTool layoutView.
  3392         view := self layoutTool layoutView.
  3372 
  3393 
  3373         self setViewInLayoutTool:view spec:spec.
  3394         self setViewInLayoutTool:view spec:spec.
  3374         spec class == DataSetSpec ifTrue:[
  3395         spec class == DataSetSpec ifTrue:[
  3375             view notNil ifTrue:[
  3396             view notNil ifTrue:[
  3376                 view columnDescriptors:(spec columns)
  3397                 view columnDescriptors:(spec columns)
  3377             ]
  3398             ]
  3378         ].        
  3399         ].        
  3379         self clearModifiedFlag.
  3400         self clearModifiedFlag.
  3380         modified := false
  3401         modified := false.
  3381     ]
  3402     ]
  3382 !
  3403 !
  3383 
  3404 
  3384 doBrowseAspectMethods
  3405 doBrowseAspectMethods
  3385     "opens a browser on the aspect methods"
  3406     "opens a browser on the aspect methods"
  3695     specClass := specSelector := nil.
  3716     specClass := specSelector := nil.
  3696     self painter removeAll.
  3717     self painter removeAll.
  3697     treeView canvas topView name:  UIPainter defaultNameOfCanvas.
  3718     treeView canvas topView name:  UIPainter defaultNameOfCanvas.
  3698     treeView canvas topView label: UIPainter defaultNameOfCanvas.
  3719     treeView canvas topView label: UIPainter defaultNameOfCanvas.
  3699     self helpTool doNew.
  3720     self helpTool doNew.
  3700     self treeSelection.
  3721     self treeSelectionChanged.
  3701     treeView selectedNode changed.
  3722     treeView selectedNode changed.
  3702     self tabModel value: self tabList value first.
  3723     self tabModel value: self tabList value first.
  3703     self updateInfoLabel.
  3724     self updateInfoLabel.
  3704 !
  3725 !
  3705 
  3726 
  4154     aWindowSpec setAttributesIn:canvasView with:builder.
  4175     aWindowSpec setAttributesIn:canvasView with:builder.
  4155 
  4176 
  4156     name := aWindowSpec label.
  4177     name := aWindowSpec label.
  4157     canvasView topView name:name.
  4178     canvasView topView name:name.
  4158     self canvasNameChanged:name.
  4179     self canvasNameChanged:name.
  4159     self application treeSelection.
  4180     self application treeSelectionChanged.
  4160 ! !
  4181 ! !
  4161 
  4182 
  4162 !UIPainter::TreeView methodsFor:'canvas selection'!
  4183 !UIPainter::TreeView methodsFor:'canvas selection'!
  4163 
  4184 
  4164 cvsSelection:aSelection
  4185 cvsSelection:aSelection