TextView.st
changeset 2442 914a5ef62334
parent 2429 eed79a96e43b
child 2455 750760093931
equal deleted inserted replaced
2441:50238eab2de4 2442:914a5ef62334
  2817 
  2817 
  2818 expandSelectionDown
  2818 expandSelectionDown
  2819     |l t|
  2819     |l t|
  2820 
  2820 
  2821     selectionStartLine notNil ifTrue:[
  2821     selectionStartLine notNil ifTrue:[
  2822 	expandingTop ifTrue:[
  2822         expandingTop ifTrue:[
  2823 	    l := selectionStartLine.
  2823             l := selectionStartLine.
  2824 	    selectionStartLine := selectionStartLine + 1.
  2824             selectionStartLine := selectionStartLine + 1.
  2825 	    (selectionStartLine > clickLine
  2825             (selectionStartLine > clickLine
  2826 	    or:[selectionStartLine == clickLine and:[selectionStartCol > clickCol]])
  2826             or:[selectionStartLine == clickLine and:[selectionStartCol > clickCol]])
  2827 	    ifTrue:[
  2827             ifTrue:[
  2828 		t := selectionStartLine.
  2828                 t := selectionStartLine.
  2829 		selectionStartLine := selectionEndLine.
  2829                 selectionStartLine := selectionEndLine.
  2830 		selectionEndLine := t.
  2830                 selectionEndLine := t.
  2831 		t := selectionStartCol.
  2831                 t := selectionStartCol.
  2832 		selectionStartCol := selectionEndCol.
  2832                 selectionStartCol := selectionEndCol.
  2833 		selectionEndCol := t.
  2833                 selectionEndCol := t.
  2834 		expandingTop := false
  2834                 expandingTop := false
  2835 	    ].
  2835             ].
  2836 	] ifFalse:[
  2836         ] ifFalse:[
  2837 	    l := selectionEndLine.
  2837             l := selectionEndLine.
  2838 	    selectionEndLine := selectionEndLine + 1.
  2838             selectionEndLine := selectionEndLine + 1.
  2839 	].
  2839         ].
  2840 	self redrawLine:l. 
  2840 "/        self redrawLine:l. 
  2841 	self redrawLine:l+1.
  2841 "/        self redrawLine:l+1.
  2842 	self makeSelectionVisible.
  2842         self redrawFromLine:l to:l+1.
       
  2843         self makeSelectionVisible.
  2843     ].
  2844     ].
  2844 
  2845 
  2845     "Created: 1.3.1996 / 23:35:08 / cg"
  2846     "Created: 1.3.1996 / 23:35:08 / cg"
  2846     "Modified: 18.3.1996 / 17:18:15 / cg"
  2847     "Modified: 18.3.1996 / 17:18:15 / cg"
  2847 !
  2848 !
  2912 
  2913 
  2913 expandSelectionUp
  2914 expandSelectionUp
  2914     |l t|
  2915     |l t|
  2915 
  2916 
  2916     selectionStartLine notNil ifTrue:[
  2917     selectionStartLine notNil ifTrue:[
  2917 	expandingTop ifTrue:[
  2918         expandingTop ifTrue:[
  2918 	    selectionStartLine := (selectionStartLine - 1) max:1.
  2919             selectionStartLine := (selectionStartLine - 1) max:1.
  2919 	    l := selectionStartLine. 
  2920             l := selectionStartLine. 
  2920 	] ifFalse:[
  2921         ] ifFalse:[
  2921 	    selectionEndLine := (selectionEndLine - 1) max:0.
  2922             selectionEndLine := (selectionEndLine - 1) max:0.
  2922 
  2923 
  2923 	    l := selectionEndLine.
  2924             l := selectionEndLine.
  2924 	    (selectionEndLine < clickLine
  2925             (selectionEndLine < clickLine
  2925 	    or:[(selectionEndLine == clickLine and:[selectionEndCol < clickCol])])
  2926             or:[(selectionEndLine == clickLine and:[selectionEndCol < clickCol])])
  2926 	    ifTrue:[
  2927             ifTrue:[
  2927 		t := selectionStartLine.
  2928                 t := selectionStartLine.
  2928 		selectionStartLine := selectionEndLine.
  2929                 selectionStartLine := selectionEndLine.
  2929 		selectionEndLine := t.
  2930                 selectionEndLine := t.
  2930 		t := selectionStartCol.
  2931                 t := selectionStartCol.
  2931 		selectionStartCol := selectionEndCol.
  2932                 selectionStartCol := selectionEndCol.
  2932 		selectionEndCol := t.
  2933                 selectionEndCol := t.
  2933 		l := selectionStartLine.
  2934                 l := selectionStartLine.
  2934 		expandingTop := true
  2935                 expandingTop := true
  2935 	    ].
  2936             ].
  2936 	].
  2937         ].
  2937 	self redrawLine:l. 
  2938         "/ self redrawLine:l. 
  2938 	self redrawLine:l+1. 
  2939         "/ self redrawLine:l+1. 
  2939 	self makeSelectionVisible.
  2940         self redrawFromLine:l to:l+1.
       
  2941         self makeSelectionVisible.
  2940     ].
  2942     ].
  2941 
  2943 
  2942     "Modified: 6.3.1996 / 14:12:06 / cg"
  2944     "Modified: 6.3.1996 / 14:12:06 / cg"
  2943 !
  2945 !
  2944 
  2946 
  3222 ! !
  3224 ! !
  3223 
  3225 
  3224 !TextView class methodsFor:'documentation'!
  3226 !TextView class methodsFor:'documentation'!
  3225 
  3227 
  3226 version
  3228 version
  3227     ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.172 2001-10-05 08:56:11 cg Exp $'
  3229     ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.173 2001-10-12 23:53:58 cg Exp $'
  3228 ! !
  3230 ! !