TextView.st
changeset 2558 4c10bec1117d
parent 2557 dabeb8404df8
child 2581 03ffde9bbf6a
equal deleted inserted replaced
2557:dabeb8404df8 2558:4c10bec1117d
  1963         inVisible:visLineNr 
  1963         inVisible:visLineNr 
  1964         from:selectionStartCol
  1964         from:selectionStartCol
  1965         with:selectionFgColor and:selectionBgColor.
  1965         with:selectionFgColor and:selectionBgColor.
  1966 !
  1966 !
  1967 
  1967 
  1968 drawVisibleLineSelected:visLineNr from:selectionStartCol to:selectionEndCol
  1968 drawVisibleLineSelected:visLineNr from:startCol to:endCol
  1969     self 
  1969     self 
  1970         drawLine:(self withoutAnyColorEmphasis:(self visibleAt:visLineNr))
  1970         drawLine:(self withoutAnyColorEmphasis:(self visibleAt:visLineNr))
  1971         inVisible:visLineNr 
  1971         inVisible:visLineNr 
  1972         from:selectionStartCol to:selectionEndCol
  1972         from:startCol to:endCol
  1973         with:selectionFgColor and:selectionBgColor.
  1973         with:selectionFgColor and:selectionBgColor.
  1974 !
  1974 !
  1975 
  1975 
  1976 redrawFromVisibleLine:startVisLineNr to:endVisLineNr
  1976 redrawFromVisibleLine:startVisLineNr to:endVisLineNr
  1977     "redraw a visible line range"
  1977     "redraw a visible line range"
  2067 !
  2067 !
  2068 
  2068 
  2069 redrawVisibleLine:visLineNr
  2069 redrawVisibleLine:visLineNr
  2070     "redraw visible line lineNr"
  2070     "redraw visible line lineNr"
  2071 
  2071 
  2072     |len line l|
  2072     |line|
  2073 
  2073 
  2074     selectionStartLine notNil ifTrue:[
  2074     selectionStartLine notNil ifTrue:[
  2075         line := self visibleLineToAbsoluteLine:visLineNr.
  2075         line := self visibleLineToAbsoluteLine:visLineNr.
  2076         (line between:selectionStartLine and:selectionEndLine) ifTrue:[
  2076         (line between:selectionStartLine and:selectionEndLine) ifTrue:[
  2077             (line == selectionStartLine) ifTrue:[
  2077             (line == selectionStartLine) ifTrue:[
  2102             (line == selectionEndLine) ifTrue:[
  2102             (line == selectionEndLine) ifTrue:[
  2103                 "its the last line of a multi-line selection"
  2103                 "its the last line of a multi-line selection"
  2104                 (selectionEndCol == 0) ifTrue:[
  2104                 (selectionEndCol == 0) ifTrue:[
  2105                     ^ super redrawVisibleLine:visLineNr
  2105                     ^ super redrawVisibleLine:visLineNr
  2106                 ].
  2106                 ].
  2107                 l := self visibleAt:selectionEndLine.
       
  2108                 len := l size.
       
  2109 
  2107 
  2110                 self clearMarginOfVisibleLine:visLineNr with:selectionBgColor.
  2108                 self clearMarginOfVisibleLine:visLineNr with:selectionBgColor.
  2111                 self drawVisibleLineSelected:visLineNr from:1 to:selectionEndCol.
  2109                 self drawVisibleLineSelected:visLineNr from:1 to:selectionEndCol.
  2112                 super redrawVisibleLine:visLineNr from:(selectionEndCol + 1).
  2110                 super redrawVisibleLine:visLineNr from:(selectionEndCol + 1).
  2113                 ^ self
  2111                 ^ self
  3440 ! !
  3438 ! !
  3441 
  3439 
  3442 !TextView class methodsFor:'documentation'!
  3440 !TextView class methodsFor:'documentation'!
  3443 
  3441 
  3444 version
  3442 version
  3445     ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.181 2002-07-23 12:40:15 cg Exp $'
  3443     ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.182 2002-07-23 15:29:50 mb Exp $'
  3446 ! !
  3444 ! !
  3447 TextView initialize!
  3445 TextView initialize!