SimpleView.st
branchjv
changeset 7716 3dba89415c91
parent 7715 925b859e1758
parent 7692 17ded3df79d8
child 7723 620e91f9b082
--- a/SimpleView.st	Fri Nov 18 21:26:33 2016 +0000
+++ b/SimpleView.st	Thu Nov 24 21:55:24 2016 +0000
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
@@ -593,13 +595,13 @@
 layoutComputation
 "
     Due to historic reasons, there are 2 mechanisms to resize a view:
-	- (old, to be eliminated mechanism)
-	    based upon info found in
-		relativeOrigin / relativeCorner / relativeExtent
-		originRule / cornerRule / extentRule
-
-	- (new, will migrate to that one)
-	    letting a layoutObject compute things
+        - (old, to be eliminated mechanism)
+            based upon info found in
+                relativeOrigin / relativeCorner / relativeExtent
+                originRule / cornerRule / extentRule
+
+        - (new, will migrate to that one)
+            letting a layoutObject compute things
 
     Actually, the old mechanism is just as powerful, as the new (layoutObject
     based) mechanism; with the help of block=rules, you can compute whatever
@@ -609,20 +611,20 @@
     relative-sized).
     Therefore (and also to make porting of ST-80 apps easier), ST/X will migrate
     to use layoutObjects.
-    You will not see a difference at the views protocol level, since
+    You will not see a difference at the view's protocol level, since
     existing interfaces will (silently) create layoutObjects as appropriate.
     However, you should remove all direct accesses to the above mentioned
     instance variables, to be prepared for that change.
 
     Notice, that a view recomputes its size whenever its superview
     changes size. This is done via:
-	sizeChanged
-	    -> allSubviews: superViewChangedSize
+        sizeChanged
+            -> allSubviews: superViewChangedSize
 
     If the geometry computation as performed in superViewChangedSize
     is not powerful enough for your application, you can either:
-	- redefine superViewChangedSize
-	- create a special layoutObject which computes a new layout.
+        - redefine superViewChangedSize
+        - create a special layoutObject which computes a new layout.
 "
 !
 
@@ -684,7 +686,7 @@
     A dynamic menu can be provided by the view itself, or by the model.
     In addition, TextViews allow a separate menuHolder to provide the menu
     (i.e. it may be different from the model).
-    If the model shall provide the menu, set the views menuMessage to a selector
+    If the model shall provide the menu, set the view's menuMessage to a selector
     which is sent to the model. This message should return a popUpMenu.
 
     For textViews, the above is also valid, except if the menuHolder is explicitely
@@ -1486,7 +1488,7 @@
 !
 
 resources
-    "return the views resources -
+    "return the view's resources -
      that's a ResourcePack containing national language strings"
 
     ^ self classResources
@@ -2337,7 +2339,7 @@
 
 heightOfContents
     "return the height of the contents in logical units
-     - defaults to views visible area here.
+     - defaults to view's visible area here.
     This method MUST be redefined in all view classess which are
     going to be scrolled AND show data which has different size than
     the view. For example, a view showing A4-size documents should return
@@ -2375,7 +2377,7 @@
     A view showing a bitmap of width 500 should return 500.
     If not redefined, scrollbars have no way of knowing the actual size
     of the contents being shown. This is called by scrollBars to compute
-    the relative width of the document vs. the views actual width.
+    the relative width of the document vs. the view's actual width.
     The value returned here must be based on a scale of 1, since users
     of this will scale as appropriate."
 
@@ -2655,12 +2657,12 @@
 !
 
 corner:corner
-    "set the views corner;
+    "set the view's corner;
      the corner argument may be:
-	 a point
-	    where integer fields mean 'pixel-values'
-	    and float values mean 'relative-to-superview'
-	    and nil means 'take current value';
+         a point
+            where integer fields mean 'pixel-values'
+            and float values mean 'relative-to-superview'
+            and nil means 'take current value';
      or a block returning a point which is interpreted as above.
      Please migrate to use layoutObjects, if possible."
 
