UISelectionPanel.st
changeset 3128 bb09c25b54dc
parent 3115 b67cec807e78
child 3142 908161b62565
equal deleted inserted replaced
3127:f28722d20fbb 3128:bb09c25b54dc
   595        window: 
   595        window: 
   596       (WindowSpec
   596       (WindowSpec
   597          label: 'Buttons'
   597          label: 'Buttons'
   598          name: 'Buttons'
   598          name: 'Buttons'
   599          min: (Point 10 10)
   599          min: (Point 10 10)
   600          bounds: (Rectangle 0 0 440 196)
   600          bounds: (Rectangle 0 0 477 241)
   601        )
   601        )
   602        component: 
   602        component: 
   603       (SpecCollection
   603       (SpecCollection
   604          collection: (
   604          collection: (
   605           (ActionButtonSpec
   605           (ActionButtonSpec
   610           (ActionButtonSpec
   610           (ActionButtonSpec
   611              label: 'OK'
   611              label: 'OK'
   612              name: 'Button - OK'
   612              name: 'Button - OK'
   613              layout: (LayoutFrame 2 0 33 0 127 0 55 0)
   613              layout: (LayoutFrame 2 0 33 0 127 0 55 0)
   614              translateLabel: true
   614              translateLabel: true
   615              model: doAccept
   615              model: accept
   616            )
   616            )
   617           (ActionButtonSpec
   617           (ActionButtonSpec
   618              label: 'Cancel'
   618              label: 'Cancel'
   619              name: 'Button - Cancel'
   619              name: 'Button - Cancel'
   620              layout: (LayoutFrame 2 0 65 0 127 0 87 0)
   620              layout: (LayoutFrame 2 0 65 0 127 0 87 0)
   621              translateLabel: true
   621              translateLabel: true
   622              model: doCancel
   622              model: cancel
   623            )
   623            )
   624           (ActionButtonSpec
   624           (ActionButtonSpec
   625              label: 'Help'
   625              label: 'Help'
   626              name: 'Button - Help'
   626              name: 'Button - Help'
   627              layout: (LayoutFrame 2 0 97 0 127 0 119 0)
   627              layout: (LayoutFrame 2 0 97 0 127 0 119 0)
   706              direction: right
   706              direction: right
   707            )
   707            )
   708           (ActionButtonSpec
   708           (ActionButtonSpec
   709              label: '...'
   709              label: '...'
   710              name: 'Button1'
   710              name: 'Button1'
   711              layout: (LayoutFrame 2 0 160 0 22 0 182 0)
   711              layout: (LayoutFrame 296 0 98 0 316 0 120 0)
   712              translateLabel: true
   712              translateLabel: true
   713              model: someAction
   713              model: someAction
       
   714            )
       
   715           (LabelSpec
       
   716              label: 'Ok/Cancel Panel'
       
   717              name: 'Label2'
       
   718              layout: (LayoutFrame 3 0 -49 1 208 0 -26 1)
       
   719              style: (FontDescription helvetica medium roman 10)
       
   720              adjust: left
       
   721              canUIDrag: false
       
   722            )
       
   723           (HorizontalPanelViewSpec
       
   724              keepUILayout: true
       
   725              name: 'OkCancelPanel'
       
   726              layout: (LayoutFrame 0 0 -30 1 0 1 0 1)
       
   727              horizontalLayout: center
       
   728              verticalLayout: center
       
   729              horizontalSpace: 3
       
   730              verticalSpace: 3
       
   731              component: 
       
   732             (SpecCollection
       
   733                collection: (
       
   734                 (ActionButtonSpec
       
   735                    label: 'Cancel'
       
   736                    name: 'Button2'
       
   737                    translateLabel: true
       
   738                    model: cancel
       
   739                    extent: (Point 125 22)
       
   740                  )
       
   741                 (ActionButtonSpec
       
   742                    label: 'OK'
       
   743                    name: 'Button3'
       
   744                    translateLabel: true
       
   745                    model: accept
       
   746                    extent: (Point 125 22)
       
   747                  )
       
   748                 )
       
   749               
       
   750              )
   714            )
   751            )
   715           )
   752           )
   716         
   753         
   717        )
   754        )
   718      )
   755      )
   915     "
   952     "
   916 
   953 
   917     <resource: #canvas>
   954     <resource: #canvas>
   918 
   955 
   919     ^ 
   956     ^ 
   920      #(FullSpec
   957     #(FullSpec
   921         name: standardGroups
   958        name: standardGroups
   922         window: 
   959        window: 
   923        (WindowSpec
   960       (WindowSpec
   924           label: 'Groups'
   961          label: 'Groups'
   925           name: 'Groups'
   962          name: 'Groups'
   926           min: (Point 10 10)
   963          min: (Point 10 10)
   927           bounds: (Rectangle 0 0 443 222)
   964          bounds: (Rectangle 0 0 450 267)
   928         )
   965        )
   929         component: 
   966        component: 
   930        (SpecCollection
   967       (SpecCollection
   931           collection: (
   968          collection: (
   932            (ViewSpec
   969           (ViewSpec
   933               name: 'Box'
   970              name: 'Box'
   934               layout: (LayoutFrame 3 0 3 0 95 0 95 0)
   971              layout: (LayoutFrame 3 0 3 0 95 0 95 0)
   935             )
   972            )
   936            (TransparentBoxSpec
   973           (TransparentBoxSpec
   937               name: 'TBox1'
   974              name: 'TBox1'
   938               layout: (LayoutFrame 113 0 3 0 204 0 95 0)
   975              layout: (LayoutFrame 113 0 3 0 204 0 95 0)
   939             )
   976            )
   940            (LabelSpec
   977           (LabelSpec
   941               label: 'TransparentBox'
   978              label: 'TransparentBox'
   942               name: 'Label1'
   979              name: 'Label1'
   943               layout: (AlignmentOrigin 106 0 5 0 0 0)
   980              layout: (AlignmentOrigin 106 0 5 0 0 0)
   944               style: (FontDescription helvetica medium roman 10)
   981              style: (FontDescription helvetica medium roman 10)
   945               resizeForLabel: true
   982              resizeForLabel: true
   946               adjust: left
   983              adjust: left
   947               canUIDrag: false
   984              canUIDrag: false
   948             )
   985            )
   949            (LabelSpec
   986           (LabelSpec
   950               label: 'Box'
   987              label: 'Box'
   951               name: 'ViewLabel'
   988              name: 'ViewLabel'
   952               layout: (AlignmentOrigin 6 0 5 0 0 0)
   989              layout: (AlignmentOrigin 6 0 5 0 0 0)
   953               style: (FontDescription helvetica medium roman 10)
   990              style: (FontDescription helvetica medium roman 10)
   954               resizeForLabel: true
   991              resizeForLabel: true
   955               adjust: left
   992              adjust: left
   956               canUIDrag: false
   993              canUIDrag: false
   957             )
   994            )
   958            (LabelSpec
   995           (LabelSpec
   959               label: 'Variable Panels'
   996              label: 'Variable Panels'
   960               name: 'VPanelLabel'
   997              name: 'VPanelLabel'
   961               layout: (LayoutFrame 3 0 104 0 208 0 127 0)
   998              layout: (LayoutFrame 3 0 104 0 208 0 127 0)
   962               style: (FontDescription helvetica medium roman 10)
   999              style: (FontDescription helvetica medium roman 10)
   963               adjust: left
  1000              adjust: left
   964               canUIDrag: false
  1001              canUIDrag: false
   965             )
  1002            )
   966            (VariableHorizontalPanelSpec
  1003           (VariableHorizontalPanelSpec
   967               name: 'Variable Horizontal Panel'
  1004              name: 'Variable Horizontal Panel'
   968               layout: (LayoutFrame 3 0 128 0 98 0 218 0)
  1005              layout: (LayoutFrame 3 0 128 0 98 0 218 0)
   969               component: 
  1006              component: 
   970              (SpecCollection
  1007             (SpecCollection
   971                 collection: (
  1008                collection: (
   972                  (LabelSpec
  1009                 (LabelSpec
   973                     label: 'A'
  1010                    label: 'A'
   974                     name: 'label4'
  1011                    name: 'label4'
   975                     style: (FontDescription helvetica medium roman 12)
  1012                    style: (FontDescription helvetica medium roman 12)
   976                     level: 2
  1013                    level: 2
   977                     canUIDrag: false
  1014                    canUIDrag: false
   978                   )
       
   979                  (LabelSpec
       
   980                     label: 'B'
       
   981                     name: 'label5'
       
   982                     style: (FontDescription helvetica medium roman 12)
       
   983                     level: 2
       
   984                     canUIDrag: false
       
   985                   )
       
   986                  )
  1015                  )
   987                
  1016                 (LabelSpec
   988               )
  1017                    label: 'B'
   989               handles: (Any 0.5 1.0)
  1018                    name: 'label5'
   990             )
  1019                    style: (FontDescription helvetica medium roman 12)
   991            (VariableVerticalPanelSpec
  1020                    level: 2
   992               name: 'Variable Vertical Panel'
  1021                    canUIDrag: false
   993               layout: (LayoutFrame 113 0 128 0 208 0 218 0)
       
   994               component: 
       
   995              (SpecCollection
       
   996                 collection: (
       
   997                  (LabelSpec
       
   998                     label: 'A'
       
   999                     name: 'label9'
       
  1000                     style: (FontDescription helvetica medium roman 12)
       
  1001                     level: 2
       
  1002                     canUIDrag: false
       
  1003                   )
       
  1004                  (LabelSpec
       
  1005                     label: 'B'
       
  1006                     name: 'label10'
       
  1007                     style: (FontDescription helvetica medium roman 12)
       
  1008                     level: 2
       
  1009                     canUIDrag: false
       
  1010                   )
       
  1011                  )
  1022                  )
  1012                
  1023                 )
  1013               )
  1024               
  1014               handles: (Any 0.5 1.0)
  1025              )
  1015             )
  1026              handles: (Any 0.5 1.0)
  1016            (FramedBoxSpec
  1027            )
  1017               label: 'Framed Box'
  1028           (VariableVerticalPanelSpec
  1018               name: 'Framed Box'
  1029              name: 'Variable Vertical Panel'
  1019               layout: (LayoutFrame 228 0 3 0 433 0 98 0)
  1030              layout: (LayoutFrame 113 0 128 0 208 0 218 0)
  1020               labelPosition: topLeft
  1031              component: 
  1021               translateLabel: true
  1032             (SpecCollection
  1022             )
  1033                collection: (
  1023            (LabelSpec
  1034                 (LabelSpec
  1024               label: 'Panels'
  1035                    label: 'A'
  1025               name: 'PanelLabel'
  1036                    name: 'label9'
  1026               layout: (LayoutFrame 228 0 104 0 433 0 127 0)
  1037                    style: (FontDescription helvetica medium roman 12)
  1027               style: (FontDescription helvetica medium roman 10)
  1038                    level: 2
  1028               adjust: left
  1039                    canUIDrag: false
  1029               canUIDrag: false
       
  1030             )
       
  1031            (HorizontalPanelViewSpec
       
  1032               name: 'Horizontal Panel'
       
  1033               layout: (LayoutFrame 228 0 128 0 312 0 218 0)
       
  1034               horizontalLayout: center
       
  1035               verticalLayout: center
       
  1036               horizontalSpace: 3
       
  1037               verticalSpace: 3
       
  1038               component: 
       
  1039              (SpecCollection
       
  1040                 collection: (
       
  1041                  (LabelSpec
       
  1042                     label: 'A'
       
  1043                     name: 'label1'
       
  1044                     style: (FontDescription helvetica medium roman 12)
       
  1045                     level: 2
       
  1046                     extent: (Point 23 23)
       
  1047                     canUIDrag: false
       
  1048                   )
       
  1049                  (LabelSpec
       
  1050                     label: 'B'
       
  1051                     name: 'label2'
       
  1052                     style: (FontDescription helvetica medium roman 12)
       
  1053                     level: 2
       
  1054                     extent: (Point 23 23)
       
  1055                     canUIDrag: false
       
  1056                   )
       
  1057                  (LabelSpec
       
  1058                     label: 'C'
       
  1059                     name: 'label3'
       
  1060                     style: (FontDescription helvetica medium roman 12)
       
  1061                     level: 2
       
  1062                     extent: (Point 23 23)
       
  1063                     canUIDrag: false
       
  1064                   )
       
  1065                  )
  1040                  )
  1066                
  1041                 (LabelSpec
  1067               )
  1042                    label: 'B'
  1068             )
  1043                    name: 'label10'
  1069            (VerticalPanelViewSpec
  1044                    style: (FontDescription helvetica medium roman 12)
  1070               name: 'Vertical Panel'
  1045                    level: 2
  1071               layout: (LayoutFrame 320 0 128 0 367 0 218 0)
  1046                    canUIDrag: false
  1072               horizontalLayout: center
       
  1073               verticalLayout: center
       
  1074               horizontalSpace: 3
       
  1075               verticalSpace: 3
       
  1076               component: 
       
  1077              (SpecCollection
       
  1078                 collection: (
       
  1079                  (LabelSpec
       
  1080                     label: 'A'
       
  1081                     name: 'label6'
       
  1082                     style: (FontDescription helvetica medium roman 12)
       
  1083                     level: 2
       
  1084                     extent: (Point 23 23)
       
  1085                     canUIDrag: false
       
  1086                   )
       
  1087                  (LabelSpec
       
  1088                     label: 'B'
       
  1089                     name: 'label7'
       
  1090                     style: (FontDescription helvetica medium roman 12)
       
  1091                     level: 2
       
  1092                     extent: (Point 23 23)
       
  1093                     canUIDrag: false
       
  1094                   )
       
  1095                  (LabelSpec
       
  1096                     label: 'C'
       
  1097                     name: 'label8'
       
  1098                     style: (FontDescription helvetica medium roman 12)
       
  1099                     level: 2
       
  1100                     extent: (Point 23 23)
       
  1101                     canUIDrag: false
       
  1102                   )
       
  1103                  )
  1047                  )
  1104                
  1048                 )
  1105               )
  1049               
  1106             )
  1050              )
  1107            (PanelViewSpec
  1051              handles: (Any 0.5 1.0)
  1108               name: 'Panel'
  1052            )
  1109               layout: (LayoutFrame 375 0 128 0 433 0 218 0)
  1053           (FramedBoxSpec
  1110               horizontalLayout: fitSpace
  1054              label: 'Framed Box'
  1111               verticalLayout: fitSpace
  1055              name: 'Framed Box'
  1112               horizontalSpace: 3
  1056              layout: (LayoutFrame 228 0 3 0 433 0 98 0)
  1113               verticalSpace: 3
  1057              labelPosition: topLeft
  1114               component: 
  1058              translateLabel: true
  1115              (SpecCollection
  1059            )
  1116                 collection: (
  1060           (LabelSpec
  1117                  (LabelSpec
  1061              label: 'Panels'
  1118                     label: 'A'
  1062              name: 'PanelLabel'
  1119                     name: 'label11'
  1063              layout: (LayoutFrame 228 0 104 0 433 0 127 0)
  1120                     style: (FontDescription helvetica medium roman 12)
  1064              style: (FontDescription helvetica medium roman 10)
  1121                     level: 2
  1065              adjust: left
  1122                     extent: (Point 23 23)
  1066              canUIDrag: false
  1123                     canUIDrag: false
  1067            )
  1124                   )
  1068           (HorizontalPanelViewSpec
  1125                  (LabelSpec
  1069              name: 'Horizontal Panel'
  1126                     label: 'B'
  1070              layout: (LayoutFrame 228 0 128 0 312 0 218 0)
  1127                     name: 'label12'
  1071              horizontalLayout: center
  1128                     style: (FontDescription helvetica medium roman 12)
  1072              verticalLayout: center
  1129                     level: 2
  1073              horizontalSpace: 3
  1130                     extent: (Point 23 23)
  1074              verticalSpace: 3
  1131                     canUIDrag: false
  1075              component: 
  1132                   )
  1076             (SpecCollection
  1133                  (LabelSpec
  1077                collection: (
  1134                     label: 'C'
  1078                 (LabelSpec
  1135                     name: 'label13'
  1079                    label: 'A'
  1136                     style: (FontDescription helvetica medium roman 12)
  1080                    name: 'label1'
  1137                     level: 2
  1081                    style: (FontDescription helvetica medium roman 12)
  1138                     extent: (Point 23 23)
  1082                    level: 2
  1139                     canUIDrag: false
  1083                    extent: (Point 23 23)
  1140                   )
  1084                    canUIDrag: false
  1141                  (LabelSpec
       
  1142                     label: 'D'
       
  1143                     name: 'label14'
       
  1144                     style: (FontDescription helvetica medium roman 12)
       
  1145                     level: 2
       
  1146                     extent: (Point 23 23)
       
  1147                     canUIDrag: false
       
  1148                   )
       
  1149                  (LabelSpec
       
  1150                     label: 'E'
       
  1151                     name: 'label15'
       
  1152                     style: (FontDescription helvetica medium roman 12)
       
  1153                     level: 2
       
  1154                     extent: (Point 23 23)
       
  1155                     canUIDrag: false
       
  1156                   )
       
  1157                  )
  1085                  )
  1158                
  1086                 (LabelSpec
  1159               )
  1087                    label: 'B'
  1160             )
  1088                    name: 'label2'
  1161            )
  1089                    style: (FontDescription helvetica medium roman 12)
  1162          
  1090                    level: 2
  1163         )
  1091                    extent: (Point 23 23)
  1164       )
  1092                    canUIDrag: false
       
  1093                  )
       
  1094                 (LabelSpec
       
  1095                    label: 'C'
       
  1096                    name: 'label3'
       
  1097                    style: (FontDescription helvetica medium roman 12)
       
  1098                    level: 2
       
  1099                    extent: (Point 23 23)
       
  1100                    canUIDrag: false
       
  1101                  )
       
  1102                 )
       
  1103               
       
  1104              )
       
  1105            )
       
  1106           (VerticalPanelViewSpec
       
  1107              name: 'Vertical Panel'
       
  1108              layout: (LayoutFrame 320 0 128 0 367 0 218 0)
       
  1109              horizontalLayout: center
       
  1110              verticalLayout: center
       
  1111              horizontalSpace: 3
       
  1112              verticalSpace: 3
       
  1113              component: 
       
  1114             (SpecCollection
       
  1115                collection: (
       
  1116                 (LabelSpec
       
  1117                    label: 'A'
       
  1118                    name: 'label6'
       
  1119                    style: (FontDescription helvetica medium roman 12)
       
  1120                    level: 2
       
  1121                    extent: (Point 23 23)
       
  1122                    canUIDrag: false
       
  1123                  )
       
  1124                 (LabelSpec
       
  1125                    label: 'B'
       
  1126                    name: 'label7'
       
  1127                    style: (FontDescription helvetica medium roman 12)
       
  1128                    level: 2
       
  1129                    extent: (Point 23 23)
       
  1130                    canUIDrag: false
       
  1131                  )
       
  1132                 (LabelSpec
       
  1133                    label: 'C'
       
  1134                    name: 'label8'
       
  1135                    style: (FontDescription helvetica medium roman 12)
       
  1136                    level: 2
       
  1137                    extent: (Point 23 23)
       
  1138                    canUIDrag: false
       
  1139                  )
       
  1140                 )
       
  1141               
       
  1142              )
       
  1143            )
       
  1144           (PanelViewSpec
       
  1145              name: 'Panel'
       
  1146              layout: (LayoutFrame 375 0 128 0 433 0 218 0)
       
  1147              horizontalLayout: fitSpace
       
  1148              verticalLayout: fitSpace
       
  1149              horizontalSpace: 3
       
  1150              verticalSpace: 3
       
  1151              component: 
       
  1152             (SpecCollection
       
  1153                collection: (
       
  1154                 (LabelSpec
       
  1155                    label: 'A'
       
  1156                    name: 'label11'
       
  1157                    style: (FontDescription helvetica medium roman 12)
       
  1158                    level: 2
       
  1159                    extent: (Point 23 23)
       
  1160                    canUIDrag: false
       
  1161                  )
       
  1162                 (LabelSpec
       
  1163                    label: 'B'
       
  1164                    name: 'label12'
       
  1165                    style: (FontDescription helvetica medium roman 12)
       
  1166                    level: 2
       
  1167                    extent: (Point 23 23)
       
  1168                    canUIDrag: false
       
  1169                  )
       
  1170                 (LabelSpec
       
  1171                    label: 'C'
       
  1172                    name: 'label13'
       
  1173                    style: (FontDescription helvetica medium roman 12)
       
  1174                    level: 2
       
  1175                    extent: (Point 23 23)
       
  1176                    canUIDrag: false
       
  1177                  )
       
  1178                 (LabelSpec
       
  1179                    label: 'D'
       
  1180                    name: 'label14'
       
  1181                    style: (FontDescription helvetica medium roman 12)
       
  1182                    level: 2
       
  1183                    extent: (Point 23 23)
       
  1184                    canUIDrag: false
       
  1185                  )
       
  1186                 (LabelSpec
       
  1187                    label: 'E'
       
  1188                    name: 'label15'
       
  1189                    style: (FontDescription helvetica medium roman 12)
       
  1190                    level: 2
       
  1191                    extent: (Point 23 23)
       
  1192                    canUIDrag: false
       
  1193                  )
       
  1194                 )
       
  1195               
       
  1196              )
       
  1197            )
       
  1198           )
       
  1199         
       
  1200        )
       
  1201      )
  1165 !
  1202 !
  1166 
  1203 
  1167 standardLists
  1204 standardLists
  1168     "This resource specification was automatically generated
  1205     "This resource specification was automatically generated
  1169      by the UIPainter of ST/X."
  1206      by the UIPainter of ST/X."
  1899     specs do:[:aSpec|
  1936     specs do:[:aSpec|
  1900         point x > ext x ifTrue:[point x:1].
  1937         point x > ext x ifTrue:[point x:1].
  1901         point y > ext y ifTrue:[point y:1].
  1938         point y > ext y ifTrue:[point y:1].
  1902 
  1939 
  1903         spec := aSpec copy.
  1940         spec := aSpec copy.
  1904         spec layout:(LayoutOrigin fromPoint:point).
  1941         spec keepUILayout ifFalse:[
       
  1942             spec layout:(LayoutOrigin fromPoint:point).
       
  1943         ].
  1905         coll add:spec.
  1944         coll add:spec.
  1906         point := point + (20@20).
  1945         point := point + (20@20).
  1907     ].
  1946     ].
  1908     gallery update.
  1947     gallery update.
  1909 
  1948