UIPainter.st
changeset 149 e652608690b1
parent 144 bca8b1953ee8
child 152 2261aa2fa21d
equal deleted inserted replaced
148:785417b6955d 149:e652608690b1
     1 ApplicationModel subclass:#UIPainter
     1 ApplicationModel subclass:#UIPainter
     2 	instanceVariableNames:'objectList selectionPanel tabSelection lastSlice specView
     2 	instanceVariableNames:'activeHelpTool layoutTool objectList selectionPanel tabSelection
     3 		layoutTool fileName specClass specSelector specSuperclass aspects'
     3 		lastSlice specView fileName specClass specSelector specSuperclass
       
     4 		aspects'
     4 	classVariableNames:''
     5 	classVariableNames:''
     5 	poolDictionaries:''
     6 	poolDictionaries:''
     6 	category:'Interface-UIPainter'
     7 	category:'Interface-UIPainter'
     7 !
     8 !
     8 
     9 
    53     ^ false
    54     ^ false
    54 
    55 
    55 
    56 
    56 ! !
    57 ! !
    57 
    58 
    58 !UIPainter class methodsFor:'constants'!
       
    59 
       
    60 titleOfLayoutMenu
       
    61     ^ 'Dimension'
       
    62 ! !
       
    63 
       
    64 !UIPainter class methodsFor:'icons'!
    59 !UIPainter class methodsFor:'icons'!
    65 
    60 
    66 iconAlignB
    61 iconAlignB
    67     ^ Image fromFile:'b_alignB.xbm'
    62     ^ Image fromFile:'b_alignB.xbm'
    68 
    63 
   101     ^ Image fromFile:'b_alignTB.xbm'
    96     ^ Image fromFile:'b_alignTB.xbm'
   102 
    97 
   103 ! !
    98 ! !
   104 
    99 
   105 !UIPainter class methodsFor:'interface specs'!
   100 !UIPainter class methodsFor:'interface specs'!
       
   101 
       
   102 XXwindowSpec
       
   103     "this window spec was automatically generated by the ST/X UIPainter"
       
   104 
       
   105     "do not manually edit this - the painter/builder may not be able to
       
   106      handle the specification if its corrupted."
       
   107 
       
   108     "
       
   109      UIPainter new openOnClass:UIPainter andSelector:#windowSpec
       
   110      UIPainter new openInterface:#windowSpec
       
   111     "
       
   112     "UIPainter open"
       
   113 
       
   114     <resource: #canvas>
       
   115 
       
   116     ^
       
   117      
       
   118        #(#FullSpec
       
   119           #'window:' 
       
   120            #(#WindowSpec
       
   121               #'name:' 'uIPainterView'
       
   122               #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
       
   123               #'label:' 'Tree-View'
       
   124               #'bounds:' #(#Rectangle 0 0 478 429)
       
   125           )
       
   126           #'component:' 
       
   127            #(#SpecCollection
       
   128               #'collection:' 
       
   129                #(
       
   130                  #(#MenuPanelSpec
       
   131                     #'name:' 'menuPullDown'
       
   132                     #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 24 0)
       
   133                     #'tabable:' true
       
   134                     #'menu:' #menuPullDown
       
   135                 )
       
   136                  #(#MenuPanelSpec
       
   137                     #'name:' 'menuAlignment'
       
   138                     #'layout:' #(#LayoutFrame 0 0.0 29 0 233 0 54 0)
       
   139                     #'tabable:' true
       
   140                     #'menu:' #menuAlignment
       
   141                     #'showSeparatingLines:' true
       
   142                 )
       
   143                  #(#PanelViewSpec
       
   144                     #'name:' 'panelViewButtons'
       
   145                     #'layout:' #(#LayoutFrame -125 1.0 25 0.0 0 1.0 57 0.0)
       
   146                     #'component:' 
       
   147                      #(#SpecCollection
       
   148                         #'collection:' 
       
   149                          #(
       
   150                            #(#ActionButtonSpec
       
   151                               #'name:' 'moveLeft'
       
   152                               #'label:' ''
       
   153                               #'translateLabel:' true
       
   154                               #'labelChannel:' #'LABELb_moveLeft.xbm'
       
   155                               #'tabable:' true
       
   156                               #'defaultable:' true
       
   157                               #'model:' #moveSelectionLeft
       
   158                               #'isTriggerOnDown:' true
       
   159                               #'enableChannel:' #enableChannel
       
   160                               #'autoRepeat:' false
       
   161                               #'extent:' #(#Point 26 24)
       
   162                           )
       
   163                            #(#ActionButtonSpec
       
   164                               #'name:' 'moveRight'
       
   165                               #'label:' ''
       
   166                               #'translateLabel:' true
       
   167                               #'labelChannel:' #'LABELb_moveRight.xbm'
       
   168                               #'tabable:' true
       
   169                               #'defaultable:' true
       
   170                               #'model:' #moveSelectionRight
       
   171                               #'isTriggerOnDown:' true
       
   172                               #'enableChannel:' #enableChannel
       
   173                               #'autoRepeat:' false
       
   174                               #'extent:' #(#Point 26 24)
       
   175                           )
       
   176                            #(#ActionButtonSpec
       
   177                               #'name:' 'moveUp'
       
   178                               #'label:' ''
       
   179                               #'translateLabel:' true
       
   180                               #'labelChannel:' #'LABELb_moveUp.xbm'
       
   181                               #'tabable:' true
       
   182                               #'defaultable:' true
       
   183                               #'model:' #moveSelectionUp
       
   184                               #'isTriggerOnDown:' true
       
   185                               #'enableChannel:' #enableChannel
       
   186                               #'autoRepeat:' false
       
   187                               #'extent:' #(#Point 26 24)
       
   188                           )
       
   189                            #(#ActionButtonSpec
       
   190                               #'name:' 'moveDown'
       
   191                               #'label:' ''
       
   192                               #'translateLabel:' true
       
   193                               #'labelChannel:' #'LABELb_moveDown.xbm'
       
   194                               #'tabable:' true
       
   195                               #'defaultable:' true
       
   196                               #'model:' #moveSelectionDown
       
   197                               #'isTriggerOnDown:' true
       
   198                               #'enableChannel:' #enableChannel
       
   199                               #'autoRepeat:' false
       
   200                               #'extent:' #(#Point 26 24)
       
   201                           )
       
   202                         )
       
   203                     )
       
   204                     #'level:' 1
       
   205                     #'horizontalLayout:' #fitSpace
       
   206                     #'verticalLayout:' #fitSpace
       
   207                     #'horizontalSpace:' 4
       
   208                     #'verticalSpace:' 4
       
   209                 )
       
   210                  #(#SequenceViewSpec
       
   211                     #'name:' 'objectTree'
       
   212                     #'layout:' #(#LayoutFrame 0 0.0 59 0.0 0 0.35 0 1.0)
       
   213                     #'enableChannel:' #enableChannel
       
   214                     #'tabable:' true
       
   215                     #'menu:' #objectListMenu
       
   216                     #'model:' #objectList
       
   217                     #'hasHorizontalScrollBar:' true
       
   218                     #'hasVerticalScrollBar:' true
       
   219                     #'miniScrollerHorizontal:' true
       
   220                     #'isMultiSelect:' true
       
   221                     #'doubleClickSelector:' #doubleClick
       
   222                     #'useIndex:' true
       
   223                 )
       
   224                  #(#NoteBookViewSpec
       
   225                     #'name:' 'noteBook'
       
   226                     #'layout:' #(#LayoutFrame 0 0.35 59 0.0 0 1.0 -30 1.0)
       
   227                     #'enableChannel:' #enableChannel
       
   228                     #'tabable:' true
       
   229                     #'menu:' #tabList
       
   230                     #'style:' 
       
   231                      #(#FontDescription
       
   232                         #helvetica #medium
       
   233                         #roman #'10'
       
   234                     )
       
   235                     #'model:' #tabModel
       
   236                     #'tabWidget:' #Window
       
   237                     #'canvas:' #noteBookView
       
   238                 )
       
   239                  #(#HorizontalPanelViewSpec
       
   240                     #'name:' 'modifyPanel'
       
   241                     #'layout:' #(#LayoutFrame 0 0.35 -30 1.0 0 1.0 0 1.0)
       
   242                     #'component:' 
       
   243                      #(#SpecCollection
       
   244                         #'collection:' 
       
   245                          #(
       
   246                            #(#ActionButtonSpec
       
   247                               #'name:' 'cancelButton'
       
   248                               #'label:' 'cancel'
       
   249                               #'tabable:' true
       
   250                               #'model:' #cancel
       
   251                               #'isTriggerOnDown:' false
       
   252                               #'enableChannel:' #modifiedChannel
       
   253                               #'autoRepeat:' false
       
   254                               #'extent:' #(#Point 151 24)
       
   255                           )
       
   256                            #(#ActionButtonSpec
       
   257                               #'name:' 'acceptButton'
       
   258                               #'label:' 'ok'
       
   259                               #'tabable:' true
       
   260                               #'model:' #accept
       
   261                               #'isTriggerOnDown:' false
       
   262                               #'enableChannel:' #modifiedChannel
       
   263                               #'autoRepeat:' false
       
   264                               #'extent:' #(#Point 151 24)
       
   265                           )
       
   266                         )
       
   267                     )
       
   268                     #'level:' 0
       
   269                     #'horizontalLayout:' #fitSpace
       
   270                     #'verticalLayout:' #fitSpace
       
   271                     #'horizontalSpace:' 3
       
   272                     #'verticalSpace:' 3
       
   273                 )
       
   274               )
       
   275           )
       
   276       )
       
   277 !
   106 
   278 
   107 menuAlignment
   279 menuAlignment
   108     ^ #(#Menu #(
   280     ^ #(#Menu #(
   109                 #(#MenuItem
   281                 #(#MenuItem
   110                         #'label:' 'align left'
   282                         #'label:' 'align left'
   182                                   )
   354                                   )
   183                                  )
   355                                  )
   184                                 #(3 1)
   356                                 #(3 1)
   185                                 nil
   357                                 nil
   186                        )
   358                        )
   187          )
       
   188         #(#MenuItem
       
   189                 #'label:' 'special'
       
   190                 #'value:' #special
       
   191                 #'submenu:' 
       
   192                         #(#Menu #(
       
   193                                 #(#MenuItem
       
   194                                         #'label:' 'group radioButtons'
       
   195                                         #'value:' #groupRadioButtons
       
   196                                  ) 
       
   197                                 #(#MenuItem
       
   198                                         #'label:' 'group enterFields'
       
   199                                         #'value:' #groupEnterFields
       
   200                                  )
       
   201                                 )
       
   202                                 nil
       
   203                                 nil
       
   204                         )
       
   205          )
   359          )
   206         #(#MenuItem
   360         #(#MenuItem
   207                 #'label:' 'misc'
   361                 #'label:' 'misc'
   208                 #'value:' #misc
   362                 #'value:' #misc
   209                 #'submenu:'
   363                 #'submenu:'
   273                                  #(#MenuItem
   427                                  #(#MenuItem
   274                                         #'label:' 'windowSpec'
   428                                         #'label:' 'windowSpec'
   275                                         #'value:' #doWindowSpec
   429                                         #'value:' #doWindowSpec
   276                                    )
   430                                    )
   277                                 #(#MenuItem
   431                                 #(#MenuItem
   278                                         #'label:' 'browse'
   432                                         #'label:' 'browse application'
   279                                         #'value:' #browseAppClass
   433                                         #'value:' #doBrowseAppClass
       
   434                                  )
       
   435                                 #(#MenuItem
       
   436                                         #'label:' 'start application'
       
   437                                         #'value:' #doStartApplication
   280                                  )
   438                                  )
   281                                 )
   439                                 )
   282                                 #( 1 2 1)
   440                                 #( 1 2 1)
   283                                 nil
   441                                 nil
   284                           )
   442                           )
   439                     #'menu:' #menuAlignment
   597                     #'menu:' #menuAlignment
   440                     #'showSeparatingLines:' true
   598                     #'showSeparatingLines:' true
   441                 )
   599                 )
   442                  #(#PanelViewSpec
   600                  #(#PanelViewSpec
   443                     #'name:' 'panelViewButtons'
   601                     #'name:' 'panelViewButtons'
   444                     #'layout:' #(#LayoutFrame -125 1.0 25 0.0 0 1.0 -372 1.0)
   602                     #'layout:' #(#LayoutFrame -125 1.0 25 0.0 0 1.0 57 0.0)
   445                     #'component:' 
   603                     #'component:' 
   446                      #(#SpecCollection
   604                      #(#SpecCollection
   447                         #'collection:' 
   605                         #'collection:' 
   448                          #(
   606                          #(
   449                            #(#ActionButtonSpec
   607                            #(#ActionButtonSpec
   454                               #'tabable:' true
   612                               #'tabable:' true
   455                               #'defaultable:' true
   613                               #'defaultable:' true
   456                               #'model:' #moveSelectionLeft
   614                               #'model:' #moveSelectionLeft
   457                               #'isTriggerOnDown:' true
   615                               #'isTriggerOnDown:' true
   458                               #'enableChannel:' #enableChannel
   616                               #'enableChannel:' #enableChannel
   459                               #'autoRepeat:' false
       
   460                               #'extent:' #(#Point 26 24)
   617                               #'extent:' #(#Point 26 24)
   461                           )
   618                           )
   462                            #(#ActionButtonSpec
   619                            #(#ActionButtonSpec
   463                               #'name:' 'moveRight'
   620                               #'name:' 'moveRight'
   464                               #'label:' ''
   621                               #'label:' ''
   467                               #'tabable:' true
   624                               #'tabable:' true
   468                               #'defaultable:' true
   625                               #'defaultable:' true
   469                               #'model:' #moveSelectionRight
   626                               #'model:' #moveSelectionRight
   470                               #'isTriggerOnDown:' true
   627                               #'isTriggerOnDown:' true
   471                               #'enableChannel:' #enableChannel
   628                               #'enableChannel:' #enableChannel
   472                               #'autoRepeat:' false
       
   473                               #'extent:' #(#Point 26 24)
   629                               #'extent:' #(#Point 26 24)
   474                           )
   630                           )
   475                            #(#ActionButtonSpec
   631                            #(#ActionButtonSpec
   476                               #'name:' 'moveUp'
   632                               #'name:' 'moveUp'
   477                               #'label:' ''
   633                               #'label:' ''
   480                               #'tabable:' true
   636                               #'tabable:' true
   481                               #'defaultable:' true
   637                               #'defaultable:' true
   482                               #'model:' #moveSelectionUp
   638                               #'model:' #moveSelectionUp
   483                               #'isTriggerOnDown:' true
   639                               #'isTriggerOnDown:' true
   484                               #'enableChannel:' #enableChannel
   640                               #'enableChannel:' #enableChannel
   485                               #'autoRepeat:' false
       
   486                               #'extent:' #(#Point 26 24)
   641                               #'extent:' #(#Point 26 24)
   487                           )
   642                           )
   488                            #(#ActionButtonSpec
   643                            #(#ActionButtonSpec
   489                               #'name:' 'moveDown'
   644                               #'name:' 'moveDown'
   490                               #'label:' ''
   645                               #'label:' ''
   493                               #'tabable:' true
   648                               #'tabable:' true
   494                               #'defaultable:' true
   649                               #'defaultable:' true
   495                               #'model:' #moveSelectionDown
   650                               #'model:' #moveSelectionDown
   496                               #'isTriggerOnDown:' true
   651                               #'isTriggerOnDown:' true
   497                               #'enableChannel:' #enableChannel
   652                               #'enableChannel:' #enableChannel
   498                               #'autoRepeat:' false
       
   499                               #'extent:' #(#Point 26 24)
   653                               #'extent:' #(#Point 26 24)
   500                           )
   654                           )
   501                         )
   655                         )
   502                     )
   656                     )
   503                     #'level:' 1
   657                     #'level:' 1
   506                     #'horizontalSpace:' 4
   660                     #'horizontalSpace:' 4
   507                     #'verticalSpace:' 4
   661                     #'verticalSpace:' 4
   508                 )
   662                 )
   509                  #(#SequenceViewSpec
   663                  #(#SequenceViewSpec
   510                     #'name:' 'objectTree'
   664                     #'name:' 'objectTree'
   511                     #'layout:' #(#LayoutFrame 0 0.0 59 0.0 0 0.35 0 1.0)
   665                     #'layout:' #(#LayoutFrame 0 0.0 59 0.0 0 0.35 -25 1.0)
   512                     #'enableChannel:' #enableChannel
   666                     #'enableChannel:' #enableChannel
   513                     #'tabable:' true
   667                     #'tabable:' true
   514                     #'menu:' #objectListMenu
   668                     #'menu:' #objectListMenu
   515                     #'model:' #objectList
   669                     #'model:' #objectList
   516                     #'hasHorizontalScrollBar:' true
   670                     #'hasHorizontalScrollBar:' true
   520                     #'doubleClickSelector:' #doubleClick
   674                     #'doubleClickSelector:' #doubleClick
   521                     #'useIndex:' true
   675                     #'useIndex:' true
   522                 )
   676                 )
   523                  #(#NoteBookViewSpec
   677                  #(#NoteBookViewSpec
   524                     #'name:' 'noteBook'
   678                     #'name:' 'noteBook'
   525                     #'layout:' #(#LayoutFrame 0 0.35 59 0.0 0 1.0 -30 1.0)
   679                     #'layout:' #(#LayoutFrame 0 0.35 59 0.0 0 1.0 -55 1.0)
   526                     #'enableChannel:' #enableChannel
   680                     #'enableChannel:' #enableChannel
   527                     #'tabable:' true
   681                     #'tabable:' true
   528                     #'menu:' #tabList
   682                     #'menu:' #tabList
   529                     #'style:' 
   683                     #'style:' 
   530                      #(#FontDescription
   684                      #(#FontDescription
   535                     #'tabWidget:' #Window
   689                     #'tabWidget:' #Window
   536                     #'canvas:' #noteBookView
   690                     #'canvas:' #noteBookView
   537                 )
   691                 )
   538                  #(#HorizontalPanelViewSpec
   692                  #(#HorizontalPanelViewSpec
   539                     #'name:' 'modifyPanel'
   693                     #'name:' 'modifyPanel'
   540                     #'layout:' #(#LayoutFrame 0 0.35 -30 1.0 0 1.0 0 1.0)
   694                     #'layout:' #(#LayoutFrame 0 0.35 -55 1.0 0 1.0 -25 1.0)
   541                     #'component:' 
   695                     #'component:' 
   542                      #(#SpecCollection
   696                      #(#SpecCollection
   543                         #'collection:' 
   697                         #'collection:' 
   544                          #(
   698                          #(
   545                            #(#ActionButtonSpec
   699                            #(#ActionButtonSpec
   546                               #'name:' 'cancelButton'
   700                               #'name:' 'cancelButton'
   547                               #'label:' 'cancel'
   701                               #'label:' 'cancel'
   548                               #'tabable:' true
   702                               #'tabable:' true
   549                               #'model:' #cancel
   703                               #'model:' #cancel
   550                               #'isTriggerOnDown:' false
       
   551                               #'enableChannel:' #modifiedChannel
   704                               #'enableChannel:' #modifiedChannel
   552                               #'autoRepeat:' false
       
   553                               #'extent:' #(#Point 151 24)
   705                               #'extent:' #(#Point 151 24)
   554                           )
   706                           )
   555                            #(#ActionButtonSpec
   707                            #(#ActionButtonSpec
   556                               #'name:' 'acceptButton'
   708                               #'name:' 'acceptButton'
   557                               #'label:' 'ok'
   709                               #'label:' 'ok'
   558                               #'tabable:' true
   710                               #'tabable:' true
   559                               #'model:' #accept
   711                               #'model:' #accept
   560                               #'isTriggerOnDown:' false
       
   561                               #'enableChannel:' #modifiedChannel
   712                               #'enableChannel:' #modifiedChannel
   562                               #'autoRepeat:' false
       
   563                               #'extent:' #(#Point 151 24)
   713                               #'extent:' #(#Point 151 24)
   564                           )
   714                           )
   565                         )
   715                         )
   566                     )
   716                     )
   567                     #'level:' 0
   717                     #'level:' 0
   568                     #'horizontalLayout:' #fitSpace
   718                     #'horizontalLayout:' #fitSpace
   569                     #'verticalLayout:' #fitSpace
   719                     #'verticalLayout:' #fitSpace
   570                     #'horizontalSpace:' 3
   720                     #'horizontalSpace:' 3
   571                     #'verticalSpace:' 3
   721                     #'verticalSpace:' 3
   572                 )
   722                 )
       
   723                  #(#LabelSpec
       
   724                     #'name:' 'helpInfo'
       
   725                     #'layout:' #(#LayoutFrame 2 0.0 -25 1.0 -2 1.0 -2 1.0)
       
   726                     #'label:' ''
       
   727                     #'level:' -1
       
   728                     #'adjust:' #left
       
   729                 )
   573               )
   730               )
   574           )
   731           )
   575       )
   732       )
   576 ! !
   733 ! !
   577 
   734 
   579 
   736 
   580 accept
   737 accept
   581     "automatically generated by UIPainter ..."
   738     "automatically generated by UIPainter ..."
   582     |layout|
   739     |layout|
   583 
   740 
   584     tabSelection = 'Dimension' ifTrue:[
   741     tabSelection = layoutTool label ifTrue:[
   585         (layout := layoutTool layout) notNil ifTrue:[
   742         (layout := layoutTool layout) notNil ifTrue:[
   586             layoutTool layoutType == #Extent ifTrue:[
   743             layoutTool layoutType == #Extent ifTrue:[
   587                 self painter setExtent:layout
   744                 self painter setExtent:layout
   588             ] ifFalse:[
   745             ] ifFalse:[
   589                 self painter setDimension:layout
   746                 self painter setLayout:layout
   590             ]
   747             ]
   591         ]
   748         ]
   592     ] ifFalse:[
   749     ] ifFalse:[
   593         self painter updateFromSpec:(specView specEdited).
   750         tabSelection = 'Help' ifTrue:[
       
   751             activeHelpTool accept
       
   752         ].
       
   753         self painter updateFromSpec:(specView specEdited)
   594     ].
   754     ].
   595     self cancel
   755     self cancel
   596 
   756 
   597 !
   757 !
   598 
   758 
   604     self modifiedChannel value:false.
   764     self modifiedChannel value:false.
   605 !
   765 !
   606 
   766 
   607 doubleClick
   767 doubleClick
   608     objectList selectGroup
   768     objectList selectGroup
       
   769 ! !
       
   770 
       
   771 !UIPainter methodsFor:'active help'!
       
   772 
       
   773 activeHelpTool
       
   774     "automatically generated by UIPainter ..."
       
   775 
       
   776     activeHelpTool isNil ifTrue:[
       
   777         activeHelpTool := UIHelpTool new
       
   778     ].
       
   779     ^ activeHelpTool
       
   780 !
       
   781 
       
   782 showHelp:aHelpText for:view
       
   783     "hook to allow an application to display active help
       
   784      texts in its own info area.
       
   785      This method may be redefined in a concrete application.
       
   786      If it returns false, the ActiveHelp manager will popup a
       
   787      bubble with the help text."
       
   788 
       
   789     |l|
       
   790 
       
   791     (l := self builder componentAt:#helpInfo) notNil ifTrue:[
       
   792         l label:aHelpText.
       
   793         ^ true.
       
   794     ].
       
   795     ^ false
       
   796 
       
   797 
   609 ! !
   798 ! !
   610 
   799 
   611 !UIPainter methodsFor:'aspects'!
   800 !UIPainter methodsFor:'aspects'!
   612 
   801 
   613 enableChannel
   802 enableChannel
   744    painter := self painter.
   933    painter := self painter.
   745 
   934 
   746    (painter respondsTo:(aMessage selector)) ifTrue:[
   935    (painter respondsTo:(aMessage selector)) ifTrue:[
   747         ^ aMessage sendTo:painter
   936         ^ aMessage sendTo:painter
   748    ].
   937    ].
   749    self error
   938    super doesNotUnderstand:aMessage
   750 
   939 
   751 !
   940 !
   752 
   941 
   753 objectListChanged
   942 objectListChanged
   754     "something changed in the painter view
   943     "something changed in the painter view
   765         layoutTool forView == view ifFalse:[
   954         layoutTool forView == view ifFalse:[
   766             slices := spec class slices.
   955             slices := spec class slices.
   767             size   := slices size + 1.
   956             size   := slices size + 1.
   768             list   := Array new:size.
   957             list   := Array new:size.
   769             slices keysAndValuesDo:[:i :s|list at:i put:(s first asString)].
   958             slices keysAndValuesDo:[:i :s|list at:i put:(s first asString)].
   770             list at:size put:'Dimension'.
   959             list at:size put:(layoutTool label).
   771             (self tabList) value:list.
   960             (self tabList) value:list.
   772         ] ifTrue:[
   961         ] ifTrue:[
   773             list := self tabList value
   962             list := self tabList value
   774         ].
   963         ].
   775         (list findFirst:[:aName| aName = lastSlice]) ~~ 0 ifTrue:[
   964         (list findFirst:[:aName| aName = lastSlice]) ~~ 0 ifTrue:[
   862         ]
  1051         ]
   863     ].
  1052     ].
   864 
  1053 
   865     objectList removeDependent:self.
  1054     objectList removeDependent:self.
   866     objectList painter release.
  1055     objectList painter release.
   867     objectList := nil.
       
   868 
  1056 
   869     selectionPanel notNil ifTrue:[
  1057     selectionPanel notNil ifTrue:[
   870         selectionPanel closeRequest
  1058         selectionPanel closeRequest
   871     ].
  1059     ].
       
  1060     selectionPanel := nil.
       
  1061     layoutTool     := nil.
       
  1062     objectList     := nil.
       
  1063     activeHelpTool := nil.
       
  1064 
   872     super closeRequest.
  1065     super closeRequest.
   873 
  1066 
   874 !
  1067 !
   875 
  1068 
   876 closeRequestFor:aTopView
  1069 closeRequestFor:aTopView
   979     painter setupFromSpec:(aClass perform:aSelector).
  1172     painter setupFromSpec:(aClass perform:aSelector).
   980 
  1173 
   981 ! !
  1174 ! !
   982 
  1175 
   983 !UIPainter methodsFor:'user interaction - dialog'!
  1176 !UIPainter methodsFor:'user interaction - dialog'!
   984 
       
   985 browseAppClass
       
   986     "open a browser on the class"
       
   987 
       
   988     |cls|
       
   989 
       
   990     specClass isNil ifTrue:[
       
   991         self information:'no class yet'.
       
   992         ^ self
       
   993     ].
       
   994 
       
   995     specClass isBehavior ifFalse:[
       
   996         cls := Smalltalk at:specClass asSymbol
       
   997     ] ifTrue:[
       
   998         cls := specClass
       
   999     ].
       
  1000 
       
  1001     cls isNil ifTrue:[
       
  1002         self information:'no class yet'.
       
  1003         ^ self
       
  1004     ].
       
  1005 
       
  1006     SystemBrowser openInClass:cls
       
  1007 
       
  1008 
       
  1009 !
       
  1010 
  1177 
  1011 checkClassAndSelector
  1178 checkClassAndSelector
  1012     "check for class & superclass"
  1179     "check for class & superclass"
  1013 
  1180 
  1014     |superclass cls|
  1181     |superclass cls|
  1086 
  1253 
  1087 
  1254 
  1088 ! !
  1255 ! !
  1089 
  1256 
  1090 !UIPainter methodsFor:'user interaction - pullDown'!
  1257 !UIPainter methodsFor:'user interaction - pullDown'!
       
  1258 
       
  1259 doBrowseAppClass
       
  1260     "open a browser on the class"
       
  1261 
       
  1262     |cls|
       
  1263 
       
  1264     specClass isNil ifTrue:[
       
  1265         ^ self information:'no class yet'.
       
  1266     ].
       
  1267 
       
  1268     specClass isBehavior ifFalse:[
       
  1269         cls := Smalltalk at:specClass asSymbol
       
  1270     ] ifTrue:[
       
  1271         cls := specClass
       
  1272     ].
       
  1273 
       
  1274     cls isNil ifTrue:[
       
  1275         ^ self information:'no class yet'.
       
  1276     ].
       
  1277 
       
  1278     SystemBrowser openInClass:cls
       
  1279 
       
  1280 
       
  1281 !
  1091 
  1282 
  1092 doFromClass
  1283 doFromClass
  1093         |className methodName cls sel accepted failed spec s painter|
  1284         |className methodName cls sel accepted failed spec s painter|
  1094 
  1285 
  1095         className  := '' asValue.
  1286         className  := '' asValue.
  1240     box action:[:aFile| self saveAs:aFile ].
  1431     box action:[:aFile| self saveAs:aFile ].
  1241     box open
  1432     box open
  1242 
  1433 
  1243 !
  1434 !
  1244 
  1435 
       
  1436 doStartApplication
       
  1437     |cls|
       
  1438 
       
  1439     (specClass isNil or:[specSelector isNil]) ifTrue:[
       
  1440         ^ self information:'no class or selector defined'.
       
  1441     ].
       
  1442 
       
  1443     specClass isBehavior ifFalse:[
       
  1444         cls := Smalltalk at:specClass asSymbol
       
  1445     ] ifTrue:[
       
  1446         cls := specClass
       
  1447     ].
       
  1448 
       
  1449     cls isNil ifTrue:[
       
  1450         ^ self information:'class not existant'.
       
  1451     ].
       
  1452 
       
  1453     (cls respondsTo:specSelector) ifFalse:[
       
  1454         ^ self information:'selector not defined'.
       
  1455     ].
       
  1456     cls new openInterface:specSelector
       
  1457 !
       
  1458 
  1245 doWindowSpec
  1459 doWindowSpec
  1246    |code code2 v|
  1460    |code code2 v|
  1247 
  1461 
  1248    code := self painter generateWindowSpecMethodSource.
  1462    code := self painter generateWindowSpecMethodSource.
  1249 
  1463