SimpleView.st
changeset 7341 5f622fa27203
parent 7339 c51be133de59
child 7364 262ab56176cb
child 7378 3f51596365af
--- a/SimpleView.st	Fri May 06 13:54:45 2016 +0200
+++ b/SimpleView.st	Sat May 07 12:29:57 2016 +0200
@@ -10894,7 +10894,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."
@@ -10911,12 +10911,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.
@@ -10927,21 +10927,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.
@@ -10952,79 +10952,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).