ListView.st
changeset 4495 512fb0a0d8bd
parent 4468 6d711c19c529
child 4522 4bd248c98c06
equal deleted inserted replaced
4494:dfe81ebdd5d6 4495:512fb0a0d8bd
  1852             ].
  1852             ].
  1853             self paint:fg on:bg.
  1853             self paint:fg on:bg.
  1854             w notNil ifTrue:[
  1854             w notNil ifTrue:[
  1855                 "/ clip req'd for VISTAs new font rendering (which seems to shoot over the compute
  1855                 "/ clip req'd for VISTAs new font rendering (which seems to shoot over the compute
  1856                 self clippedTo:(Rectangle left:x top:yf width:w height:fontHeight) do:[
  1856                 self clippedTo:(Rectangle left:x top:yf width:w height:fontHeight) do:[
  1857                     self displayOpaqueString:lineString from:sCol to:eCol x:x y:(y + fontAscent)
  1857                     "/ self displayOpaqueString:lineString from:sCol to:eCol x:x y:(y + fontAscent)
       
  1858                     self displayString:lineString from:sCol to:eCol x:x y:(y + fontAscent)
  1858                 ]
  1859                 ]
  1859             ] ifFalse:[
  1860             ] ifFalse:[
  1860                 self displayOpaqueString:lineString from:sCol to:eCol x:x y:(y + fontAscent)
  1861                 "/ self displayOpaqueString:lineString from:sCol to:eCol x:x y:(y + fontAscent)
       
  1862                 self displayString:lineString from:sCol to:eCol x:x y:(y + fontAscent)
  1861             ].
  1863             ].
  1862         ]
  1864         ]
  1863     ]
  1865     ]
  1864 
  1866 
  1865     "Modified: / 15.12.1999 / 23:21:43 / cg"
  1867     "Modified: / 15.12.1999 / 23:21:43 / cg"
  1869     "draw right part of a visible line from startCol to end of line in fg/bg"
  1871     "draw right part of a visible line from startCol to end of line in fg/bg"
  1870 
  1872 
  1871     |y x index1 index2 lineWithoutColor|
  1873     |y x index1 index2 lineWithoutColor|
  1872 
  1874 
  1873     (startCol < 1) ifTrue:[
  1875     (startCol < 1) ifTrue:[
  1874 	index1 := 1
  1876         index1 := 1
  1875     ] ifFalse:[
  1877     ] ifFalse:[
  1876 	index1 := startCol
  1878         index1 := startCol
  1877     ].
  1879     ].
  1878     y := self yOfVisibleLine:visLineNr.
  1880     y := self yOfVisibleLine:visLineNr.
  1879     x := (self xOfCol:index1 inVisibleLine:visLineNr) - viewOrigin x.
  1881     x := (self xOfCol:index1 inVisibleLine:visLineNr) - viewOrigin x.
  1880     backgroundAlreadyClearedColor == bg ifFalse:[
  1882     backgroundAlreadyClearedColor == bg ifFalse:[
  1881 	self paint:bg.
  1883         self paint:bg.
  1882 	self fillRectangleX:x y:y - (lineSpacing // 2)
  1884         self fillRectangleX:x y:y - (lineSpacing // 2)
  1883 		      width:(width + viewOrigin x - x)
  1885                       width:(width + viewOrigin x - x)
  1884 		     height:fontHeight.
  1886                      height:fontHeight.
  1885     ].
  1887     ].                                      
  1886     lineString notNil ifTrue:[
  1888     lineString notNil ifTrue:[
  1887 	lineString isString ifFalse:[
  1889         lineString isString ifFalse:[
  1888 	    self drawLine:lineString inVisible:visLineNr from:startCol to:nil with:fg and:bg.
  1890             self drawLine:lineString inVisible:visLineNr from:startCol to:nil with:fg and:bg.
  1889 	] ifTrue:[
  1891         ] ifTrue:[
  1890 	    lineWithoutColor := self withoutColorEmphasis:lineString ifFg:fg andBg:bg.
  1892             lineWithoutColor := self withoutColorEmphasis:lineString ifFg:fg andBg:bg.
  1891 	    index2 := lineWithoutColor size.
  1893             index2 := lineWithoutColor size.
  1892 	    (index2 < index1) ifTrue:[^ self].
  1894             (index2 < index1) ifTrue:[^ self].
  1893 	    (index1 <= index2) ifTrue:[
  1895             (index1 <= index2) ifTrue:[
  1894 		self paint:fg on:bg.
  1896                 self paint:fg on:bg.
  1895 		self displayOpaqueString:lineWithoutColor from:index1 to:index2 x:x y:(y + fontAscent)
  1897                 "/ self displayOpaqueString:lineWithoutColor from:index1 to:index2 x:x y:(y + fontAscent)
  1896 	    ]
  1898                 self displayString:lineWithoutColor from:index1 to:index2 x:x y:(y + fontAscent)
  1897 	]
  1899             ]
       
  1900         ]
  1898     ]
  1901     ]
  1899 
  1902 
  1900     "Modified: / 15.12.1999 / 23:24:40 / cg"
  1903     "Modified: / 15.12.1999 / 23:24:40 / cg"
  1901 !
  1904 !
  1902 
  1905 
  4846 ! !
  4849 ! !
  4847 
  4850 
  4848 !ListView class methodsFor:'documentation'!
  4851 !ListView class methodsFor:'documentation'!
  4849 
  4852 
  4850 version_CVS
  4853 version_CVS
  4851     ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.356 2012-10-24 10:31:56 cg Exp $'
  4854     ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.357 2013-01-17 16:24:20 cg Exp $'
  4852 ! !
  4855 ! !
       
  4856