'From Squeak3.1alpha of 19 February 2001 [latest update: #4173] on 16 July 2001 at 2:09:56 am'! "Change Set: HierarchyTextItems-dew Date: 16 July 2001 Author: Doug Way Adds the ability for hierarchy widget items to have text emphasis (bold, etc.) (To do this, have #asString in the ListItemMorph subclass return a Text object.)"! !IndentingListItemMorph methodsFor: 'drawing' stamp: 'dew 7/16/2001 02:09'! drawOn: aCanvas | tRect sRect columnRect columnScanner columnData columnLeft colorToUse | tRect := self toggleRectangle. sRect := bounds withLeft: tRect right + 3. self drawToggleOn: aCanvas in: tRect. colorToUse _ complexContents preferredColor ifNil: [color]. (container columns isNil or: [(contents asString indexOf: Character tab) = 0]) ifTrue: [ aCanvas text: contents asString bounds: sRect font: self fontToUse color: colorToUse. ] ifFalse: [ columnLeft _ sRect left. columnScanner _ ReadStream on: contents asString. container columns do: [ :width | columnRect _ columnLeft @ sRect top extent: width @ sRect height. columnData _ columnScanner upTo: Character tab. columnData isEmpty ifFalse: [ aCanvas text: columnData bounds: columnRect font: self fontToUse color: colorToUse. ]. columnLeft _ columnRect right + 5. ]. ]! !