inform renderere if list changed
authorca
Thu, 19 Feb 2004 08:22:58 +0100
changeset 2640 2855d7e55d43
parent 2639 6d95857dd389
child 2641 c69c486e53c0
inform renderere if list changed
ListModelView.st
--- a/ListModelView.st	Thu Feb 19 01:39:25 2004 +0100
+++ b/ListModelView.st	Thu Feb 19 08:22:58 2004 +0100
@@ -190,6 +190,8 @@
     "
     |negatedOrg|
 
+    renderer listWillChange.
+
     list ~~ aList ifTrue:[
         list removeDependent:self.
         list := aList.
@@ -1049,6 +1051,18 @@
     ^ startOfLinesY
 !
 
+xAbsoluteOfItem:anItem
+    "returns the absolute x of the labeled text
+    "
+    ^ (self xVisibleOfItem:anItem) + viewOrigin x.
+!
+
+xVisibleOfItem:anItem
+    "returns the visible x of the labeled text
+    "
+    ^ textStartLeft - viewOrigin x
+!
+
 yAbsoluteOfLine:aLineNr
     "given a lineNr, return y-coordinate absolute
     "
@@ -1617,6 +1631,14 @@
     ^ renderer
 ! !
 
+!ListModelView::Renderer methodsFor:'change & update'!
+
+listWillChange
+    "called before the list changed, clear cashes ect.
+     here nothing is done
+    "
+! !
+
 !ListModelView::Renderer methodsFor:'displaying'!
 
 display:anItem atX:xLeft y:yTop lineHeight:h
@@ -1668,7 +1690,7 @@
 !ListModelView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/ListModelView.st,v 1.88 2004-01-28 06:08:23 ca Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/ListModelView.st,v 1.89 2004-02-19 07:22:58 ca Exp $'
 ! !
 
 ListModelView initialize!