SimpleView.st
branchjv
changeset 7364 262ab56176cb
parent 7340 4ffa0a87c163
parent 7341 5f622fa27203
child 7380 62f0b3e4fa9c
--- a/SimpleView.st	Sat May 07 06:52:53 2016 +0200
+++ b/SimpleView.st	Mon May 09 21:41:22 2016 +0200
@@ -10901,7 +10901,7 @@
 	allowScrollBeyondContents:false
 !
 
-scrollTo:newOrigin redraw:doRedraw allowScrollBeyondContents:allowScrollBehondContents
+scrollTo:newOrigin redraw:doRedraw allowScrollBeyondContents:allowScrollBeyondContents
     "change origin to have newOrigin be visible at the top-left.
      The argument defines the integer device coordinates of the new top-left
      point."
@@ -10918,12 +10918,12 @@
     wCont := self widthOfContents.
     currentTransformation := gc transformation.
     currentTransformation isNil ifTrue:[
-	orgY := orgX := 0
+        orgY := orgX := 0
     ] ifFalse:[
-	wCont := (currentTransformation applyScaleX:wCont) rounded.
-	hCont := (currentTransformation applyScaleY:hCont) rounded.
-	orgY := currentTransformation translation y negated.
-	orgX := currentTransformation translation x negated
+        wCont := (currentTransformation applyScaleX:wCont) rounded.
+        hCont := (currentTransformation applyScaleY:hCont) rounded.
+        orgY := currentTransformation translation y negated.
+        orgX := currentTransformation translation x negated
     ].
 
     iw := self innerWidth.
@@ -10934,21 +10934,21 @@
     x := newOrigin x.
     y := newOrigin y.
 
-    allowScrollBehondContents ifFalse:[
-	x + iw > wCont ifTrue:[
-	    x := (wCont - iw) asInteger.
-	].
+    allowScrollBeyondContents ifFalse:[
+        x + iw > wCont ifTrue:[
+            x := (wCont - iw) asInteger.
+        ].
     ].
     x < 0 ifTrue:[
-	x := 0
-    ].
-    allowScrollBehondContents ifFalse:[
-	y + ih > hCont ifTrue:[
-	    y := (hCont - ih) asInteger.
-	].
+        x := 0
+    ].
+    allowScrollBeyondContents ifFalse:[
+        y + ih > hCont ifTrue:[
+            y := (hCont - ih) asInteger.
+        ].
     ].
     y < 0 ifTrue:[
-	y := 0.
+        y := 0.
     ].
 
     dX := x - orgX.
@@ -10959,79 +10959,79 @@
     ].
 
     (wg := self windowGroup) notNil ifTrue:[
-	wg processRealExposeEventsFor:self.
+        wg processRealExposeEventsFor:self.
     ].
 
     self originWillChange.
     (shown and:[doRedraw]) ifTrue:[
-	copyWidth := iw - dX abs.
-	copyHeight := ih - dY abs.
-	((copyWidth > 0) and:[copyHeight > 0]) ifTrue:[
-	    "/ some of the currently displayed pixels
-	    "/ remain visible. Copy them
-
-	    dX < 0 ifTrue:[
-	      fromX := margin.
-	      toX := margin - dX.
-	      redrawX := margin
-	    ] ifFalse:[
-	      fromX := margin + dX.
-	      toX := margin.
-	      redrawX := margin + copyWidth.
-	    ].
-	    dY < 0 ifTrue:[
-	      fromY := margin.
-	      toY   := margin - dY.
-	      redrawY := margin.
-	    ] ifFalse:[
-	      fromY := margin + dY.
-	      toY   := margin.
-	      redrawY := margin + copyHeight.
-	    ].
-	    self catchExpose.
-	    self setViewOrigin:(x @ y).
-	    self
-		copyFrom:self
-		x:fromX y:fromY
-		toX:toX   y:toY
-		width:copyWidth
-		height:copyHeight
-		async:true.
-
-	    self setInnerClip.
-
-	    "first redraw the rectangle above/below the
-	     copied area (with full width)."
-
-	    copyHeight < ih ifTrue:[
-	    self invalidateDeviceRectangle:((margin@redrawY) extent:(iw@(ih - copyHeight))) repairNow:false.
+        copyWidth := iw - dX abs.
+        copyHeight := ih - dY abs.
+        ((copyWidth > 0) and:[copyHeight > 0]) ifTrue:[
+            "/ some of the currently displayed pixels
+            "/ remain visible. Copy them
+
+            dX < 0 ifTrue:[
+              fromX := margin.
+              toX := margin - dX.
+              redrawX := margin
+            ] ifFalse:[
+              fromX := margin + dX.
+              toX := margin.
+              redrawX := margin + copyWidth.
+            ].
+            dY < 0 ifTrue:[
+              fromY := margin.
+              toY   := margin - dY.
+              redrawY := margin.
+            ] ifFalse:[
+              fromY := margin + dY.
+              toY   := margin.
+              redrawY := margin + copyHeight.
+            ].
+            self catchExpose.
+            self setViewOrigin:(x @ y).
+            self
+                copyFrom:self
+                x:fromX y:fromY
+                toX:toX   y:toY
+                width:copyWidth
+                height:copyHeight
+                async:true.
+
+            self setInnerClip.
+
+            "first redraw the rectangle above/below the
+             copied area (with full width)."
+
+            copyHeight < ih ifTrue:[
+            self invalidateDeviceRectangle:((margin@redrawY) extent:(iw@(ih - copyHeight))) repairNow:false.
 "/                self
 "/                    redrawDeviceX:margin y:redrawY
 "/                    width:iw height:(ih - copyHeight).
-	    ].
-
-	    "second redraw the rectangle left/right of the
-	     copied area"
-
-	    copyWidth < iw ifTrue:[
-	    self invalidateDeviceRectangle:((redrawX@toY) extent:((iw-copyWidth)@copyHeight)) repairNow:false.
+            ].
+
+            "second redraw the rectangle left/right of the
+             copied area"
+
+            copyWidth < iw ifTrue:[
+            self invalidateDeviceRectangle:((redrawX@toY) extent:((iw-copyWidth)@copyHeight)) repairNow:false.
 "/                self redrawDeviceX:redrawX y:toY
 "/
 "/                             width:iw - copyWidth
 "/                            height:copyHeight.
-	    ].
-	    self waitForExpose.
-	] ifFalse:[
-	    "redraw everything"
-
-	    self setViewOrigin:(x @ y).
-	    self invalidateDeviceRectangle:((margin@margin) extent:(iw@ih)) repairNow:false.
+            ].
+            self waitForExpose.
+        ] ifFalse:[
+            "redraw everything"
+
+            self setViewOrigin:(x @ y).
+            self invalidateDeviceRectangle:((margin@margin) extent:(iw@ih)) repairNow:false.
 "/            self redrawDeviceX:margin y:margin
 "/                         width:iw
 "/                        height:ih.
-	].
+        ].
     ] ifFalse:[
-	self setViewOrigin:(x @ y).
+        self setViewOrigin:(x @ y).
     ].
 
     self originChanged:(dX negated @ dY negated).