Tools__ViewTreeApplication.st
changeset 3551 94a23bbd725b
parent 3532 12b7b904b5e1
child 3568 5004640f2a10
equal deleted inserted replaced
3550:b31b44c04a3e 3551:94a23bbd725b
     1 "{ Encoding: utf8 }"
       
     2 
       
     3 "
     1 "
     4  COPYRIGHT (c) 2007 by eXept Software AG
     2  COPYRIGHT (c) 2007 by eXept Software AG
     5 	      All Rights Reserved
     3 	      All Rights Reserved
     6 
     4 
     7  This software is furnished under a license and may be used
     5  This software is furnished under a license and may be used
  1554 ! !
  1552 ! !
  1555 
  1553 
  1556 !ViewTreeInspectorApplication methodsFor:'menu specs'!
  1554 !ViewTreeInspectorApplication methodsFor:'menu specs'!
  1557 
  1555 
  1558 middleButtonMenu
  1556 middleButtonMenu
  1559     "returns the middleButton menu for the single selected item or nil"
  1557     "returns the middleButton menu for the single selected view tree item or nil"
  1560 
  1558 
  1561     ^ [
  1559     ^ [
  1562 	model selectedItem notNil ifTrue:[
  1560         |viewTreeItem|
  1563 	    model selectedItem isView ifTrue:[
  1561 
  1564 		self class middleButtonMenu
  1562         (viewTreeItem := model selectedItem) notNil ifTrue:[
  1565 	    ] ifFalse:[
  1563             viewTreeItem isView ifTrue:[
  1566 		self class middleButtonMenuForMenuItems
  1564                 self class middleButtonMenu
  1567 	    ].
  1565             ] ifFalse:[
  1568 	] ifFalse:[
  1566                 self class middleButtonMenuForMenuItems
  1569 	    nil
  1567             ].
  1570 	]
  1568         ] ifFalse:[
       
  1569             nil
       
  1570         ]
  1571       ]
  1571       ]
  1572 
  1572 
  1573     "Modified: / 16-08-2017 / 13:48:31 / cg"
  1573     "Modified: / 16-08-2017 / 13:48:31 / cg"
  1574 !
  1574 !
  1575 
  1575 
  2616 
  2616 
  2617 isDrawnShown:aBoolean
  2617 isDrawnShown:aBoolean
  2618     isDrawnShown := aBoolean.
  2618     isDrawnShown := aBoolean.
  2619 !
  2619 !
  2620 
  2620 
       
  2621 isMenuItem
       
  2622     ^ menuItem notNil
       
  2623 !
       
  2624 
  2621 menuItem
  2625 menuItem
  2622     ^ menuItem
  2626     ^ menuItem
  2623 !
  2627 !
  2624 
  2628 
  2625 parent:aParent
  2629 parent:aParent
  3307 !
  3311 !
  3308 
  3312 
  3309 isApplicationClass
  3313 isApplicationClass
  3310     |cls|
  3314     |cls|
  3311 
  3315 
       
  3316     widget isNil ifTrue:[^ false].
  3312     cls := widget class.
  3317     cls := widget class.
  3313 
  3318 
  3314     ^ (    cls == ApplicationSubView
  3319     ^ (    cls == ApplicationSubView
  3315 	or:[cls == ApplicationWindow
  3320         or:[cls == ApplicationWindow
  3316 	or:[cls == SubCanvas]]
  3321         or:[cls == SubCanvas]]
  3317       )
  3322       )
  3318 !
  3323 !
  3319 
  3324 
  3320 isSelected
  3325 isSelected
  3321     |model|
  3326     |model|
  3322 
  3327 
  3323     model := self treeModel.
  3328     model := self treeModel.
  3324     model notNil ifTrue:[^ model isSelected:self].
  3329     model notNil ifTrue:[^ model isSelected:self].
  3325     ^ false
  3330     ^ false
       
  3331 !
       
  3332 
       
  3333 isView
       
  3334     ^ widget notNil
  3326 !
  3335 !
  3327 
  3336 
  3328 supportsSubComponents
  3337 supportsSubComponents
  3329     "returns true if the widget supports sub components
  3338     "returns true if the widget supports sub components
  3330     "
  3339     "