@@ -2669,31 +2671,31 @@
     self explicitExtent:true.
 
     corner isBlock ifTrue:[
-	cornerRule := corner.
-	self drawableId notNil ifTrue:[
-	    pixelCorner := corner value
-	] ifFalse:[
-	    self extentChangedFlag:true
-	]
+        cornerRule := corner.
+        self drawableId notNil ifTrue:[
+            pixelCorner := corner value
+        ] ifFalse:[
+            self extentChangedFlag:true
+        ]
     ] ifFalse:[
-	x := corner x.
-	y := corner y.
-	x isNil ifTrue:[x := self corner x].
-	y isNil ifTrue:[y := self corner y].
-	c := x @ y.
-	((x isInteger not) or:[y isInteger not]) ifTrue:[
-	    relativeCorner := c.
-	    pixelCorner := self cornerFromRelativeCorner.
-	    pixelCorner isNil ifTrue:[
-		self extentChangedFlag:true
-	    ]
-	] ifFalse:[
-	    pixelCorner := c
-	]
+        x := corner x.
+        y := corner y.
+        x isNil ifTrue:[x := self corner x].
+        y isNil ifTrue:[y := self corner y].
+        c := x @ y.
+        ((x isInteger not) or:[y isInteger not]) ifTrue:[
+            relativeCorner := c.
+            pixelCorner := self cornerFromRelativeCorner.
+            pixelCorner isNil ifTrue:[
+                self extentChangedFlag:true
+            ]
+        ] ifFalse:[
+            pixelCorner := c
+        ]
     ].
 
     pixelCorner notNil ifTrue:[
-	self pixelCorner:pixelCorner
+        self pixelCorner:pixelCorner
     ]
 
     "Modified: 15.7.1996 / 09:51:06 / cg"
@@ -2706,53 +2708,53 @@
 !
 
 extent:extent
-    "set the views extent;
+    "set the view's extent;
      extent may be:
-	a point
-	    where integer fields mean 'pixel-values'
-	    and float values mean 'relative-to-superview'
-	    and nil means 'leave current value';
+        a point
+            where integer fields mean 'pixel-values'
+            and float values mean 'relative-to-superview'
+            and nil means 'leave current value';
      or a block returning a point which is interpreted as above.
      Be careful when using relative extents: rounding errors may
      accumulate. Better use origin/corner.
      Best: migrate to use layour objects.
 
      Notice: this sets the views explicitExtent flag, which prevents it normally
-	     from resizing itself to its preferredExtent.
-	     See initialExtent: for a variation."
+             from resizing itself to its preferredExtent.
+             See initialExtent: for a variation."
 
     |w h pixelExtent e|
 
     self explicitExtent:true.
 
     extent isBlock ifTrue:[
-	extentRule := extent.
-	self drawableId notNil ifTrue:[
-	    pixelExtent := extent value
-	] ifFalse:[
-	    self extentChangedFlag:true
-	]
+        extentRule := extent.
+        self drawableId notNil ifTrue:[
+            pixelExtent := extent value
+        ] ifFalse:[
+            self extentChangedFlag:true
+        ]
     ] ifFalse:[
-	extentRule := nil.
-	w := extent x.
-	h := extent y.
-	w isNil ifTrue:[w := width].
-	h isNil ifTrue:[h := height].
-	e := w@h.
-	((w isInteger not) or:[h isInteger not]) ifTrue:[
-	    "/ w > 1 ifTrue:[self halt].
-	    relativeExtent := e.
-	    pixelExtent := self extentFromRelativeExtent.
-	    pixelExtent isNil ifTrue:[
-		self extentChangedFlag:true
-	    ]
-	] ifFalse:[
-	    relativeExtent := nil.
-	    pixelExtent := e
-	]
+        extentRule := nil.
+        w := extent x.
+        h := extent y.
+        w isNil ifTrue:[w := width].
+        h isNil ifTrue:[h := height].
+        e := w@h.
+        ((w isInteger not) or:[h isInteger not]) ifTrue:[
+            "/ w > 1 ifTrue:[self halt].
+            relativeExtent := e.
+            pixelExtent := self extentFromRelativeExtent.
+            pixelExtent isNil ifTrue:[
+                self extentChangedFlag:true
+            ]
+        ] ifFalse:[
+            relativeExtent := nil.
+            pixelExtent := e
+        ]
     ].
     pixelExtent notNil ifTrue:[
-	self pixelExtent:pixelExtent
+        self pixelExtent:pixelExtent
     ]
 
     "Modified: / 07-07-2010 / 16:44:57 / cg"
