UIPainter.st
changeset 446 b513a621a7a4
parent 440 1198f19712ff
child 447 664522b11cde
equal deleted inserted replaced
445:ddfa937f6d1d 446:b513a621a7a4
     9  other person.  No title to or ownership of the software is
     9  other person.  No title to or ownership of the software is
    10  hereby transferred.
    10  hereby transferred.
    11 "
    11 "
    12 
    12 
    13 
    13 
    14 ApplicationModel subclass:#UIPainter
    14 ToolApplicationModel subclass:#UIPainter
    15 	instanceVariableNames:'treeView selectionPanel tabSelection specClass specSelector
    15 	instanceVariableNames:'treeView selectionPanel tabSelection specClass specSelector
    16 		specSuperclass aspects layoutCanvas helpCanvas specCanvas
    16 		specSuperclass aspects layoutCanvas helpCanvas specCanvas
    17 		transcript'
    17 		transcript'
    18 	classVariableNames:'IconStepUp IconStepOut IconStepIn IconStepDown'
    18 	classVariableNames:''
    19 	poolDictionaries:''
    19 	poolDictionaries:''
    20 	category:'Interface-UIPainter'
    20 	category:'Interface-UIPainter'
    21 !
    21 !
    22 
    22 
    23 SelectionInTreeView subclass:#TreeView
    23 SelectionInTreeView subclass:#TreeView
    95     "ST-80 compatible; always returns false
    95     "ST-80 compatible; always returns false
    96     "
    96     "
    97     ^ false
    97     ^ false
    98 
    98 
    99 
    99 
       
   100 ! !
       
   101 
       
   102 !UIPainter class methodsFor:'accessing'!
       
   103 
       
   104 label
       
   105 
       
   106     ^'GUI Builder'
   100 ! !
   107 ! !
   101 
   108 
   102 !UIPainter class methodsFor:'help specs'!
   109 !UIPainter class methodsFor:'help specs'!
   103 
   110 
   104 helpSpec
   111 helpSpec
   273         ]
   280         ]
   274     ].
   281     ].
   275     ^ stream contents
   282     ^ stream contents
   276 ! !
   283 ! !
   277 
   284 
   278 !UIPainter class methodsFor:'icons'!
       
   279 
       
   280 iconAlignB
       
   281     "returns image assigned to align bottom
       
   282     "
       
   283 
       
   284     <resource: #fileImage>
       
   285 
       
   286     ^ Image fromFile:'b_alignB.xbm'
       
   287 
       
   288     "Modified: / 29.10.1997 / 03:18:16 / cg"
       
   289 !
       
   290 
       
   291 iconAlignCenterH
       
   292     "returns image assigned to center horizontal
       
   293     "
       
   294 
       
   295     <resource: #fileImage>
       
   296 
       
   297     ^ Image fromFile:'b_alignCH.xbm'
       
   298 
       
   299     "Modified: / 29.10.1997 / 03:18:34 / cg"
       
   300 !
       
   301 
       
   302 iconAlignCenterV
       
   303     "returns image assigned to center vertical
       
   304     "
       
   305 
       
   306     <resource: #fileImage>
       
   307 
       
   308     ^ Image fromFile:'b_alignCV.xbm'
       
   309 
       
   310     "Modified: / 29.10.1997 / 03:18:39 / cg"
       
   311 !
       
   312 
       
   313 iconAlignL
       
   314     "returns image assigned to align left
       
   315     "
       
   316 
       
   317     <resource: #fileImage>
       
   318 
       
   319     ^ Image fromFile:'b_alignL.xbm'
       
   320 
       
   321     "Modified: / 29.10.1997 / 03:18:43 / cg"
       
   322 !
       
   323 
       
   324 iconAlignLR
       
   325     "returns image assigned to align left and right
       
   326     "
       
   327 
       
   328     <resource: #fileImage>
       
   329 
       
   330     ^ Image fromFile:'b_alignLR.xbm'
       
   331 
       
   332     "Modified: / 29.10.1997 / 03:18:48 / cg"
       
   333 !
       
   334 
       
   335 iconAlignR
       
   336     "returns image assigned to align right
       
   337     "
       
   338 
       
   339     <resource: #fileImage>
       
   340 
       
   341     ^ Image fromFile:'b_alignR.xbm'
       
   342 
       
   343     "Modified: / 29.10.1997 / 03:18:51 / cg"
       
   344 !
       
   345 
       
   346 iconAlignT
       
   347     "returns image assigned to align top
       
   348     "
       
   349 
       
   350     <resource: #fileImage>
       
   351 
       
   352     ^ Image fromFile:'b_alignT.xbm'
       
   353 
       
   354     "Modified: / 29.10.1997 / 03:18:56 / cg"
       
   355 !
       
   356 
       
   357 iconAlignTB
       
   358     "returns image assigned to align top and bottom
       
   359     "
       
   360 
       
   361     <resource: #fileImage>
       
   362 
       
   363     ^ Image fromFile:'b_alignTB.xbm'
       
   364 
       
   365     "Modified: / 29.10.1997 / 03:19:01 / cg"
       
   366 !
       
   367 
       
   368 iconInstall
       
   369 
       
   370     <resource: #fileImage>
       
   371 
       
   372     ^ Image fromFile:'bitmaps/xpmBitmaps/misc_tools/SaveButton.xpm'
       
   373 
       
   374     "Modified: / 29.10.1997 / 03:19:06 / cg"
       
   375 !
       
   376 
       
   377 iconStepDown
       
   378     "returns image assigned to step down (change hierarchy).
       
   379     "
       
   380 
       
   381     <resource: #fileImage>
       
   382 
       
   383     IconStepDown isNil ifTrue:[
       
   384         IconStepDown := ((Image fromFile:'stepOver.xpm') rotated:90) flipHorizontal
       
   385     ].
       
   386   ^ IconStepDown
       
   387 
       
   388 "
       
   389 IconStepDown := nil
       
   390 "
       
   391 
       
   392     "Modified: / 29.10.1997 / 03:19:14 / cg"
       
   393 !
       
   394 
       
   395 iconStepIn
       
   396     "returns image assigned to step in (change hierarchy).
       
   397     "
       
   398 
       
   399     <resource: #fileImage>
       
   400 
       
   401     IconStepIn isNil ifTrue:[
       
   402         IconStepIn := ((Image fromFile:'stepIn.xpm') rotated:90) flipHorizontal
       
   403     ].
       
   404   ^ IconStepIn
       
   405 
       
   406     "Modified: / 29.10.1997 / 03:19:19 / cg"
       
   407 !
       
   408 
       
   409 iconStepOut
       
   410     "returns image assigned to step out (change hierarchy).
       
   411     "
       
   412 
       
   413     <resource: #fileImage>
       
   414 
       
   415     IconStepOut isNil ifTrue:[
       
   416         IconStepOut := ((Image fromFile:'stepOut.xpm') rotated:90) flipHorizontal
       
   417     ].
       
   418   ^ IconStepOut
       
   419 
       
   420     "Modified: / 29.10.1997 / 03:19:25 / cg"
       
   421 !
       
   422 
       
   423 iconStepUp
       
   424     "returns image assigned to step up (change hierarchy).
       
   425     "
       
   426 
       
   427     <resource: #fileImage>
       
   428 
       
   429     IconStepUp isNil ifTrue:[
       
   430         IconStepUp := ((Image fromFile:'stepOver.xpm') rotated:90) flipHorizontal flipVertical
       
   431     ].
       
   432   ^ IconStepUp
       
   433 
       
   434 "
       
   435 IconStepUp := nil
       
   436 "
       
   437 
       
   438     "Modified: / 29.10.1997 / 03:19:29 / cg"
       
   439 ! !
       
   440 
       
   441 !UIPainter class methodsFor:'interface specs'!
   285 !UIPainter class methodsFor:'interface specs'!
   442 
   286 
   443 gridParametersSpec
   287 gridParametersSpec
   444     "this window spec was automatically generated by the ST/X UIPainter"
   288     "this window spec was automatically generated by the ST/X UIPainter"
   445 
   289 
   448 
   292 
   449     "
   293     "
   450      UIPainter new openOnClass:UIPainter andSelector:#gridParametersSpec
   294      UIPainter new openOnClass:UIPainter andSelector:#gridParametersSpec
   451      UIPainter new openInterface:#gridParametersSpec
   295      UIPainter new openInterface:#gridParametersSpec
   452     "
   296     "
   453     "UIPainter open"
       
   454 
   297 
   455     <resource: #canvas>
   298     <resource: #canvas>
   456 
   299 
   457     ^
   300     ^
   458 
   301      
   459        #(#FullSpec
   302        #(#FullSpec
   460           #'window:' 
   303           #'window:' 
   461            #(#WindowSpec
   304            #(#WindowSpec
   462               #'name:' 'Grid Parameters:'
   305               #'name:' 'Grid Parameters:'
   463               #'layout:' #(#LayoutFrame 219 0 193 0 484 0 366 0)
   306               #'layout:' #(#LayoutFrame 229 0 394 0 494 0 543 0)
   464               #'label:' 'Grid Parameters:'
   307               #'label:' 'Grid Parameters:'
   465               #'min:' #(#Point 10 10)
   308               #'min:' #(#Point 10 10)
   466               #'max:' #(#Point 1280 1024)
   309               #'max:' #(#Point 1280 1024)
   467               #'bounds:' #(#Rectangle 219 193 485 367)
   310               #'bounds:' #(#Rectangle 229 394 495 544)
       
   311               #'usePreferredExtent:' false
   468           )
   312           )
   469           #'component:' 
   313           #'component:' 
   470            #(#SpecCollection
   314            #(#SpecCollection
   471               #'collection:' 
   315               #'collection:' 
   472                #(
   316                #(
   473                  #(#LabelSpec
       
   474                     #'name:' 'gridParameters'
       
   475                     #'layout:' #(#LayoutOrigin 0 0 0 0)
       
   476                     #'label:' 'Grid Parameters:'
       
   477                     #'adjust:' #left
       
   478                     #'resizeForLabel:' true
       
   479                 )
       
   480                  #(#CheckBoxSpec
   317                  #(#CheckBoxSpec
   481                     #'name:' 'show'
   318                     #'name:' 'show'
   482                     #'layout:' #(#Point 30 31)
   319                     #'layout:' #(#Point 13 14)
   483                     #'model:' #showGrid
   320                     #'model:' #showGrid
   484                     #'label:' 'show grid'
   321                     #'label:' 'Show grid'
   485                 )
   322                 )
   486                  #(#CheckBoxSpec
   323                  #(#CheckBoxSpec
   487                     #'name:' 'align'
   324                     #'name:' 'align'
   488                     #'layout:' #(#Point 30 57)
   325                     #'layout:' #(#Point 117 14)
   489                     #'model:' #alignToGrid
   326                     #'model:' #alignToGrid
   490                     #'label:' 'align to grid'
   327                     #'label:' 'Align to Grid'
   491                 )
   328                 )
   492                  #(#LabelSpec
   329                  #(#LabelSpec
   493                     #'name:' 'hrzLabel'
   330                     #'name:' 'hrzLabel'
   494                     #'layout:' #(#Point 90 94)
   331                     #'layout:' #(#AlignmentOrigin 136 0 62 0 1 0.5)
   495                     #'label:' 'pixels horizontal'
   332                     #'label:' 'Horizontal Pixels:'
       
   333                     #'adjust:' #right
   496                     #'resizeForLabel:' true
   334                     #'resizeForLabel:' true
   497                 )
   335                 )
   498                  #(#InputFieldSpec
   336                  #(#InputFieldSpec
   499                     #'name:' 'hrzField'
   337                     #'name:' 'hrzField'
   500                     #'layout:' #(#LayoutFrame 33 0 91 0 86 0 113 0)
   338                     #'layout:' #(#LayoutFrame 141 0 51 0 194 0 73 0)
   501                     #'model:' #hspace
   339                     #'model:' #hspace
   502                     #'type:' #numberOrNil
   340                     #'type:' #numberOrNil
   503                 )
   341                 )
   504                  #(#LabelSpec
   342                  #(#LabelSpec
   505                     #'name:' 'vrtLabel'
   343                     #'name:' 'vrtLabel'
   506                     #'layout:' #(#Point 90 118)
   344                     #'layout:' #(#AlignmentOrigin 137 0 85 0 1 0.5)
   507                     #'label:' 'pixels vertical'
   345                     #'label:' 'Vertical Pixels:'
       
   346                     #'adjust:' #right
   508                     #'resizeForLabel:' true
   347                     #'resizeForLabel:' true
   509                 )
   348                 )
   510                  #(#InputFieldSpec
   349                  #(#InputFieldSpec
   511                     #'name:' 'vrtField'
   350                     #'name:' 'vrtField'
   512                     #'layout:' #(#LayoutFrame 33 0 115 0 86 0 137 0)
   351                     #'layout:' #(#LayoutFrame 141 0 74 0 194 0 96 0)
   513                     #'model:' #vspace
   352                     #'model:' #vspace
   514                     #'type:' #numberOrNil
   353                     #'type:' #numberOrNil
   515                 )
   354                 )
   516                  #(#HorizontalPanelViewSpec
   355                  #(#UISubSpecification
   517                     #'name:' 'horizontalPanelView1'
   356                     #'name:' 'uISubSpecifica1'
   518                     #'layout:' #(#LayoutFrame 0 0.0 -30 1.0 0 1.0 0 1.0)
   357                     #'layout:' #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1)
   519                     #'component:' 
   358                     #'majorKey:' #ToolApplicationModel
   520                      #(#SpecCollection
   359                     #'minorKey:' #windowSpecForCommitWithoutChannels
   521                         #'collection:' 
       
   522                          #(
       
   523                            #(#ActionButtonSpec
       
   524                               #'name:' 'cancel'
       
   525                               #'label:' 'cancel'
       
   526                               #'model:' #cancel
       
   527                               #'extent:' #(#Point 128 24)
       
   528                           )
       
   529                            #(#ActionButtonSpec
       
   530                               #'name:' 'accept'
       
   531                               #'label:' 'accept'
       
   532                               #'model:' #accept
       
   533                               #'extent:' #(#Point 129 24)
       
   534                           )
       
   535                         )
       
   536                     )
       
   537                     #'horizontalLayout:' #fitSpace
       
   538                     #'verticalLayout:' #fitSpace
       
   539                     #'horizontalSpace:' 3
       
   540                     #'verticalSpace:' 3
       
   541                 )
   360                 )
   542               )
   361               )
   543           )
   362           )
   544       )
   363       )
   545 
       
   546 
       
   547 !
   364 !
   548 
   365 
   549 nameAndSelectorSpec
   366 nameAndSelectorSpec
   550     "this window spec was automatically generated by the ST/X UIPainter"
   367     "this window spec was automatically generated by the ST/X UIPainter"
   551 
   368 
   562     ^
   379     ^
   563      
   380      
   564        #(#FullSpec
   381        #(#FullSpec
   565           #'window:' 
   382           #'window:' 
   566            #(#WindowSpec
   383            #(#WindowSpec
   567               #'name:' 'NameAndSelectorSpec'
   384               #'name:' 'Painter'
   568               #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
   385               #'layout:' #(#LayoutFrame 101 0 328 0 491 0 497 0)
   569               #'label:' 'Painter'
   386               #'label:' 'Painter'
   570               #'bounds:' #(#Rectangle 0 0 391 170)
   387               #'min:' #(#Point 10 10)
       
   388               #'max:' #(#Point 1152 900)
       
   389               #'bounds:' #(#Rectangle 101 328 492 498)
       
   390               #'usePreferredExtent:' false
   571           )
   391           )
   572           #'component:' 
   392           #'component:' 
   573            #(#SpecCollection
   393            #(#SpecCollection
   574               #'collection:' 
   394               #'collection:' 
   575                #(
   395                #(
   576                  #(#LabelSpec
   396                  #(#LabelSpec
   577                     #'name:' 'classLabel'
   397                     #'name:' 'classLabel'
   578                     #'layout:' #(#AlignmentOrigin 50 0.11 51 0 1 0.5)
   398                     #'layout:' #(#AlignmentOrigin 50 0.11 51 0 1 0.5)
   579                     #'label:' 'class:'
   399                     #'label:' 'Class:'
   580                     #'adjust:' #right
   400                     #'adjust:' #right
   581                     #'resizeForLabel:' true
   401                     #'resizeForLabel:' true
   582                 )
   402                 )
   583                  #(#LabelSpec
   403                  #(#LabelSpec
   584                     #'name:' 'superClassLabel'
   404                     #'name:' 'superClassLabel'
   585                     #'layout:' #(#AlignmentOrigin 50 0.11 77 0 1 0.5)
   405                     #'layout:' #(#AlignmentOrigin 50 0.11 77 0 1 0.5)
   586                     #'label:' 'superclass:'
   406                     #'label:' 'Superclass:'
   587                     #'adjust:' #right
   407                     #'adjust:' #right
   588                     #'resizeForLabel:' true
   408                     #'resizeForLabel:' true
   589                 )
   409                 )
   590                  #(#LabelSpec
   410                  #(#LabelSpec
   591                     #'name:' 'selectorLabel'
   411                     #'name:' 'selectorLabel'
   592                     #'layout:' #(#AlignmentOrigin 50 0.11 105 0 1 0.5)
   412                     #'layout:' #(#AlignmentOrigin 50 0.11 105 0 1 0.5)
   593                     #'label:' 'selector:'
   413                     #'label:' 'Selector:'
   594                     #'adjust:' #right
   414                     #'adjust:' #right
   595                     #'resizeForLabel:' true
   415                     #'resizeForLabel:' true
   596                 )
   416                 )
   597                  #(#InputFieldSpec
   417                  #(#InputFieldSpec
   598                     #'name:' 'methodNameField'
   418                     #'name:' 'methodNameField'
   601                     #'model:' #methodNameChannel
   421                     #'model:' #methodNameChannel
   602                 )
   422                 )
   603                  #(#LabelSpec
   423                  #(#LabelSpec
   604                     #'name:' 'boxLabel'
   424                     #'name:' 'boxLabel'
   605                     #'layout:' #(#Point 2 10)
   425                     #'layout:' #(#Point 2 10)
   606                     #'label:' 'class & selector for code:'
   426                     #'label:' 'Class and selector for interface:'
   607                     #'adjust:' #left
   427                     #'adjust:' #left
   608                     #'resizeForLabel:' true
   428                     #'resizeForLabel:' true
   609                 )
   429                 )
   610                  #(#InputFieldSpec
   430                  #(#InputFieldSpec
   611                     #'name:' 'classNameField'
   431                     #'name:' 'classNameField'
   618                     #'layout:' #(#LayoutFrame 51 0.11 67 0 0 1.0 89 0)
   438                     #'layout:' #(#LayoutFrame 51 0.11 67 0 0 1.0 89 0)
   619                     #'tabable:' true
   439                     #'tabable:' true
   620                     #'model:' #superclassNameChannel
   440                     #'model:' #superclassNameChannel
   621                     #'comboList:' #superclassNameDefaults
   441                     #'comboList:' #superclassNameDefaults
   622                 )
   442                 )
   623                  #(#HorizontalPanelViewSpec
   443                  #(#UISubSpecification
   624                     #'name:' 'commitPanel'
   444                     #'name:' 'uISubSpecifica1'
   625                     #'layout:' #(#LayoutFrame 0 0.0 -26 1.0 0 1.0 -2 1.0)
   445                     #'layout:' #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1)
   626                     #'component:' 
   446                     #'majorKey:' #ToolApplicationModel
   627                      #(#SpecCollection
   447                     #'minorKey:' #windowSpecForCommitWithoutChannels
   628                         #'collection:' 
       
   629                          #(
       
   630                            #(#ActionButtonSpec
       
   631                               #'name:' 'button1'
       
   632                               #'label:' 'cancel'
       
   633                               #'tabable:' true
       
   634                               #'model:' #cancel
       
   635                               #'extent:' #(#Point 190 24)
       
   636                           )
       
   637                            #(#ActionButtonSpec
       
   638                               #'name:' 'button2'
       
   639                               #'label:' 'ok'
       
   640                               #'tabable:' true
       
   641                               #'isDefault:' true
       
   642                               #'model:' #accept
       
   643                               #'extent:' #(#Point 190 22)
       
   644                           )
       
   645                         )
       
   646                     )
       
   647                     #'horizontalLayout:' #fitSpace
       
   648                     #'verticalLayout:' #fit
       
   649                     #'horizontalSpace:' 3
       
   650                     #'verticalSpace:' 3
       
   651                 )
   448                 )
   652               )
   449               )
   653           )
   450           )
   654       )
   451       )
   655 
       
   656     "Modified: 28.7.1997 / 16:49:49 / cg"
       
   657 !
   452 !
   658 
   453 
   659 windowSpec
   454 windowSpec
   660     "this window spec was automatically generated by the ST/X UIPainter"
   455     "this window spec was automatically generated by the ST/X UIPainter"
   661 
   456 
   674      
   469      
   675        #(#FullSpec
   470        #(#FullSpec
   676           #'window:' 
   471           #'window:' 
   677            #(#WindowSpec
   472            #(#WindowSpec
   678               #'name:' 'Tree-View'
   473               #'name:' 'Tree-View'
   679               #'layout:' #(#LayoutFrame 61 0 445 0 574 0 905 0)
   474               #'layout:' #(#LayoutFrame 536 0 334 0 1088 0 794 0)
   680               #'label:' 'Tree-View'
   475               #'label:' 'Tree-View'
   681               #'min:' #(#Point 10 10)
   476               #'min:' #(#Point 10 10)
   682               #'max:' #(#Point 1160 870)
   477               #'max:' #(#Point 1160 870)
   683               #'bounds:' #(#Rectangle 61 445 575 906)
   478               #'bounds:' #(#Rectangle 536 334 1089 795)
       
   479               #'menu:' #menu
   684               #'usePreferredExtent:' false
   480               #'usePreferredExtent:' false
   685           )
   481           )
   686           #'component:' 
   482           #'component:' 
   687            #(#SpecCollection
   483            #(#SpecCollection
   688               #'collection:' 
   484               #'collection:' 
   689                #(
   485                #(
   690                  #(#MenuPanelSpec
   486                  #(#MenuPanelSpec
   691                     #'name:' 'menuPullDown'
   487                     #'name:' 'menuToolbarView'
   692                     #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 25 0)
   488                     #'layout:' #(#LayoutFrame -1 0.0 0 0 -1 1.0 32 0)
       
   489                     #'activeHelpKey:' #menuChangeHierarchy
   693                     #'tabable:' true
   490                     #'tabable:' true
   694                     #'menu:' #menuPullDown
   491                     #'menu:' #menuToolbar
   695                 )
   492                     #'showSeparatingLines:' true
   696                  #(#HorizontalPanelViewSpec
       
   697                     #'name:' 'menuContainer'
       
   698                     #'layout:' #(#LayoutFrame 0 0.0 26 0 0 1.0 58 0)
       
   699                     #'component:' 
       
   700                      #(#SpecCollection
       
   701                         #'collection:' 
       
   702                          #(
       
   703                            #(#MenuPanelSpec
       
   704                               #'name:' 'menuChangeHierarchy'
       
   705                               #'activeHelpKey:' #menuChangeHierarchy
       
   706                               #'enableChannel:' #hasOneSelectionOtherThanCanvas
       
   707                               #'tabable:' true
       
   708                               #'menu:' #menuChangeHierarchy
       
   709                               #'showSeparatingLines:' true
       
   710                               #'extent:' #(#Point 120 30)
       
   711                           )
       
   712                            #(#MenuPanelSpec
       
   713                               #'name:' 'menuAlignment'
       
   714                               #'activeHelpKey:' #menuAlignment
       
   715                               #'enableChannel:' #canMoveOrAlignSelection
       
   716                               #'tabable:' true
       
   717                               #'menu:' #menuAlignment
       
   718                               #'showSeparatingLines:' true
       
   719                               #'extent:' #(#Point 244 30)
       
   720                           )
       
   721                            #(#HorizontalPanelViewSpec
       
   722                               #'name:' 'panelViewButtons'
       
   723                               #'component:' 
       
   724                                #(#SpecCollection
       
   725                                   #'collection:' 
       
   726                                    #(
       
   727                                      #(#ArrowButtonSpec
       
   728                                         #'name:' 'moveLeft'
       
   729                                         #'activeHelpKey:' #moveSelectionLeft
       
   730                                         #'tabable:' true
       
   731                                         #'model:' #moveSelectionLeft
       
   732                                         #'enableChannel:' #canMoveOrAlignSelection
       
   733                                         #'isTriggerOnDown:' true
       
   734                                         #'direction:' #left
       
   735                                         #'extent:' #(#Point 22 24)
       
   736                                     )
       
   737                                      #(#ArrowButtonSpec
       
   738                                         #'name:' 'moveRight'
       
   739                                         #'activeHelpKey:' #moveSelectionRight
       
   740                                         #'model:' #moveSelectionRight
       
   741                                         #'enableChannel:' #canMoveOrAlignSelection
       
   742                                         #'isTriggerOnDown:' true
       
   743                                         #'direction:' #right
       
   744                                         #'extent:' #(#Point 22 24)
       
   745                                     )
       
   746                                      #(#ArrowButtonSpec
       
   747                                         #'name:' 'moveDown'
       
   748                                         #'activeHelpKey:' #moveSelectionDown
       
   749                                         #'model:' #moveSelectionDown
       
   750                                         #'enableChannel:' #canMoveOrAlignSelection
       
   751                                         #'isTriggerOnDown:' true
       
   752                                         #'direction:' #down
       
   753                                         #'extent:' #(#Point 22 24)
       
   754                                     )
       
   755                                      #(#ArrowButtonSpec
       
   756                                         #'name:' 'moveUp'
       
   757                                         #'activeHelpKey:' #moveSelectionUp
       
   758                                         #'model:' #moveSelectionUp
       
   759                                         #'enableChannel:' #canMoveOrAlignSelection
       
   760                                         #'isTriggerOnDown:' true
       
   761                                         #'direction:' #up
       
   762                                         #'extent:' #(#Point 22 24)
       
   763                                     )
       
   764                                   )
       
   765                               )
       
   766                               #'level:' 1
       
   767                               #'horizontalLayout:' #spreadSpace
       
   768                               #'verticalLayout:' #fitSpace
       
   769                               #'horizontalSpace:' 4
       
   770                               #'verticalSpace:' 4
       
   771                               #'extent:' #(#Point 125 32)
       
   772                           )
       
   773                         )
       
   774                     )
       
   775                     #'horizontalLayout:' #spread
       
   776                     #'verticalLayout:' #fit
       
   777                     #'horizontalSpace:' 3
       
   778                     #'verticalSpace:' 3
       
   779                 )
   493                 )
   780                  #(#VariableVerticalPanelSpec
   494                  #(#VariableVerticalPanelSpec
   781                     #'name:' 'vpanel'
   495                     #'name:' 'vpanel'
   782                     #'layout:' #(#LayoutFrame 0 0.0 59 0.0 0 1.0 0 1.0)
   496                     #'layout:' #(#LayoutFrame 0 0.0 34 0.0 0 1.0 0 1.0)
   783                     #'component:' 
   497                     #'component:' 
   784                      #(#SpecCollection
   498                      #(#SpecCollection
   785                         #'collection:' 
   499                         #'collection:' 
   786                          #(
   500                          #(
   787                            #(#VariableHorizontalPanelSpec
   501                            #(#VariableHorizontalPanelSpec
   791                                   #'collection:' 
   505                                   #'collection:' 
   792                                    #(
   506                                    #(
   793                                      #(#ArbitraryComponentSpec
   507                                      #(#ArbitraryComponentSpec
   794                                         #'name:' 'treeView'
   508                                         #'name:' 'treeView'
   795                                         #'tabable:' true
   509                                         #'tabable:' true
   796                                         #'menu:' #menuCanvas
   510                                         #'menu:' #menuEdit
   797                                         #'hasHorizontalScrollBar:' true
   511                                         #'hasHorizontalScrollBar:' true
   798                                         #'hasVerticalScrollBar:' true
   512                                         #'hasVerticalScrollBar:' true
   799                                         #'miniScrollerHorizontal:' true
   513                                         #'miniScrollerHorizontal:' true
   800                                         #'miniScrollerVertical:' true
   514                                         #'miniScrollerVertical:' true
   801                                         #'component:' #treeView
   515                                         #'component:' #treeView
   807                                          #(#SpecCollection
   521                                          #(#SpecCollection
   808                                             #'collection:' 
   522                                             #'collection:' 
   809                                              #(
   523                                              #(
   810                                                #(#NoteBookViewSpec
   524                                                #(#NoteBookViewSpec
   811                                                   #'name:' 'noteBook'
   525                                                   #'name:' 'noteBook'
   812                                                   #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 -30 1.0)
   526                                                   #'layout:' #(#LayoutFrame 0 0.0 26 0.0 0 1.0 -30 1.0)
   813                                                   #'enableChannel:' #enableChannel
   527                                                   #'enableChannel:' #enableChannel
   814                                                   #'tabable:' true
   528                                                   #'tabable:' true
   815                                                   #'model:' #tabModel
   529                                                   #'model:' #tabModel
   816                                                   #'menu:' #tabList
   530                                                   #'menu:' #tabList
   817                                                   #'style:' #(#FontDescription #helvetica #medium #roman 10)
   531                                                   #'style:' #(#FontDescription #helvetica #medium #roman 10)
   825                                                       #'collection:' 
   539                                                       #'collection:' 
   826                                                        #(
   540                                                        #(
   827                                                          #(#ActionButtonSpec
   541                                                          #(#ActionButtonSpec
   828                                                             #'name:' 'cancelButton'
   542                                                             #'name:' 'cancelButton'
   829                                                             #'activeHelpKey:' #cancel
   543                                                             #'activeHelpKey:' #cancel
   830                                                             #'label:' 'cancel'
   544                                                             #'label:' 'Cancel'
   831                                                             #'tabable:' true
   545                                                             #'tabable:' true
   832                                                             #'model:' #cancel
   546                                                             #'model:' #cancel
   833                                                             #'enableChannel:' #modifiedChannel
   547                                                             #'enableChannel:' #modifiedChannel
   834                                                             #'extent:' #(#Point 166 24)
   548                                                             #'extent:' #(#Point 179 24)
   835                                                         )
   549                                                         )
   836                                                          #(#ActionButtonSpec
   550                                                          #(#ActionButtonSpec
   837                                                             #'name:' 'acceptButton'
   551                                                             #'name:' 'acceptButton'
   838                                                             #'activeHelpKey:' #accept
   552                                                             #'activeHelpKey:' #accept
   839                                                             #'label:' 'accept'
   553                                                             #'label:' 'OK'
   840                                                             #'tabable:' true
   554                                                             #'tabable:' true
   841                                                             #'model:' #accept
   555                                                             #'model:' #accept
   842                                                             #'enableChannel:' #modifiedChannel
   556                                                             #'enableChannel:' #modifiedChannel
   843                                                             #'extent:' #(#Point 167 24)
   557                                                             #'extent:' #(#Point 180 24)
   844                                                         )
   558                                                         )
   845                                                       )
   559                                                       )
   846                                                   )
   560                                                   )
   847                                                   #'horizontalLayout:' #fitSpace
   561                                                   #'horizontalLayout:' #fitSpace
   848                                                   #'verticalLayout:' #fitSpace
   562                                                   #'verticalLayout:' #fitSpace
   849                                                   #'horizontalSpace:' 3
   563                                                   #'horizontalSpace:' 3
   850                                                   #'verticalSpace:' 3
   564                                                   #'verticalSpace:' 3
       
   565                                               )
       
   566                                                #(#HorizontalPanelViewSpec
       
   567                                                   #'name:' 'panelViewButtons'
       
   568                                                   #'layout:' #(#LayoutFrame 0 0.0 0 0 0 1.0 24 0)
       
   569                                                   #'component:' 
       
   570                                                    #(#SpecCollection
       
   571                                                       #'collection:' 
       
   572                                                        #(
       
   573                                                          #(#ArrowButtonSpec
       
   574                                                             #'name:' 'moveLeft'
       
   575                                                             #'activeHelpKey:' #moveSelectionLeft
       
   576                                                             #'tabable:' true
       
   577                                                             #'model:' #moveSelectionLeft
       
   578                                                             #'enableChannel:' #canMoveOrAlignSelection
       
   579                                                             #'isTriggerOnDown:' true
       
   580                                                             #'direction:' #left
       
   581                                                             #'extent:' #(#Point 22 22)
       
   582                                                         )
       
   583                                                          #(#ArrowButtonSpec
       
   584                                                             #'name:' 'moveRight'
       
   585                                                             #'activeHelpKey:' #moveSelectionRight
       
   586                                                             #'model:' #moveSelectionRight
       
   587                                                             #'enableChannel:' #canMoveOrAlignSelection
       
   588                                                             #'isTriggerOnDown:' true
       
   589                                                             #'direction:' #right
       
   590                                                             #'extent:' #(#Point 22 22)
       
   591                                                         )
       
   592                                                          #(#ArrowButtonSpec
       
   593                                                             #'name:' 'moveDown'
       
   594                                                             #'activeHelpKey:' #moveSelectionDown
       
   595                                                             #'model:' #moveSelectionDown
       
   596                                                             #'enableChannel:' #canMoveOrAlignSelection
       
   597                                                             #'isTriggerOnDown:' true
       
   598                                                             #'direction:' #down
       
   599                                                             #'extent:' #(#Point 22 22)
       
   600                                                         )
       
   601                                                          #(#ArrowButtonSpec
       
   602                                                             #'name:' 'moveUp'
       
   603                                                             #'activeHelpKey:' #moveSelectionUp
       
   604                                                             #'model:' #moveSelectionUp
       
   605                                                             #'enableChannel:' #canMoveOrAlignSelection
       
   606                                                             #'isTriggerOnDown:' true
       
   607                                                             #'direction:' #up
       
   608                                                             #'extent:' #(#Point 22 22)
       
   609                                                         )
       
   610                                                       )
       
   611                                                   )
       
   612                                                   #'level:' 1
       
   613                                                   #'horizontalLayout:' #left
       
   614                                                   #'verticalLayout:' #fit
       
   615                                                   #'horizontalSpace:' 4
       
   616                                                   #'verticalSpace:' 4
   851                                               )
   617                                               )
   852                                             )
   618                                             )
   853                                         )
   619                                         )
   854                                         #'borderWidth:' 1
   620                                         #'borderWidth:' 1
   855                                     )
   621                                     )
   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
  1928 
  1710 
  1929 ! !
  1711 ! !
  1930 
  1712 
  1931 !UIPainter methodsFor:'menu accessing'!
  1713 !UIPainter methodsFor:'menu accessing'!
  1932 
  1714 
  1933 menuAlignment
  1715 menuEdit
  1934     "returns the pull down menu which keeps the alignment operations
       
  1935     "
       
  1936     ^ self class menuAlignment
       
  1937 
       
  1938 !
       
  1939 
       
  1940 menuCanvas
       
  1941     "returns the middle button menu used by the painter and the tree view
  1716     "returns the middle button menu used by the painter and the tree view
  1942     "
  1717     "
  1943     ^ [ treeView canvas showMiddleButtonMenu ]
  1718     ^ [ treeView canvas showMiddleButtonMenu ]
  1944 !
       
  1945 
       
  1946 menuChangeHierarchy
       
  1947     "returns the hierarchy pull down menu
       
  1948     "
       
  1949     ^ self class menuChangeHierarchy
       
  1950 
       
  1951 
       
  1952 !
       
  1953 
       
  1954 menuPullDown
       
  1955     "returns the main pull down menu
       
  1956     "
       
  1957     ^ self class menuPullDown
       
  1958 
       
  1959 
       
  1960 ! !
  1719 ! !
  1961 
  1720 
  1962 !UIPainter methodsFor:'printing'!
  1721 !UIPainter methodsFor:'printing'!
  1963 
  1722 
  1964 show:aText
  1723 show:aText
  1966     transcript contents:aText.
  1725     transcript contents:aText.
  1967         
  1726         
  1968 ! !
  1727 ! !
  1969 
  1728 
  1970 !UIPainter methodsFor:'private'!
  1729 !UIPainter methodsFor:'private'!
       
  1730 
       
  1731 checkModified
       
  1732     "check interface modification
       
  1733     "
       
  1734     self painter isModified
       
  1735     ifTrue:
       
  1736     [
       
  1737         ((YesNoBox title:'Interface was modified!!')        
       
  1738             noText:'Cancel';
       
  1739             yesText:'Waste it and proceed';
       
  1740             showAtPointer;
       
  1741             accepted) ifFalse: [^false].
       
  1742         self painter resetModification
       
  1743     ].
       
  1744     ^true
       
  1745 !
  1971 
  1746 
  1972 hideUIView:aView
  1747 hideUIView:aView
  1973     "hide the view which is an application or top view
  1748     "hide the view which is an application or top view
  1974     "
  1749     "
  1975     aView beIndependent.
  1750     aView beIndependent.
  2017 
  1792 
  2018     self specClass:clsName.
  1793     self specClass:clsName.
  2019     specSelector := (selector ? '').
  1794     specSelector := (selector ? '').
  2020     specSuperclass := superClassName.
  1795     specSuperclass := superClassName.
  2021 
  1796 
       
  1797     specClass notNil & selector notNil
       
  1798     ifTrue:
       
  1799     [
       
  1800         |className message|
       
  1801         specClass isClass ifTrue: [className := specClass name].
       
  1802         specClass isString ifTrue: [className := specClass].
       
  1803         message := className, ' ', specSelector.
       
  1804         self addToHistory: message -> #loadFromMessage:.
       
  1805         self valueOfInfoLabel value: className, ' << ', specSelector
       
  1806     ].
  2022     "Modified: 24.6.1997 / 19:07:01 / cg"
  1807     "Modified: 24.6.1997 / 19:07:01 / cg"
  2023 !
  1808 !
  2024 
  1809 
  2025 setViewInLayoutTool:aView
  1810 setViewInLayoutTool:aView
  2026     "set view for layout tool
  1811     "set view for layout tool
  2137         ^ self
  1922         ^ self
  2138     ].
  1923     ].
  2139 
  1924 
  2140     self isModified ifTrue:[
  1925     self isModified ifTrue:[
  2141         whatToDo := DialogBox 
  1926         whatToDo := DialogBox 
  2142                         confirmWithCancel:'accept change made in ' , tabSelection printString , ' section ?'
  1927                         confirmWithCancel:'Accept change made in ' , tabSelection printString , ' section?'
  2143                         labels:#('cancel' 'ignore' 'accept')
  1928                         labels:#('Cancel' 'Ignore' 'Accept')
  2144                         default:3.
  1929                         default:3.
  2145         whatToDo isNil ifTrue:[^self].
  1930         whatToDo isNil ifTrue:[^self].
  2146         whatToDo == true ifTrue:[
  1931         whatToDo == true ifTrue:[
  2147             self accept
  1932             self accept
  2148         ] ifFalse:[
  1933         ] ifFalse:[
  2161     "called whenever the selection of the treeview changed
  1946     "called whenever the selection of the treeview changed
  2162     "
  1947     "
  2163     |view list spec slices size property tabComponent|
  1948     |view list spec slices size property tabComponent|
  2164 
  1949 
  2165     self isModified ifTrue:[
  1950     self isModified ifTrue:[
  2166         (self confirm:'accept change made in ' , tabSelection printString , ' section ?') ifTrue:[
  1951         (self confirm:'Accept change made in ' , tabSelection printString , ' section ?') ifTrue:[
  2167             self accept
  1952             self accept
  2168         ]
  1953         ]
  2169     ].
  1954     ].
  2170     self canMoveOrAlignSelection        value:(treeView canMoveOrAlignSelection).
  1955     self canMoveOrAlignSelection        value:(treeView canMoveOrAlignSelection).
  2171     self canMoveSelectionIntoContainer  value:(treeView canMoveSelectionIntoContainer).
  1956     self canMoveSelectionIntoContainer  value:(treeView canMoveSelectionIntoContainer).
  2220 !UIPainter methodsFor:'startup / release'!
  2005 !UIPainter methodsFor:'startup / release'!
  2221 
  2006 
  2222 closeRequest
  2007 closeRequest
  2223     "close all windows open by builder
  2008     "close all windows open by builder
  2224     "
  2009     "
  2225     self painter isModified ifTrue:[
  2010     self checkModified ifFalse:[^self].
  2226         (self confirm:'quit without without saving your modifications ?') ifFalse:[
       
  2227             ^ self
       
  2228         ]
       
  2229     ].
       
  2230 
  2011 
  2231     treeView model removeDependent:self.
  2012     treeView model removeDependent:self.
  2232     self painter release.
  2013     self painter release.
  2233     ColorMenu releaseResources.
  2014     ColorMenu releaseResources.
  2234 
  2015 
  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|
  2404 
  2481 
  2405     cls isNil ifTrue:[
  2482     cls isNil ifTrue:[
  2406         superclass := self resolveName:specSuperclass.
  2483         superclass := self resolveName:specSuperclass.
  2407 
  2484 
  2408         superclass isNil ifTrue:[
  2485         superclass isNil ifTrue:[
  2409             self warn:'no class named ' , specSuperclass , ' exists.'.
  2486             self warn:'No class named ' , specSuperclass , ' exists!!'.
  2410             ^ false.
  2487             ^ false.
  2411         ].
  2488         ].
  2412         (self confirm:'create ' , specClass , ' ?') ifTrue:[
  2489         (self confirm:'Create ' , specClass , '?') ifTrue:[
  2413             superclass subclass:(specClass asSymbol)
  2490             superclass subclass:(specClass asSymbol)
  2414                        instanceVariableNames:''
  2491                        instanceVariableNames:''
  2415                        classVariableNames:''
  2492                        classVariableNames:''
  2416                        poolDictionaries:''
  2493                        poolDictionaries:''
  2417                        category:'Applications'.
  2494                        category:'Applications'.
  2418             ^ true.
  2495             ^ true.
  2419         ].
  2496         ].
  2420         ^ false.
  2497         ^ false.
  2421     ].
  2498     ].
  2422     cls isBehavior ifFalse:[
  2499     cls isBehavior ifFalse:[
  2423         self warn:'a global named ' , specClass , ' exists, but is no class.'.
  2500         self warn:'A global named ' , specClass , ' exists, but is no class.'.
  2424         ^ false.
  2501         ^ false.
  2425     ].
  2502     ].
  2426 
  2503 
  2427     specSuperclass isBehavior ifFalse:[
  2504     specSuperclass isBehavior ifFalse:[
  2428         specSuperclass isEmpty ifFalse:[
  2505         specSuperclass isEmpty ifFalse:[
  2434         superclass := specSuperclass
  2511         superclass := specSuperclass
  2435     ].
  2512     ].
  2436 
  2513 
  2437     specSuperclass notNil ifTrue:[
  2514     specSuperclass notNil ifTrue:[
  2438         superclass isNil ifTrue:[
  2515         superclass isNil ifTrue:[
  2439             self warn:'no class named ' , specSuperclass , ' exists.'.
  2516             self warn:'No class named ' , specSuperclass , ' exists!!'.
  2440             ^ false.
  2517             ^ false.
  2441         ].
  2518         ].
  2442 
  2519 
  2443         (cls isSubclassOf:superclass) ifFalse:[
  2520         (cls isSubclassOf:superclass) ifFalse:[
  2444             self information:('a global named ' , specClass , ' exists,\' ,
  2521             self information:('A global named ' , specClass , ' exists,\' ,
  2445                               'but is not a subclass of ' , superclass name , '.\\' ,
  2522                               'but is not a subclass of ' , superclass name , '.\\' ,
  2446                               'Check and try again if that is not what you want.') withCRs.
  2523                               'Check and try again if that is not what you want.') withCRs.
  2447         ]
  2524         ]
  2448     ].
  2525     ].
  2449 
  2526 
  2527     painter gridShown:(bindings at:#showGrid) value.
  2604     painter gridShown:(bindings at:#showGrid) value.
  2528 
  2605 
  2529 
  2606 
  2530 ! !
  2607 ! !
  2531 
  2608 
  2532 !UIPainter methodsFor:'user interaction - move'!
  2609 !UIPainter methodsFor:'user interactions - move'!
  2533 
  2610 
  2534 doStepDown
  2611 doStepDown
  2535     "move selected component after the next component in the hierarchy of
  2612     "move selected component after the next component in the hierarchy of
  2536      its container widget
  2613      its container widget
  2537     "
  2614     "
  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
  3182     (    aName size ~~ 0
  2949     (    aName size ~~ 0
  3183      and:[(name := aName string withoutSeparators) size ~~ 0
  2950      and:[(name := aName string withoutSeparators) size ~~ 0
  3184      and:[(self propertyDetect:[:p| p name = name]) isNil
  2951      and:[(self propertyDetect:[:p| p name = name]) isNil
  3185      and:[node name ~= name]]]
  2952      and:[node name ~= name]]]
  3186     ) ifTrue:[
  2953     ) ifTrue:[
  3187         node name:name.
  2954         node name: name.
  3188         self redrawLine:1.
  2955         self redrawLine:1.
  3189     ].
  2956     ].
  3190 !
  2957 !
  3191 
  2958 
  3192 layoutChanged
  2959 layoutChanged
  3213         item name = aProperty name ifFalse:[
  2980         item name = aProperty name ifFalse:[
  3214             idx := self firstLineShown.
  2981             idx := self firstLineShown.
  3215 
  2982 
  3216             (end := self lastLineShown) > listOfNodes size ifTrue:[
  2983             (end := self lastLineShown) > listOfNodes size ifTrue:[
  3217                 end := listOfNodes size
  2984                 end := listOfNodes size
  3218             ].
  2985             ].                          
  3219             item name:aProperty name.
  2986             item name: aProperty name.
  3220 
  2987 
  3221             [idx <= end] whileTrue:[
  2988             [idx <= end] whileTrue:[
  3222                 (listOfNodes at:idx) == item ifTrue:[
  2989                 (listOfNodes at:idx) == item ifTrue:[
  3223                     self redrawLine:idx.                "/ is visible; redraw line
  2990                     self redrawLine:idx.                "/ is visible; redraw line
  3224                     end := 0
  2991                     end := 0
  3301 
  3068 
  3302 ! !
  3069 ! !
  3303 
  3070 
  3304 !UIPainter::TreeView methodsFor:'initialization'!
  3071 !UIPainter::TreeView methodsFor:'initialization'!
  3305 
  3072 
       
  3073 destroy
       
  3074     "destroy images"
       
  3075 
       
  3076     super destroy.
       
  3077 
       
  3078     Images removeAll
       
  3079 !
       
  3080 
  3306 initialize
  3081 initialize
  3307     "initialization; set multiple select and model
  3082     "initialization; set multiple select and model
  3308     "
  3083     "
  3309     Images := Images ? IdentityDictionary new.
  3084     Images := Images ? IdentityDictionary new.
  3310     super initialize.
  3085     super initialize.
  3317 !UIPainter::TreeView methodsFor:'private'!
  3092 !UIPainter::TreeView methodsFor:'private'!
  3318 
  3093 
  3319 figureFor:aNode
  3094 figureFor:aNode
  3320     "returns image for an spec item"
  3095     "returns image for an spec item"
  3321 
  3096 
  3322     |cls|
  3097     |cls image|
  3323 
  3098 
  3324     cls := aNode contents spec class.
  3099     cls := aNode contents spec class.
  3325     aNode contents spec isNil ifTrue: [cls := UISpecification].
  3100     aNode contents spec isNil ifTrue: [cls := WindowSpec].
  3326     cls := cls withAllSuperclasses detect: [:cls| cls class implements: #icon] ifNone: [^nil].
  3101     cls := cls withAllSuperclasses detect: [:cls| cls class implements: #icon] ifNone: [^nil].
  3327     ^Images at: cls name ifAbsent: [Images at: cls name put: (cls icon onDevice: device)]
  3102     image := Images at: cls name ifAbsent: [Images at: cls name put: cls icon].
       
  3103     image device ~~ device ifTrue: [image := image onDevice: device].
       
  3104     image extent y > 16 ifTrue: [image := image magnifiedBy: 16/image extent y].
       
  3105     ^image
  3328 !
  3106 !
  3329 
  3107 
  3330 selectionChangedFrom:oldSelection
  3108 selectionChangedFrom:oldSelection
  3331     "selection has changed. update master selection and raise notification
  3109     "selection has changed. update master selection and raise notification
  3332      to canvas in case of enabled cvs events
  3110      to canvas in case of enabled cvs events