UISelectionPanel.st
changeset 795 9987c25de0f9
parent 753 45be0e91a172
child 797 6494228f845a
equal deleted inserted replaced
794:212bc7e46765 795:9987c25de0f9
    80 !UISelectionPanel class methodsFor:'accessing'!
    80 !UISelectionPanel class methodsFor:'accessing'!
    81 
    81 
    82 specifications
    82 specifications
    83 
    83 
    84     ^ #(
    84     ^ #(
    85         #( 'Standards'  #( 
    85         #( 'Standard'  #( 
    86                             #('Buttons' standardButtons)
    86                             #('Buttons' standardButtons)
    87                             #('Menus'   standardMenus)
    87                             #('Menus'   standardMenus)
    88                             #('Texts'   standardTexts)
    88                             #('Text'    standardTexts)
    89                             #('Lists'   standardLists)
    89                             #('Lists'   standardLists)
    90                             #('Groups'  standardGroups)
    90                             #('Groups'  standardGroups)
    91                             #('Misc'    standardMisc)
    91                             #('Misc'    standardMisc)
    92                          )
    92                          )
    93          )
    93          )
    97                           )
    97                           )
    98          )
    98          )
    99 
    99 
   100         #( 'User Def.'   #userDefined )
   100         #( 'User Def.'   #userDefined )
   101      )
   101      )
       
   102 
       
   103     "Modified: / 21.4.1998 / 12:04:22 / cg"
   102 !
   104 !
   103 
   105 
   104 userClass
   106 userClass
   105     "return the class which provides the user defined gallery specs."
   107     "return the class which provides the user defined gallery specs."
   106 
   108 
   371      
   373      
   372        #(#FullSpec
   374        #(#FullSpec
   373           #window: 
   375           #window: 
   374            #(#WindowSpec
   376            #(#WindowSpec
   375               #name: 'Buttons'
   377               #name: 'Buttons'
   376               #layout: #(#LayoutFrame 141 0 235 0 619 0 438 0)
   378               #layout: #(#LayoutFrame 216 0 173 0 694 0 376 0)
   377               #label: 'Buttons'
   379               #label: 'Buttons'
   378               #min: #(#Point 10 10)
   380               #min: #(#Point 10 10)
   379               #max: #(#Point 1280 1024)
   381               #max: #(#Point 1280 1024)
   380               #bounds: #(#Rectangle 141 235 620 439)
   382               #bounds: #(#Rectangle 216 173 695 377)
   381               #usePreferredExtent: false
   383               #usePreferredExtent: false
   382           )
   384           )
   383           #component: 
   385           #component: 
   384            #(#SpecCollection
   386            #(#SpecCollection
   385               #collection: 
   387               #collection: 
   432                     #layout: #(#LayoutFrame 157 0 79 0 293 0 101 0)
   434                     #layout: #(#LayoutFrame 157 0 79 0 293 0 101 0)
   433                     #label: 'Check Box'
   435                     #label: 'Check Box'
   434                 )
   436                 )
   435                  #(#CheckToggleSpec
   437                  #(#CheckToggleSpec
   436                     #name: 'Check Toggle'
   438                     #name: 'Check Toggle'
   437                     #layout: #(#LayoutFrame 157 0 111 0 176 0 130 0)
   439                     #layout: #(#LayoutOrigin 157 0 113 0)
   438                     #isTriggerOnDown: true
   440                     #isTriggerOnDown: true
   439                     #showLamp: false
   441                     #showLamp: false
   440                     #lampColor: #(#Color 100.0 100.0 0.0)
   442                     #lampColor: #(#Color 100.0 100.0 0.0)
   441                 )
   443                 )
   442                  #(#LabelSpec
   444                  #(#LabelSpec
   443                     #name: 'CheckToggleLabel'
   445                     #name: 'CheckToggleLabel'
   444                     #layout: #(#AlignmentOrigin 182 0 115 0 0 0)
   446                     #layout: #(#AlignmentOrigin 180 0 112 0 0 0)
   445                     #label: 'Check Toggle'
   447                     #label: 'Check Toggle'
   446                     #style: #(#FontDescription #helvetica #medium #roman 10)
       
   447                     #adjust: #left
   448                     #adjust: #left
   448                     #resizeForLabel: true
   449                     #resizeForLabel: true
   449                     #canUIDrag: false
   450                     #canUIDrag: false
   450                 )
   451                 )
   451                  #(#ButtonSpec
   452                  #(#ButtonSpec
   453                     #layout: #(#LayoutFrame 309 0 15 0 445 0 37 0)
   454                     #layout: #(#LayoutFrame 309 0 15 0 445 0 37 0)
   454                     #label: 'Model Button'
   455                     #label: 'Model Button'
   455                 )
   456                 )
   456                  #(#LabelSpec
   457                  #(#LabelSpec
   457                     #name: 'UpDownButtonLabel'
   458                     #name: 'UpDownButtonLabel'
   458                     #layout: #(#AlignmentOrigin 361 0 54 0 0 0)
   459                     #layout: #(#AlignmentOrigin 361 0 49 0 0 0)
   459                     #label: 'UpDown Button'
   460                     #label: 'Spin Button'
   460                     #style: #(#FontDescription #helvetica #medium #roman 10)
       
   461                     #adjust: #left
   461                     #adjust: #left
   462                     #resizeForLabel: true
   462                     #resizeForLabel: true
   463                     #canUIDrag: false
   463                     #canUIDrag: false
   464                 )
   464                 )
   465                  #(#UpDownButtonSpec
   465                  #(#UpDownButtonSpec
   467                     #layout: #(#LayoutFrame 309 0 47 0 354 0 69 0)
   467                     #layout: #(#LayoutFrame 309 0 47 0 354 0 69 0)
   468                     #orientation: #horizontal
   468                     #orientation: #horizontal
   469                 )
   469                 )
   470                  #(#LabelSpec
   470                  #(#LabelSpec
   471                     #name: 'ArrowButtonsLabel'
   471                     #name: 'ArrowButtonsLabel'
   472                     #layout: #(#AlignmentOrigin 361 0 86 0 0 0)
   472                     #layout: #(#AlignmentOrigin 361 0 83 0 0 0)
   473                     #label: 'Arrow Button'
   473                     #label: 'Arrow Button'
   474                     #style: #(#FontDescription #helvetica #medium #roman 10)
       
   475                     #adjust: #left
   474                     #adjust: #left
   476                     #resizeForLabel: true
   475                     #resizeForLabel: true
   477                     #canUIDrag: false
   476                     #canUIDrag: false
   478                 )
   477                 )
   479                  #(#ArrowButtonSpec
   478                  #(#ArrowButtonSpec
   483                     #direction: #right
   482                     #direction: #right
   484                 )
   483                 )
   485               )
   484               )
   486           )
   485           )
   487       )
   486       )
       
   487 
       
   488     "Modified: / 21.4.1998 / 13:03:11 / cg"
   488 !
   489 !
   489 
   490 
   490 standardGraphs
   491 standardGraphs
   491     "this window spec was automatically generated by the ST/X UIPainter"
   492     "this window spec was automatically generated by the ST/X UIPainter"
   492 
   493 
   914      
   915      
   915        #(#FullSpec
   916        #(#FullSpec
   916           #window: 
   917           #window: 
   917            #(#WindowSpec
   918            #(#WindowSpec
   918               #name: 'Menus'
   919               #name: 'Menus'
   919               #layout: #(#LayoutFrame 56 0 405 0 532 0 594 0)
   920               #layout: #(#LayoutFrame 216 0 173 0 692 0 362 0)
   920               #label: 'Menus'
   921               #label: 'Menus'
   921               #min: #(#Point 10 10)
   922               #min: #(#Point 10 10)
   922               #max: #(#Point 1280 1024)
   923               #max: #(#Point 1280 1024)
   923               #bounds: #(#Rectangle 56 405 533 595)
   924               #bounds: #(#Rectangle 216 173 693 363)
   924               #usePreferredExtent: false
   925               #usePreferredExtent: false
   925           )
   926           )
   926           #component: 
   927           #component: 
   927            #(#SpecCollection
   928            #(#SpecCollection
   928               #collection: 
   929               #collection: 
   931                     #name: 'Tool Bar'
   932                     #name: 'Tool Bar'
   932                     #layout: #(#LayoutFrame 15 0 30 0 140 0 62 0)
   933                     #layout: #(#LayoutFrame 15 0 30 0 140 0 62 0)
   933                 )
   934                 )
   934                  #(#LabelSpec
   935                  #(#LabelSpec
   935                     #name: 'ToolBarLabel'
   936                     #name: 'ToolBarLabel'
   936                     #layout: #(#LayoutFrame 15 0 15 0 56 0 30 0)
   937                     #layout: #(#AlignmentOrigin 15 0 30 0 0 1)
   937                     #label: 'Tool Bar'
   938                     #label: 'Tool Bar'
   938                     #style: #(#FontDescription #helvetica #medium #roman 10)
   939                     #style: #(#FontDescription #helvetica #medium #roman 10)
   939                     #adjust: #left
   940                     #adjust: #left
   940                     #resizeForLabel: true
   941                     #resizeForLabel: true
   941                     #canUIDrag: false
   942                     #canUIDrag: false
   942                 )
   943                 )
   943                  #(#PopUpListSpec
   944                  #(#PopUpListSpec
   944                     #name: 'PopUp List'
   945                     #name: 'PopUp List'
   945                     #layout: #(#LayoutFrame 15 0 72 0 140 0 94 0)
   946                     #layout: #(#LayoutFrame 15 0 72 0 140 0 94 0)
   946                     #label: 'PopUp List'
   947                     #label: 'PopUp List'
   947                     #style: #(#FontDescription #helvetica #medium #roman 10)
       
   948                     #useIndex: false
   948                     #useIndex: false
   949                 )
   949                 )
   950                  #(#ComboListSpec
   950                  #(#ComboListSpec
   951                     #name: 'Combo List'
   951                     #name: 'Combo List'
   952                     #layout: #(#LayoutFrame 15 0 102 0 140 0 122 0)
   952                     #layout: #(#LayoutFrame 15 0 102 0 140 0 122 0)
   953                     #useIndex: false
   953                     #useIndex: false
   954                 )
   954                 )
   955                  #(#LabelSpec
   955                  #(#LabelSpec
   956                     #name: 'ComboListLabel'
   956                     #name: 'ComboListLabel'
   957                     #layout: #(#LayoutFrame 17 0 104 0 79 0 122 0)
   957                     #layout: #(#AlignmentOrigin 17 0 124 0 0 1)
   958                     #label: 'Combo List'
   958                     #label: 'Combo List'
   959                     #style: #(#FontDescription #helvetica #medium #roman 10)
   959                     #style: #(#FontDescription #helvetica #medium #roman 10)
   960                     #adjust: #left
   960                     #adjust: #left
   961                     #resizeForLabel: true
   961                     #resizeForLabel: true
   962                     #canUIDrag: false
   962                     #canUIDrag: false
   965                     #name: 'Combo Box'
   965                     #name: 'Combo Box'
   966                     #layout: #(#LayoutFrame 15 0 130 0 140 0 150 0)
   966                     #layout: #(#LayoutFrame 15 0 130 0 140 0 150 0)
   967                 )
   967                 )
   968                  #(#LabelSpec
   968                  #(#LabelSpec
   969                     #name: 'ComboBoxLabel'
   969                     #name: 'ComboBoxLabel'
   970                     #layout: #(#LayoutFrame 17 0 132 0 79 0 150 0)
   970                     #layout: #(#AlignmentOrigin 17 0 150 0 0 1)
   971                     #label: 'Combo Box'
   971                     #label: 'Combo Box'
   972                     #style: #(#FontDescription #helvetica #medium #roman 10)
   972                     #style: #(#FontDescription #helvetica #medium #roman 10)
   973                     #adjust: #left
   973                     #adjust: #left
   974                     #resizeForLabel: true
   974                     #resizeForLabel: true
   975                     #canUIDrag: false
   975                     #canUIDrag: false
  1014                     #canUIDrag: false
  1014                     #canUIDrag: false
  1015                 )
  1015                 )
  1016               )
  1016               )
  1017           )
  1017           )
  1018       )
  1018       )
       
  1019 
       
  1020     "Modified: / 21.4.1998 / 13:50:08 / cg"
  1019 !
  1021 !
  1020 
  1022 
  1021 standardMisc
  1023 standardMisc
  1022     "This resource specification was automatically generated
  1024     "This resource specification was automatically generated
  1023      by the UIPainter of ST/X."
  1025      by the UIPainter of ST/X."
  1178           )
  1180           )
  1179       )
  1181       )
  1180 !
  1182 !
  1181 
  1183 
  1182 standardTexts
  1184 standardTexts
  1183     "this window spec was automatically generated by the ST/X UIPainter"
  1185     "This resource specification was automatically generated
  1184 
  1186      by the UIPainter of ST/X."
  1185     "do not manually edit this - the painter/builder may not be able to
  1187 
  1186      handle the specification if its corrupted."
  1188     "Do not manually edit this!! If it is corrupted,
       
  1189      the UIPainter may not be able to read the specification."
  1187 
  1190 
  1188     "
  1191     "
  1189      UIPainter new openOnClass:UISelectionPanel andSelector:#standardTexts
  1192      UIPainter new openOnClass:UISelectionPanel andSelector:#standardTexts
  1190      UISelectionPanel new openInterface:#standardTexts
  1193      UISelectionPanel new openInterface:#standardTexts
  1191     "
  1194     "
  1196      
  1199      
  1197        #(#FullSpec
  1200        #(#FullSpec
  1198           #window: 
  1201           #window: 
  1199            #(#WindowSpec
  1202            #(#WindowSpec
  1200               #name: 'Texts'
  1203               #name: 'Texts'
  1201               #layout: #(#LayoutFrame 147 0 281 0 613 0 487 0)
  1204               #layout: #(#LayoutFrame 216 0 173 0 682 0 379 0)
  1202               #label: 'Texts'
  1205               #label: 'Texts'
  1203               #min: #(#Point 10 10)
  1206               #min: #(#Point 10 10)
  1204               #max: #(#Point 1280 1024)
  1207               #max: #(#Point 1280 1024)
  1205               #bounds: #(#Rectangle 147 281 614 488)
  1208               #bounds: #(#Rectangle 216 173 683 380)
  1206               #usePreferredExtent: false
  1209               #usePreferredExtent: false
  1207           )
  1210           )
  1208           #component: 
  1211           #component: 
  1209            #(#SpecCollection
  1212            #(#SpecCollection
  1210               #collection: 
  1213               #collection: 
  1243                     #name: 'Entry Field'
  1246                     #name: 'Entry Field'
  1244                     #layout: #(#LayoutFrame 15 0 125 0 220 0 147 0)
  1247                     #layout: #(#LayoutFrame 15 0 125 0 220 0 147 0)
  1245                 )
  1248                 )
  1246                  #(#LabelSpec
  1249                  #(#LabelSpec
  1247                     #name: 'EntryFieldLabel'
  1250                     #name: 'EntryFieldLabel'
  1248                     #layout: #(#LayoutFrame 53 0 127 0 106 0 147 0)
  1251                     #layout: #(#AlignmentOrigin 53 0 147 0 0 1)
  1249                     #label: 'Entry Field'
  1252                     #label: 'Entry Field'
  1250                     #style: #(#FontDescription #helvetica #medium #roman 10)
  1253                     #style: #(#FontDescription #helvetica #medium #roman 10)
  1251                     #adjust: #left
  1254                     #adjust: #left
  1252                     #resizeForLabel: true
  1255                     #resizeForLabel: true
  1253                     #canUIDrag: false
  1256                     #canUIDrag: false
  1258                     #label: 'Label'
  1261                     #label: 'Label'
  1259                 )
  1262                 )
  1260               )
  1263               )
  1261           )
  1264           )
  1262       )
  1265       )
       
  1266 
       
  1267     "Modified: / 21.4.1998 / 18:42:30 / cg"
  1263 !
  1268 !
  1264 
  1269 
  1265 standardUserPanel
  1270 standardUserPanel
  1266     "this window spec was automatically generated by the ST/X UIPainter"
  1271     "this window spec was automatically generated by the ST/X UIPainter"
  1267 
  1272 
  1562 majorSelection
  1567 majorSelection
  1563     ^ majorSelection ? 0
  1568     ^ majorSelection ? 0
  1564 !
  1569 !
  1565 
  1570 
  1566 majorSelection:aSelection
  1571 majorSelection:aSelection
  1567     |spec gallery|
  1572     |spec g gallery|
  1568 
  1573 
  1569     (majorSelection == aSelection or:[aSelection == 0]) ifTrue:[
  1574     (majorSelection == aSelection or:[aSelection == 0]) ifTrue:[
  1570         ^ self
  1575         ^ self
  1571     ].
  1576     ].
  1572 
  1577 
  1573     (self builder componentAt:#gallery) builder:nil.
  1578     (g := self builder componentAt:#gallery) notNil ifTrue:[
       
  1579         g builder:nil.
       
  1580     ].
  1574 
  1581 
  1575     majorSelection := aSelection.
  1582     majorSelection := aSelection.
  1576     spec := ((self class specifications) at:majorSelection) last.
  1583     spec := ((self class specifications) at:majorSelection) last.
  1577 
  1584 
  1578     gallery := self galleryModel.
  1585     gallery := self galleryModel.
  1585     ] ifTrue:[
  1592     ] ifTrue:[
  1586         self perform:spec.
  1593         self perform:spec.
  1587     ].
  1594     ].
  1588     gallery value:1.
  1595     gallery value:1.
  1589 
  1596 
  1590 
  1597     "Modified: / 21.4.1998 / 11:59:08 / cg"
  1591 ! !
  1598 ! !
  1592 
  1599 
  1593 !UISelectionPanel methodsFor:'startup / release'!
  1600 !UISelectionPanel methodsFor:'startup / release'!
  1594 
  1601 
  1595 closeRequest
  1602 closeRequest