@@ -2796,13 +2798,13 @@
 !
 
 height:aNumber
-    "set the views height in pixels"
+    "set the view's height in pixels"
 
     "/ check: the following leads to an error in the notebook...
 "/    aNumber isInteger ifTrue:[
 "/        height := aNumber.
 "/    ] ifFalse:[
-	self extent:(width @ aNumber)
+        self extent:(width @ aNumber)
 "/    ].
 
     "Modified: / 02-02-2011 / 12:16:44 / cg"
@@ -2844,7 +2846,7 @@
 !
 
 initialExtent:extent
-    "set the views extent, but don't change its explicitExtent setting.
+    "set the view's extent, but don't change its explicitExtent setting.
      a variant of #extent."
 
     |expl|
@@ -2855,13 +2857,13 @@
 !
 
 initialHeight:aNumber
-    "set the views height in pixels, but don't change its explicitExtent setting"
+    "set the view's height in pixels, but don't change its explicitExtent setting"
 
     self initialExtent:(width @ aNumber)
 !
 
 initialWidth:aNumber
-    "set the views width in pixels, but don't change its explicitExtent setting"
+    "set the view's width in pixels, but don't change its explicitExtent setting"
 
     self initialExtent:(aNumber @ height)
 !
@@ -3232,44 +3234,44 @@
 !
 
 origin:origin
-    "set the views origin;
+    "set the view's origin;
      origin may be:
-	a point
-	    where integer fields mean 'pixel-values'
-	    and float values mean 'relative-to-superview'
-	    and nil means 'take current value';
+        a point
+            where integer fields mean 'pixel-values'
+            and float values mean 'relative-to-superview'
+            and nil means 'take current value';
      or a block returning a point which is interpreted as above.
      Please migrate to use layout objects."
 
     |newLeft newTop pixelOrigin o|
 
     origin isBlock ifTrue:[
-	originRule := origin.
-	self drawableId notNil ifTrue:[
-	    pixelOrigin := origin value
-	] ifFalse:[
-	    self originChangedFlag:true
-	]
+        originRule := origin.
+        self drawableId notNil ifTrue:[
+            pixelOrigin := origin value
+        ] ifFalse:[
+            self originChangedFlag:true
+        ]
     ] ifFalse:[
-	o := origin.
-	newLeft := origin x.
-	newTop := origin y.
-	newLeft isNil ifTrue:[newLeft := left].
-	newTop isNil ifTrue:[newTop := top].
-	o := newLeft @ newTop.
-	((newLeft isInteger not) or:[newTop isInteger not]) ifTrue:[
-	    relativeOrigin := o.
-	    pixelOrigin := self originFromRelativeOrigin.
-	    pixelOrigin isNil ifTrue:[
-		self originChangedFlag:true
-	    ]
-	] ifFalse:[
-	    relativeOrigin := nil.
-	    pixelOrigin := o
-	]
+        o := origin.
+        newLeft := origin x.
+        newTop := origin y.
+        newLeft isNil ifTrue:[newLeft := left].
+        newTop isNil ifTrue:[newTop := top].
+        o := newLeft @ newTop.
+        ((newLeft isInteger not) or:[newTop isInteger not]) ifTrue:[
+            relativeOrigin := o.
+            pixelOrigin := self originFromRelativeOrigin.
+            pixelOrigin isNil ifTrue:[
+                self originChangedFlag:true
+            ]
+        ] ifFalse:[
+            relativeOrigin := nil.
+            pixelOrigin := o
+        ]
     ].
     pixelOrigin notNil ifTrue:[
-	self pixelOrigin:pixelOrigin
+        self pixelOrigin:pixelOrigin
     ].
 
     "Modified: 19.4.1996 / 15:12:36 / cg"
