equal
deleted
inserted
replaced
47 hereby transferred. |
47 hereby transferred. |
48 " |
48 " |
49 ! |
49 ! |
50 |
50 |
51 version |
51 version |
52 ^ '$Header: /cvs/stx/stx/libwidg/Attic/SelListV.st,v 1.44 1995-11-17 08:54:42 cg Exp $' |
52 ^ '$Header: /cvs/stx/stx/libwidg/Attic/SelListV.st,v 1.45 1995-11-22 23:08:01 cg Exp $' |
53 ! |
53 ! |
54 |
54 |
55 documentation |
55 documentation |
56 " |
56 " |
57 this one is a ListView with a selected line (which is shown highlighted) |
57 this one is a ListView with a selected line (which is shown highlighted) |
1218 |listLine fg bg |
1218 |listLine fg bg |
1219 y "{ Class: SmallInteger }" |
1219 y "{ Class: SmallInteger }" |
1220 y2 "{ Class: SmallInteger }" |
1220 y2 "{ Class: SmallInteger }" |
1221 wEdge| |
1221 wEdge| |
1222 |
1222 |
1223 |
|
1224 bg := hilightBgColor. |
1223 bg := hilightBgColor. |
1225 fg := hilightFgColor. |
1224 fg := hilightFgColor. |
1226 listLine := self visibleLineToListLine:visLineNr. |
1225 listLine := self visibleLineToListLine:visLineNr. |
1227 listLine notNil ifTrue:[ |
1226 listLine notNil ifTrue:[ |
1228 "XXX only if -1/+1" |
|
1229 "/ hilightLevel ~~ 0 ifTrue:[ |
|
1230 "/ self paint:bg. |
|
1231 "/ self fillRectangleX:0 y:(self yOfVisibleLine:visLineNr)-1 width:width height:1 |
|
1232 "/ ]. |
|
1233 |
|
1234 strikeOut ifTrue:[ |
1227 strikeOut ifTrue:[ |
1235 self drawVisibleLine:visLineNr with:fgColor and:bgColor. |
1228 self drawVisibleLine:visLineNr with:fgColor and:bgColor. |
1236 y := self yOfVisibleLine:visLineNr. |
1229 y := self yOfVisibleLine:visLineNr. |
1237 |
1230 |
1238 self paint:fgColor. |
1231 self paint:fgColor. |
1240 self displayLineFromX:0 y:y toX:width y:y. |
1233 self displayLineFromX:0 y:y toX:width y:y. |
1241 ^ self |
1234 ^ self |
1242 ]. |
1235 ]. |
1243 |
1236 |
1244 self drawVisibleLine:visLineNr with:fg and:bg. |
1237 self drawVisibleLine:visLineNr with:fg and:bg. |
1245 y := self yOfVisibleLine:visLineNr. |
1238 y := (self yOfVisibleLine:visLineNr) - (lineSpacing//2). |
1246 |
1239 |
1247 " |
1240 " |
1248 a line above and below |
1241 a line above and below |
1249 " |
1242 " |
1250 hilightFrameColor notNil ifTrue:[ |
1243 hilightFrameColor notNil ifTrue:[ |
1259 |
1252 |
1260 " |
1253 " |
1261 an edge it around |
1254 an edge it around |
1262 " |
1255 " |
1263 (hilightLevel ~~ 0) ifTrue:[ |
1256 (hilightLevel ~~ 0) ifTrue:[ |
1264 "XXX the -1/+1 need some more work" |
|
1265 "/ self drawEdgesForX:0 y:y-1 |
|
1266 "/ width:width height:fontHeight+1 |
|
1267 "/ level:hilightLevel. |
|
1268 |
|
1269 " |
1257 " |
1270 let edge start at left, extending to the full width |
1258 let edge start at left, extending to the full width |
1271 XXX: widthOfContents should be cached in ListView |
1259 XXX: widthOfContents should be cached in ListView |
1272 (instead of recomputing all over) |
1260 (instead of recomputing all over) |
1273 " |
1261 " |
1274 wEdge := width-(2 * margin). |
1262 wEdge := width-(2 * margin). |
1275 includesNonStrings ifFalse:[ |
1263 includesNonStrings ifFalse:[ |
1276 wEdge := wEdge max:(self widthOfContents). |
1264 wEdge := wEdge max:(self widthOfContents). |
1277 ]. |
1265 ]. |
1278 self drawEdgesForX:(margin - leftOffset) y:y |
1266 self drawEdgesForX:(margin - leftOffset) y:y |
1279 width:wEdge height:fontHeight |
1267 width:wEdge height:fontHeight |
1280 level:hilightLevel. |
1268 level:hilightLevel. |
1281 |
1269 |
1282 |
1270 |