--- a/Tools__ViewTreeModel.st Wed Jan 21 13:37:04 2009 +0100
+++ b/Tools__ViewTreeModel.st Wed Jan 21 13:37:09 2009 +0100
@@ -12,7 +12,7 @@
!
HierarchicalList subclass:#ItemList
- instanceVariableNames:'treeModel eventHook eventHookInitialized'
+ instanceVariableNames:'treeModel eventHook eventHookInitialized showWidgetNames'
classVariableNames:''
poolDictionaries:''
privateIn:ViewTreeModel
@@ -1187,6 +1187,48 @@
^ treeModel
! !
+!ViewTreeModel::ItemList methodsFor:'accessing look'!
+
+additionalLabelForItem:anItem
+ "answer the additional lable for an item or nil"
+
+ |applClass|
+
+ showWidgetNames == true ifTrue:[
+ ^ '[', anItem widget name, ']'
+ ].
+
+ anItem isApplicationClass ifTrue:[
+ applClass := anItem applicationClass.
+
+ applClass notNil ifTrue:[
+ ^ ('[', applClass name, ']')
+ ].
+ ].
+ ^ nil
+!
+
+showWidgetNames
+ "answer true if the additional text is the widget name
+ otherwise the name of the application"
+
+ ^ showWidgetNames ? false
+!
+
+showWidgetNames:aBoolean
+ "set true if the additional text is the widget name
+ otherwise the name of the application"
+
+ self showWidgetNames == aBoolean ifFalse:[
+ showWidgetNames := aBoolean.
+
+ root notNil ifTrue:[
+ root recursiveAdditionalNameBehaviourChanged.
+ self changed.
+ ].
+ ].
+! !
+
!ViewTreeModel::ItemList methodsFor:'event processing'!
processEvent:anEvent
@@ -1202,6 +1244,7 @@
"
treeModel := aModel.
showRoot := true.
+ showWidgetNames := false.
! !
!ViewTreeModel::ItemList methodsFor:'searching'!