@@ -3389,7 +3391,7 @@
 !
 
 preferredExtent:anExtentPoint
-    "override the views own preferredExtent computation,
+    "override the view's own preferredExtent computation,
      and let it prefer the size given by the argument."
 
     preferredExtent := anExtentPoint.
@@ -3520,7 +3522,7 @@
 !
 
 setHeight:aNumber
-    "set the views height in pixels"
+    "set the view's height in pixels"
 
     height := aNumber.
 
@@ -3535,7 +3537,7 @@
 !
 
 setWidth:aNumber
-    "set the views width in pixels"
+    "set the view's width in pixels"
 
     width := aNumber.
 
@@ -3654,13 +3656,13 @@
 !
 
 width:aNumber
-    "set the views width in pixels"
+    "set the view's width in pixels"
 
     "/ check: the following leads to an error in the notebook...
 "/    aNumber isInteger ifTrue:[
 "/        width := aNumber.
 "/    ] ifFalse:[
-	self extent:(aNumber @ height)
+        self extent:(aNumber @ height)
 "/    ]
 
     "Modified: / 02-02-2011 / 12:16:26 / cg"
@@ -3970,17 +3972,17 @@
 
     "
      mhmh - for backward compatibility, try to ask
-     the model first, then use the views menu.
+     the model first, then use the view's menu.
     "
     (menuHolder respondsTo:sym) ifFalse:[
-	(self respondsTo:sym) ifTrue:[
-	    menuHolder := self
-	]
+        (self respondsTo:sym) ifTrue:[
+            menuHolder := self
+        ]
     ].
 
     sym numArgs > 0 ifTrue:[
-	"/ squeak compatibility (with args): create the empty menu here, let model add items
-	^ menuHolder perform:sym withOptionalArgument:(Menu new) and:(device shiftDown).
+        "/ squeak compatibility (with args): create the empty menu here, let model add items
+        ^ menuHolder perform:sym withOptionalArgument:(Menu new) and:(device shiftDown).
     ].
 
     "
@@ -4197,10 +4199,10 @@
 !
 
 sensor
-    "return the views sensor"
+    "return the view's sensor"
 
     windowGroup notNil ifTrue:[
-	^ windowGroup sensor.
+        ^ windowGroup sensor.
     ].
 
     "there is no window group. Deliver events synchronously"
@@ -6450,7 +6452,7 @@
     "the mouseWheel was turned - handle as a scroll operation.
      Specialized application windows may redefine this for any other
      operation.
-     Here, we scroll some amount which depends upon the views contents height
+     Here, we scroll some amount which depends upon the view's contents height
      (but never too much);
      if shift is pressed, always scroll a single scroll-step;
      if ctrl is pressed, always scroll one page."
