--- a/HierarchicalListView.st Thu Sep 16 15:45:17 1999 +0200
+++ b/HierarchicalListView.st Fri Sep 17 17:55:49 1999 +0200
@@ -388,14 +388,14 @@
!HierarchicalListView methodsFor:'drawing basics'!
-displayElement:anItem x:xL y:yT toX:xR y:yB
- "draw a label at xL/yT; fg/bg colors are already set
+displayElement:anItem x:x y:y h:h
+ "draw a label at x/y; fg/bg colors are already set
"
- anItem displayOn:self x:xL y:yT toX:xR y:yB
+ anItem displayOn:self x:x y:y h:h
!
-drawElementsFrom:start to:stop x:xL y:yT toX:xR
+drawElementsFrom:start to:stop x:xL y:yT w:w
"draw the items between start to stop without clearing the background
"
|item prevItem parent icon showIndc showIcon showText nxtPrnt
@@ -407,6 +407,8 @@
xIndc "{ Class:SmallInteger }"
xIcon "{ Class:SmallInteger }"
xText "{ Class:SmallInteger }"
+ xR "{ Class:SmallInteger }"
+ height "{ Class:SmallInteger }"
widthLvl "{ Class:SmallInteger }"
insetTxt "{ Class:SmallInteger }"
@@ -426,6 +428,7 @@
offIndcX := offIndcX - icon x.
offIndcY := icon y.
].
+ xR := xL + w.
showLines ifTrue:[
self drawLinesFrom:start to:stop x:xL y:yT toX:xR
@@ -441,7 +444,9 @@
].
yTop := yBot.
yBot := self yVisibleOfLine:(anIndex + 1).
- yCtr := yTop + (yBot - yTop // 2).
+ height := yBot - yTop.
+
+ yCtr := yTop + (height // 2).
(nxtPrnt := item parent) ~~ parent ifTrue:[
parent := nxtPrnt.
@@ -470,7 +475,7 @@
].
showText ifTrue:[
- self drawLabelAt:anIndex x:xText y:yTop toX:xR y:yBot
+ self drawLabelAt:anIndex x:xText y:yTop h:height
].
(showIndc and:[item hasChildren]) ifTrue:[
icon := item isExpanded ifTrue:[openIndicator] ifFalse:[closeIndicator].
@@ -959,5 +964,5 @@
!HierarchicalListView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalListView.st,v 1.8 1999-09-08 15:48:51 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalListView.st,v 1.9 1999-09-17 15:55:40 cg Exp $'
! !