TextView.st
changeset 502 6f3d0d7a782c
parent 489 5816aa12fec8
child 503 468d4a36ed67
equal deleted inserted replaced
501:13fc7b9ce5cb 502:6f3d0d7a782c
  1680                 expandingTop := false
  1680                 expandingTop := false
  1681             ].
  1681             ].
  1682         ] ifFalse:[
  1682         ] ifFalse:[
  1683             l := selectionEndLine.
  1683             l := selectionEndLine.
  1684             selectionEndLine := selectionEndLine + 1.
  1684             selectionEndLine := selectionEndLine + 1.
  1685             selectionEndLine <= clickLine ifTrue:[
       
  1686                 expandingTop := true
       
  1687             ]
       
  1688         ].
  1685         ].
  1689         self redrawLine:l. 
  1686         self redrawLine:l. 
  1690         self redrawLine:l+1.
  1687         self redrawLine:l+1.
  1691         self makeSelectionVisible.
  1688         self makeSelectionVisible.
  1692     ].
  1689     ].
  1693 
  1690 
  1694     "Created: 1.3.1996 / 23:35:08 / cg"
  1691     "Created: 1.3.1996 / 23:35:08 / cg"
  1695     "Modified: 6.3.1996 / 14:18:12 / cg"
  1692     "Modified: 18.3.1996 / 17:18:15 / cg"
  1696 !
  1693 !
  1697 
  1694 
  1698 expandSelectionLeft
  1695 expandSelectionLeft
  1699     |c l t|
  1696     |c l t c1 c2|
  1700 
  1697 
  1701     selectionStartLine notNil ifTrue:[
  1698     selectionStartLine notNil ifTrue:[
  1702         expandingTop ifTrue:[
  1699         expandingTop ifTrue:[
  1703             selectionStartCol == 0 ifTrue:[^ self].
  1700             selectionStartCol == 0 ifTrue:[^ self].
  1704             l := selectionStartLine.
  1701             l := selectionStartLine.
  1705             selectionStartCol := (selectionStartCol - 1) max:0.
  1702             selectionStartCol := (selectionStartCol - 1) max:1.
  1706             c := selectionStartCol.
  1703             c := selectionStartCol.
  1707         ] ifFalse:[
  1704         ] ifFalse:[
  1708             l := selectionEndLine.
  1705             l := selectionEndLine.
  1709             selectionEndCol := (selectionEndCol - 1) max:0.
  1706             selectionEndCol := (selectionEndCol - 1) max:0.
  1710             c := selectionEndCol.
  1707             c := selectionEndCol.
  1715                     expandingTop := true.
  1712                     expandingTop := true.
  1716                     c := selectionStartCol.
  1713                     c := selectionStartCol.
  1717                 ]
  1714                 ]
  1718             ].
  1715             ].
  1719         ].
  1716         ].
  1720         self redrawLine:l from:c to:c+1. 
  1717         c1 := c.
       
  1718         c2 := c1 + 1.
       
  1719         c1 == 0 ifTrue:[
       
  1720             c1 := 1
       
  1721         ].
       
  1722         self redrawLine:l from:c1 to:c2. 
  1721         self makeSelectionVisible.
  1723         self makeSelectionVisible.
  1722     ].
  1724     ].
  1723 
  1725 
  1724     "Modified: 6.3.1996 / 14:18:27 / cg"
  1726     "Modified: 18.3.1996 / 17:05:46 / cg"
  1725 !
  1727 !
  1726 
  1728 
  1727 expandSelectionRight
  1729 expandSelectionRight
  1728     |l c t|
  1730     |l c t|
  1729 
  1731 
  2069 ! !
  2071 ! !
  2070 
  2072 
  2071 !TextView class methodsFor:'documentation'!
  2073 !TextView class methodsFor:'documentation'!
  2072 
  2074 
  2073 version
  2075 version
  2074     ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.43 1996-03-07 12:23:34 cg Exp $'
  2076     ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.44 1996-03-18 16:19:09 cg Exp $'
  2075 ! !
  2077 ! !