@@ -6460,39 +6462,39 @@
     sensor := self sensor.
 
     UserPreferences current allowMouseWheelZoom ifTrue:[
-	zoomInOrOut := sensor ctrlDown or:[sensor metaDown].
-	zoomInOrOut ifTrue:[
-	    self mouseWheelZoom:amount.
-	    ^ self.
-	].
+        zoomInOrOut := sensor ctrlDown or:[sensor metaDown].
+        zoomInOrOut ifTrue:[
+            self mouseWheelZoom:amount.
+            ^ self.
+        ].
     ].
 
     horizontal := pageScroll := false.
     (UserPreferences current shiftMouseWheelScrollsHorizontally) ifTrue:[
-	horizontal := sensor shiftDown
+        horizontal := sensor shiftDown
     ] ifFalse:[                              
-	pageScroll := sensor shiftDown.
+        pageScroll := sensor shiftDown.
     ].
     
     pageScroll ifFalse:[
         amountToScroll := horizontal 
-			    ifTrue:[ self horizontalScrollStep]
-			    ifFalse:[ self verticalScrollStep ].
-	amountToScroll := self scaleMouseWheelScrollAmount:amountToScroll.
+                            ifTrue:[ self horizontalScrollStep]
+                            ifFalse:[ self verticalScrollStep ].
+        amountToScroll := self scaleMouseWheelScrollAmount:amountToScroll.
     ].
 
     amount > 0 ifTrue:[
-	pageScroll ifTrue:[
-	    horizontal ifTrue:[self pageLeft] ifFalse:[self pageUp]
-	] ifFalse:[
-	    horizontal ifTrue:[self scrollLeft:amountToScroll] ifFalse:[self scrollUp:amountToScroll]
-	]
+        pageScroll ifTrue:[
+            horizontal ifTrue:[self pageLeft] ifFalse:[self pageUp]
+        ] ifFalse:[
+            horizontal ifTrue:[self scrollLeft:amountToScroll] ifFalse:[self scrollUp:amountToScroll]
+        ]
     ] ifFalse:[
-	pageScroll ifTrue:[
-	    horizontal ifTrue:[self pageRight] ifFalse:[self pageDown]
-	] ifFalse:[
-	    horizontal ifTrue:[self scrollRight:amountToScroll] ifFalse:[self scrollDown:amountToScroll]
-	]
+        pageScroll ifTrue:[
+            horizontal ifTrue:[self pageRight] ifFalse:[self pageDown]
+        ] ifFalse:[
+            horizontal ifTrue:[self scrollRight:amountToScroll] ifFalse:[self scrollDown:amountToScroll]
+        ]
     ].
 
     "Modified: / 21.5.1999 / 19:58:42 / cg"
