Tools__ViewTreeApplication.st
changeset 2779 10fef360ad85
parent 2770 9322aee00ea0
child 2888 9adfb8a84696
equal deleted inserted replaced
2778:6d59e67bcd8a 2779:10fef360ad85
  1366         ].
  1366         ].
  1367     ].
  1367     ].
  1368     list add:(MenuDesc separator).
  1368     list add:(MenuDesc separator).
  1369 
  1369 
  1370     (view respondsTo:#'model:') ifTrue:[
  1370     (view respondsTo:#'model:') ifTrue:[
  1371         inst := model.
  1371         inst := view model.
  1372 
  1372 
  1373         inst isNil ifTrue:[ label := value := nil ]
  1373         inst isNil ifTrue:[ label := value := nil ]
  1374                   ifFalse:[ label := inst displayString.
  1374                   ifFalse:[ label := inst displayString.
  1375                             value := [ view model inspect ].
  1375                             value := [ view model inspect ].
  1376                           ].
  1376                           ].
  1394                   ifFalse:[ label := inst displayString.
  1394                   ifFalse:[ label := inst displayString.
  1395                             value := [ view enableChannel inspect ].
  1395                             value := [ view enableChannel inspect ].
  1396                           ].
  1396                           ].
  1397 
  1397 
  1398         list add:(MenuDesc title:'enableChannel' value:label action:value).
  1398         list add:(MenuDesc title:'enableChannel' value:label action:value).
       
  1399     ].
       
  1400 
       
  1401     #( #action #pressaAction #releaseAction ) do:[:actionSelector |
       
  1402         (view respondsTo:actionSelector) ifTrue:[
       
  1403             inst := view perform:actionSelector.
       
  1404 
       
  1405             inst isNil 
       
  1406                 ifTrue:[ label := value := nil ]
       
  1407                 ifFalse:[ label := inst displayString.
       
  1408                             value := [ (view perform:actionSelector) inspect ].
       
  1409                         ].
       
  1410 
       
  1411             list add:(MenuDesc title:'action' value:label action:value).
       
  1412         ].
  1399     ].
  1413     ].
  1400 
  1414 
  1401     list last isSeparator ifFalse:[ list add:(MenuDesc separator) ].
  1415     list last isSeparator ifFalse:[ list add:(MenuDesc separator) ].
  1402 
  1416 
  1403     (view respondsTo:#listHolder) ifTrue:[
  1417     (view respondsTo:#listHolder) ifTrue:[
  1421         list add:(MenuDesc title:'list' value:label action:value).
  1435         list add:(MenuDesc title:'list' value:label action:value).
  1422     ].
  1436     ].
  1423 
  1437 
  1424     list last isSeparator ifTrue:[ list removeLast ].
  1438     list last isSeparator ifTrue:[ list removeLast ].
  1425   ^ MenuDesc buildFromList:list onGC:aMenu
  1439   ^ MenuDesc buildFromList:list onGC:aMenu
       
  1440 
       
  1441     "Modified: / 11-05-2010 / 12:53:24 / cg"
  1426 !
  1442 !
  1427 
  1443 
  1428 submenuVisibility:aMenu
  1444 submenuVisibility:aMenu
  1429     "builds and returns the geometry submenu"
  1445     "builds and returns the geometry submenu"
  1430 
  1446