1605 "Modified: 16.12.1995 / 13:11:31 / cg" |
1605 "Modified: 16.12.1995 / 13:11:31 / cg" |
1606 ! ! |
1606 ! ! |
1607 |
1607 |
1608 !TextView methodsFor:'selections'! |
1608 !TextView methodsFor:'selections'! |
1609 |
1609 |
|
1610 expandSelectionDown |
|
1611 selectionStartLine notNil ifTrue:[ |
|
1612 selectionEndLine := selectionEndLine + 1. |
|
1613 |
|
1614 self redrawLine:selectionEndLine-1. |
|
1615 self redrawLine:selectionEndLine. |
|
1616 ]. |
|
1617 |
|
1618 "Created: 1.3.1996 / 23:35:08 / cg" |
|
1619 ! |
|
1620 |
|
1621 expandSelectionLeft |
|
1622 selectionStartLine notNil ifTrue:[ |
|
1623 selectionEndCol := (selectionEndCol - 1) max:0. |
|
1624 selectionEndLine == selectionStartLine ifTrue:[ |
|
1625 selectionEndCol := selectionEndCol max:selectionStartCol |
|
1626 ]. |
|
1627 self redrawLine:selectionEndLine. |
|
1628 ]. |
|
1629 |
|
1630 "Modified: 2.3.1996 / 00:00:00 / cg" |
|
1631 ! |
|
1632 |
|
1633 expandSelectionRight |
|
1634 selectionStartLine notNil ifTrue:[ |
|
1635 selectionEndCol := selectionEndCol + 1. |
|
1636 |
|
1637 self redrawLine:selectionEndLine |
|
1638 from:selectionEndCol-1 |
|
1639 to:selectionEndCol |
|
1640 ]. |
|
1641 |
|
1642 "Created: 1.3.1996 / 23:33:17 / cg" |
|
1643 ! |
|
1644 |
|
1645 expandSelectionUp |
|
1646 |t| |
|
1647 |
|
1648 selectionStartLine notNil ifTrue:[ |
|
1649 selectionEndLine := (selectionEndLine - 1) max:0. |
|
1650 selectionEndLine := selectionEndLine max:selectionStartLine. |
|
1651 selectionEndLine == selectionStartLine ifTrue:[ |
|
1652 selectionEndCol := selectionEndCol max:selectionStartCol |
|
1653 ]. |
|
1654 self redrawLine:selectionEndLine+1. |
|
1655 self redrawLine:selectionEndLine. |
|
1656 ]. |
|
1657 |
|
1658 "Modified: 2.3.1996 / 00:01:17 / cg" |
|
1659 ! |
|
1660 |
1610 hasSelection |
1661 hasSelection |
1611 "return true, if there is a selection" |
1662 "return true, if there is a selection" |
1612 |
1663 |
1613 ^ selectionStartLine notNil |
1664 ^ selectionStartLine notNil |
1614 ! |
1665 ! |