874 ) |
640 ) |
875 ! ! |
641 ! ! |
876 |
642 |
877 !UIPainter class methodsFor:'menu specs'! |
643 !UIPainter class methodsFor:'menu specs'! |
878 |
644 |
879 menuAlignment |
645 menu |
880 "this window spec was automatically generated by the ST/X MenuEditor" |
646 "this window spec was automatically generated by the ST/X MenuEditor" |
881 |
647 |
882 "do not manually edit this - the builder may not be able to |
648 "do not manually edit this - the builder may not be able to |
883 handle the specification if its corrupted." |
649 handle the specification if its corrupted." |
884 |
650 |
885 " |
651 " |
886 MenuEditor new openOnClass:UIPainter andSelector:#menuAlignment |
652 MenuEditor new openOnClass:UIPainter andSelector:#menu |
887 (Menu new fromLiteralArrayEncoding:(UIPainter menuAlignment)) startUp |
653 (Menu new fromLiteralArrayEncoding:(UIPainter menu)) startUp |
888 " |
654 " |
889 |
655 |
890 <resource: #menu> |
656 <resource: #menu> |
891 |
657 |
892 ^ |
658 ^ |
893 |
659 |
894 #(#Menu |
660 #(#Menu |
895 |
661 |
896 #( |
662 #( |
897 #(#MenuItem |
663 #(#MenuItem |
898 #'label:' 'align left' |
664 #'label:' 'About' |
899 #'isButton:' true |
665 #'labelImage:' #(#ResourceRetriever nil #icon) |
900 #'value:' #alignSelectionLeft |
666 #'submenuChannel:' #menuAbout |
901 #'activeHelpKey:' #alignSelectionLeft |
667 ) |
902 #'labelImage:' #(#ResourceRetriever nil #iconAlignL) |
668 #(#MenuItem |
903 ) |
669 #'label:' 'File' |
904 #(#MenuItem |
|
905 #'label:' 'align right' |
|
906 #'isButton:' true |
|
907 #'value:' #alignSelectionRight |
|
908 #'activeHelpKey:' #alignSelectionRight |
|
909 #'labelImage:' #(#ResourceRetriever nil #iconAlignR) |
|
910 ) |
|
911 #(#MenuItem |
|
912 #'label:' 'align left & right' |
|
913 #'isButton:' true |
|
914 #'value:' #alignSelectionLeftAndRight |
|
915 #'activeHelpKey:' #alignSelectionLeftAndRight |
|
916 #'labelImage:' #(#ResourceRetriever nil #iconAlignLR) |
|
917 ) |
|
918 #(#MenuItem |
|
919 #'label:' '-' |
|
920 ) |
|
921 #(#MenuItem |
|
922 #'label:' 'align top' |
|
923 #'isButton:' true |
|
924 #'value:' #alignSelectionTop |
|
925 #'activeHelpKey:' #alignSelectionTop |
|
926 #'labelImage:' #(#ResourceRetriever nil #iconAlignT) |
|
927 ) |
|
928 #(#MenuItem |
|
929 #'label:' 'align bottom' |
|
930 #'isButton:' true |
|
931 #'value:' #alignSelectionBottom |
|
932 #'activeHelpKey:' #alignSelectionBottom |
|
933 #'labelImage:' #(#ResourceRetriever nil #iconAlignB) |
|
934 ) |
|
935 #(#MenuItem |
|
936 #'label:' 'align top & bottom' |
|
937 #'isButton:' true |
|
938 #'value:' #alignSelectionTopAndBottom |
|
939 #'activeHelpKey:' #alignSelectionTopAndBottom |
|
940 #'labelImage:' #(#ResourceRetriever nil #iconAlignTB) |
|
941 ) |
|
942 #(#MenuItem |
|
943 #'label:' '-' |
|
944 ) |
|
945 #(#MenuItem |
|
946 #'label:' 'align centered horizontal' |
|
947 #'isButton:' true |
|
948 #'value:' #alignSelectionCenterHor |
|
949 #'activeHelpKey:' #alignSelectionCenterHor |
|
950 #'labelImage:' #(#ResourceRetriever nil #iconAlignCenterH) |
|
951 ) |
|
952 #(#MenuItem |
|
953 #'label:' 'align centered vertical' |
|
954 #'isButton:' true |
|
955 #'value:' #alignSelectionCenterVer |
|
956 #'activeHelpKey:' #alignSelectionCenterVer |
|
957 #'labelImage:' #(#ResourceRetriever nil #iconAlignCenterV) |
|
958 ) |
|
959 ) nil |
|
960 nil |
|
961 ) |
|
962 ! |
|
963 |
|
964 menuCanvas |
|
965 "this window spec was automatically generated by the ST/X MenuEditor" |
|
966 |
|
967 "do not manually edit this - the builder may not be able to |
|
968 handle the specification if its corrupted." |
|
969 |
|
970 " |
|
971 MenuEditor new openOnClass:UIPainter andSelector:#menuCanvas |
|
972 (Menu new fromLiteralArrayEncoding:(UIPainter menuCanvas)) startUp |
|
973 " |
|
974 |
|
975 <resource: #menu> |
|
976 |
|
977 ^ |
|
978 |
|
979 #(#Menu |
|
980 #( |
|
981 #(#MenuItem |
|
982 #'label:' 'copy' |
|
983 #'value:' #copySelection |
|
984 #'enabled:' #hasSelection |
|
985 #'shortcutKeyCharacter:' #Copy |
|
986 ) |
|
987 #(#MenuItem |
|
988 #'label:' 'cut' |
|
989 #'value:' #deleteSelection |
|
990 #'enabled:' #hasSelection |
|
991 #'shortcutKeyCharacter:' #Cut |
|
992 ) |
|
993 #(#MenuItem |
|
994 #'label:' 'paste' |
|
995 #'nameKey:' #paste |
|
996 #'enabled:' #canPaste |
|
997 #'value:' #paste |
|
998 #'submenu:' |
|
999 #(#Menu |
|
1000 |
|
1001 #( |
|
1002 #(#MenuItem |
|
1003 #'label:' 'paste' |
|
1004 #'value:' #pasteBuffer |
|
1005 #'activeHelpKey:' #pasteBuffer |
|
1006 #'shortcutKeyCharacter:' #Paste |
|
1007 ) |
|
1008 #(#MenuItem |
|
1009 #'label:' 'keep layout' |
|
1010 #'value:' #pasteWithLayout |
|
1011 #'enabled:' #canKeepLayoutInSelection |
|
1012 #'activeHelpKey:' #pasteWithLayout |
|
1013 ) |
|
1014 ) nil |
|
1015 nil |
|
1016 ) |
|
1017 ) |
|
1018 #(#MenuItem |
|
1019 #'label:' '-' |
|
1020 ) |
|
1021 #(#MenuItem |
|
1022 #'label:' 'undo' |
|
1023 #'nameKey:' #undo |
|
1024 #'enabled:' #hasUndoHistory |
|
1025 #'shortcutKeyCharacter:' #Cmdu |
|
1026 #'value:' #undoLast |
|
1027 ) |
|
1028 #(#MenuItem |
|
1029 #'label:' '-' |
|
1030 ) |
|
1031 #(#MenuItem |
|
1032 #'label:' 'dimension' |
|
1033 #'value:' #dimension |
|
1034 #'enabled:' #hasSelection |
|
1035 #'submenu:' |
|
1036 #(#Menu |
|
1037 |
|
1038 #( |
|
1039 #(#MenuItem |
|
1040 #'label:' 'default extent' |
|
1041 #'value:' #setToDefaultExtent |
|
1042 #'enabled:' #canMoveOrAlignSelection |
|
1043 #'activeHelpKey:' #setToDefaultExtent |
|
1044 ) |
|
1045 #(#MenuItem |
|
1046 #'label:' 'default width' |
|
1047 #'value:' #setToDefaultWidth |
|
1048 #'enabled:' #canMoveOrAlignSelection |
|
1049 #'activeHelpKey:' #setToDefaultWidth |
|
1050 ) |
|
1051 #(#MenuItem |
|
1052 #'label:' 'default height' |
|
1053 #'value:' #setToDefaultHeight |
|
1054 #'enabled:' #canMoveOrAlignSelection |
|
1055 #'activeHelpKey:' #setToDefaultHeight |
|
1056 ) |
|
1057 #(#MenuItem |
|
1058 #'label:' 'copy extent' |
|
1059 #'value:' #copyExtent |
|
1060 #'enabled:' #hasSingleSelection |
|
1061 #'activeHelpKey:' #copyExtent |
|
1062 ) |
|
1063 #(#MenuItem |
|
1064 #'label:' 'paste extent' |
|
1065 #'value:' #pasteExtent |
|
1066 #'enabled:' #canMoveOrAlignSelection |
|
1067 #'activeHelpKey:' #pasteExtent |
|
1068 ) |
|
1069 #(#MenuItem |
|
1070 #'label:' 'paste width' |
|
1071 #'value:' #pasteWidth |
|
1072 #'enabled:' #canMoveOrAlignSelection |
|
1073 #'activeHelpKey:' #pasteWidth |
|
1074 ) |
|
1075 #(#MenuItem |
|
1076 #'label:' 'paste height' |
|
1077 #'value:' #pasteHeight |
|
1078 #'enabled:' #canMoveOrAlignSelection |
|
1079 #'activeHelpKey:' #pasteHeight |
|
1080 ) |
|
1081 #(#MenuItem |
|
1082 #'label:' 'copy layout' |
|
1083 #'value:' #copyLayout |
|
1084 #'enabled:' #hasSingleSelection |
|
1085 #'activeHelpKey:' #copyLayout |
|
1086 ) |
|
1087 #(#MenuItem |
|
1088 #'label:' 'paste layout' |
|
1089 #'value:' #pasteLayout |
|
1090 #'enabled:' #canMoveOrAlignSelection |
|
1091 #'activeHelpKey:' #pasteLayout |
|
1092 ) |
|
1093 ) |
|
1094 #(3 1 3) |
|
1095 nil |
|
1096 ) |
|
1097 ) |
|
1098 #(#MenuItem |
|
1099 #'label:' 'align' |
|
1100 #'value:' #align |
|
1101 #'enabled:' #canMoveOrAlignSelection |
|
1102 #'submenu:' |
|
1103 #(#Menu |
|
1104 |
|
1105 #( |
|
1106 #(#MenuItem |
|
1107 #'label:' 'align left' |
|
1108 #'value:' #alignSelectionLeft |
|
1109 #'activeHelpKey:' #alignSelectionLeft |
|
1110 #'labelImage:' |
|
1111 #(#ResourceRetriever |
|
1112 #UIPainter #iconAlignL |
|
1113 'align left' |
|
1114 ) |
|
1115 ) |
|
1116 #(#MenuItem |
|
1117 #'label:' 'align right' |
|
1118 #'value:' #alignSelectionRight |
|
1119 #'activeHelpKey:' #alignSelectionRight |
|
1120 #'labelImage:' |
|
1121 #(#ResourceRetriever |
|
1122 #UIPainter #iconAlignR |
|
1123 'align right' |
|
1124 ) |
|
1125 ) |
|
1126 #(#MenuItem |
|
1127 #'label:' 'align left & right' |
|
1128 #'value:' #alignSelectionLeftAndRight |
|
1129 #'activeHelpKey:' #alignSelectionLeftAndRight |
|
1130 #'labelImage:' |
|
1131 #(#ResourceRetriever |
|
1132 #UIPainter #iconAlignLR |
|
1133 'align left & right' |
|
1134 ) |
|
1135 ) |
|
1136 #(#MenuItem |
|
1137 #'label:' 'align top' |
|
1138 #'value:' #alignSelectionTop |
|
1139 #'activeHelpKey:' #alignSelectionTop |
|
1140 #'labelImage:' |
|
1141 #(#ResourceRetriever |
|
1142 #UIPainter #iconAlignT |
|
1143 'align top' |
|
1144 ) |
|
1145 ) |
|
1146 #(#MenuItem |
|
1147 #'label:' 'align bottom' |
|
1148 #'value:' #alignSelectionBottom |
|
1149 #'activeHelpKey:' #alignSelectionBottom |
|
1150 #'labelImage:' |
|
1151 #(#ResourceRetriever |
|
1152 #UIPainter #iconAlignB |
|
1153 'align bottom' |
|
1154 ) |
|
1155 ) |
|
1156 #(#MenuItem |
|
1157 #'label:' 'align top & bottom' |
|
1158 #'value:' #alignSelectionTopAndBottom |
|
1159 #'activeHelpKey:' #alignSelectionTopAndBottom |
|
1160 #'labelImage:' |
|
1161 #(#ResourceRetriever |
|
1162 #UIPainter #iconAlignTB |
|
1163 'align top & bottom' |
|
1164 ) |
|
1165 ) |
|
1166 #(#MenuItem |
|
1167 #'label:' 'align centered horizontal' |
|
1168 #'value:' #alignSelectionCenterHor |
|
1169 #'activeHelpKey:' #alignSelectionCenterHor |
|
1170 #'labelImage:' |
|
1171 #(#ResourceRetriever |
|
1172 #UIPainter #iconAlignCenterH |
|
1173 'align centered horizontal' |
|
1174 ) |
|
1175 ) |
|
1176 #(#MenuItem |
|
1177 #'label:' 'align centered vertical' |
|
1178 #'value:' #alignSelectionCenterVer |
|
1179 #'activeHelpKey:' #alignSelectionCenterVer |
|
1180 #'labelImage:' |
|
1181 #(#ResourceRetriever |
|
1182 #UIPainter #iconAlignCenterV |
|
1183 'align centered vertical' |
|
1184 ) |
|
1185 ) |
|
1186 #(#MenuItem |
|
1187 #'label:' 'spread horizontal' |
|
1188 #'value:' #spreadSelectionHor |
|
1189 #'activeHelpKey:' #spreadSelectionHor |
|
1190 ) |
|
1191 #(#MenuItem |
|
1192 #'label:' 'spread vertical' |
|
1193 #'value:' #spreadSelectionVer |
|
1194 #'activeHelpKey:' #spreadSelectionVer |
|
1195 ) |
|
1196 #(#MenuItem |
|
1197 #'label:' 'center horizontal in frame' |
|
1198 #'value:' #centerSelectionHor |
|
1199 #'activeHelpKey:' #centerSelectionHor |
|
1200 ) |
|
1201 #(#MenuItem |
|
1202 #'label:' 'center vertical in frame' |
|
1203 #'value:' #centerSelectionVer |
|
1204 #'activeHelpKey:' #centerSelectionVer |
|
1205 ) |
|
1206 ) |
|
1207 #(8 2) |
|
1208 nil |
|
1209 ) |
|
1210 ) |
|
1211 ) nil |
|
1212 nil |
|
1213 ) |
|
1214 |
|
1215 |
|
1216 ! |
|
1217 |
|
1218 menuChangeHierarchy |
|
1219 "this window spec was automatically generated by the ST/X MenuEditor" |
|
1220 |
|
1221 "do not manually edit this - the builder may not be able to |
|
1222 handle the specification if its corrupted." |
|
1223 |
|
1224 " |
|
1225 MenuEditor new openOnClass:UIPainter andSelector:#menuChangeHierarchy |
|
1226 (Menu new fromLiteralArrayEncoding:(UIPainter menuChangeHierarchy)) startUp |
|
1227 " |
|
1228 |
|
1229 <resource: #menu> |
|
1230 |
|
1231 ^ |
|
1232 |
|
1233 #(#Menu |
|
1234 |
|
1235 #( |
|
1236 #(#MenuItem |
|
1237 #'label:' 'stepUp' |
|
1238 #'isButton:' true |
|
1239 #'value:' #doStepUp |
|
1240 #'labelImage:' #(#ResourceRetriever #UIPainter #iconStepUp) |
|
1241 ) |
|
1242 #(#MenuItem |
|
1243 #'label:' 'stepDown' |
|
1244 #'isButton:' true |
|
1245 #'value:' #doStepDown |
|
1246 #'labelImage:' #(#ResourceRetriever #UIPainter #iconStepDown) |
|
1247 ) |
|
1248 #(#MenuItem |
|
1249 #'label:' 'stepIn' |
|
1250 #'isButton:' true |
|
1251 #'value:' #doStepIn |
|
1252 #'enabled:' #canMoveSelectionIntoContainer |
|
1253 #'labelImage:' #(#ResourceRetriever #UIPainter #iconStepIn) |
|
1254 ) |
|
1255 #(#MenuItem |
|
1256 #'label:' 'stepOut' |
|
1257 #'isButton:' true |
|
1258 #'value:' #doStepOut |
|
1259 #'enabled:' #canMoveSelectionOutOfContainer |
|
1260 #'labelImage:' #(#ResourceRetriever #UIPainter #iconStepOut) |
|
1261 ) |
|
1262 ) nil |
|
1263 nil |
|
1264 ) |
|
1265 ! |
|
1266 |
|
1267 menuPullDown |
|
1268 "this window spec was automatically generated by the ST/X MenuEditor" |
|
1269 |
|
1270 "do not manually edit this - the builder may not be able to |
|
1271 handle the specification if its corrupted." |
|
1272 |
|
1273 " |
|
1274 MenuEditor new openOnClass:UIPainter andSelector:#menuPullDown |
|
1275 (Menu new fromLiteralArrayEncoding:(UIPainter menuPullDown)) startUp |
|
1276 " |
|
1277 |
|
1278 <resource: #menu> |
|
1279 |
|
1280 ^ |
|
1281 |
|
1282 #(#Menu |
|
1283 |
|
1284 #( |
|
1285 #(#MenuItem |
|
1286 #'label:' 'file' |
|
1287 #'value:' #file |
670 #'value:' #file |
1288 #'enabled:' #enableChannel |
671 #'enabled:' #enableChannel |
1289 #'submenu:' |
672 #'submenu:' |
1290 #(#Menu |
673 #(#Menu |
1291 |
674 |
1292 #( |
675 #( |
1293 #(#MenuItem |
676 #(#MenuItem |
1294 #'label:' 'new' |
677 #'label:' 'New' |
1295 #'value:' #doNew |
678 #'value:' #doNew |
1296 ) |
679 ) |
1297 #(#MenuItem |
680 #(#MenuItem |
1298 #'label:' 'from class ...' |
681 #'label:' '-' |
|
682 ) |
|
683 #(#MenuItem |
|
684 #'label:' 'Load From Class...' |
1299 #'value:' #doFromClass |
685 #'value:' #doFromClass |
1300 ) |
686 ) |
1301 #(#MenuItem |
687 #(#MenuItem |
1302 #'label:' 'pick a view ' |
688 #'label:' 'Load From Class With Superclass...' |
|
689 #'value:' #loadFromClassWithSuperclass |
|
690 ) |
|
691 #(#MenuItem |
|
692 #'label:' '-' |
|
693 ) |
|
694 #(#MenuItem |
|
695 #'label:' 'Define Class And Selector...' |
|
696 #'value:' #defineClassAndSelector |
|
697 ) |
|
698 #(#MenuItem |
|
699 #'label:' '-' |
|
700 ) |
|
701 #(#MenuItem |
|
702 #'label:' 'Save Window Spec' |
|
703 #'value:' #doInstallSpec |
|
704 ) |
|
705 #(#MenuItem |
|
706 #'label:' 'Save Help Spec' |
|
707 #'value:' #doInstallHelp |
|
708 #'enabled:' #hasSpecClass |
|
709 ) |
|
710 #(#MenuItem |
|
711 #'label:' '-' |
|
712 ) |
|
713 #(#MenuItem |
|
714 #'label:' 'Create Aspect Methods' |
|
715 #'value:' #doInstallAspects |
|
716 #'enabled:' #hasSpecClass |
|
717 ) |
|
718 #(#MenuItem |
|
719 #'label:' 'Create Hook Methods' |
|
720 #'value:' #doInstallHooks |
|
721 ) |
|
722 #(#MenuItem |
|
723 #'label:' '-' |
|
724 ) |
|
725 #(#MenuItem |
|
726 #'label:' 'Show Window Spec' |
|
727 #'value:' #doWindowSpec |
|
728 ) |
|
729 #(#MenuItem |
|
730 #'label:' 'Browse Application' |
|
731 #'value:' #doBrowseAppClass |
|
732 #'enabled:' #hasSpecClass |
|
733 ) |
|
734 #(#MenuItem |
|
735 #'label:' 'Browse Aspect Methods' |
|
736 #'value:' #doBrowseAspectMethods |
|
737 ) |
|
738 #(#MenuItem |
|
739 #'label:' '-' |
|
740 ) |
|
741 #(#MenuItem |
|
742 #'label:' 'Pick a View ' |
1303 #'value:' #doPickAView |
743 #'value:' #doPickAView |
1304 ) |
744 ) |
1305 #(#MenuItem |
745 #(#MenuItem |
1306 #'label:' '-' |
746 #'label:' '-' |
1307 ) |
747 ) |
1308 #(#MenuItem |
748 #(#MenuItem |
1309 #'label:' 'quit' |
749 #'label:' 'Exit' |
1310 #'value:' #closeRequest |
750 #'value:' #closeRequest |
1311 ) |
751 ) |
1312 ) nil |
752 ) nil |
1313 nil |
753 nil |
1314 ) |
754 ) |
1315 ) |
755 ) |
1316 #(#MenuItem |
756 #(#MenuItem |
1317 #'label:' 'misc' |
757 #'label:' 'Edit' |
1318 #'value:' #misc |
758 #'submenuChannel:' #menuEdit |
1319 #'enabled:' #enableChannel |
759 ) |
|
760 #(#MenuItem |
|
761 #'label:' 'Align' |
|
762 #'submenuChannel:' #menuAlign |
|
763 ) |
|
764 #(#MenuItem |
|
765 #'label:' 'Test' |
1320 #'submenu:' |
766 #'submenu:' |
1321 #(#Menu |
767 #(#Menu |
1322 |
768 |
1323 #( |
769 #( |
1324 #(#MenuItem |
770 #(#MenuItem |
1325 #'label:' 'grid' |
771 #'label:' 'Geometry Test Mode' |
1326 #'value:' #grid |
772 #'indication:' #'testMode:' |
1327 #'submenu:' |
|
1328 #(#Menu |
|
1329 |
|
1330 #( |
|
1331 #(#MenuItem |
|
1332 #'label:' 'show' |
|
1333 #'indication:' #'gridShown:' |
|
1334 ) |
|
1335 #(#MenuItem |
|
1336 #'label:' 'align' |
|
1337 #'indication:' #'gridAlign:' |
|
1338 ) |
|
1339 #(#MenuItem |
|
1340 #'label:' '-' |
|
1341 ) |
|
1342 #(#MenuItem |
|
1343 #'label:' 'menu' |
|
1344 #'value:' #gridMenu |
|
1345 ) |
|
1346 ) nil |
|
1347 nil |
|
1348 ) |
|
1349 ) |
|
1350 #(#MenuItem |
|
1351 #'label:' 'undo' |
|
1352 #'value:' #undo |
|
1353 #'submenu:' |
|
1354 #(#Menu |
|
1355 |
|
1356 #( |
|
1357 #(#MenuItem |
|
1358 #'label:' 'last' |
|
1359 #'value:' #undoLast |
|
1360 ) |
|
1361 #(#MenuItem |
|
1362 #'label:' 'menu' |
|
1363 #'value:' #openUndoMenu |
|
1364 ) |
|
1365 #(#MenuItem |
|
1366 #'label:' '-' |
|
1367 ) |
|
1368 #(#MenuItem |
|
1369 #'label:' 'delete' |
|
1370 #'value:' #removeUndoHistory |
|
1371 ) |
|
1372 ) nil |
|
1373 nil |
|
1374 ) |
|
1375 ) |
773 ) |
1376 ) nil |
774 ) nil |
1377 nil |
775 nil |
1378 ) |
776 ) |
1379 ) |
777 ) |
1380 #(#MenuItem |
778 #(#MenuItem |
1381 #'label:' 'code' |
779 #'label:' 'Settings' |
1382 #'value:' #code |
|
1383 #'enabled:' #enableChannel |
|
1384 #'submenu:' |
780 #'submenu:' |
1385 #(#Menu |
781 #(#Menu |
1386 |
782 |
1387 #( |
783 #( |
1388 #(#MenuItem |
784 #(#MenuItem |
1389 #'label:' 'class && method ...' |
785 #'label:' 'Undo Manager' |
1390 #'value:' #defineClassAndSelector |
786 #'value:' #openUndoMenu |
1391 ) |
787 ) |
1392 #(#MenuItem |
788 #(#MenuItem |
1393 #'label:' '-' |
789 #'label:' '-' |
1394 ) |
790 ) |
1395 #(#MenuItem |
791 #(#MenuItem |
1396 #'label:' 'install window spec.' |
792 #'label:' 'Grid Manager' |
1397 #'value:' #doInstallSpec |
793 #'value:' #gridMenu |
1398 ) |
|
1399 #(#MenuItem |
|
1400 #'label:' 'install aspects' |
|
1401 #'value:' #doInstallAspects |
|
1402 #'enabled:' #hasSpecClass |
|
1403 ) |
|
1404 #(#MenuItem |
|
1405 #'label:' 'install hooks' |
|
1406 #'value:' #doInstallHooks |
|
1407 ) |
|
1408 #(#MenuItem |
|
1409 #'label:' 'install help spec.' |
|
1410 #'value:' #doInstallHelp |
|
1411 #'enabled:' #hasSpecClass |
|
1412 ) |
|
1413 #(#MenuItem |
|
1414 #'label:' '-' |
|
1415 ) |
|
1416 #(#MenuItem |
|
1417 #'label:' 'show window spec.' |
|
1418 #'value:' #doWindowSpec |
|
1419 ) |
|
1420 #(#MenuItem |
|
1421 #'label:' 'browse application' |
|
1422 #'value:' #doBrowseAppClass |
|
1423 #'enabled:' #hasSpecClass |
|
1424 ) |
|
1425 #(#MenuItem |
|
1426 #'label:' 'browse aspect methods' |
|
1427 #'value:' #doBrowseAspectMethods |
|
1428 ) |
794 ) |
1429 ) nil |
795 ) nil |
1430 nil |
796 nil |
1431 ) |
797 ) |
1432 ) |
798 ) |
1433 #(#MenuItem |
799 #(#MenuItem |
1434 #'label:' 'test' |
800 #'label:' 'History' |
1435 #'nameKey:' #test |
801 #'submenuChannel:' #menuHistory |
1436 #'value:' #test |
802 ) |
|
803 #(#MenuItem |
|
804 #'label:' '' |
|
805 ) |
|
806 #(#MenuItem |
|
807 #'label:' 'Gallery' |
|
808 #'indication:' #galleryShown |
|
809 ) |
|
810 #(#MenuItem |
|
811 #'label:' 'Canvas' |
|
812 #'indication:' #painterShown |
|
813 ) |
|
814 ) nil |
|
815 nil |
|
816 ) |
|
817 ! |
|
818 |
|
819 menuAlign |
|
820 "this window spec was automatically generated by the ST/X MenuEditor" |
|
821 |
|
822 "do not manually edit this - the builder may not be able to |
|
823 handle the specification if its corrupted." |
|
824 |
|
825 " |
|
826 MenuEditor new openOnClass:UIPainter andSelector:#menuAlign |
|
827 (Menu new fromLiteralArrayEncoding:(UIPainter menuAlign)) startUp |
|
828 " |
|
829 |
|
830 <resource: #menu> |
|
831 |
|
832 ^ |
|
833 |
|
834 #(#Menu |
|
835 |
|
836 #( |
|
837 #(#MenuItem |
|
838 #'label:' 'Align Left' |
|
839 #'value:' #alignSelectionLeft |
|
840 #'activeHelpKey:' #alignSelectionLeft |
|
841 #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignL 'Align Left') |
|
842 ) |
|
843 #(#MenuItem |
|
844 #'label:' 'Align Right' |
|
845 #'value:' #alignSelectionRight |
|
846 #'activeHelpKey:' #alignSelectionRight |
|
847 #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignR 'Align Right') |
|
848 ) |
|
849 #(#MenuItem |
|
850 #'label:' 'Align Left & Right' |
|
851 #'value:' #alignSelectionLeftAndRight |
|
852 #'activeHelpKey:' #alignSelectionLeftAndRight |
|
853 #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignLR 'Align Left & Right') |
|
854 ) |
|
855 #(#MenuItem |
|
856 #'label:' 'Align top' |
|
857 #'value:' #alignSelectionTop |
|
858 #'activeHelpKey:' #alignSelectionTop |
|
859 #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignT 'Align top') |
|
860 ) |
|
861 #(#MenuItem |
|
862 #'label:' 'Align Bottom' |
|
863 #'value:' #alignSelectionBottom |
|
864 #'activeHelpKey:' #alignSelectionBottom |
|
865 #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignB 'Align Bottom') |
|
866 ) |
|
867 #(#MenuItem |
|
868 #'label:' 'Align Top & Bottom' |
|
869 #'value:' #alignSelectionTopAndBottom |
|
870 #'activeHelpKey:' #alignSelectionTopAndBottom |
|
871 #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignTB 'Align Top & Bottom') |
|
872 ) |
|
873 #(#MenuItem |
|
874 #'label:' 'Align Centered Horizontal' |
|
875 #'value:' #alignSelectionCenterHor |
|
876 #'activeHelpKey:' #alignSelectionCenterHor |
|
877 #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignCenterH 'Align Centered Horizontal') |
|
878 ) |
|
879 #(#MenuItem |
|
880 #'label:' 'Align Centered Vertical' |
|
881 #'value:' #alignSelectionCenterVer |
|
882 #'activeHelpKey:' #alignSelectionCenterVer |
|
883 #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignCenterV 'Align Centered Vertical') |
|
884 ) |
|
885 #(#MenuItem |
|
886 #'label:' '-' |
|
887 ) |
|
888 #(#MenuItem |
|
889 #'label:' 'Spread Horizontal' |
|
890 #'value:' #spreadSelectionHor |
|
891 #'activeHelpKey:' #spreadSelectionHor |
|
892 ) |
|
893 #(#MenuItem |
|
894 #'label:' 'Spread Vertical' |
|
895 #'value:' #spreadSelectionVer |
|
896 #'activeHelpKey:' #spreadSelectionVer |
|
897 ) |
|
898 #(#MenuItem |
|
899 #'label:' '-' |
|
900 ) |
|
901 #(#MenuItem |
|
902 #'label:' 'Center Horizontal In Frame' |
|
903 #'value:' #centerSelectionHor |
|
904 #'activeHelpKey:' #centerSelectionHor |
|
905 ) |
|
906 #(#MenuItem |
|
907 #'label:' 'Center Vertical In Frame' |
|
908 #'value:' #centerSelectionVer |
|
909 #'activeHelpKey:' #centerSelectionVer |
|
910 ) |
|
911 ) nil |
|
912 nil |
|
913 ) |
|
914 ! |
|
915 |
|
916 menuEdit |
|
917 "this window spec was automatically generated by the ST/X MenuEditor" |
|
918 |
|
919 "do not manually edit this - the builder may not be able to |
|
920 handle the specification if its corrupted." |
|
921 |
|
922 " |
|
923 MenuEditor new openOnClass:UIPainter andSelector:#menuEdit |
|
924 (Menu new fromLiteralArrayEncoding:(UIPainter menuEdit)) startUp |
|
925 " |
|
926 |
|
927 <resource: #menu> |
|
928 |
|
929 ^ |
|
930 |
|
931 #(#Menu |
|
932 |
|
933 #( |
|
934 #(#MenuItem |
|
935 #'label:' 'Cut' |
|
936 #'value:' #deleteSelection |
|
937 #'enabled:' #hasSelection |
|
938 #'shortcutKeyCharacter:' #Cut |
|
939 ) |
|
940 #(#MenuItem |
|
941 #'label:' 'Copy' |
|
942 #'value:' #copySelection |
|
943 #'enabled:' #hasSelection |
|
944 #'shortcutKeyCharacter:' #Copy |
|
945 ) |
|
946 #(#MenuItem |
|
947 #'label:' 'Paste' |
|
948 #'nameKey:' #paste |
|
949 #'value:' #paste |
|
950 #'enabled:' #canPaste |
1437 #'submenu:' |
951 #'submenu:' |
1438 #(#Menu |
952 #(#Menu |
1439 |
953 |
1440 #( |
954 #( |
1441 #(#MenuItem |
955 #(#MenuItem |
1442 #'label:' 'geometry test mode' |
956 #'label:' 'Paste' |
1443 #'indication:' #'testMode:' |
957 #'value:' #pasteBuffer |
|
958 #'activeHelpKey:' #pasteBuffer |
|
959 #'shortcutKeyCharacter:' #Paste |
|
960 ) |
|
961 #(#MenuItem |
|
962 #'label:' 'Keep Layout' |
|
963 #'value:' #pasteWithLayout |
|
964 #'activeHelpKey:' #pasteWithLayout |
|
965 #'enabled:' #canKeepLayoutInSelection |
1444 ) |
966 ) |
1445 ) nil |
967 ) nil |
1446 nil |
968 nil |
1447 ) |
969 ) |
1448 ) |
970 ) |
1449 #(#MenuItem |
971 #(#MenuItem |
1450 #'label:' '' |
|
1451 ) |
|
1452 #(#MenuItem |
|
1453 #'label:' 'Gallery' |
|
1454 #'indication:' #galleryShown |
|
1455 ) |
|
1456 #(#MenuItem |
|
1457 #'label:' 'Canvas' |
|
1458 #'indication:' #painterShown |
|
1459 ) |
|
1460 #(#MenuItem |
|
1461 #'label:' '' |
|
1462 ) |
|
1463 #(#MenuItem |
|
1464 #'label:' '-' |
972 #'label:' '-' |
1465 ) |
973 ) |
1466 #(#MenuItem |
974 #(#MenuItem |
1467 #'label:' 'Install' |
975 #'label:' 'Undo' |
1468 #'value:' #doInstallSpec |
976 #'nameKey:' #undo |
1469 #'labelImage:' #(#ResourceRetriever nil #iconInstall 'Install') |
977 #'value:' #undoLast |
|
978 #'enabled:' #hasUndoHistory |
|
979 #'shortcutKeyCharacter:' #Cmdu |
1470 ) |
980 ) |
1471 #(#MenuItem |
981 #(#MenuItem |
1472 #'label:' '-' |
982 #'label:' '-' |
1473 ) |
983 ) |
1474 #(#MenuItem |
984 #(#MenuItem |
1475 #'label:' 'Run' |
985 #'label:' 'Dimension' |
1476 #'value:' #doStartApplication |
986 #'value:' #dimension |
1477 ) |
987 #'enabled:' #hasSelection |
1478 #(#MenuItem |
988 #'submenu:' |
1479 #'label:' '-' |
989 #(#Menu |
|
990 |
|
991 #( |
|
992 #(#MenuItem |
|
993 #'label:' 'Default Extent' |
|
994 #'value:' #setToDefaultExtent |
|
995 #'activeHelpKey:' #setToDefaultExtent |
|
996 #'enabled:' #canMoveOrAlignSelection |
|
997 ) |
|
998 #(#MenuItem |
|
999 #'label:' 'Default Width' |
|
1000 #'value:' #setToDefaultWidth |
|
1001 #'activeHelpKey:' #setToDefaultWidth |
|
1002 #'enabled:' #canMoveOrAlignSelection |
|
1003 ) |
|
1004 #(#MenuItem |
|
1005 #'label:' 'Default Height' |
|
1006 #'value:' #setToDefaultHeight |
|
1007 #'activeHelpKey:' #setToDefaultHeight |
|
1008 #'enabled:' #canMoveOrAlignSelection |
|
1009 ) |
|
1010 #(#MenuItem |
|
1011 #'label:' '-' |
|
1012 ) |
|
1013 #(#MenuItem |
|
1014 #'label:' 'Copy Extent' |
|
1015 #'value:' #copyExtent |
|
1016 #'activeHelpKey:' #copyExtent |
|
1017 #'enabled:' #hasSingleSelection |
|
1018 ) |
|
1019 #(#MenuItem |
|
1020 #'label:' '-' |
|
1021 ) |
|
1022 #(#MenuItem |
|
1023 #'label:' 'Paste Extent' |
|
1024 #'value:' #pasteExtent |
|
1025 #'activeHelpKey:' #pasteExtent |
|
1026 #'enabled:' #canMoveOrAlignSelection |
|
1027 ) |
|
1028 #(#MenuItem |
|
1029 #'label:' 'Paste Width' |
|
1030 #'value:' #pasteWidth |
|
1031 #'activeHelpKey:' #pasteWidth |
|
1032 #'enabled:' #canMoveOrAlignSelection |
|
1033 ) |
|
1034 #(#MenuItem |
|
1035 #'label:' 'Paste Height' |
|
1036 #'value:' #pasteHeight |
|
1037 #'activeHelpKey:' #pasteHeight |
|
1038 #'enabled:' #canMoveOrAlignSelection |
|
1039 ) |
|
1040 #(#MenuItem |
|
1041 #'label:' '-' |
|
1042 ) |
|
1043 #(#MenuItem |
|
1044 #'label:' 'Copy Layout' |
|
1045 #'value:' #copyLayout |
|
1046 #'activeHelpKey:' #copyLayout |
|
1047 #'enabled:' #hasSingleSelection |
|
1048 ) |
|
1049 #(#MenuItem |
|
1050 #'label:' 'Paste Layout' |
|
1051 #'value:' #pasteLayout |
|
1052 #'activeHelpKey:' #pasteLayout |
|
1053 #'enabled:' #canMoveOrAlignSelection |
|
1054 ) |
|
1055 ) nil |
|
1056 nil |
|
1057 ) |
|
1058 ) |
|
1059 #(#MenuItem |
|
1060 #'label:' 'Align' |
|
1061 #'submenuChannel:' #menuAlign |
1480 ) |
1062 ) |
1481 ) nil |
1063 ) nil |
1482 nil |
1064 nil |
1483 ) |
1065 ) |
1484 |
1066 ! |
1485 "Modified: / 31.10.1997 / 17:35:38 / cg" |
1067 |
1486 ! ! |
1068 menuToolbar |
|
1069 "this window spec was automatically generated by the ST/X MenuEditor" |
|
1070 |
|
1071 "do not manually edit this - the builder may not be able to |
|
1072 handle the specification if its corrupted." |
|
1073 |
|
1074 " |
|
1075 MenuEditor new openOnClass:UIPainter andSelector:#menuToolbar |
|
1076 (Menu new fromLiteralArrayEncoding:(UIPainter menuToolbar)) startUp |
|
1077 " |
|
1078 |
|
1079 <resource: #menu> |
|
1080 |
|
1081 ^ |
|
1082 |
|
1083 #(#Menu |
|
1084 |
|
1085 #( |
|
1086 #(#MenuItem |
|
1087 #'label:' 'Run' |
|
1088 #'isButton:' true |
|
1089 #'value:' #doStartApplication |
|
1090 #'labelImage:' #(#ResourceRetriever nil #runIcon) |
|
1091 ) |
|
1092 #(#MenuItem |
|
1093 #'label:' '-' |
|
1094 ) |
|
1095 #(#MenuItem |
|
1096 #'label:' 'New' |
|
1097 #'isButton:' true |
|
1098 #'value:' #doNew |
|
1099 #'labelImage:' #(#ResourceRetriever nil #newIcon) |
|
1100 ) |
|
1101 #(#MenuItem |
|
1102 #'label:' 'Load' |
|
1103 #'isButton:' true |
|
1104 #'value:' #doFromClass |
|
1105 #'labelImage:' #(#ResourceRetriever nil #loadIcon) |
|
1106 ) |
|
1107 #(#MenuItem |
|
1108 #'label:' 'Save' |
|
1109 #'isButton:' true |
|
1110 #'value:' #doInstallSpec |
|
1111 #'labelImage:' #(#ResourceRetriever nil #saveIcon) |
|
1112 ) |
|
1113 #(#MenuItem |
|
1114 #'label:' '-' |
|
1115 ) |
|
1116 #(#MenuItem |
|
1117 #'label:' 'stepUp' |
|
1118 #'isButton:' true |
|
1119 #'value:' #doStepUp |
|
1120 #'enabled:' #enabledStepOver |
|
1121 #'labelImage:' #(#ResourceRetriever nil #upIcon) |
|
1122 ) |
|
1123 #(#MenuItem |
|
1124 #'label:' 'stepDown' |
|
1125 #'isButton:' true |
|
1126 #'value:' #doStepDown |
|
1127 #'enabled:' #enabledStepOver |
|
1128 #'labelImage:' #(#ResourceRetriever nil #downIcon) |
|
1129 ) |
|
1130 #(#MenuItem |
|
1131 #'label:' 'stepIn' |
|
1132 #'isButton:' true |
|
1133 #'value:' #doStepIn |
|
1134 #'enabled:' #enabledStepIn |
|
1135 #'labelImage:' #(#ResourceRetriever nil #downRightIcon) |
|
1136 ) |
|
1137 #(#MenuItem |
|
1138 #'label:' 'stepOut' |
|
1139 #'isButton:' true |
|
1140 #'value:' #doStepOut |
|
1141 #'enabled:' #enabledStepOut |
|
1142 #'labelImage:' #(#ResourceRetriever nil #leftDownIcon) |
|
1143 ) |
|
1144 #(#MenuItem |
|
1145 #'label:' '-' |
|
1146 ) |
|
1147 #(#MenuItem |
|
1148 #'label:' 'align left' |
|
1149 #'isButton:' true |
|
1150 #'value:' #alignSelectionLeft |
|
1151 #'activeHelpKey:' #alignSelectionLeft |
|
1152 #'labelImage:' #(#ResourceRetriever nil #iconAlignL) |
|
1153 ) |
|
1154 #(#MenuItem |
|
1155 #'label:' 'align right' |
|
1156 #'isButton:' true |
|
1157 #'value:' #alignSelectionRight |
|
1158 #'activeHelpKey:' #alignSelectionRight |
|
1159 #'labelImage:' #(#ResourceRetriever nil #iconAlignR) |
|
1160 ) |
|
1161 #(#MenuItem |
|
1162 #'label:' 'align left & right' |
|
1163 #'isButton:' true |
|
1164 #'value:' #alignSelectionLeftAndRight |
|
1165 #'activeHelpKey:' #alignSelectionLeftAndRight |
|
1166 #'labelImage:' #(#ResourceRetriever nil #iconAlignLR) |
|
1167 ) |
|
1168 #(#MenuItem |
|
1169 #'label:' 'align top' |
|
1170 #'isButton:' true |
|
1171 #'value:' #alignSelectionTop |
|
1172 #'activeHelpKey:' #alignSelectionTop |
|
1173 #'labelImage:' #(#ResourceRetriever nil #iconAlignT) |
|
1174 ) |
|
1175 #(#MenuItem |
|
1176 #'label:' 'align bottom' |
|
1177 #'isButton:' true |
|
1178 #'value:' #alignSelectionBottom |
|
1179 #'activeHelpKey:' #alignSelectionBottom |
|
1180 #'labelImage:' #(#ResourceRetriever nil #iconAlignB) |
|
1181 ) |
|
1182 #(#MenuItem |
|
1183 #'label:' 'align top & bottom' |
|
1184 #'isButton:' true |
|
1185 #'value:' #alignSelectionTopAndBottom |
|
1186 #'activeHelpKey:' #alignSelectionTopAndBottom |
|
1187 #'labelImage:' #(#ResourceRetriever nil #iconAlignTB) |
|
1188 ) |
|
1189 #(#MenuItem |
|
1190 #'label:' '-' |
|
1191 ) |
|
1192 #(#MenuItem |
|
1193 #'label:' 'align centered horizontal' |
|
1194 #'isButton:' true |
|
1195 #'value:' #alignSelectionCenterHor |
|
1196 #'activeHelpKey:' #alignSelectionCenterHor |
|
1197 #'labelImage:' #(#ResourceRetriever nil #iconAlignCenterH) |
|
1198 ) |
|
1199 #(#MenuItem |
|
1200 #'label:' 'align centered vertical' |
|
1201 #'isButton:' true |
|
1202 #'value:' #alignSelectionCenterVer |
|
1203 #'activeHelpKey:' #alignSelectionCenterVer |
|
1204 #'labelImage:' #(#ResourceRetriever nil #iconAlignCenterV) |
|
1205 ) |
|
1206 ) nil |
|
1207 nil |
|
1208 ) |
|
1209 ! ! |
|
1210 |
|
1211 !UIPainter class methodsFor:'resources'! |
|
1212 |
|
1213 icon |
|
1214 |
|
1215 ^self startGUIBuilderIcon subImageIn: (0@0 extent: (24@16)) |
|
1216 |
|
1217 |
|
1218 |
|
1219 |
|
1220 ! |
|
1221 |
|
1222 iconAlignB |
|
1223 "ImageEditor openOnClass:self andSelector:#iconAlignB" |
|
1224 |
|
1225 <resource: #image> |
|
1226 ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 7 0 0 0 0 0 7 0 80 0 0 0 7 0 112 0 0 0 7 0 112 0 0 0 7 0 112 0 0 80 7 0 112 0 0 112 7 0 112 11 0 112 7 0 112 0 0 112 7 0 112 1 0 112 7 0 112 0 0 112 7 0 112 11 0 0 0 0 0 0 10 170 170 170 170 0 10 170 170 170 170 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9977)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 120 3 0 120 0 0 121 224 0 121 224 0 121 224 0 121 224 30 121 224 30 121 224 30 121 224 30 121 225 30 121 224 30 121 224 30 121 224 30 121 224 63 255 240 63 255 240 0 0 0 0 0 3 0 0 0]) ; yourself); yourself! |
|
1227 |
|
1228 iconAlignCenterH |
|
1229 "ImageEditor openOnClass:self andSelector:#iconAlignCenterH" |
|
1230 |
|
1231 <resource: #image> |
|
1232 ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 84 0 0 0 5 80 84 170 170 170 165 80 85 85 89 85 85 80 85 85 42 21 85 90 85 84 170 133 85 88 85 82 170 161 85 80 85 74 170 168 85 80 85 69 85 85 85 80 85 85 85 85 85 88 84 0 0 0 5 80 84 170 170 170 165 80 85 85 89 85 85 88 85 85 42 21 85 80 85 84 170 133 85 80 85 82 170 161 85 80 85 74 170 168 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 88]) ; colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9977 blue:49.9977); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 31 255 192 31 255 224 15 255 224 0 248 0 1 252 0 3 254 0 7 255 0 7 255 0 0 0 0 31 255 192 31 255 224 15 255 224 0 248 0 1 252 0 3 254 0 7 255 0 3 255 0 0 0 0 0 0 0]) ; yourself); yourself! |
|
1233 |
|
1234 iconAlignCenterV |
|
1235 "ImageEditor openOnClass:self andSelector:#iconAlignCenterV" |
|
1236 |
|
1237 <resource: #image> |
|
1238 ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 84 21 85 5 80 85 84 149 85 37 80 80 84 148 21 37 80 82 20 148 133 37 80 82 132 148 161 37 80 82 160 148 168 37 82 82 168 148 170 37 80 82 170 148 170 165 80 82 169 148 170 101 80 82 164 148 169 37 80 82 148 148 165 37 80 82 84 148 149 37 80 85 84 149 85 37 88 85 84 149 85 37 80 85 84 149 85 37 80 85 85 85 85 85 80 85 85 85 85 85 88 85 85 85 85 85 80 85 85 85 85 85 80]) ; colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9992 blue:49.9992); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 1 1 128 192 1 192 224 49 216 224 57 220 224 61 222 224 63 223 224 63 223 224 63 223 224 63 223 224 63 223 224 61 222 224 57 220 224 17 200 227 1 192 224 1 192 224 0 192 96 0 0 0 0 0 3 0 0 0]) ; yourself); yourself! |
|
1239 |
|
1240 iconAlignL |
|
1241 "ImageEditor openOnClass:self andSelector:#iconAlignL" |
|
1242 |
|
1243 <resource: #image> |
|
1244 ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 2 128 0 0 0 0 2 128 0 0 0 0 2 133 85 85 0 9 2 135 255 255 0 0 2 128 0 0 0 0 2 128 0 0 0 0 2 128 0 0 0 0 2 128 0 0 0 0 2 133 85 85 80 0 2 135 255 255 240 0 2 128 0 0 0 5 2 128 0 0 0 0 2 128 0 0 0 0 2 128 0 0 0 0 2 133 85 0 0 0 2 135 255 0 0 0 2 128 0 0 0 0 2 128 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9992)); at:4 put:((Color grey:66.9993)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 24 0 0 31 255 128 31 255 128 31 255 128 31 255 128 24 0 0 24 0 0 31 255 224 31 255 224 31 255 224 31 255 224 24 0 0 24 0 0 31 248 0 31 248 0 31 248 0 31 248 0 24 0 0 0 0 0 0 0 0]) ; yourself); yourself! |
|
1245 |
|
1246 iconAlignLR |
|
1247 "ImageEditor openOnClass:self andSelector:#iconAlignLR" |
|
1248 |
|
1249 <resource: #image> |
|
1250 ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 2 128 0 0 40 0 2 128 0 0 40 0 2 133 85 85 40 9 2 135 255 255 40 0 2 128 0 0 40 0 2 128 0 0 40 0 2 128 0 0 40 0 2 128 0 0 40 0 2 133 85 85 40 0 2 135 255 255 40 0 2 128 0 0 40 5 2 128 0 0 40 0 2 128 0 0 40 0 2 128 0 0 40 0 2 133 85 85 40 0 2 135 255 252 40 0 2 128 0 0 40 0 2 128 0 0 40 0 0 0 0 0 0 5 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9992)); at:4 put:((Color grey:66.9993)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 24 0 96 31 255 224 31 255 224 31 255 224 31 255 224 24 0 96 24 0 96 31 255 224 31 255 224 31 255 224 31 255 224 24 0 96 24 0 96 31 255 224 31 255 224 31 254 224 31 255 224 24 0 96 0 0 0 0 0 0]) ; yourself); yourself! |
|
1251 |
|
1252 iconAlignR |
|
1253 "ImageEditor openOnClass:self andSelector:#iconAlignR" |
|
1254 |
|
1255 <resource: #image> |
|
1256 ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 40 0 0 0 0 0 40 0 0 5 85 85 40 9 0 7 255 255 40 0 0 0 0 0 40 0 0 0 0 0 40 0 0 0 0 0 40 0 0 0 0 0 40 0 0 85 85 85 40 0 0 127 255 255 40 0 0 0 0 0 40 5 0 0 0 0 40 0 0 0 0 0 40 0 0 0 0 0 40 0 0 0 5 85 40 0 0 0 7 255 40 0 0 0 0 0 40 0 0 0 0 0 40 0 0 0 0 0 0 5 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9992)); at:4 put:((Color grey:66.9993)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 96 7 255 224 7 255 224 7 255 224 7 255 224 0 0 96 0 0 96 31 255 224 31 255 224 31 255 224 31 255 224 0 0 96 0 0 96 0 127 224 0 127 224 0 127 224 0 127 224 0 0 96 0 0 0 0 0 0]) ; yourself); yourself! |
|
1257 |
|
1258 iconAlignT |
|
1259 "ImageEditor openOnClass:self andSelector:#iconAlignT" |
|
1260 |
|
1261 <resource: #image> |
|
1262 ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 170 170 170 170 0 10 170 170 170 170 0 0 0 0 0 0 0 0 80 5 0 80 11 0 112 7 0 112 0 0 112 7 0 112 1 0 112 7 0 112 0 0 112 7 0 112 11 0 112 7 0 112 0 0 0 7 0 112 0 0 0 7 0 112 0 0 0 7 0 112 0 0 0 7 0 112 0 0 0 7 0 0 0 0 0 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9977)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 3 0 0 0 63 255 240 63 255 240 30 121 224 30 121 224 30 121 224 30 121 224 30 121 225 30 121 224 30 121 224 30 121 224 0 121 224 0 121 224 0 121 224 0 121 224 0 120 0 0 120 3 0 0 0 0 0 0 0 0 0]) ; yourself); yourself! |
|
1263 |
|
1264 iconAlignTB |
|
1265 "ImageEditor openOnClass:self andSelector:#iconAlignTB" |
|
1266 |
|
1267 <resource: #image> |
|
1268 ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 10 170 170 170 170 0 10 170 170 170 170 0 0 0 0 0 0 0 0 80 5 0 80 7 0 112 7 0 112 0 0 112 7 0 112 0 0 112 7 0 112 0 0 112 7 0 112 8 0 112 7 0 112 0 0 112 7 0 112 1 0 112 7 0 112 0 0 112 7 0 112 0 0 112 7 0 64 0 0 0 0 0 0 0 10 170 170 170 170 0 10 170 170 170 170 0 0 0 0 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9977)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 3 0 0 0 63 255 240 63 255 240 30 121 224 30 121 225 30 121 224 30 121 224 30 121 224 30 121 224 30 121 224 30 121 224 30 121 225 30 121 225 30 121 160 30 121 224 63 255 240 63 255 242 0 0 0 0 0 0 0 0 0]) ; yourself); yourself! ! |
1487 |
1269 |
1488 !UIPainter methodsFor:'actions'! |
1270 !UIPainter methodsFor:'actions'! |
1489 |
1271 |
1490 accept |
1272 accept |
1491 "accept changes done to the specification. The component assigned to the |
1273 "accept changes done to the specification. The component assigned to the |
2389 ] |
2170 ] |
2390 |
2171 |
2391 "Modified: / 25.10.1997 / 19:11:51 / cg" |
2172 "Modified: / 25.10.1997 / 19:11:51 / cg" |
2392 ! ! |
2173 ! ! |
2393 |
2174 |
2394 !UIPainter methodsFor:'user interaction - dialog'! |
2175 !UIPainter methodsFor:'user interactions'! |
|
2176 |
|
2177 doBrowseAppClass |
|
2178 "open a browser on the class" |
|
2179 |
|
2180 |cls| |
|
2181 |
|
2182 self painter isModified ifTrue:[ |
|
2183 self warn:'The current interface has not yet been saved.\\The browser will show the code of the old interface.' withCRs. |
|
2184 ]. |
|
2185 cls := self resolveName:specClass. |
|
2186 |
|
2187 cls notNil ifTrue:[ |
|
2188 SystemBrowser openInClass:cls |
|
2189 ] ifFalse:[ |
|
2190 self information:'No class defined!!'. |
|
2191 ]. |
|
2192 |
|
2193 ! |
|
2194 |
|
2195 doBrowseAspectMethods |
|
2196 "open a browser on the aspect methods" |
|
2197 |
|
2198 |cls methods| |
|
2199 |
|
2200 self painter isModified ifTrue:[ |
|
2201 self warn:'The current interface has not yet been saved.\\The browser may show the code of the old aspect methods.' withCRs. |
|
2202 ]. |
|
2203 cls := self resolveName:specClass. |
|
2204 |
|
2205 cls notNil ifTrue:[ |
|
2206 methods := self painter aspectMethods. |
|
2207 methods isEmpty ifTrue:[ |
|
2208 self warn:'No aspect methods have been saved yet!!'. |
|
2209 ^ self. |
|
2210 ]. |
|
2211 SystemBrowser browseMethods:methods title:'Aspect methods'. |
|
2212 ] ifFalse:[ |
|
2213 self information:'No class defined!!'. |
|
2214 ]. |
|
2215 |
|
2216 "Created: / 25.10.1997 / 19:07:55 / cg" |
|
2217 ! |
|
2218 |
|
2219 doFromClass |
|
2220 |
|
2221 self loadFromInClassesOf: #Object |
|
2222 ! |
|
2223 |
|
2224 doInstallAspects |
|
2225 "install aspects and actions |
|
2226 " |
|
2227 |code| |
|
2228 |
|
2229 self hasSpecClassAndSelector ifFalse:[ |
|
2230 self defineClassAndSelector |
|
2231 ]. |
|
2232 |
|
2233 self checkClassAndSelector ifFalse:[ |
|
2234 ^ self |
|
2235 ]. |
|
2236 |
|
2237 self painter className:specClass |
|
2238 superclassName:specSuperclass |
|
2239 selector:specSelector. |
|
2240 |
|
2241 code := self painter generateAspectMethods. |
|
2242 (ReadStream on:code) fileIn. |
|
2243 |
|
2244 ! |
|
2245 |
|
2246 doInstallHelp |
|
2247 "install help text |
|
2248 " |
|
2249 self helpTool installHelpSpecInto:specClass |
|
2250 ! |
|
2251 |
|
2252 doInstallHooks |
|
2253 "install application hooks |
|
2254 " |
|
2255 |code| |
|
2256 |
|
2257 self hasSpecClassAndSelector ifFalse:[ |
|
2258 self defineClassAndSelector |
|
2259 ]. |
|
2260 |
|
2261 self checkClassAndSelector ifFalse:[ |
|
2262 ^ self |
|
2263 ]. |
|
2264 |
|
2265 self painter className:specClass |
|
2266 superclassName:specSuperclass |
|
2267 selector:specSelector. |
|
2268 |
|
2269 code := self painter generateHookMethods. |
|
2270 (ReadStream on:code) fileIn. |
|
2271 |
|
2272 "Created: / 31.10.1997 / 17:37:54 / cg" |
|
2273 ! |
|
2274 |
|
2275 doInstallSpec |
|
2276 "install window specification |
|
2277 " |
|
2278 |code painter| |
|
2279 |
|
2280 self hasSpecClassAndSelector ifFalse:[ |
|
2281 self defineClassAndSelector |
|
2282 ]. |
|
2283 |
|
2284 self checkClassAndSelector ifFalse:[ |
|
2285 ^ self |
|
2286 ]. |
|
2287 |
|
2288 self isModified ifTrue:[ |
|
2289 (self confirm:'Accept change made in ' , tabSelection printString , ' section?') ifTrue:[ |
|
2290 self accept |
|
2291 ] ifFalse:[ |
|
2292 (self confirm:'Load old interface?') ifFalse:[ |
|
2293 ^ self |
|
2294 ] |
|
2295 ] |
|
2296 ]. |
|
2297 |
|
2298 painter := self painter. |
|
2299 |
|
2300 painter className:specClass |
|
2301 superclassName:specSuperclass |
|
2302 selector:specSelector. |
|
2303 |
|
2304 code := painter generateWindowSpecMethodSource withCRs. |
|
2305 painter resetModification. |
|
2306 (ReadStream on:code) fileIn. |
|
2307 |
|
2308 "Modified: / 26.10.1997 / 15:47:48 / cg" |
|
2309 ! |
|
2310 |
|
2311 doNew |
|
2312 "remove all components and associated resources |
|
2313 " |
|
2314 self painter isModified ifTrue:[ |
|
2315 (self confirm:'Edit a new interface without saving current?') ifFalse:[ |
|
2316 ^ self |
|
2317 ] |
|
2318 ]. |
|
2319 self painter removeAll |
|
2320 ! |
|
2321 |
|
2322 doPickAView |
|
2323 "pick a view and setup specifications |
|
2324 " |
|
2325 |painter view cls spec app| |
|
2326 |
|
2327 self painter isModified ifTrue:[ |
|
2328 (self confirm:'pick another interface without saving your modifications ?') ifFalse:[ |
|
2329 ^ self |
|
2330 ] |
|
2331 ]. |
|
2332 |
|
2333 (view := Screen current viewFromUser) notNil ifTrue:[ |
|
2334 view == Screen current rootView ifFalse:[ |
|
2335 painter := self painter. |
|
2336 spec := UISpecification fromView:view topView. |
|
2337 |
|
2338 "/ ok, got it |
|
2339 |
|
2340 (app := view application) notNil ifTrue:[ |
|
2341 cls := app class |
|
2342 ] ifFalse:[ |
|
2343 cls := view class |
|
2344 ]. |
|
2345 self setClass:cls selector:nil. |
|
2346 |
|
2347 painter setupFromSpec:spec. |
|
2348 ] |
|
2349 ] |
|
2350 |
|
2351 "Modified: / 1.11.1997 / 13:47:49 / cg" |
|
2352 ! |
|
2353 |
|
2354 doStartApplication |
|
2355 "start current edited application |
|
2356 " |
|
2357 |cls app infoMessage| |
|
2358 |
|
2359 self isModified ifTrue:[ |
|
2360 (self confirm:'Accept change made in ' , tabSelection printString , ' section?') ifTrue:[ |
|
2361 self accept. |
|
2362 "/ "XXX must be fixed - canvas changes are not recorded in the history |
|
2363 "/ so isModified returns false here |
|
2364 "/ |
|
2365 "/ self painter isModified ifTrue:[ |
|
2366 "/ |
|
2367 (self confirm:'Reinstall the new interface?' withCRs) ifTrue:[ |
|
2368 self doInstallSpec |
|
2369 ] |
|
2370 "/ ]. |
|
2371 ] |
|
2372 ]. |
|
2373 self painter isModified ifTrue:[ |
|
2374 (self confirm:'The current interface has not yet been reinstalled!!\\Start anyway (based upon the previous interface)?' withCRs) ifFalse:[ |
|
2375 ^ self |
|
2376 ] |
|
2377 ]. |
|
2378 |
|
2379 (specClass isNil or:[specSelector size < 2]) ifTrue:[ |
|
2380 infoMessage := 'No class or selector defined!!'. |
|
2381 ] ifFalse:[ |
|
2382 cls := self resolveName:specClass. |
|
2383 |
|
2384 cls isNil ifTrue:[ |
|
2385 infoMessage := 'Class not existant!!'. |
|
2386 ] ifFalse:[ |
|
2387 (cls respondsTo:specSelector) ifFalse:[ |
|
2388 infoMessage := ('No method for: #' |
|
2389 , specSelector , ' in ' , cls name |
|
2390 , '\\(did you install the interface?)') withCRs. |
|
2391 ] |
|
2392 ] |
|
2393 ]. |
|
2394 |
|
2395 infoMessage notNil ifTrue:[ |
|
2396 ^ self information:infoMessage |
|
2397 ]. |
|
2398 app := cls new. |
|
2399 (app respondsTo:#openInterface:) ifFalse:[ |
|
2400 ^ self warn:('The application does not respond to the ''openInterface:'' message.\\(maybe its supposed to be used as subApplication/subCanvas)') withCRs. |
|
2401 ]. |
|
2402 app openInterface:specSelector |
|
2403 |
|
2404 "Modified: / 29.10.1997 / 19:01:50 / cg" |
|
2405 ! |
|
2406 |
|
2407 doWindowSpec |
|
2408 "create the window specification but do not write to application; instead |
|
2409 open a view |
|
2410 " |
|
2411 |code v| |
|
2412 |
|
2413 code := self painter generateWindowSpecMethodSource. |
|
2414 |
|
2415 v := CodeView open. |
|
2416 v contents:code. |
|
2417 v label:'windowSpec'. |
|
2418 |
|
2419 ! |
|
2420 |
|
2421 loadFromClassWithSuperclass |
|
2422 |
|
2423 |box| |
|
2424 box := EnterBox new. |
|
2425 box title:'Name of superclass:'. |
|
2426 box okText:'OK'. |
|
2427 box abortText:'Cancel'. |
|
2428 box initialText: 'ApplicationModel'. |
|
2429 box showAtPointer. |
|
2430 box accepted |
|
2431 ifTrue: |
|
2432 [ |
|
2433 self loadFromInClassesOf: box contents asSymbol |
|
2434 ] |
|
2435 |
|
2436 ! |
|
2437 |
|
2438 loadFromInClassesOf: aSuperclassOrSymbol |
|
2439 |
|
2440 self loadFromMessage: |
|
2441 (ResourceSelectionBrowser |
|
2442 request: 'Load Interface From Class' |
|
2443 onSuperclass: aSuperclassOrSymbol |
|
2444 andClass: specClass |
|
2445 andSelector: nil |
|
2446 withResourceTypes: #(canvas)) |
|
2447 ! |
|
2448 |
|
2449 loadFromMessage: aMessage |
|
2450 |
|
2451 ((aMessage size > 0) and: [self checkModified]) |
|
2452 ifTrue: |
|
2453 [ |
|
2454 |readStream aClass aSelector| |
|
2455 readStream := aMessage readStream. |
|
2456 (aClass := Smalltalk at: (readStream upTo: $ ) asSymbol) notNil |
|
2457 ifTrue: |
|
2458 [ |
|
2459 aSelector := readStream upToEnd asSymbol. |
|
2460 self setClass: aClass selector: aSelector. |
|
2461 (aClass respondsTo:aSelector) |
|
2462 ifTrue: |
|
2463 [ |
|
2464 self painter setupFromSpec:(aClass perform:aSelector). |
|
2465 ] |
|
2466 ] |
|
2467 ] |
|
2468 |
|
2469 ! ! |
|
2470 |
|
2471 !UIPainter methodsFor:'user interactions - dialog'! |
2395 |
2472 |
2396 checkClassAndSelector |
2473 checkClassAndSelector |
2397 "check for class & superclass" |
2474 "check for class & superclass" |
2398 |
2475 |
2399 |superclass cls| |
2476 |superclass cls| |
2553 doStepUp |
2630 doStepUp |
2554 "move selected component before the previous component in the hierarchy of |
2631 "move selected component before the previous component in the hierarchy of |
2555 its container widget |
2632 its container widget |
2556 " |
2633 " |
2557 treeView doStepOver:-1 |
2634 treeView doStepOver:-1 |
2558 ! ! |
|
2559 |
|
2560 !UIPainter methodsFor:'user interaction - pullDown'! |
|
2561 |
|
2562 doBrowseAppClass |
|
2563 "open a browser on the class" |
|
2564 |
|
2565 |cls| |
|
2566 |
|
2567 self painter isModified ifTrue:[ |
|
2568 self warn:'the change have not yet been reinstalled.\\The browser will show the old interfaces code.' withCRs. |
|
2569 ]. |
|
2570 cls := self resolveName:specClass. |
|
2571 |
|
2572 cls notNil ifTrue:[ |
|
2573 SystemBrowser openInClass:cls |
|
2574 ] ifFalse:[ |
|
2575 self information:'no class yet'. |
|
2576 ]. |
|
2577 |
|
2578 ! |
|
2579 |
|
2580 doBrowseAspectMethods |
|
2581 "open a browser on the aspect methods" |
|
2582 |
|
2583 |cls methods| |
|
2584 |
|
2585 self painter isModified ifTrue:[ |
|
2586 self warn:'the changes have not yet been reinstalled.\\The browser may show old code.' withCRs. |
|
2587 ]. |
|
2588 cls := self resolveName:specClass. |
|
2589 |
|
2590 cls notNil ifTrue:[ |
|
2591 methods := self painter aspectMethods. |
|
2592 methods isEmpty ifTrue:[ |
|
2593 self warn:'no aspect methods have been installed yet.'. |
|
2594 ^ self. |
|
2595 ]. |
|
2596 SystemBrowser browseMethods:methods title:'aspect methods'. |
|
2597 ] ifFalse:[ |
|
2598 self information:'no class yet'. |
|
2599 ]. |
|
2600 |
|
2601 "Created: / 25.10.1997 / 19:07:55 / cg" |
|
2602 ! |
|
2603 |
|
2604 doFromClass |
|
2605 "setup new specification from a class and selector accessed through |
|
2606 to a dialog |
|
2607 " |
|
2608 |className methodName cls sel accepted failed spec s painter| |
|
2609 |
|
2610 self painter isModified ifTrue:[ |
|
2611 (self confirm:'edit another interface without saving your modifications ?') ifFalse:[ |
|
2612 ^ self |
|
2613 ] |
|
2614 ]. |
|
2615 |
|
2616 className := (specClass ? '') asValue. |
|
2617 methodName := (specSelector ? '') asValue. |
|
2618 painter := self painter. |
|
2619 |
|
2620 (s := painter className) notNil ifTrue:[ |
|
2621 className value:s |
|
2622 ]. |
|
2623 (s := painter methodName) notNil ifTrue:[ |
|
2624 methodName value:s |
|
2625 ]. |
|
2626 |
|
2627 failed := false. |
|
2628 [ |
|
2629 accepted := |
|
2630 (DialogBox new |
|
2631 addTextLabel:'Classes name:'; |
|
2632 addInputFieldOn:className; |
|
2633 addVerticalSpace; |
|
2634 addTextLabel:'methods name:'; |
|
2635 addInputFieldOn:methodName; |
|
2636 addAbortButton; |
|
2637 addOkButton; |
|
2638 open |
|
2639 ) accepted. |
|
2640 |
|
2641 accepted ifTrue:[ |
|
2642 cls := self resolveName:className value. |
|
2643 |
|
2644 cls isNil ifTrue:[ |
|
2645 failed := true. |
|
2646 self warn:'no such class'. |
|
2647 ] ifFalse:[ |
|
2648 sel := methodName value asSymbol. |
|
2649 (cls respondsTo:sel ) ifFalse:[ |
|
2650 failed := true. |
|
2651 self warn:'no such method' |
|
2652 ] ifTrue:[ |
|
2653 spec := cls perform:sel. |
|
2654 spec isArray ifFalse:[ |
|
2655 failed := true. |
|
2656 self warn:'not a windowSpec method' |
|
2657 ]. |
|
2658 "/ ok, got it |
|
2659 |
|
2660 self setClass:cls selector:sel. |
|
2661 |
|
2662 painter setupFromSpec:spec. |
|
2663 |
|
2664 ^ self |
|
2665 ] |
|
2666 ] |
|
2667 ] |
|
2668 ] doWhile:[accepted and:[failed]]. |
|
2669 |
|
2670 "Modified: 24.6.1997 / 18:59:29 / cg" |
|
2671 ! |
|
2672 |
|
2673 doInstallAspects |
|
2674 "install aspects and actions |
|
2675 " |
|
2676 |code| |
|
2677 |
|
2678 self hasSpecClassAndSelector ifFalse:[ |
|
2679 self defineClassAndSelector |
|
2680 ]. |
|
2681 |
|
2682 self checkClassAndSelector ifFalse:[ |
|
2683 ^ self |
|
2684 ]. |
|
2685 |
|
2686 self painter className:specClass |
|
2687 superclassName:specSuperclass |
|
2688 selector:specSelector. |
|
2689 |
|
2690 code := self painter generateAspectMethods. |
|
2691 (ReadStream on:code) fileIn. |
|
2692 |
|
2693 ! |
|
2694 |
|
2695 doInstallHelp |
|
2696 "install help text |
|
2697 " |
|
2698 self helpTool installHelpSpecInto:specClass |
|
2699 ! |
|
2700 |
|
2701 doInstallHooks |
|
2702 "install application hooks |
|
2703 " |
|
2704 |code| |
|
2705 |
|
2706 self hasSpecClassAndSelector ifFalse:[ |
|
2707 self defineClassAndSelector |
|
2708 ]. |
|
2709 |
|
2710 self checkClassAndSelector ifFalse:[ |
|
2711 ^ self |
|
2712 ]. |
|
2713 |
|
2714 self painter className:specClass |
|
2715 superclassName:specSuperclass |
|
2716 selector:specSelector. |
|
2717 |
|
2718 code := self painter generateHookMethods. |
|
2719 (ReadStream on:code) fileIn. |
|
2720 |
|
2721 "Created: / 31.10.1997 / 17:37:54 / cg" |
|
2722 ! |
|
2723 |
|
2724 doInstallSpec |
|
2725 "install window specification |
|
2726 " |
|
2727 |code painter| |
|
2728 |
|
2729 self hasSpecClassAndSelector ifFalse:[ |
|
2730 self defineClassAndSelector |
|
2731 ]. |
|
2732 |
|
2733 self checkClassAndSelector ifFalse:[ |
|
2734 ^ self |
|
2735 ]. |
|
2736 |
|
2737 self isModified ifTrue:[ |
|
2738 (self confirm:'accept change made in ' , tabSelection printString , ' section ?') ifTrue:[ |
|
2739 self accept |
|
2740 ] ifFalse:[ |
|
2741 (self confirm:'install old specification ?') ifFalse:[ |
|
2742 ^ self |
|
2743 ] |
|
2744 ] |
|
2745 ]. |
|
2746 |
|
2747 painter := self painter. |
|
2748 |
|
2749 painter className:specClass |
|
2750 superclassName:specSuperclass |
|
2751 selector:specSelector. |
|
2752 |
|
2753 code := painter generateWindowSpecMethodSource withCRs. |
|
2754 painter resetModification. |
|
2755 (ReadStream on:code) fileIn. |
|
2756 |
|
2757 "Modified: / 26.10.1997 / 15:47:48 / cg" |
|
2758 ! |
|
2759 |
|
2760 doNew |
|
2761 "remove all components and associated resources |
|
2762 " |
|
2763 self painter isModified ifTrue:[ |
|
2764 (self confirm:'edit a new interface without saving your modifications ?') ifFalse:[ |
|
2765 ^ self |
|
2766 ] |
|
2767 ]. |
|
2768 self painter removeAll |
|
2769 ! |
|
2770 |
|
2771 doPickAView |
|
2772 "pick a view and setup specifications |
|
2773 " |
|
2774 |painter view cls spec app| |
|
2775 |
|
2776 self painter isModified ifTrue:[ |
|
2777 (self confirm:'pick another interface without saving your modifications ?') ifFalse:[ |
|
2778 ^ self |
|
2779 ] |
|
2780 ]. |
|
2781 |
|
2782 (view := Screen current viewFromUser) notNil ifTrue:[ |
|
2783 view == Screen current rootView ifFalse:[ |
|
2784 painter := self painter. |
|
2785 spec := UISpecification fromView:view topView. |
|
2786 |
|
2787 "/ ok, got it |
|
2788 |
|
2789 (app := view application) notNil ifTrue:[ |
|
2790 cls := app class |
|
2791 ] ifFalse:[ |
|
2792 cls := view class |
|
2793 ]. |
|
2794 self setClass:cls selector:nil. |
|
2795 |
|
2796 painter setupFromSpec:spec. |
|
2797 ] |
|
2798 ] |
|
2799 |
|
2800 "Modified: / 1.11.1997 / 13:47:49 / cg" |
|
2801 ! |
|
2802 |
|
2803 doStartApplication |
|
2804 "start current edited application |
|
2805 " |
|
2806 |cls app infoMessage| |
|
2807 |
|
2808 self isModified ifTrue:[ |
|
2809 (self confirm:'accept change made in ' , tabSelection printString , ' section ?') ifTrue:[ |
|
2810 self accept. |
|
2811 "/ "XXX must be fixed - canvas changes are not recorded in the history |
|
2812 "/ so isModified returns false here |
|
2813 "/ |
|
2814 "/ self painter isModified ifTrue:[ |
|
2815 "/ |
|
2816 (self confirm:'reinstall the new spec ?' withCRs) ifTrue:[ |
|
2817 self doInstallSpec |
|
2818 ] |
|
2819 "/ ]. |
|
2820 ] |
|
2821 ]. |
|
2822 self painter isModified ifTrue:[ |
|
2823 (self confirm:'the changed spec has not yet been reinstalled.\\Start anyway (based upon the previous interface) ?' withCRs) ifFalse:[ |
|
2824 ^ self |
|
2825 ] |
|
2826 ]. |
|
2827 |
|
2828 (specClass isNil or:[specSelector size < 2]) ifTrue:[ |
|
2829 infoMessage := 'no class or selector defined'. |
|
2830 ] ifFalse:[ |
|
2831 cls := self resolveName:specClass. |
|
2832 |
|
2833 cls isNil ifTrue:[ |
|
2834 infoMessage := 'class not existant'. |
|
2835 ] ifFalse:[ |
|
2836 (cls respondsTo:specSelector) ifFalse:[ |
|
2837 infoMessage := ('no method for: #' |
|
2838 , specSelector , ' in ' , cls name |
|
2839 , '\\(did you install the spec ?)') withCRs. |
|
2840 ] |
|
2841 ] |
|
2842 ]. |
|
2843 |
|
2844 infoMessage notNil ifTrue:[ |
|
2845 ^ self information:infoMessage |
|
2846 ]. |
|
2847 app := cls new. |
|
2848 (app respondsTo:#openInterface:) ifFalse:[ |
|
2849 ^ self warn:('The application does not respond to the ''openInterface:'' message.\\(maybe its supposed to be used as subApplication/subCanvas)') withCRs. |
|
2850 ]. |
|
2851 app openInterface:specSelector |
|
2852 |
|
2853 "Modified: / 29.10.1997 / 19:01:50 / cg" |
|
2854 ! |
|
2855 |
|
2856 doWindowSpec |
|
2857 "create the window specification but do not write to application; instead |
|
2858 open a view |
|
2859 " |
|
2860 |code v| |
|
2861 |
|
2862 code := self painter generateWindowSpecMethodSource. |
|
2863 |
|
2864 v := CodeView open. |
|
2865 v contents:code. |
|
2866 v label:'windowSpec'. |
|
2867 |
|
2868 ! ! |
2635 ! ! |
2869 |
2636 |
2870 !UIPainter::TreeView class methodsFor:'constants'! |
2637 !UIPainter::TreeView class methodsFor:'constants'! |
2871 |
2638 |
2872 defaultNameOfCanvas |
2639 defaultNameOfCanvas |