UIPainterTreeView.st
changeset 72 a5a7054e2b7d
parent 62 0e8573b4329a
child 78 a0a00603a8b6
equal deleted inserted replaced
71:407d25aca670 72:a5a7054e2b7d
   136 !
   136 !
   137 
   137 
   138 selectionChangedFrom:oldSelection
   138 selectionChangedFrom:oldSelection
   139     "redraw master
   139     "redraw master
   140     "
   140     "
   141     self disableMaster:oldSelection.
   141     oldSelection ~= selection ifTrue:[
   142     super selectionChangedFrom:oldSelection
   142         self disableMaster:oldSelection.
   143 
   143         super selectionChangedFrom:oldSelection
       
   144     ]
   144 ! !
   145 ! !
   145 
   146 
   146 !UIPainterTreeView methodsFor:'initialization'!
   147 !UIPainterTreeView methodsFor:'initialization'!
   147 
   148 
   148 initialize
   149 initialize
   150 
   151 
   151     list := OrderedCollection new.
   152     list := OrderedCollection new.
   152 
   153 
   153     self multipleSelectOk:true.
   154     self multipleSelectOk:true.
   154     self action:[:aSelection| self selectionChanged ].
   155     self action:[:aSelection| self selectionChanged ].
   155 
   156     self doubleClickAction:[:aSelection| builderView selectSubComponents].
   156 
       
   157 ! !
   157 ! !
   158 
   158 
   159 !UIPainterTreeView methodsFor:'menu & actions'!
   159 !UIPainterTreeView methodsFor:'menu & actions'!
   160 
   160 
   161 inspectProps
   161 inspectProps
   175 
   175 
   176     (menu := builderView menu) notNil ifTrue:[
   176     (menu := builderView menu) notNil ifTrue:[
   177         menu addLabels:(
   177         menu addLabels:(
   178             resources array:#(
   178             resources array:#(
   179                                 '-'
   179                                 '-'
   180                                 'treeMisc'
   180                                 'misc'
   181                             )
   181                             )
   182                         )
   182                         )
   183              selectors:#(       
   183              selectors:#(       
   184                                 nil
   184                                 nil
   185                                 #treeMisc
   185                                 #treeMisc
   196 
   196 
   197 menuMisc
   197 menuMisc
   198 
   198 
   199     |menu ispMenu|
   199     |menu ispMenu|
   200 
   200 
   201     menu := PopUpMenu labels:( resources array:#('inspect' 'ordering' 'remove layout' ) )
   201     menu := PopUpMenu labels:( resources array:#('inspect' 'ordering' ) )
   202                    selectors:#( #inspect #ordering #removeLayout )
   202                    selectors:#( #inspect #ordering )
   203                     receiver:self.
   203                     receiver:self.
   204 
   204 
   205     ispMenu := PopUpMenu labels:( resources array:#('view' 'spec' 'property') )
   205     ispMenu := PopUpMenu labels:( resources array:#('view' 'spec' 'property') )
   206                       selectors:#( #inspectView  #inspectSpec #inspectProps  )
   206                       selectors:#( #inspectView  #inspectSpec #inspectProps  )
   207                        receiver:self.
   207                        receiver:self.
   256         index := index - 1
   256         index := index - 1
   257     ].
   257     ].
   258     (spView changeSequenceOrderFor:view to:index) ifTrue:[
   258     (spView changeSequenceOrderFor:view to:index) ifTrue:[
   259         self builderViewChanged:#tree
   259         self builderViewChanged:#tree
   260     ]
   260     ]
   261 !
       
   262 
       
   263 removeLayout
       
   264     builderView withSelectionHiddenDo:[
       
   265         builderView selectionDo:[:aView|
       
   266             aView geometryLayout:nil.
       
   267             builderView elementChangedSize:aView.
       
   268         ]
       
   269     ].
       
   270 ! !
   261 ! !
   271 
   262 
   272 !UIPainterTreeView methodsFor:'redrawing'!
   263 !UIPainterTreeView methodsFor:'redrawing'!
   273 
   264 
   274 disableMaster:aLineNrOrCollection
   265 disableMaster:aLineNrOrCollection