@@ -6512,20 +6514,20 @@
 
     "/ first ask my flags if its enforced or forbidden
     self requestFocusOnPointerEnter ifTrue:[
-	doRequestFocus := true
+        doRequestFocus := true
     ] ifFalse:[
-	self doNotRequestFocusOnPointerEnter ifTrue:[
-	    doRequestFocus := false
-	] ifFalse:[
-	    "/ then look for the settings.
-	    doRequestFocus := self wantsFocusWithPointerEnter
-	]
+        self doNotRequestFocusOnPointerEnter ifTrue:[
+            doRequestFocus := false
+        ] ifFalse:[
+            "/ then look for the settings.
+            doRequestFocus := self wantsFocusWithPointerEnter
+        ]
     ].
 
     doRequestFocus ifTrue:[
-	self requestFocus.
-    ].
-    dependents notNil ifTrue:[ self changed:#pointerInView ]
+        self requestFocus.
+    ].
+    dependents notNil ifTrue:[ self changed:#pointerInView with:true ]
     
     "Modified: / 01-08-2012 / 17:06:41 / cg"
 !
@@ -6534,7 +6536,7 @@
     "mouse pointer left"
 
     super pointerLeave:buttonState.
-    dependents notNil ifTrue:[ self changed:#pointerInView ]
+    dependents notNil ifTrue:[ self changed:#pointerInView with:false]
 !
 
 propertyChange:propertyId state: state
@@ -8149,86 +8151,86 @@
      and handled in the superClass (static menus are a historic leftOver).
      Otherwise, the follwing steps are performed:
 
-	- ask the receiver for the menu (via #yellowButtonMenu)
-	- ask the receiver for the menuPerformer.
-	- startUp the menu - it is supposed to return an actionSelector
-	- if the menuPerformer responds to the selector,
-	  send it to the performer;
-	  otherwise send it to the view (the receiver)
-	  This is funny, it allows additional menuItems to be added
-	  AND still get the views copy/cut/paste functionality.
-	  Without this, you had to redefine and forward all of those
-	  messages in the performer."
+        - ask the receiver for the menu (via #yellowButtonMenu)
+        - ask the receiver for the menuPerformer.
+        - startUp the menu - it is supposed to return an actionSelector
+        - if the menuPerformer responds to the selector,
+          send it to the performer;
+          otherwise send it to the view (the receiver)
+          This is funny, it allows additional menuItems to be added
+          AND still get the view's copy/cut/paste functionality.
+          Without this, you had to redefine and forward all of those
+          messages in the performer."
 
     |menu menuPerformer actionSelector prevReceiver wg|
 
     self middleButtonMenu isNil ifTrue:[
-	"
-	 try ST-80 style menus first:
-	 if there is a model, and a menuMessage is defined,
-	 ask model for the menu and launch that if non-nil.
-	"
-	menu := self yellowButtonMenu.
-	menu notNil ifTrue:[
-	    "
-	     got one, launch the menu. It is supposed
-	     to return an actionSelector.
-	    "
-	    menuPerformer := self menuPerformer value.
-
-	    "/ could be a spec ...
-	    menu isArray ifTrue:[
-		menu := menu decodeAsLiteralArray.
-		menu receiver:menuPerformer.
-		menu findGuiResourcesIn:(self menuHolder).
-	    ] ifFalse:[
-		(menu respondsTo:#receiver) ifTrue:[
-		    menuPerformer := menu receiver ? menuPerformer.
-		].
-	    ].
-
-	    "
-	     a temporary kludge:
-		 pass myself as receiver, the menuPerformer as performer;
-		 the menu will send its messages to either the
-		 menuPerformer or me (its receiver).
-		 This allows for the ST-80 behavior, where some messages
-		 go to the model, others to the view
-		 (copy/cut/paste).
-	    "
-	    (prevReceiver := menu receiver) isNil ifTrue:[
-		"/ kludge for oldStyle menus (MenuView/PopUpMenu)
-		"/ not req'd for real Menus
-		"/ (menu isKindOf:Menu) ifFalse:[
-		(menu respondsTo:#menuPerformer:) ifTrue:[
-		    menu receiver:self.    "/ really ?
-		    menu menuPerformer:menuPerformer.
-		] ifFalse:[
-		"/ ] ifTrue:[
-		    "/ new style menu
-		    menu receiver:menuPerformer.
-		]
-	    ].
-
-	    "/
-	    "/ startup the menu - this returns a selector
-	    "/
-	    actionSelector := self startUpMenu:menu.
-
-	    "/ before doing anything else, redraw expose area from
-	    "/ the menu (in case the action changes my state)
-	    (wg := self windowGroup) notNil ifTrue:[
-		wg processExposeEvents.
-	    ].
-
-	    (actionSelector notNil and:[actionSelector isSymbol]) ifTrue:[
-		self dispatchMenuSelection:actionSelector to: menuPerformer.
-	    ].
-
-	    menu receiver:prevReceiver.
-
-	    ^ self
-	].
+        "
+         try ST-80 style menus first:
+         if there is a model, and a menuMessage is defined,
+         ask model for the menu and launch that if non-nil.
+        "
+        menu := self yellowButtonMenu.
+        menu notNil ifTrue:[
+            "
+             got one, launch the menu. It is supposed
+             to return an actionSelector.
+            "
+            menuPerformer := self menuPerformer value.
+
+            "/ could be a spec ...
+            menu isArray ifTrue:[
+                menu := menu decodeAsLiteralArray.
+                menu receiver:menuPerformer.
+                menu findGuiResourcesIn:(self menuHolder).
+            ] ifFalse:[
+                (menu respondsTo:#receiver) ifTrue:[
+                    menuPerformer := menu receiver ? menuPerformer.
+                ].
+            ].
+
+            "
+             a temporary kludge:
+                 pass myself as receiver, the menuPerformer as performer;
+                 the menu will send its messages to either the
+                 menuPerformer or me (its receiver).
+                 This allows for the ST-80 behavior, where some messages
+                 go to the model, others to the view
+                 (copy/cut/paste).
+            "
+            (prevReceiver := menu receiver) isNil ifTrue:[
+                "/ kludge for oldStyle menus (MenuView/PopUpMenu)
+                "/ not req'd for real Menus
+                "/ (menu isKindOf:Menu) ifFalse:[
+                (menu respondsTo:#menuPerformer:) ifTrue:[
+                    menu receiver:self.    "/ really ?
+                    menu menuPerformer:menuPerformer.
+                ] ifFalse:[
+                "/ ] ifTrue:[
+                    "/ new style menu
+                    menu receiver:menuPerformer.
+                ]
+            ].
+
+            "/
+            "/ startup the menu - this returns a selector
+            "/
+            actionSelector := self startUpMenu:menu.
+
+            "/ before doing anything else, redraw expose area from
+            "/ the menu (in case the action changes my state)
+            (wg := self windowGroup) notNil ifTrue:[
+                wg processExposeEvents.
+            ].
+
+            (actionSelector notNil and:[actionSelector isSymbol]) ifTrue:[
+                self dispatchMenuSelection:actionSelector to: menuPerformer.
+            ].
+
+            menu receiver:prevReceiver.
+
+            ^ self
+        ].
     ].
 
     "/
@@ -9366,7 +9368,7 @@
 !
 
 resources
-    "return the views resources -
+    "return the view's resources -
      that's a ResourcePack containing national language strings"
 
     ^ resources
@@ -9738,11 +9740,11 @@
 
 mapAt:aPoint
     "make the view visible on the screen.
-     For topViews, if aPoint is nonNil, the views origin is located there
+     For topViews, if aPoint is nonNil, the view's origin is located there
      (unless you have a dictator as windowManager ;-)
      Notice:
-	Actually, this method is only valid for topViews;
-	however, it is defined here to allow things like 'Button new realize'"
+        Actually, this method is only valid for topViews;
+        however, it is defined here to allow things like 'Button new realize'"
 
     self mapAt:aPoint iconified:false
 
@@ -9751,65 +9753,65 @@
 
 mapAt:aPoint iconified:iconified
     "make the view visible on the screen.
-     For topViews, if aPoint is nonNil, the views origin is located there
+     For topViews, if aPoint is nonNil, the view's origin is located there
      (unless you have a dictator as windowManager ;-).
      If the iconified argument is true, the window is created as icon initially.
      Notice:
-	Actually, this method is only valid for topViews;
-	however, it is defined here to allow things like 'Button new realize'"
+        Actually, this method is only valid for topViews;
+        however, it is defined here to allow things like 'Button new realize'"
 
     |subs|
 
     realized ifFalse:[
-	self drawableId isNil ifTrue:[
-	    "
-	     first time ?
-	     yes, realize (implies a map)
-	    "
-	    self realizeKeepingGroup:false at:aPoint iconified:iconified
-	] ifFalse:[
-	    "
-	     no, map only
-	    "
-	    realized := true.
-	    aPoint isNil ifTrue:[
-		iconified ifTrue:[
-		    device
-			mapView:self id:self drawableId iconified:iconified
-			atX:0 y:0
-			width:width height:height
-			minExtent:(self minExtent) maxExtent:(self maxExtent).
-		] ifFalse:[
-		    device mapWindow:self drawableId.
-		]
-	    ] ifFalse:[
-		left := aPoint x.
-		top := aPoint y.
-		device
-		    mapView:self id:self drawableId iconified:iconified
-		    atX:left y:top
-		    width:width height:height
-		    minExtent:(self minExtent) maxExtent:(self maxExtent).
-	    ].
-
-	    "/
-	    "/ implies that all realized subviews
-	    "/ are now also mapped
-	    "/
-	    "/ not needed for topViews - the mapped event does exactly the same
-	    "/ however, X does not generate mapped events for non-topViews
-	    "/ when a view gets deiconified.
-
-	    superView notNil ifTrue:[
-		(subs := self subViews) notNil ifTrue:[
-		    subs do:[:v |
-			v realized "shown" ifFalse:[
-			    v mapped
-			]
-		    ]
-		]
-	    ]
-	].
+        self drawableId isNil ifTrue:[
+            "
+             first time ?
+             yes, realize (implies a map)
+            "
+            self realizeKeepingGroup:false at:aPoint iconified:iconified
+        ] ifFalse:[
+            "
+             no, map only
+            "
+            realized := true.
+            aPoint isNil ifTrue:[
+                iconified ifTrue:[
+                    device
+                        mapView:self id:self drawableId iconified:iconified
+                        atX:0 y:0
+                        width:width height:height
+                        minExtent:(self minExtent) maxExtent:(self maxExtent).
+                ] ifFalse:[
+                    device mapWindow:self drawableId.
+                ]
+            ] ifFalse:[
+                left := aPoint x.
+                top := aPoint y.
+                device
+                    mapView:self id:self drawableId iconified:iconified
+                    atX:left y:top
+                    width:width height:height
+                    minExtent:(self minExtent) maxExtent:(self maxExtent).
+            ].
+
+            "/
+            "/ implies that all realized subviews
+            "/ are now also mapped
+            "/
+            "/ not needed for topViews - the mapped event does exactly the same
+            "/ however, X does not generate mapped events for non-topViews
+            "/ when a view gets deiconified.
+
+            superView notNil ifTrue:[
+                (subs := self subViews) notNil ifTrue:[
+                    subs do:[:v |
+                        v realized "shown" ifFalse:[
+                            v mapped
+                        ]
+                    ]
+                ]
+            ]
+        ].
     ]
 
     "Modified: 23.8.1996 / 14:53:55 / stefan"
@@ -10393,19 +10395,19 @@
 invalidate
     "add a damage to redraw the receiver to its input event queue.
      This is preferable to calling redraw directly, in that the drawing is done by
-     the views process itself, and there is a possibilty to merge
+     the view's process itself, and there is a possibilty to merge
      multiple damage rectangles into single redraws.
      However, be aware, that the redrawing may be delayed for some time,
      until the receiver's windowGroupProcess gets rescheduled."
 
     shown ifFalse:[
-	"/ no need to add damage - will get a full-redraw anyway,
-	"/ when I will be shown again.
-	^ self
+        "/ no need to add damage - will get a full-redraw anyway,
+        "/ when I will be shown again.
+        ^ self
     ].
     self
-	invalidateDeviceRectangle:(Rectangle left:0 top:0 width:width height:height)
-	repairNow:false
+        invalidateDeviceRectangle:(Rectangle left:0 top:0 width:width height:height)
+        repairNow:false
 
     "Modified: / 9.11.1998 / 21:04:16 / cg"
 !
@@ -10413,16 +10415,16 @@
 invalidate:aRectangle
     "add a damage to redraw part of the receiver, to its input event queue.
      This is preferable to calling redraw directly,
-     in that the drawing is done by the views process itself,
+     in that the drawing is done by the view's process itself,
      and there is a possibilty to merge multiple damage rectangles into
      single redraws.
      However, be aware, that the redrawing may be delayed for some time,
      intil the receiver's windowGroupProcess gets rescheduled."
 
     shown ifFalse:[
-	"/ no need to add damage - will get a full-redraw anyway,
-	"/ when I will be shown again.
-	^ self
+        "/ no need to add damage - will get a full-redraw anyway,
+        "/ when I will be shown again.
+        ^ self
     ].
     self invalidate:aRectangle repairNow:false