# HG changeset patch # User ca # Date 1232541429 -3600 # Node ID cc98051589bb0dbb2180ae1df5daca19c558868b # Parent 7892f26996b723145df178ccc7ba39ddfa80a168 *** empty log message *** diff -r 7892f26996b7 -r cc98051589bb Tools__ViewTreeModel.st --- 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'!