remember the helpKey in the view - not in the builder
authorClaus Gittinger <cg@exept.de>
Mon, 09 Jan 2006 09:50:41 +0100
changeset 4452 0076d4427e51
parent 4451 37c3c3242e63
child 4453 79fcf4ad63c7
remember the helpKey in the view - not in the builder (its hard to find for the activeHelp otherwise)
SimpleView.st
--- a/SimpleView.st	Thu Dec 22 18:41:50 2005 +0100
+++ b/SimpleView.st	Mon Jan 09 09:50:41 2006 +0100
@@ -19,7 +19,7 @@
 		insets layout shown hiddenOnRealize name level margin
 		innerClipRect shadowColor lightColor bitGravity viewGravity
 		controller windowGroup preferredExtent explicitExtent dependents
-		layoutManager visibilityChannel'
+		layoutManager visibilityChannel helpKey'
 	classVariableNames:'Grey CentPoint ViewSpacing DefaultStyle StyleSheet
 		DefaultViewBackgroundColor DefaultBorderColor DefaultLightColor
 		DefaultShadowColor DefaultBorderWidth DefaultFocusColor
@@ -79,7 +79,7 @@
 
 documentation
 "
-    this class implements functions common to all Views which do not work on / show a model. 
+    this class implements functions common to all Views which do not work on / show a model.
     Previously, all of this functionality used to be in the old View class, but has been
     separated into this new SimpleView (which does not know about models) and the new View, which
     does so.
@@ -87,9 +87,9 @@
     but for backward compatibility its better to leave things the way they are
     (there are simply too many subclasses of View around ...).
 
-    Instances of SimpleView are seldom used, most views in the system inherit 
-    from this class. 
-    However, sometimes a view is used to create a dummy view for framing 
+    Instances of SimpleView are seldom used, most views in the system inherit
+    from this class.
+    However, sometimes a view is used to create a dummy view for framing
     or layout purposes.
 
     [Instance variables:]
@@ -206,7 +206,7 @@
 	(although this will make view setup more complicated, it will remove
 	 complexity from the internals of view. Also, it will allow for more
 	 varieties of borders.)
-        
+
 	add components (could also call them gadgets or lightweight views)
 	- views are expensive in terms of X resources. This would make all
 	framing/edge and panel helper views become cheap ST objects, instead
@@ -224,9 +224,9 @@
 "
 !
 
-examples 
+examples
 "
-    (all examples below use different viewBackgrounds, 
+    (all examples below use different viewBackgrounds,
      to make the individual subviews visible)
 
     a subView in a topView:
@@ -319,7 +319,7 @@
        top open
 									[exEnd]
 
-    fixed origin, variable size, 
+    fixed origin, variable size,
     bottomInset for constant distance from bottom:
 									[exBegin]
        |top v1 v2|
@@ -344,7 +344,7 @@
        top open
 									[exEnd]
 
-    variable origin, variable size, 
+    variable origin, variable size,
 									[exBegin]
        |top v1 v2|
 
@@ -366,7 +366,7 @@
        top open
 									[exEnd]
 
-    variable origin, variable size, 
+    variable origin, variable size,
     insets for some constant distance
 									[exBegin]
        |top v1 v2|
@@ -495,11 +495,11 @@
 "
 !
 
-layoutComputation 
+layoutComputation
 "
     Due to historic reasons, there are 2 mechanisms to resize a view:
 	- (old, to be eliminated mechanism)
-	    based upon info found in 
+	    based upon info found in
 		relativeOrigin / relativeCorner / relativeExtent
 		originRule / cornerRule / extentRule
 
@@ -512,7 +512,7 @@
     However, having 6 instance variables in every view creates some overhead,
     which can be avoided in most cases (most views are either fixed-size or
     relative-sized).
-    Therefore (and also to make porting of ST-80 apps easier), ST/X will migrate 
+    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
     existing interfaces will (silently) create layoutObjects as appropriate.
@@ -531,9 +531,9 @@
 "
 !
 
-popupMenus 
+popupMenus
 "
-    Due to historic reasons, there are multiple mechanisms for popupMenu 
+    Due to historic reasons, there are multiple mechanisms for popupMenu
     definition:
 
 	- static menus
@@ -553,7 +553,7 @@
 
 	someView middleButtonMenu:<aPopUpMenu>
 
-    Compatibility note: 
+    Compatibility note:
 	static menus should no longer be used - their operation
 	is incompatible with ST-80 and ST/X's dynamic menus.
 	Do not use them if you care for compatibility.
@@ -573,12 +573,12 @@
 	v2 viewBackground:Color yellow.
 
 	v1 middleButtonMenu:(
-				PopUpMenu 
+				PopUpMenu
 				   labels:#('foo' 'bar')
 				   selectors:#(foo bar)
 				   receiver:v1
 			    ).
-                                        
+
 	top open.
 
 
@@ -599,7 +599,7 @@
 
     example: (in your application, the plug would be your application, topView or model)
     Notice, that all menu messages are sent to the view (because no model was set)
-    - so the textView still performs the copy-function correctly 
+    - so the textView still performs the copy-function correctly
     (but of course, does not respond to the fooBar messages).
     If a model was set, the menu would try the model first, but send its messages
     to the view IFF the model would not respond to the menu message.
@@ -611,19 +611,19 @@
 	holder respondTo:#menu1
 		    with:[
 			    v1 menuMessage:#otherMenu1.
-			    PopUpMenu 
+			    PopUpMenu
 				labels:#('foo' 'bar')
 				selectors:#(foo bar).
 			 ].
 	holder respondTo:#otherMenu1
-		    with:[  
+		    with:[
 			    v1 menuMessage:#menu1.
-			    PopUpMenu 
+			    PopUpMenu
 				labels:#('other foo' 'other bar')
 				selectors:#(foo bar).
 			 ].
 	holder respondTo:#menu2
-		    with:[  PopUpMenu 
+		    with:[  PopUpMenu
 				labels:#('copy' 'bar2')
 				selectors:#(copySelection bar2)
 			 ].
@@ -649,7 +649,7 @@
 
     example:
     (Notice: the executor understands the #copySelection message - therefore, the
-     views built-in copy is NOT performed 
+     views built-in copy is NOT performed
      - it could be forwarded to the view, though.
      This could be useful to intercept/filter things).
 
@@ -657,15 +657,15 @@
 
 	menuProvider := Plug new.
 	menuProvider respondTo:#menu
-		    with:[  PopUpMenu 
+		    with:[  PopUpMenu
 				labels:#('copy' 'foo')
 				selectors:#(copySelection foo)
 			 ].
 
 	menuExecutor := Plug new.
-	menuExecutor respondTo:#copySelection 
+	menuExecutor respondTo:#copySelection
 			   with:[Transcript showCR:'copy function'].
-	menuExecutor respondTo:#foo 
+	menuExecutor respondTo:#foo
 			   with:[Transcript showCR:'foo function'].
 
 	top := StandardSystemView new.
@@ -685,12 +685,12 @@
 
 initialize
     DefaultStyle isNil ifTrue:[
-        Font initialize.
-        Form initialize.
-        Color initialize.
+	Font initialize.
+	Form initialize.
+	Color initialize.
     ].
     self == SimpleView ifTrue:[
-        Smalltalk addDependent:self   "/ to get language changes
+	Smalltalk addDependent:self   "/ to get language changes
     ].
 
     ReturnFocusWhenClosingModalBoxes := false.
@@ -743,7 +743,7 @@
      If aView is nil, it is left unspecified, in which superview
      the new view will be placed. The view can later be assigned
      by adding it to the superview via #addSubView:.
-     If its later realized and no superview has ever been set, 
+     If its later realized and no superview has ever been set,
      it will come up as a topview."
 
     |newView|
@@ -814,7 +814,7 @@
     "Modified: 28.5.1996 / 20:25:05 / cg"
 !
 
-origin:origin corner:corner 
+origin:origin corner:corner
     "create a new view with given origin and extent"
 
     ^ self origin:origin corner:corner borderWidth:nil
@@ -949,11 +949,11 @@
 
 update:something with:aParameter from:changedObject
     changedObject == Smalltalk ifTrue:[
-        (something == #Language or:[something == LanguageTerritory]) ifTrue:[
-            "flush resources on language changes"
-            self flushAllClassResources.
-            self allSubInstancesDo:[:eachView | eachView languageChanged].
-        ].
+	(something == #Language or:[something == LanguageTerritory]) ifTrue:[
+	    "flush resources on language changes"
+	    self flushAllClassResources.
+	    self allSubInstancesDo:[:eachView | eachView languageChanged].
+	].
     ]
 
     "Created: 15.6.1996 / 15:23:04 / cg"
@@ -1048,7 +1048,7 @@
     ^ DefaultViewBackgroundColor
 
     "
-     View defaultViewBackgroundColor 
+     View defaultViewBackgroundColor
     "
 
     "Modified: 13.8.1997 / 19:37:55 / cg"
@@ -1060,20 +1060,20 @@
     |iconLibraryClass |
 
     DefaultStyle isNil ifTrue:[
-        self setDefaultStyle
+	self setDefaultStyle
     ].
 
     StyleSheet := ViewStyle fromFile:(DefaultStyle , '.style').
     StyleSheet fileReadFailed ifTrue:[
-        ('SimpleView [warning]: ***** no styleSheet for ' , DefaultStyle , '-style.') errorPrintCR.
-        DefaultStyle ~~ #normal ifTrue:[
-            DefaultStyle := #normal.
-            StyleSheet := ViewStyle fromFile:(DefaultStyle , '.style').
-        
-            StyleSheet fileReadFailed ifTrue:[
-                'SimpleView [warning]: not even a styleSheet for normal-style (using ugly defaults).' errorPrintCR.
-            ]
-        ]
+	('SimpleView [warning]: ***** no styleSheet for ' , DefaultStyle , '-style.') errorPrintCR.
+	DefaultStyle ~~ #normal ifTrue:[
+	    DefaultStyle := #normal.
+	    StyleSheet := ViewStyle fromFile:(DefaultStyle , '.style').
+
+	    StyleSheet fileReadFailed ifTrue:[
+		'SimpleView [warning]: not even a styleSheet for normal-style (using ugly defaults).' errorPrintCR.
+	    ]
+	]
     ].
 
     iconLibraryClass := StyleSheet at:#ToolbarIconLibrary.
@@ -1110,7 +1110,7 @@
      it is better to return the focus automatically.
      For managers which assign the focus according the pointer position,
      it may be better to turn the focus-return off.
-     You should add a corresponding expression into your private.rc or 
+     You should add a corresponding expression into your private.rc or
      display.rc file."
 
     ReturnFocusWhenClosingModalBoxes := aBoolean
@@ -1125,12 +1125,12 @@
     |defStyle|
 
     DefaultStyle isNil ifTrue:[
-        defStyle := OperatingSystem getEnvironment:'STX_VIEWSTYLE'.
-        defStyle notNil ifTrue:[
-            DefaultStyle := defStyle asSymbol.
-        ] ifFalse:[
-            DefaultStyle := #mswindowsXP
-        ].
+	defStyle := OperatingSystem getEnvironment:'STX_VIEWSTYLE'.
+	defStyle notNil ifTrue:[
+	    DefaultStyle := defStyle asSymbol.
+	] ifFalse:[
+	    DefaultStyle := #mswindowsXP
+	].
     ].
 !
 
@@ -1138,7 +1138,7 @@
     "return the view style sheet information (a dictionary)"
 
     StyleSheet isNil ifTrue:[
-        self updateAllStyleCaches.
+	self updateAllStyleCaches.
     ].
     ^ StyleSheet
 
@@ -1187,7 +1187,7 @@
     "this method gets some heavily used style stuff and keeps
      it in class-variables for faster access.
      Subclasses should redefine this to load any cached style-values
-     into faster class variables as well. These should NOT do a 
+     into faster class variables as well. These should NOT do a
      super updateStyleCache, since this method is called for all view-classes
      anyway."
 
@@ -1220,7 +1220,7 @@
 	currentScreen hasGrayscales ifTrue:[
 	    bgGrey := Grey
 	] ifFalse:[
-	    bgGrey := White 
+	    bgGrey := White
 	]
     ].
     bgGrey := bgGrey onDevice:currentScreen.
@@ -1284,7 +1284,7 @@
     "if not already loaded, get the classes resourcePack and return it"
 
     ClassResources isNil ifTrue:[
-        ClassResources := super classResources.
+	ClassResources := super classResources.
     ].
     ^ ClassResources
 !
@@ -1315,7 +1315,7 @@
 	Language := #de.
 	Smalltalk changed:#Language.
 	View flushAllClassResources
-    "     
+    "
 !
 
 flushClassResources
@@ -1345,12 +1345,12 @@
     "create, realize the view - this topview and all its subviews will
      run as a separate process with its own windowGroup"
 
-    ^ self new open 
+    ^ self new open
 !
 
 openOnXScreenNamed:aScreenName
     "create an instance of the view and open it
-     on some X display screen. The argument aScreenName must be 
+     on some X display screen. The argument aScreenName must be
      a valid x-display name (i.e. of the form '<host>:<screenNr>' as in 'foo:0').
      For more info, read the document on multiple display
      support and the documentation of the DeviceWorkstation class."
@@ -1358,10 +1358,10 @@
     |newDevice|
 
     [
-        newDevice := XWorkstation newDispatchingFor:aScreenName.
+	newDevice := XWorkstation newDispatchingFor:aScreenName.
     ] on:Screen deviceOpenErrorSignal do:[:ex|
-        self warn:'Could not open display: ' , aScreenName.
-        ^ self
+	self warn:'Could not open display: ' , aScreenName.
+	^ self
     ].
     ^ (self onDevice:newDevice) open.
 
@@ -1418,7 +1418,7 @@
     "/ what a kludge - Dolphin and Squeak mean: printOn:;
     "/ ST/X (and some old ST80's) mean: draw-yourself on.
     (aGCOrStream isStream or:[aGCOrStream == Transcript]) ifTrue:[
-        ^ super displayOn:aGCOrStream
+	^ super displayOn:aGCOrStream
     ].
     self redraw
 
@@ -1484,6 +1484,14 @@
 
 !SimpleView methodsFor:'accessing'!
 
+helpKey
+    ^ helpKey
+!
+
+helpKey:something
+    helpKey := something.
+!
+
 keyboardProcessor
     "return my keyboard processor"
 
@@ -1557,8 +1565,8 @@
      in myself and recursively in all of my subviews"
 
     viewBackground ~~ something ifTrue:[
-        self viewBackground:something.
-        self invalidate
+	self viewBackground:something.
+	self invalidate
     ].
 
     self allSubViewsBackground:something
@@ -1582,7 +1590,7 @@
 
     self viewBackground:aColor.
     shown ifTrue:[
-        self clear; invalidate.
+	self clear; invalidate.
     ].
 
     "Created: 3.5.1997 / 10:26:49 / cg"
@@ -1628,7 +1636,7 @@
 	drawableId notNil ifTrue:[
 	    device setWindowBorderShape:nil in:drawableId
 	]
-    ] ifFalse:[        
+    ] ifFalse:[
 	viewShape isNil ifTrue:[
 	    viewShape := ArbitraryViewShape new
 	].
@@ -1723,36 +1731,36 @@
     "/ backward compatibility
     "/ superView will be renamed to container soon.
     (superView notNil and:[superView isBorderedWrapper]) ifTrue:[
-        ^ superView level:aNumber
+	^ superView level:aNumber
     ].
 
     (aNumber ~~ level and:[aNumber notNil]) ifTrue:[
-        self is3D ifTrue:[
-            level := aNumber.
-            oldMargin := margin.
-            margin := level abs.
-
-            realized ifTrue:[
-                margin ~~ oldMargin ifTrue:[
-                    (margin > oldMargin) ifTrue:[
-                        how := #smaller
-                    ] ifFalse:[
-                        how := #larger
-                    ].
-                    self sizeChanged:how.
-                    self setInnerClip.
-                ].
-                shown ifTrue:[
-                    margin ~~ oldMargin ifTrue:[
-                        self clearView.
-                        self redrawX:margin y:margin
-                               width:width-(margin*2) 
-                              height:height-(margin*2)
-                    ].
-                    self redrawEdges.
-               ]
-            ]
-        ]
+	self is3D ifTrue:[
+	    level := aNumber.
+	    oldMargin := margin.
+	    margin := level abs.
+
+	    realized ifTrue:[
+		margin ~~ oldMargin ifTrue:[
+		    (margin > oldMargin) ifTrue:[
+			how := #smaller
+		    ] ifFalse:[
+			how := #larger
+		    ].
+		    self sizeChanged:how.
+		    self setInnerClip.
+		].
+		shown ifTrue:[
+		    margin ~~ oldMargin ifTrue:[
+			self clearView.
+			self redrawX:margin y:margin
+			       width:width-(margin*2)
+			      height:height-(margin*2)
+		    ].
+		    self redrawEdges.
+	       ]
+	    ]
+	]
     ]
 
     "Modified: 5.6.1996 / 14:12:17 / cg"
@@ -1761,7 +1769,7 @@
 lightColor
     "returb the color to be used for lighted edges (3D only)"
 
-    ^ lightColor 
+    ^ lightColor
 !
 
 lightColor:aColorOrImage
@@ -1772,7 +1780,7 @@
 
 margin
     "return my inner margin - this is usually the level,
-     but can be more for some views 
+     but can be more for some views
      (textViews which add more margin between the border and the text)"
 
     ^ margin
@@ -1783,7 +1791,7 @@
 shadowColor
     "returb the color to be used for shadowed edges (3D only)"
 
-    ^ shadowColor 
+    ^ shadowColor
 !
 
 shadowColor:aColorOrImage
@@ -1826,7 +1834,7 @@
 	drawableId notNil ifTrue:[
 	    device setWindowShape:nil in:drawableId
 	]
-    ] ifFalse:[        
+    ] ifFalse:[
 	viewShape isNil ifTrue:[
 	    viewShape := ArbitraryViewShape new
 	].
@@ -1884,7 +1892,7 @@
 !SimpleView methodsFor:'accessing-contents'!
 
 heightOfContents
-    "return the height of the contents in logical units 
+    "return the height of the contents in logical units
      - defaults to views 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
@@ -1903,7 +1911,7 @@
 !
 
 widthOfContents
-    "return the width of the contents in logical units 
+    "return the width of the contents in logical units
      - defaults to views 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
@@ -1963,23 +1971,23 @@
 !
 
 bottomInset:aNumber
-    "set the inset of the bottom edge; 
+    "set the inset of the bottom edge;
      positive is to the top (view becomes smaller),
      negative to the bottom (becomes larger)"
 
     |newInset|
 
     insets isNil ifTrue:[
-        insets := Array with:0 with:0 with:0 with:0
+	insets := Array with:0 with:0 with:0 with:0
     ].
     newInset := aNumber.
     newInset isNil ifTrue:[
-        self halt:'oops'.
-        newInset := 0.
+	self halt:'oops'.
+	newInset := 0.
     ].
     (insets at:4) ~= newInset ifTrue:[
-        insets at:4 put:newInset.
-        self containerChangedSize
+	insets at:4 put:newInset.
+	self containerChangedSize
     ]
 
     "Modified: 19.7.1996 / 17:30:22 / cg"
@@ -2024,7 +2032,7 @@
 	x isNil ifTrue:[x := self corner x].
 	y isNil ifTrue:[y := self corner y].
 	((x isInteger not) or:[y isInteger not]) ifTrue:[
-	    newCorner := self cornerFromRelativeCorner:x@y 
+	    newCorner := self cornerFromRelativeCorner:x@y
 	]
     ] ifFalse:[
 	(relativeCorner notNil) ifTrue:[
@@ -2035,7 +2043,7 @@
 		newExt := extentRule value
 	    ] ifFalse:[
 		(relativeExtent notNil) ifTrue:[
-		    newExt := self extentFromRelativeExtent:relativeExtent 
+		    newExt := self extentFromRelativeExtent:relativeExtent
 		] ifFalse:[
 		    newExt := self extent.
 		]
@@ -2049,7 +2057,7 @@
 !
 
 computeExtent
-    "compute my extent; if I have a layoutObject, a relative extent 
+    "compute my extent; if I have a layoutObject, a relative extent
      or blocks to evaluate, compute it now ..
      There is one catch here, if the dimension was defined
      by origin/corner, compute them here and take that value.
@@ -2159,10 +2167,10 @@
     "Modified: 31.8.1995 / 16:51:40 / claus"
 !
 
-corner:corner 
-    "set the views corner; 
+corner:corner
+    "set the views corner;
      the corner argument may be:
-	 a point 
+	 a point
 	    where integer fields mean 'pixel-values'
 	    and float values mean 'relative-to-superview'
 	    and nil means 'take current value';
@@ -2175,7 +2183,7 @@
 
     corner isBlock ifTrue:[
 	cornerRule := corner.
-	drawableId notNil ifTrue:[    
+	drawableId notNil ifTrue:[
 	    pixelCorner := corner value
 	] ifFalse:[
 	    self extentChangedFlag:true
@@ -2211,19 +2219,19 @@
 !
 
 extent:extent
-    "set the views extent; 
+    "set the views extent;
      extent may be:
-	a point 
+	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. 
+     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. 
+	     from resizing itself to its preferredExtent.
 	     See initialExtent: for a variation."
 
     |w h pixelExtent e|
@@ -2300,7 +2308,7 @@
 !
 
 heightIncludingBorder
-    "return my height including border 
+    "return my height including border
      (this is my height as seen from the outside view;
       while #height returns the height as seen by myself)"
 
@@ -2308,14 +2316,14 @@
 !
 
 horizontalInset:aNumber
-    "set the insets of the left/right edge; 
+    "set the insets of the left/right edge;
      positive makes it smaller, negative makes it larger"
 
     insets isNil ifTrue:[
-        insets := Array with:0 with:0 with:0 with:0
+	insets := Array with:0 with:0 with:0 with:0
     ].
     aNumber isNil ifTrue:[
-        self halt:'oops'.
+	self halt:'oops'.
     ].
     insets at:1 put:(aNumber ? 0).
     insets at:3 put:(aNumber ? 0).
@@ -2324,7 +2332,7 @@
 "/    drawableId isNil ifTrue:[
 "/        self originChangedFlag:true
 "/    ] ifFalse:[
-        self containerChangedSize.
+	self containerChangedSize.
 "/    ]
 
     "Modified: 19.7.1996 / 17:30:25 / cg"
@@ -2456,27 +2464,27 @@
      negative to the left"
 
     insets isNil ifTrue:[^ 0].
-    ^ insets at:1 
+    ^ insets at:1
 !
 
 leftInset:aNumber
-    "set the inset of the left edge; 
+    "set the inset of the left edge;
      positive is to the right (view becomes smaller),
      negative to the left (becomes larger)"
 
     |newInset|
 
     insets isNil ifTrue:[
-        insets := Array with:0 with:0 with:0 with:0
+	insets := Array with:0 with:0 with:0 with:0
     ].
     newInset := aNumber.
     newInset isNil ifTrue:[
-        self halt:'oops'.
-        newInset := 0.
+	self halt:'oops'.
+	newInset := 0.
     ].
     (insets at:1) ~= newInset ifTrue:[
-        insets at:1 put:newInset.
-        self containerChangedSize.
+	insets at:1 put:newInset.
+	self containerChangedSize.
     ]
 
     "Modified: 19.7.1996 / 17:30:30 / cg"
@@ -2534,7 +2542,7 @@
 	borderForm := Form extent:extent.
 	shapeForm  := Form extent:extent.
 
-	borderForm fillArcX:0 y:0 
+	borderForm fillArcX:0 y:0
 		  width:w
 		 height:h
 		   from:0
@@ -2548,7 +2556,7 @@
 	    shapeForm foreground:(Color colorId:1).
 	].
 
-	f fillArcX:lineWidth y:lineWidth 
+	f fillArcX:lineWidth y:lineWidth
 		width:w - (bw * 2)
 	       height:h - (bw * 2)
 		 from:0
@@ -2561,7 +2569,7 @@
 "/
 "/        extent := self extent.
 "/
-"/        w := extent x.  
+"/        w := extent x.
 "/        h := extent y.
 "/        borderForm := Form width:w height:h.
 "/        "/        borderForm fill:(Color colorId:0).
@@ -2570,8 +2578,8 @@
 "/        "/        shapeForm fill:(Color colorId:0).
 "/
 "/        borderForm foreground:(Color colorId:1).
-"/        borderForm 
-"/            fillArcX:0 y:0 
+"/        borderForm
+"/            fillArcX:0 y:0
 "/            width:w
 "/            height:h
 "/            from:0
@@ -2584,8 +2592,8 @@
 "/            f := shapeForm.
 "/            shapeForm foreground:(Color colorId:1).
 "/        ].
-"/        f 
-"/            fillArcX:bw y:bw 
+"/        f
+"/            fillArcX:bw y:bw
 "/            width:(w - (bw * 2))
 "/            height:(h - (bw * 2))
 "/            from:0
@@ -2613,7 +2621,7 @@
 	borderForm := Form extent:extent.
 	shapeForm  := Form extent:extent.
 
-	borderForm 
+	borderForm
 	    fillRectangleX:0 y:0
 	    width:w
 	    height:h.
@@ -2646,9 +2654,9 @@
 !
 
 origin:origin
-    "set the views origin; 
+    "set the views origin;
      origin may be:
-	a point 
+	a point
 	    where integer fields mean 'pixel-values'
 	    and float values mean 'relative-to-superview'
 	    and nil means 'take current value';
@@ -2689,7 +2697,7 @@
     "Modified: 19.4.1996 / 15:12:36 / cg"
 !
 
-origin:origin corner:corner 
+origin:origin corner:corner
     "set both origin and extent"
 
     |newLeft newTop newRight newBot|
@@ -2708,7 +2716,7 @@
 		    newRight isInteger ifTrue:[
 			newBot := corner y.
 			newBot isInteger ifTrue:[
-			    self pixelOrigin:origin corner:corner 
+			    self pixelOrigin:origin corner:corner
 			]
 		    ]
 		]
@@ -2785,7 +2793,7 @@
      |top sub1 sub2|
 
      top := StandardSystemView new.
-     top extent:200@200.   
+     top extent:200@200.
      sub1 := View origin:0.2 @ 0.2 corner:0.8 @ 0.8 in:top.
      sub2 := Button origin:0.3 @ 0.3 corner:0.7 @ 0.7 in:sub1.
      top openAndWait.
@@ -2868,27 +2876,27 @@
      negative to the right"
 
     insets isNil ifTrue:[^ 0].
-    ^ insets at:3 
+    ^ insets at:3
 !
 
 rightInset:aNumber
-    "set the inset of the right edge; 
-     positive is to the left (view becomes smaller), 
+    "set the inset of the right edge;
+     positive is to the left (view becomes smaller),
      negative to the right (becomes larger)"
 
     |newInset|
 
     insets isNil ifTrue:[
-        insets := Array with:0 with:0 with:0 with:0
+	insets := Array with:0 with:0 with:0 with:0
     ].
     newInset := aNumber.
     newInset isNil ifTrue:[
-        self halt:'oops'.
-        newInset := 0.
+	self halt:'oops'.
+	newInset := 0.
     ].
     (insets at:3) ~= newInset ifTrue:[
-        insets at:3 put:newInset.
-        self containerChangedSize.
+	insets at:3 put:newInset.
+	self containerChangedSize.
     ]
 
     "Modified: 19.7.1996 / 17:30:32 / cg"
@@ -2906,7 +2914,7 @@
      Views which want to resize themselfes as appropriate to their contents
      should cease to do so and take their current size if sizeFixed is set to
      true. Currently, only supported by Labels.
-     This does NOT prevent the window manager from resizing the view, 
+     This does NOT prevent the window manager from resizing the view,
      instead it tell the view to NOT resize ITSELF.
      Added here to provide a common protocol for all views."
 
@@ -2930,41 +2938,41 @@
      negative to the top"
 
     insets isNil ifTrue:[^ 0].
-    ^ insets at:2 
+    ^ insets at:2
 !
 
 topInset:aNumber
-    "set the inset of the top edge; 
+    "set the inset of the top edge;
      positive is to the bottom (view becomes smaller),
      negative to the top (becomes larger)"
 
     |newInset|
 
     insets isNil ifTrue:[
-        insets := Array with:0 with:0 with:0 with:0
+	insets := Array with:0 with:0 with:0 with:0
     ].
     newInset := aNumber.
     newInset isNil ifTrue:[
-        self halt:'oops'.
-        newInset := 0.
+	self halt:'oops'.
+	newInset := 0.
     ].
     (insets at:2) ~= newInset ifTrue:[
-        insets at:2 put:newInset.
-        self containerChangedSize.
+	insets at:2 put:newInset.
+	self containerChangedSize.
     ]
 
     "Modified: 19.7.1996 / 17:30:45 / cg"
 !
 
 verticalInset:aNumber
-    "set the insets of the top/bottom edge; 
+    "set the insets of the top/bottom edge;
      positive makes it smaller, negative makes it larger"
 
     insets isNil ifTrue:[
-        insets := Array with:0 with:0 with:0 with:0
+	insets := Array with:0 with:0 with:0 with:0
     ].
     aNumber isNil ifTrue:[
-        self halt:'oops'.
+	self halt:'oops'.
     ].
     insets at:2 put:(aNumber ? 0).
     insets at:4 put:(aNumber ? 0).
@@ -2973,7 +2981,7 @@
 "/    drawableId isNil ifTrue:[
 "/        self originChangedFlag:true
 "/    ] ifFalse:[
-        self containerChangedSize.
+	self containerChangedSize.
 "/    ]
 
     "Modified: 19.7.1996 / 17:30:50 / cg"
@@ -3068,7 +3076,7 @@
     "set my container (i.e. superView) to be aContainer"
 
     superView == aContainer ifTrue:[
-	"/ no change 
+	"/ no change
 	^ self.
     ].
 
@@ -3171,10 +3179,10 @@
     n := 1.
     v := self.
     [v notNil] whileTrue:[
-        (next := v container) isNil ifTrue:[^ v].
-        v := next.
-        n := n + 1.
-        n > 1000 ifTrue:[self error:'circular superView chain'].
+	(next := v container) isNil ifTrue:[^ v].
+	v := next.
+	n := n + 1.
+	n > 1000 ifTrue:[self error:'circular superView chain'].
     ].
 
     ^ nil
@@ -3194,7 +3202,7 @@
 !SimpleView methodsFor:'accessing-menus'!
 
 menuHolder
-    "who has the menu ? 
+    "who has the menu ?
      By default, I have it."
 
     ^ self
@@ -3207,7 +3215,7 @@
 !
 
 menuPerformer
-    "who should perform the menu actions ? 
+    "who should perform the menu actions ?
      By default, I do it."
 
     ^ self
@@ -3243,18 +3251,18 @@
      the model first, then use the views menu.
     "
     (menuHolder respondsTo:sym) ifFalse:[
-        (self respondsTo:sym) ifTrue:[
-            menuHolder := self
-        ]
+	(self respondsTo:sym) ifTrue:[
+	    menuHolder := self
+	]
     ].
 
     sym numArgs == 1 ifTrue:[
-        "/ squeak compatibility: create the menu here, let model add items
-        ^ menuHolder perform:sym with:(Menu new).
+	"/ squeak compatibility: create the menu here, let model add items
+	^ menuHolder perform:sym with:(Menu new).
     ].
     sym numArgs == 2 ifTrue:[
-        "/ squeak compatibility: create the menu here, let model add items
-        ^ menuHolder perform:sym with:(Menu new) with:(device shiftDown).
+	"/ squeak compatibility: create the menu here, let model add items
+	^ menuHolder perform:sym with:(Menu new) with:(device shiftDown).
     ].
 
     "
@@ -3292,55 +3300,55 @@
     |x y w h|
 
     aRectangle isNil ifTrue:[
-        clipRect isNil ifTrue:[^ self].
-        gcId notNil ifTrue:[
-            device noClipIn:drawableId gc:gcId
-        ]
+	clipRect isNil ifTrue:[^ self].
+	gcId notNil ifTrue:[
+	    device noClipIn:drawableId gc:gcId
+	]
     ] ifFalse:[
-        clipRect notNil ifTrue:[
-            (clipRect = aRectangle) ifTrue:[^ self]
-        ].
-        gcId notNil ifTrue:[
-            x := aRectangle left.
-            y := aRectangle top.
-            w := aRectangle width.
-            h := aRectangle height.
-            transformation notNil ifTrue:[
-                x := transformation applyToX:x.
-                y := transformation applyToY:y.
-                w := transformation applyScaleX:w.
-                h := transformation applyScaleY:h.
-            ].
-            (x isMemberOf:SmallInteger) ifFalse:[
-                w := w + (x - x truncated).
-                x := x truncated
-            ].
-            (y isMemberOf:SmallInteger) ifFalse:[
-                h := h + (y - y truncated).
-                y := y truncated
-            ].
-            (w isMemberOf:SmallInteger) ifFalse:[
-                w := w truncated + 1
-            ].
-            (h isMemberOf:SmallInteger) ifFalse:[
-                h := h truncated + 1
-            ].
-            x < margin ifTrue:[
-                x := margin.
-            ].
-            y < margin ifTrue:[
-                y := margin.
-            ].
-            x + w - 1 >= (width-margin) ifTrue:[
-                w := width - margin - x
-            ].
-            y + h - 1 >= (height-margin) ifTrue:[
-                h := height - margin - y
-            ].
-            w := w max:0.
-            h := h max:0.
-            device setClipX:x y:y width:w height:h in:drawableId gc:gcId
-        ]
+	clipRect notNil ifTrue:[
+	    (clipRect = aRectangle) ifTrue:[^ self]
+	].
+	gcId notNil ifTrue:[
+	    x := aRectangle left.
+	    y := aRectangle top.
+	    w := aRectangle width.
+	    h := aRectangle height.
+	    transformation notNil ifTrue:[
+		x := transformation applyToX:x.
+		y := transformation applyToY:y.
+		w := transformation applyScaleX:w.
+		h := transformation applyScaleY:h.
+	    ].
+	    (x isMemberOf:SmallInteger) ifFalse:[
+		w := w + (x - x truncated).
+		x := x truncated
+	    ].
+	    (y isMemberOf:SmallInteger) ifFalse:[
+		h := h + (y - y truncated).
+		y := y truncated
+	    ].
+	    (w isMemberOf:SmallInteger) ifFalse:[
+		w := w truncated + 1
+	    ].
+	    (h isMemberOf:SmallInteger) ifFalse:[
+		h := h truncated + 1
+	    ].
+	    x < margin ifTrue:[
+		x := margin.
+	    ].
+	    y < margin ifTrue:[
+		y := margin.
+	    ].
+	    x + w - 1 >= (width-margin) ifTrue:[
+		w := width - margin - x
+	    ].
+	    y + h - 1 >= (height-margin) ifTrue:[
+		h := height - margin - y
+	    ].
+	    w := w max:0.
+	    h := h max:0.
+	    device setClipX:x y:y width:w height:h in:drawableId gc:gcId
+	]
     ].
     clipRect := aRectangle
 
@@ -3375,7 +3383,7 @@
     ^ self name
 !
 
-styleSheet 
+styleSheet
     "return the styleSheet. This is set at early view-creation time,
      from the defaultStyleSheet which is valid at that time.
      It is not affected by later defaultStyle changes"
@@ -3385,7 +3393,7 @@
     "Created: 10.9.1995 / 11:02:20 / claus"
 !
 
-styleSheet:aStyleSheet 
+styleSheet:aStyleSheet
     "change the styleSheet. Knowledgable users only, please."
 
     styleSheet := aStyleSheet.
@@ -3425,7 +3433,7 @@
 !
 
 aspect:aspectSymbol
-    "ST-80 style updating: If a views aspectSymbol is nonNil, 
+    "ST-80 style updating: If a views aspectSymbol is nonNil,
      it will respond to changes of this aspect from the model.
      Alias for aspectMessage: for ST-80 compatibility."
 
@@ -3463,26 +3471,26 @@
     aWindowSpecOrSpecSymbol isNil ifTrue:[^ self].
 
     (builder := aBuilder) isNil ifTrue:[
-        "/ problem: anApplication could have no builder
-        "/          or anApplication could be a non-appModel (theoretically - only providing a spec)
-        isApplicationModel := true.
-        builder := anApplication perform:#builder ifNotUnderstood:[isApplicationModel := false. nil].
-        builder isNil ifTrue:[
-            isApplicationModel ifTrue:[
-                 anApplication createBuilder.
-                 builder := anApplication builder
-            ] ifFalse:[
-                 builder := UIBuilder new.    
-            ]
-        ]
+	"/ problem: anApplication could have no builder
+	"/          or anApplication could be a non-appModel (theoretically - only providing a spec)
+	isApplicationModel := true.
+	builder := anApplication perform:#builder ifNotUnderstood:[isApplicationModel := false. nil].
+	builder isNil ifTrue:[
+	    isApplicationModel ifTrue:[
+		 anApplication createBuilder.
+		 builder := anApplication builder
+	    ] ifFalse:[
+		 builder := UIBuilder new.
+	    ]
+	]
     ].
 
     (subSpec := aWindowSpecOrSpecSymbol) isSymbol ifTrue:[
-        anApplication isNil ifTrue:[^ self].
-        subSpec := anApplication class interfaceSpecFor:aWindowSpecOrSpecSymbol.
-        subSpec isNil ifTrue:[
-            ^ self
-        ].
+	anApplication isNil ifTrue:[^ self].
+	subSpec := anApplication class interfaceSpecFor:aWindowSpecOrSpecSymbol.
+	subSpec isNil ifTrue:[
+	    ^ self
+	].
     ].
 
     "/ if the appl is not the master, but the masters builder is used,
@@ -3491,23 +3499,23 @@
     masterApp := anApplication perform:#masterApplication ifNotUnderstood:[isApplicationModel := false. nil].
     thisApp := builder application.
     (isApplicationModel and:[anApplication ~~ thisApp]) ifTrue:[
-        masterApp ~~ thisApp ifTrue:[self error:'should not happen'].
-
-        builder application:anApplication.
-        savedView := builder window.
-        builder window:self.
-        [
-            anApplication buildSubCanvas:subSpec withBuilder:builder.
-        ] ensure:[
-            builder window:savedView.
-            builder application:thisApp.
-        ].
+	masterApp ~~ thisApp ifTrue:[self error:'should not happen'].
+
+	builder application:anApplication.
+	savedView := builder window.
+	builder window:self.
+	[
+	    anApplication buildSubCanvas:subSpec withBuilder:builder.
+	] ensure:[
+	    builder window:savedView.
+	    builder application:thisApp.
+	].
 
     ] ifFalse:[
-        builder window isNil ifTrue:[
-            builder window:self
-        ].
-        builder buildFromSpec:subSpec in:self.
+	builder window isNil ifTrue:[
+	    builder window:self
+	].
+	builder buildFromSpec:subSpec in:self.
     ].
 
 "/    postBuildWith: will be called twice if code below is enabled
@@ -3561,7 +3569,7 @@
     "return the views sensor"
 
     windowGroup notNil ifTrue:[
-        ^ windowGroup sensor.
+	^ windowGroup sensor.
     ].
 
     "there is no window group. Deliver events synchronously"
@@ -3621,7 +3629,7 @@
     "return the maximum of all components bottom"
 
     components isNil ifTrue:[^ 0].
-    ^ components inject:0 into:[:maxSoFar :sub 
+    ^ components inject:0 into:[:maxSoFar :sub
 					| (sub bottom) max:maxSoFar].
 
     "Created: 26.5.1996 / 12:44:05 / cg"
@@ -3632,20 +3640,20 @@
     "return the maximum of all components rights"
 
     components isNil ifTrue:[^ 0].
-    ^ components inject:0 into:[:maxSoFar :sub 
+    ^ components inject:0 into:[:maxSoFar :sub
 					| (sub right) max:maxSoFar].
 
     "Modified: 26.5.1996 / 12:56:39 / cg"
     "Created: 26.5.1996 / 13:02:19 / cg"
 !
 
-maxSubViewBottom 
+maxSubViewBottom
 "/    subViews isNil ifTrue:[^ 0].
 "/    ^ subViews inject:0 into:[:maxSoFar :sub | (sub top + sub height) max:maxSoFar].
       ^ 0
 !
 
-maxSubViewRight 
+maxSubViewRight
 "/    subViews isNil ifTrue:[^ 0].
 "/    ^ subViews inject:0 into:[:maxSoFar :sub | (sub left + sub width) max:maxSoFar].
     ^ 0
@@ -3665,9 +3673,9 @@
 
     p := aPoint negated.
     transformation isNil ifTrue:[
-	transformation := WindowingTransformation scale:1 translation:p 
+	transformation := WindowingTransformation scale:1 translation:p
     ] ifFalse:[
-	transformation translation:p 
+	transformation translation:p
     ].
     clipRect notNil ifTrue:[
 	self setInnerClip.
@@ -3675,8 +3683,8 @@
 !
 
 viewOrigin
-    "return the viewOrigin; thats the coordinate of the contents 
-     which is shown topLeft in the view 
+    "return the viewOrigin; thats the coordinate of the contents
+     which is shown topLeft in the view
      (i.e. the origin of the visible part of the contents)."
 
     transformation isNil ifTrue:[
@@ -3700,14 +3708,14 @@
 !
 
 xOriginOfContents
-    "return the x coordinate of the viewOrigin in pixels; 
+    "return the x coordinate of the viewOrigin in pixels;
      used by scrollBars to compute thumb position within the document."
 
     ^ self viewOrigin x
 !
 
 yOriginOfContents
-    "return the y coordinate of the viewOrigin in pixels; 
+    "return the y coordinate of the viewOrigin in pixels;
      used by scrollBars to compute thumb position within the document."
 
     ^ self viewOrigin y
@@ -3717,7 +3725,7 @@
 
 beInvisible
     "make the view invisible; if my container is visible,
-     change visibility immediately; 
+     change visibility immediately;
      otherwise, arrange for the receiver to be not realized,
      when the container is made visible."
 
@@ -3739,8 +3747,8 @@
      change visibility immediately; otherwise, arrange for the receiver
      to be made visible when the container is made visible.
      Notice, that the command may not be sent immediately to the display,
-     and that ST/X considers the view to be still invisible until a 
-     visibility event arrives from the display. 
+     and that ST/X considers the view to be still invisible until a
+     visibility event arrives from the display.
      Thus, the view may remain logically invisible
      for a while. (see #beVisibleNow for more on this)"
 
@@ -3871,7 +3879,7 @@
     "Created: / 27.10.1997 / 04:23:04 / cg"
 !
 
-setVisibilityChannel:aValueHolder 
+setVisibilityChannel:aValueHolder
     "set the valueHolder, which holds the visible boolean value"
 
     visibilityChannel := aValueHolder
@@ -3884,7 +3892,7 @@
     ^ shown
 !
 
-visibilityChannel 
+visibilityChannel
     "return a valueHolder for visible/invisible"
 
     ^ visibilityChannel
@@ -3892,7 +3900,7 @@
     "Modified: / 30.3.1999 / 13:49:56 / stefan"
 !
 
-visibilityChannel:aValueHolder 
+visibilityChannel:aValueHolder
     "set the valueHolder, which holds the visible boolean value"
 
 
@@ -3928,7 +3936,7 @@
     self addComponent:aComponent
 !
 
-add:aComponent at:anOrigin 
+add:aComponent at:anOrigin
     "for ST-80 compatibility.
      add a component at some origin"
 
@@ -3949,7 +3957,7 @@
     "Modified: 18.4.1997 / 20:00:20 / cg"
 !
 
-add:aComponentOrCollection in:aRectangleOrLayoutFrame 
+add:aComponentOrCollection in:aRectangleOrLayoutFrame
     "for ST-80 compatibility.
      add a component in some frame; the argument may be either a rectangle
      with relative coordinates, or an instance of LayoutFrame, specifying
@@ -3980,7 +3988,7 @@
 !
 
 addComponent:aComponent
-    "components (i.e. gadgets or lightweight views) are being prepared. 
+    "components (i.e. gadgets or lightweight views) are being prepared.
      Dont use this right now for non-views"
 
     aComponent isView ifTrue:[
@@ -4088,7 +4096,7 @@
 !
 
 component:aComponent
-    "components (i.e. gadgets or lightweight views) are being prepared. 
+    "components (i.e. gadgets or lightweight views) are being prepared.
      Dont use this right now for non-views"
 
     aComponent origin:0.0@0.0 corner:1.0@1.0.
@@ -4126,7 +4134,7 @@
 !
 
 removeComponent:aComponent
-    "components (i.e. gadgets or lightweight views) are being prepared. 
+    "components (i.e. gadgets or lightweight views) are being prepared.
      Dont use this right now for non-views"
 
     aComponent isView ifTrue:[
@@ -4134,7 +4142,7 @@
     ] ifFalse:[
 	components isNil ifTrue:[^self].
 	components remove:aComponent ifAbsent:[].
-	aComponent parent:nil 
+	aComponent parent:nil
     ]
 !
 
@@ -4201,7 +4209,7 @@
      fallback to the standard busy cursor.
      Experimental."
 
-    |ok bitmaps cursors mask process oldCursor|
+    |ok bitmaps cursors maskForm process oldCursor|
 
     oldCursor := cursor.
 
@@ -4218,10 +4226,12 @@
                    f
                ].
 
-    mask := Smalltalk imageFromFileNamed:'wheelm.xbm' forClass:self class.
-    mask isNil ifTrue:[
-        ('SimpleView [warning]: no bitmap file: wheelm.xbm') errorPrintCR.
-        ok := false
+    ok ifTrue:[
+        maskForm := Smalltalk imageFromFileNamed:'wheelm.xbm' forClass:self class.
+        maskForm isNil ifTrue:[
+            ('SimpleView [warning]: no bitmap file: wheelm.xbm') errorPrintCR.
+            ok := false
+        ].
     ].
 
     ok ifFalse:[
@@ -4231,7 +4241,7 @@
         ]
     ] ifTrue:[
         cursors := bitmaps collect:[:form | (Cursor sourceForm:form
-                                                      maskForm:mask
+                                                      maskForm:maskForm
                                                           hotX:8
                                                           hotY:8) onDevice:device].
 
@@ -4243,18 +4253,17 @@
                             Delay waitForSeconds:0.05
                         ]
                     ]
-                   ] fork.
-
-        Processor activeProcess priority:(Processor userSchedulingPriority - 1).
+                   ] forkAt:(Processor activeProcess priority + 1).
+
         aBlock ensure:[
-            Processor activeProcess priority:(Processor userSchedulingPriority).
             process terminate.
             self cursor:oldCursor
         ]
     ].
 
     "
-     View new realize showBusyWhile:[10 timesRepeat:[3000 factorial]]
+     View new realize showBusyWhile:[ Delay waitForSeconds:5 ]
+     Transcript showBusyWhile:[ Delay waitForSeconds:5 ]
     "
 
     "Modified: / 31.10.1997 / 19:59:49 / cg"
@@ -4501,16 +4510,16 @@
     "draw bottom 3D edge into window frame"
 
     self drawBottomEdgeLevel:level
-		      shadow:shadowColor 
+		      shadow:shadowColor
 		      light:lightColor
-		      halfShadow:nil 
+		      halfShadow:nil
 		      halfLight:nil
 		      style:nil.
 !
 
 drawBottomEdgeLevel:level shadow:shadowColor light:lightColor halfShadow:halfShadowColor halfLight:halfLightColor style:edgeStyle
     |botFg
-     count "{ Class: SmallInteger }" 
+     count "{ Class: SmallInteger }"
      b r|
 
     count := level.
@@ -4538,7 +4547,7 @@
     ((edgeStyle == #soft) and:[level > 1]) ifTrue:[
 	b := height - 1.
 	super paint:shadowColor.
-	super displayDeviceLineFromX:1 y:b toX:r y:b. 
+	super displayDeviceLineFromX:1 y:b toX:r y:b.
     ].
 
     self edgeDrawn:#bottom.
@@ -4550,41 +4559,41 @@
     "draw all of my 3D edges"
 
     self drawEdgesForX:0 y:0 width:width height:height level:level
-		shadow:shadowColor 
+		shadow:shadowColor
 		light:lightColor
-		halfShadow:nil 
-		halfLight:nil 
-		style:nil 
+		halfShadow:nil
+		halfLight:nil
+		style:nil
 !
 
 drawEdgesForX:x y:y width:w height:h level:l
     "draw 3D edges into a rectangle"
 
-    self 
-        drawEdgesForX:x y:y width:w height:h level:l 
-        shadow:shadowColor light:lightColor
-        halfShadow:nil halfLight:nil 
-        style:nil 
+    self
+	drawEdgesForX:x y:y width:w height:h level:l
+	shadow:shadowColor light:lightColor
+	halfShadow:nil halfLight:nil
+	style:nil
 !
 
 drawLeftEdge
     "draw left 3D edge into window frame"
 
     self drawLeftEdgeLevel:level
-		    shadow:shadowColor 
+		    shadow:shadowColor
 		     light:lightColor
-		     halfShadow:nil 
+		     halfShadow:nil
 		     halfLight:nil
 		     style:nil.
 !
 
-drawLeftEdgeLevel:level shadow:shadowColor light:lightColor halfShadow:halfShadowColor halfLight:halfLightColor style:edgeStyle 
+drawLeftEdgeLevel:level shadow:shadowColor light:lightColor halfShadow:halfShadowColor halfLight:halfLightColor style:edgeStyle
     |leftFg leftHalfFg paint b
      count "{ Class: SmallInteger }" |
 
     count := level.
     count == 0 ifTrue:[^ self].
-    
+
     (count < 0) ifTrue:[
 	leftFg := shadowColor.
 	leftHalfFg := halfShadowColor.
@@ -4612,7 +4621,7 @@
 
     ((edgeStyle == #soft) and:[level > 2]) ifTrue:[
 	super paint:(device blackColor).
-	super displayDeviceLineFromX:0 y:0 toX:0 y:b. 
+	super displayDeviceLineFromX:0 y:0 toX:0 y:b.
     ].
 
     self edgeDrawn:#left.
@@ -4624,16 +4633,16 @@
     "draw right 3D edge into window frame"
 
     self drawRightEdgeLevel:level
-		     shadow:shadowColor 
+		     shadow:shadowColor
 		      light:lightColor
-		      halfShadow:nil 
+		      halfShadow:nil
 		      halfLight:nil
 		      style:nil.
 !
 
-drawRightEdgeLevel:level shadow:shadowColor light:lightColor halfShadow:halfShadowColor halfLight:halfLightColor style:edgeStyle 
+drawRightEdgeLevel:level shadow:shadowColor light:lightColor halfShadow:halfShadowColor halfLight:halfLightColor style:edgeStyle
     |rightFg
-     count "{ Class: SmallInteger }" 
+     count "{ Class: SmallInteger }"
      r b|
 
     count := level.
@@ -4660,7 +4669,7 @@
     ((edgeStyle == #soft) and:[level > 1]) ifTrue:[
 	r := width - 1.
 	super paint:shadowColor.
-	super displayDeviceLineFromX:r y:1 toX:r y:b. 
+	super displayDeviceLineFromX:r y:1 toX:r y:b.
     ].
 
     self edgeDrawn:#right.
@@ -4672,14 +4681,14 @@
     "draw top 3D edge into window frame"
 
     self drawTopEdgeLevel:level
-		   shadow:shadowColor 
+		   shadow:shadowColor
 		    light:lightColor
-		    halfShadow:nil 
+		    halfShadow:nil
 		    halfLight:nil
 		    style:nil.
 !
 
-drawTopEdgeLevel:level shadow:shadowColor light:lightColor halfShadow:halfShadowColor halfLight:halfLightColor style:edgeStyle 
+drawTopEdgeLevel:level shadow:shadowColor light:lightColor halfShadow:halfShadowColor halfLight:halfLightColor style:edgeStyle
     |topFg topHalfFg paint r
      count "{ Class: SmallInteger }" |
 
@@ -4712,7 +4721,7 @@
     ].
     ((edgeStyle == #soft) and:[level > 2]) ifTrue:[
 	super paint:(device blackColor).
-	super displayDeviceLineFromX:0 y:0 toX:r y:0. 
+	super displayDeviceLineFromX:0 y:0 toX:r y:0.
     ].
 
     self edgeDrawn:#top.
@@ -4728,7 +4737,7 @@
 	    self clippingRectangle:nil.
 	    self drawEdges.
 	    self deviceClippingRectangle:innerClipRect
-	]                  
+	]
     ]
 
     "Modified: / 25.5.1999 / 14:50:25 / cg"
@@ -4830,7 +4839,7 @@
     "Created: 4.4.1997 / 18:56:52 / cg"
 !
 
-closeRequest 
+closeRequest
     "programmatic close request"
 
     self destroy
@@ -4848,66 +4857,66 @@
     left := x.
     top := y.
 
-    (superView isNil 
+    (superView isNil
     and:[drawableId notNil]) ifTrue:[
-        "/ have to be careful - some window managers (motif) wrap another
-        "/ view around and the reported origin is relative to that.
-        "/ not relative to the screen.
-        p := device translatePoint:0@0 fromView:self toView:nil.
-        p := p + self borderWidth.
-        left := p x.
-        top := p y.
+	"/ have to be careful - some window managers (motif) wrap another
+	"/ view around and the reported origin is relative to that.
+	"/ not relative to the screen.
+	p := device translatePoint:0@0 fromView:self toView:nil.
+	p := p + self borderWidth.
+	left := p x.
+	top := p y.
     ].
 
     ((width ~~ newWidth) or:[height ~~ newHeight]) ifTrue:[
-        realized ifFalse:[
-            width := newWidth.
-            height := newHeight.
-            self extentChangedFlag:true.
-            ^ self
-        ].
-
-        ((newWidth <= width) and:[newHeight <= height]) ifTrue:[
-            how := #smaller
-        ] ifFalse:[
-            ((newWidth >= width) and:[newHeight >= height]) ifTrue:[
-                how := #larger
-            ]
-        ].
-
-        level ~~ 0 ifTrue:[
-            mustRedrawBottomEdge := newHeight < height.
-            mustRedrawRightEdge := newWidth < width.
-            anyEdge := mustRedrawBottomEdge or:[mustRedrawRightEdge]
-        ] ifFalse:[
-            anyEdge := false
-        ].
-
-        width := newWidth.
-        height := newHeight.
-
-        "recompute inner-clip if needed"
-        self setInnerClip.
-
-        "
-         must first process pending exposes;
-         otherwise, those may be drawn at a wrong position
-        "
+	realized ifFalse:[
+	    width := newWidth.
+	    height := newHeight.
+	    self extentChangedFlag:true.
+	    ^ self
+	].
+
+	((newWidth <= width) and:[newHeight <= height]) ifTrue:[
+	    how := #smaller
+	] ifFalse:[
+	    ((newWidth >= width) and:[newHeight >= height]) ifTrue:[
+		how := #larger
+	    ]
+	].
+
+	level ~~ 0 ifTrue:[
+	    mustRedrawBottomEdge := newHeight < height.
+	    mustRedrawRightEdge := newWidth < width.
+	    anyEdge := mustRedrawBottomEdge or:[mustRedrawRightEdge]
+	] ifFalse:[
+	    anyEdge := false
+	].
+
+	width := newWidth.
+	height := newHeight.
+
+	"recompute inner-clip if needed"
+	self setInnerClip.
+
+	"
+	 must first process pending exposes;
+	 otherwise, those may be drawn at a wrong position
+	"
 "/ claus: no; expose events are in the same queue as configure events;
 "/        which is exactly for that reason ...
 
 "/        windowGroup notNil ifTrue:[
 "/            windowGroup processExposeEvents
 "/        ].
-        self sizeChanged:how.
-
-        (anyEdge and:[shown]) ifTrue:[
-            mustRedrawBottomEdge ifTrue:[
-                self invalidateDeviceRectangle:((0 @ (height-1-margin)) extent:width@margin) repairNow:false.
-            ].
-            mustRedrawRightEdge ifTrue:[
-                self invalidateDeviceRectangle:((width-1-margin)@0 extent:margin@height) repairNow:false.
-            ].
+	self sizeChanged:how.
+
+	(anyEdge and:[shown]) ifTrue:[
+	    mustRedrawBottomEdge ifTrue:[
+		self invalidateDeviceRectangle:((0 @ (height-1-margin)) extent:width@margin) repairNow:false.
+	    ].
+	    mustRedrawRightEdge ifTrue:[
+		self invalidateDeviceRectangle:((width-1-margin)@0 extent:margin@height) repairNow:false.
+	    ].
 "/ OLD code:
 "/            self clippingRectangle:nil.
 "/            mustRedrawBottomEdge ifTrue:[
@@ -4917,11 +4926,11 @@
 "/                self drawRightEdge
 "/            ].
 "/            self deviceClippingRectangle:innerClipRect
-        ]
+	]
     ].
 
     originChanged ifTrue:[
-        self changed:#origin.
+	self changed:#origin.
     ].
 
     "Modified: / 10.10.2001 / 14:14:19 / cg"
@@ -5008,7 +5017,7 @@
 !
 
 containerUnmapped
-    "my container was unmapped 
+    "my container was unmapped
      - this implies that the recevier is now also unmapped."
 
     "/ if I was previously shown, tell it to all of
@@ -5069,7 +5078,7 @@
     |leftEdge topEdge rightEdge botEdge anyEdge nx ny nw nh dx dy dw dh old oldPaint|
 
     shown ifFalse:[
-        ^ self
+	^ self
     ].
 
     nw := dw := w.
@@ -5083,118 +5092,118 @@
      check if there is a need to draw an edge (i.e. if margin is hit)
     "
     (margin ~~ 0) ifTrue:[
-        leftEdge := false.
-        topEdge := false.
-        rightEdge := false.
-        botEdge := false.
-        transformation notNil ifTrue:[
-            "
-             need device coordinates for this test
-            "
-            nx := transformation applyToX:nx.
-            ny := transformation applyToY:ny.
-            nw := transformation applyScaleX:nw.
-            nh := transformation applyScaleY:nh.
-        ].
-        "
-         adjust expose rectangle, to exclude the margin.
-         Care for rounding errors ...
-        "
-        (nx isMemberOf:SmallInteger) ifFalse:[
-            old := nx.
-            nx := nx truncated.
-            nw := nw + (nx - old).
-        ].
-        (ny isMemberOf:SmallInteger) ifFalse:[
-            old := ny.
-            ny := ny truncated.
-            nh := nh + (ny - old).
-        ].
-        (nw isMemberOf:SmallInteger) ifFalse:[
-            nw := nw truncated + 1
-        ].
-        (nh isMemberOf:SmallInteger) ifFalse:[
-            nh := nh truncated + 1
-        ].
-
-        dx := nx.
-        dy := ny.
-        dw := nw.
-        dh := nh.
-
-        (nx < margin) ifTrue:[
-            old := nx.
-            nx := margin.
-            nw := nw - (nx - old).
-            leftEdge := anyEdge := true.
-        ].
-        ((nx + nw - 1) >= (width - margin)) ifTrue:[
-            nw := (width - margin - nx).
-            rightEdge := anyEdge := true.
-        ].
-        (ny < margin) ifTrue:[
-            old := ny.
-            ny := margin.
-            nh := nh - (ny - old).
-            topEdge := anyEdge := true.
-        ].
-        ((ny + nh - 1) >= (height - margin)) ifTrue:[
-            nh := (height - margin - ny).
-            botEdge := anyEdge := true.
-        ].
-        transformation notNil ifTrue:[
-            "
-             need logical coordinates for redraw
-            "
-            nx := transformation applyInverseToX:nx.
-            ny := transformation applyInverseToY:ny.
-            nw := transformation applyInverseScaleX:nw.
-            nh := transformation applyInverseScaleY:nh.
-        ].
+	leftEdge := false.
+	topEdge := false.
+	rightEdge := false.
+	botEdge := false.
+	transformation notNil ifTrue:[
+	    "
+	     need device coordinates for this test
+	    "
+	    nx := transformation applyToX:nx.
+	    ny := transformation applyToY:ny.
+	    nw := transformation applyScaleX:nw.
+	    nh := transformation applyScaleY:nh.
+	].
+	"
+	 adjust expose rectangle, to exclude the margin.
+	 Care for rounding errors ...
+	"
+	(nx isMemberOf:SmallInteger) ifFalse:[
+	    old := nx.
+	    nx := nx truncated.
+	    nw := nw + (nx - old).
+	].
+	(ny isMemberOf:SmallInteger) ifFalse:[
+	    old := ny.
+	    ny := ny truncated.
+	    nh := nh + (ny - old).
+	].
+	(nw isMemberOf:SmallInteger) ifFalse:[
+	    nw := nw truncated + 1
+	].
+	(nh isMemberOf:SmallInteger) ifFalse:[
+	    nh := nh truncated + 1
+	].
+
+	dx := nx.
+	dy := ny.
+	dw := nw.
+	dh := nh.
+
+	(nx < margin) ifTrue:[
+	    old := nx.
+	    nx := margin.
+	    nw := nw - (nx - old).
+	    leftEdge := anyEdge := true.
+	].
+	((nx + nw - 1) >= (width - margin)) ifTrue:[
+	    nw := (width - margin - nx).
+	    rightEdge := anyEdge := true.
+	].
+	(ny < margin) ifTrue:[
+	    old := ny.
+	    ny := margin.
+	    nh := nh - (ny - old).
+	    topEdge := anyEdge := true.
+	].
+	((ny + nh - 1) >= (height - margin)) ifTrue:[
+	    nh := (height - margin - ny).
+	    botEdge := anyEdge := true.
+	].
+	transformation notNil ifTrue:[
+	    "
+	     need logical coordinates for redraw
+	    "
+	    nx := transformation applyInverseToX:nx.
+	    ny := transformation applyInverseToY:ny.
+	    nw := transformation applyInverseScaleX:nw.
+	    nh := transformation applyInverseScaleY:nh.
+	].
     ].
 
     (nw > 0 and:[nh > 0]) ifTrue:[
-        "
-         redraw inside area
-        "
-        self clippingRectangle:(Rectangle left:nx top:ny width:nw height:nh).
-
-        device supportsAnyViewBackgroundPixmaps ifFalse:[
-            "/ workaround: non-existing bg-pixmap support (win95)
-
-            viewBackground isImageOrForm ifTrue:[
-                (device supportsViewBackgroundPixmap:viewBackground) ifFalse:[
-                    self fillRectangleWithViewBackgroundX:nx y:ny width:nw height:nh
-                ]
-            ].
-        ].
-
-        self redrawX:nx y:ny width:nw height:nh.
+	"
+	 redraw inside area
+	"
+	self clippingRectangle:(Rectangle left:nx top:ny width:nw height:nh).
+
+	device supportsAnyViewBackgroundPixmaps ifFalse:[
+	    "/ workaround: non-existing bg-pixmap support (win95)
+
+	    viewBackground isImageOrForm ifTrue:[
+		(device supportsViewBackgroundPixmap:viewBackground) ifFalse:[
+		    self fillRectangleWithViewBackgroundX:nx y:ny width:nw height:nh
+		]
+	    ].
+	].
+
+	self redrawX:nx y:ny width:nw height:nh.
     ].
 
     "
      redraw edge(s)
     "
     anyEdge ifTrue:[
-        self deviceClippingRectangle:nil.
-        oldPaint := paint.
-        (topEdge and:[leftEdge and:[botEdge and:[rightEdge]]]) ifTrue:[
-            self drawEdges
-        ] ifFalse:[
-            topEdge ifTrue:[
-                self drawTopEdge
-            ].
-            leftEdge ifTrue:[
-                self drawLeftEdge
-            ].
-            botEdge ifTrue:[
-                self drawBottomEdge
-            ].
-            rightEdge ifTrue:[
-                self drawRightEdge
-            ]
-        ].
-        self paint:oldPaint.
+	self deviceClippingRectangle:nil.
+	oldPaint := paint.
+	(topEdge and:[leftEdge and:[botEdge and:[rightEdge]]]) ifTrue:[
+	    self drawEdges
+	] ifFalse:[
+	    topEdge ifTrue:[
+		self drawTopEdge
+	    ].
+	    leftEdge ifTrue:[
+		self drawLeftEdge
+	    ].
+	    botEdge ifTrue:[
+		self drawBottomEdge
+	    ].
+	    rightEdge ifTrue:[
+		self drawRightEdge
+	    ]
+	].
+	self paint:oldPaint.
     ].
     self deviceClippingRectangle:innerClipRect.
 
@@ -5223,7 +5232,7 @@
 
 keyPress:key x:x y:y
     "a key has been pressed. If there are components,
-     pass it to the corresponding one. 
+     pass it to the corresponding one.
      Otherwise, forward it to the superview, if there is any."
 
     <resource: #keyboard ( #Menu ) >
@@ -5262,7 +5271,7 @@
 	superView
 	    dispatchEvent:#keyPress:x:y:
 	    arguments:(Array with:key with:0 with:0)
-        
+
 "/        WindowEvent
 "/            sendEvent:#keyPress:x:y:
 "/            arguments:(Array with:key with:0 with:0)
@@ -5276,7 +5285,7 @@
 
 keyRelease:key x:x y:y
     "a key has been released. If there are components,
-     pass it to the corresponding one. 
+     pass it to the corresponding one.
      Otherwise, do whatever my superclass would do."
 
     components notNil ifTrue:[
@@ -5308,7 +5317,7 @@
      this created a race condition, if the view was
      realized and shortly after unrealized - before the mapped event
      arrived. This lead to realized being set to true even thought the
-     view was not. 
+     view was not.
      Boy - that was a bad one (hard to reproduce and hard to find).
     "
 
@@ -5360,31 +5369,31 @@
 
     sensor := self sensor.
     sensor ctrlDown ifTrue:[
-        pageScroll := true
+	pageScroll := true
     ].
 
     pageScroll ifFalse:[
-        sensor shiftDown ifFalse:[
-            hCont := self heightOfContents.
-            hCont > (self innerHeight * 3) ifTrue:[
-                factor := (hCont // self innerHeight) min:4.
-                amountToScroll := amountToScroll * factor.
-            ]
-        ]
+	sensor shiftDown ifFalse:[
+	    hCont := self heightOfContents.
+	    hCont > (self innerHeight * 3) ifTrue:[
+		factor := (hCont // self innerHeight) min:4.
+		amountToScroll := amountToScroll * factor.
+	    ]
+	]
     ].
 
     amount > 0 ifTrue:[
-        pageScroll ifTrue:[
-            self pageUp
-        ] ifFalse:[
-            self scrollUp:amountToScroll
-        ]
+	pageScroll ifTrue:[
+	    self pageUp
+	] ifFalse:[
+	    self scrollUp:amountToScroll
+	]
     ] ifFalse:[
-        pageScroll ifTrue:[
-            self pageDown
-        ] ifFalse:[
-            self scrollDown:amountToScroll
-        ]
+	pageScroll ifTrue:[
+	    self pageDown
+	] ifFalse:[
+	    self scrollDown:amountToScroll
+	]
     ].
 
     "Modified: / 21.5.1999 / 19:58:42 / cg"
@@ -5426,8 +5435,8 @@
 !
 
 saveAndTerminate
-    "window manager wants me to save and go away; 
-     - notice, that not all window managers are nice enough to 
+    "window manager wants me to save and go away;
+     - notice, that not all window managers are nice enough to
        send this event, but simply destroy the view instead.
      Can be redefined in subclasses to do whatever is required
      to prepare for restart."
@@ -5445,7 +5454,7 @@
     |subViews|
 
     (subViews := self subViews) notNil ifTrue:[
-	(how isNil "false" 
+	(how isNil "false"
 	or:[how == #smaller]) ifTrue:[
 	    subViews do:[:view |
 		view notNil ifTrue:[
@@ -5467,7 +5476,7 @@
     ].
 
     components notNil ifTrue:[
-	(how isNil "false" 
+	(how isNil "false"
 	or:[how == #smaller]) ifTrue:[
 	    components do:[:view |
 		view containerChangedSize
@@ -5505,9 +5514,9 @@
 
 terminate
     "window manager wants me to go away;
-     - notice, that not all window managers are nice enough to 
+     - notice, that not all window managers are nice enough to
        send this event, but simply destroy the view instead.
-     Can be redefined in subclasses to do whatever cleanup is 
+     Can be redefined in subclasses to do whatever cleanup is
      required."
 
     self closeRequest
@@ -5516,7 +5525,7 @@
 !
 
 unmapped
-    "the view has been unmapped 
+    "the view has been unmapped
      (either by some outside action - i.e. window manager iconified me,
      or due to unmapping of my parentView)."
 
@@ -5630,14 +5639,14 @@
     |p|
 
     self stopButtonLongPressedHandlerProcess.
-    p := 
-        [
-            Delay waitForSeconds:0.7.
-            self sensor leftButtonPressed ifTrue:[
-                "/ simulate a right-button press
-                self buttonPress:2 x:0 y:0
-            ]
-        ] newProcess.
+    p :=
+	[
+	    Delay waitForSeconds:0.7.
+	    self sensor leftButtonPressed ifTrue:[
+		"/ simulate a right-button press
+		self buttonPress:2 x:0 y:0
+	    ]
+	] newProcess.
 
     device buttonLongPressedHandlerProcess:p.
     p resume.
@@ -5650,8 +5659,8 @@
 
     (p := device buttonLongPressedHandlerProcess) notNil ifTrue:[
 "/ Transcript showCR:'stop'.
-        device buttonLongPressedHandlerProcess:nil.
-        p terminate.
+	device buttonLongPressedHandlerProcess:nil.
+	p terminate.
     ].
 ! !
 
@@ -5669,9 +5678,9 @@
 
     "/ canTab := aBoolean
     aBoolean ifTrue:[
-        flagBits := flagBits bitOr:FlagCanTab
+	flagBits := flagBits bitOr:FlagCanTab
     ] ifFalse:[
-        flagBits := flagBits bitClear:FlagCanTab
+	flagBits := flagBits bitClear:FlagCanTab
     ].
 !
 
@@ -5687,9 +5696,9 @@
      if false, the behavior depends upon the settings."
 
     aBoolean ifTrue:[
-        flagBits := flagBits bitOr:FlagDoNotRequestFocusOnPointerEnter
+	flagBits := flagBits bitOr:FlagDoNotRequestFocusOnPointerEnter
     ] ifFalse:[
-        flagBits := flagBits bitClear:FlagDoNotRequestFocusOnPointerEnter
+	flagBits := flagBits bitClear:FlagDoNotRequestFocusOnPointerEnter
     ].
 !
 
@@ -5700,17 +5709,17 @@
     |viewInSubView|
 
     (shown and:[subViews notNil]) ifTrue:[
-        subViews do:[:aSubView|
-            aSubView shown ifTrue:[
-                (aSubView canTab and:[aSubView enabled]) ifTrue:[
-                    ^ aSubView
-                ].
-
-                (viewInSubView := aSubView focusNext) notNil ifTrue:[
-                    ^ viewInSubView
-                ]
-            ]
-        ]
+	subViews do:[:aSubView|
+	    aSubView shown ifTrue:[
+		(aSubView canTab and:[aSubView enabled]) ifTrue:[
+		    ^ aSubView
+		].
+
+		(viewInSubView := aSubView focusNext) notNil ifTrue:[
+		    ^ viewInSubView
+		]
+	    ]
+	]
     ].
     ^ nil
 !
@@ -5722,18 +5731,18 @@
     |viewInSubView|
 
     (shown and:[subViews notNil]) ifTrue:[
-        subViews reverseDo:[:aSubView|
-            aSubView shown ifTrue:[
-                viewInSubView := aSubView focusPrevious.
-
-                viewInSubView notNil ifTrue:[
-                    ^ viewInSubView
-                ].
-                (aSubView canTab and:[aSubView enabled]) ifTrue:[
-                    ^ aSubView
-                ].
-            ]
-        ]
+	subViews reverseDo:[:aSubView|
+	    aSubView shown ifTrue:[
+		viewInSubView := aSubView focusPrevious.
+
+		viewInSubView notNil ifTrue:[
+		    ^ viewInSubView
+		].
+		(aSubView canTab and:[aSubView enabled]) ifTrue:[
+		    ^ aSubView
+		].
+	    ]
+	]
     ].
     ^ nil
 !
@@ -5798,32 +5807,32 @@
     |delta clrId bd|
 
     explicit ifTrue:[
-        (drawableId notNil 
-        and:[superView notNil
-        and:[styleSheet notNil]]) ifTrue:[
-            (styleSheet at:#'focus.showBorder' default:true) ifTrue:[
-                (device supportsWindowBorder:(bd := DefaultFocusBorderWidth)) ifFalse:[
-                    (device supportsWindowBorder:(bd := 1)) ifFalse:[
-                        bd := 0.
-                    ]
-                ].
-                delta := bd - borderWidth.
-                delta ~~ 0 ifTrue:[
-                    (left == 0 or:[top == 0]) ifTrue:[
-                        device resizeWindow:drawableId width:width-delta-delta height:height-delta-delta.
-                    ] ifFalse:[
-                        device moveWindow:drawableId x:left-delta y:top-delta.
-                    ].
-                    device setWindowBorderWidth:bd in:drawableId.
-                ].
-
-                clrId := (DefaultFocusColor onDevice:device) colorId.
-                clrId isNil ifTrue:[
-                    clrId := device blackpixel
-                ].
-                device setWindowBorderColor:clrId in:drawableId.
-            ]
-        ]
+	(drawableId notNil
+	and:[superView notNil
+	and:[styleSheet notNil]]) ifTrue:[
+	    (styleSheet at:#'focus.showBorder' default:true) ifTrue:[
+		(device supportsWindowBorder:(bd := DefaultFocusBorderWidth)) ifFalse:[
+		    (device supportsWindowBorder:(bd := 1)) ifFalse:[
+			bd := 0.
+		    ]
+		].
+		delta := bd - borderWidth.
+		delta ~~ 0 ifTrue:[
+		    (left == 0 or:[top == 0]) ifTrue:[
+			device resizeWindow:drawableId width:width-delta-delta height:height-delta-delta.
+		    ] ifFalse:[
+			device moveWindow:drawableId x:left-delta y:top-delta.
+		    ].
+		    device setWindowBorderWidth:bd in:drawableId.
+		].
+
+		clrId := (DefaultFocusColor onDevice:device) colorId.
+		clrId isNil ifTrue:[
+		    clrId := device blackpixel
+		].
+		device setWindowBorderColor:clrId in:drawableId.
+	    ]
+	]
     ] ifFalse:[
 "/        superView notNil ifTrue:[
 "/            superView showFocus:explicit
@@ -5867,7 +5876,7 @@
     "Unconditionally take the focus from my windowGroup"
 
     windowGroup notNil ifTrue:[
-        windowGroup focusView:self byTab:false.
+	windowGroup focusView:self byTab:false.
     ].
 !
 
@@ -5908,7 +5917,7 @@
 !
 
 grabKeyboard
-    "grab the keayboard - that is: report all keyboard events to myself, 
+    "grab the keayboard - that is: report all keyboard events to myself,
      even if the mouse moved out of myself.
      Returns true, if the grab was sucessfull (could fail, if some other
      application has a grab - but thats very unlikely)."
@@ -6053,7 +6062,7 @@
      make me unknown to the device"
 
     realized ifTrue:[
-	self unmap.            
+	self unmap.
     ].
     shown := false.
 
@@ -6108,28 +6117,28 @@
     viewBackground := DefaultViewBackgroundColor.
 
     DefaultLightColor notNil ifTrue:[
-        lightColor := DefaultLightColor.
+	lightColor := DefaultLightColor.
     ] ifFalse:[
-        device hasGrayscales ifTrue:[
-            (viewBackground isImageOrForm and:[viewBackground colorMap isNil]) ifTrue:[
-                lightColor := viewBackground averageColor lightened.
-            ] ifFalse:[
-                lightColor := viewBackground lightened.
-            ].
-            DefaultLightColor := lightColor.
-        ] ifFalse:[
-            "
-             this seems strange: on B&W screens, we create the light color 
-             darker than normal viewBackground (White) -
-             to make the boundary of the view visible
-            "
-            lightColor := Color gray:50
-        ]
+	device hasGrayscales ifTrue:[
+	    (viewBackground isImageOrForm and:[viewBackground colorMap isNil]) ifTrue:[
+		lightColor := viewBackground averageColor lightened.
+	    ] ifFalse:[
+		lightColor := viewBackground lightened.
+	    ].
+	    DefaultLightColor := lightColor.
+	] ifFalse:[
+	    "
+	     this seems strange: on B&W screens, we create the light color
+	     darker than normal viewBackground (White) -
+	     to make the boundary of the view visible
+	    "
+	    lightColor := Color gray:50
+	]
     ].
     DefaultShadowColor notNil ifTrue:[
-        shadowColor := DefaultShadowColor.
+	shadowColor := DefaultShadowColor.
     ] ifFalse:[
-        shadowColor := Black
+	shadowColor := Black
     ].
 
     borderColor := DefaultBorderColor.
@@ -6147,12 +6156,12 @@
      and keep the values in fast class variables
     "
     StyleSheet isNil ifTrue:[
-        DefaultStyle isNil ifTrue:[
-            "/ the very-very first time (no styleSheet yet)
-            View setDefaultStyle. 
-            View defaultStyle:DefaultStyle.
-        ].
-        SimpleView updateAllStyleCaches
+	DefaultStyle isNil ifTrue:[
+	    "/ the very-very first time (no styleSheet yet)
+	    View setDefaultStyle.
+	    View defaultStyle:DefaultStyle.
+	].
+	SimpleView updateAllStyleCaches
     ].
 
     styleSheet := StyleSheet.
@@ -6205,8 +6214,8 @@
 
     controllerClass := self defaultControllerClass.
     controllerClass notNil ifTrue:[
-        controller := controllerClass new.
-        controller view:self.
+	controller := controllerClass new.
+	controller view:self.
     ].
 
     self initializeMiddleButtonMenu.
@@ -6237,11 +6246,11 @@
 
     self initStyle.
     (drawableId notNil and:[gcId notNil]) ifTrue:[
-        "force a change"
-        t := borderWidth. borderWidth := nil. self borderWidth:t.
-        t := viewBackground. viewBackground := nil. self viewBackground:t.
-        self clearView. 
-        self invalidate.
+	"force a change"
+	t := borderWidth. borderWidth := nil. self borderWidth:t.
+	t := viewBackground. viewBackground := nil. self viewBackground:t.
+	self clearView.
+	self invalidate.
     ].
 
     "Modified: / 18.9.1998 / 21:15:33 / cg"
@@ -6513,7 +6522,7 @@
             ].
 
             "
-             a temporary kludge: 
+             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).
@@ -6640,7 +6649,7 @@
 		"/ prepare for masked/non-rectangular components ...
 		(aComponent perform:#containsPointX:y: with:x with:y ifNotUnderstood:true)
 		ifTrue:[
-		    aBlock value:aComponent 
+		    aBlock value:aComponent
 			   value:x - thisFrame left
 			   value:y - thisFrame top.
 		]
@@ -6658,24 +6667,24 @@
 
     margin isNil ifTrue:[margin := 0].
     (margin ~~ 0) ifTrue:[
-        m2 := margin + margin.
-        nX := nY := margin.
-        nW := width - m2.
-        nH := height - m2.
+	m2 := margin + margin.
+	nX := nY := margin.
+	nW := width - m2.
+	nH := height - m2.
 "/        transformation notNil ifTrue:[
 "/            nX := transformation applyInverseToX:nX.
 "/            nY := transformation applyInverseToY:nY.
 "/            nW := transformation applyInverseScaleX:nW.
 "/            nH := transformation applyInverseScaleY:nH.
 "/        ].
-        innerClipRect := Rectangle 
-                                 left:nX 
-                                 top:nY 
-                                 width:nW 
-                                 height:nH
+	innerClipRect := Rectangle
+				 left:nX
+				 top:nY
+				 width:nW
+				 height:nH
     ] ifFalse:[
-        "no clipping"
-        innerClipRect := nil
+	"no clipping"
+	innerClipRect := nil
     ]
 
     "Modified: / 22.5.1999 / 16:50:58 / cg"
@@ -6886,7 +6895,7 @@
 	 operation right away - otherwise, simply remember that the
 	 origin has changed - will tell the display once we get realized
 	"
-"/        (shown 
+"/        (shown
 "/        or:[superView isNil and:[drawableId notNil]]) ifTrue:[
 
 	"/ no, have to do it if drawableId is there
@@ -6915,7 +6924,7 @@
 pixelOrigin:origin extent:extent
     "set the views origin and extent in pixels"
 
-    |newLeft newTop newWidth newHeight how 
+    |newLeft newTop newWidth newHeight how
      mustRedrawBottomEdge mustRedrawRightEdge mustRepaintBottom
      mustRepaintRight sameOrigin oldWidth oldHeight oldPaint|
 
@@ -6931,150 +6940,150 @@
      a dimension <= 0 ... (although I think that 0 maks sense ...)
     "
     newWidth < 1 ifTrue:[
-        newWidth := 1.
+	newWidth := 1.
     ].
     newHeight < 1 ifTrue:[
-        newHeight := 1
+	newHeight := 1
     ].
 
     ((newWidth == width) and:[newHeight == height]) ifTrue:[
-        sameOrigin ifTrue:[^ self].
-        self changed:#origin.
-        ^ self pixelOrigin:origin
+	sameOrigin ifTrue:[^ self].
+	self changed:#origin.
+	^ self pixelOrigin:origin
     ].
     top := newTop.
     left := newLeft.
 
 "/    shown ifTrue:[                  "4-nov-94 actually correct,"
     drawableId notNil ifTrue:[        "but theres a bug in menus when resized while hidden"
-        mustRedrawBottomEdge := (level ~~ 0) and:[newHeight < height].
-        mustRedrawRightEdge := (level ~~ 0) and:[newWidth < width].
-
-        ((newHeight <= height) and:[newWidth <= width]) ifTrue:[
-            how := #smaller
-        ] ifFalse:[
-            ((newHeight >= height) and:[newWidth >= width]) ifTrue:[
-                how := #larger
-            ]
-        ].
-
-        mustRepaintRight := false.
-        mustRepaintBottom := false.
-
-        oldWidth := width.
-        oldHeight := height.
-
-        shown ifTrue:[
-            (level ~~ 0) ifTrue:[
-                "clear the old edges"
-
-                newWidth > width ifTrue:[
-                    self clippingRectangle:nil.
-                    oldPaint := paint.
-                    self paint:viewBackground.
-                    self fillDeviceRectangleX:(width - margin)
-                                            y:0
-                                        width:margin
-                                       height:height.
-                    self paint:oldPaint.
-                    mustRepaintRight := true.
-                ].
-                newHeight > height ifTrue:[
-                    self clippingRectangle:nil.
-                    oldPaint := paint.
-                    self paint:viewBackground.
-                    self fillDeviceRectangleX:0
-                                            y:(height - margin)
-                                        width:width
-                                       height:margin.
-                    self paint:oldPaint.
-                    mustRepaintBottom := true.
-                ]
-            ]
-        ].
-
-        width := newWidth.
-        height := newHeight.
-
-        self setInnerClip.
-
-        "if view becomes smaller, send sizeChanged first"
-        true  "(how == #smaller)" ifTrue:[
-            self sizeChanged:how
-        ].
-
-        "have to tell X, when extent of view is changed"
-        sameOrigin ifTrue:[
-            device resizeWindow:drawableId width:width height:height.
-
-        ] ifFalse:[
-            "claus: some xservers seem to do better when resizing
-             first ...."
-" 
-            (how == #smaller) ifTrue:[
-                device resizeWindow:drawableId width:width height:height.
-                device moveWindow:drawableId x:left y:top
-            ] ifFalse:[
-                device moveResizeWindow:drawableId x:left y:top width:width height:height
-            ].
-" 
-            device moveResizeWindow:drawableId x:left y:top
-                                           width:width height:height.
-        ].
-
-        "if view becomes bigger, send sizeChanged after"
-        false "(how ~~ #smaller)" ifTrue:[
-            self sizeChanged:how
-        ].
-
-        shown ifTrue:[
-            (mustRedrawBottomEdge or:[mustRedrawRightEdge]) ifTrue:[
-                self deviceClippingRectangle:nil.
-                oldPaint := paint.
-                mustRedrawBottomEdge ifTrue:[
-                    self drawBottomEdge
-                ].
-                mustRedrawRightEdge ifTrue:[
-                    self drawRightEdge
-                ].
-                self paint:oldPaint.
-                self deviceClippingRectangle:innerClipRect
-            ].
-        ].
-
-        mustRepaintRight ifTrue:[
-            self invalidateDeviceRectangle:(((oldWidth - margin) @ 0)
-                                           extent:margin@height)
-                                 repairNow:false.
+	mustRedrawBottomEdge := (level ~~ 0) and:[newHeight < height].
+	mustRedrawRightEdge := (level ~~ 0) and:[newWidth < width].
+
+	((newHeight <= height) and:[newWidth <= width]) ifTrue:[
+	    how := #smaller
+	] ifFalse:[
+	    ((newHeight >= height) and:[newWidth >= width]) ifTrue:[
+		how := #larger
+	    ]
+	].
+
+	mustRepaintRight := false.
+	mustRepaintBottom := false.
+
+	oldWidth := width.
+	oldHeight := height.
+
+	shown ifTrue:[
+	    (level ~~ 0) ifTrue:[
+		"clear the old edges"
+
+		newWidth > width ifTrue:[
+		    self clippingRectangle:nil.
+		    oldPaint := paint.
+		    self paint:viewBackground.
+		    self fillDeviceRectangleX:(width - margin)
+					    y:0
+					width:margin
+				       height:height.
+		    self paint:oldPaint.
+		    mustRepaintRight := true.
+		].
+		newHeight > height ifTrue:[
+		    self clippingRectangle:nil.
+		    oldPaint := paint.
+		    self paint:viewBackground.
+		    self fillDeviceRectangleX:0
+					    y:(height - margin)
+					width:width
+				       height:margin.
+		    self paint:oldPaint.
+		    mustRepaintBottom := true.
+		]
+	    ]
+	].
+
+	width := newWidth.
+	height := newHeight.
+
+	self setInnerClip.
+
+	"if view becomes smaller, send sizeChanged first"
+	true  "(how == #smaller)" ifTrue:[
+	    self sizeChanged:how
+	].
+
+	"have to tell X, when extent of view is changed"
+	sameOrigin ifTrue:[
+	    device resizeWindow:drawableId width:width height:height.
+
+	] ifFalse:[
+	    "claus: some xservers seem to do better when resizing
+	     first ...."
+"
+	    (how == #smaller) ifTrue:[
+		device resizeWindow:drawableId width:width height:height.
+		device moveWindow:drawableId x:left y:top
+	    ] ifFalse:[
+		device moveResizeWindow:drawableId x:left y:top width:width height:height
+	    ].
+"
+	    device moveResizeWindow:drawableId x:left y:top
+					   width:width height:height.
+	].
+
+	"if view becomes bigger, send sizeChanged after"
+	false "(how ~~ #smaller)" ifTrue:[
+	    self sizeChanged:how
+	].
+
+	shown ifTrue:[
+	    (mustRedrawBottomEdge or:[mustRedrawRightEdge]) ifTrue:[
+		self deviceClippingRectangle:nil.
+		oldPaint := paint.
+		mustRedrawBottomEdge ifTrue:[
+		    self drawBottomEdge
+		].
+		mustRedrawRightEdge ifTrue:[
+		    self drawRightEdge
+		].
+		self paint:oldPaint.
+		self deviceClippingRectangle:innerClipRect
+	    ].
+	].
+
+	mustRepaintRight ifTrue:[
+	    self invalidateDeviceRectangle:(((oldWidth - margin) @ 0)
+					   extent:margin@height)
+				 repairNow:false.
 "/            self redrawDeviceX:(oldWidth - margin)
 "/                             y:0
 "/                         width:margin
 "/                        height:height.
-        ].
-        mustRepaintBottom ifTrue:[
-            self invalidateDeviceRectangle:((0 @ (oldHeight - margin))
-                                           extent:width@margin)
-                                 repairNow:false.
+	].
+	mustRepaintBottom ifTrue:[
+	    self invalidateDeviceRectangle:((0 @ (oldHeight - margin))
+					   extent:width@margin)
+				 repairNow:false.
 "/            self redrawDeviceX:0
 "/                             y:(oldHeight - margin)
 "/                         width:width
 "/                        height:margin.
-        ].
+	].
     ] ifFalse:[
-        "otherwise memorize the need for a sizeChanged message"
-
-        width := newWidth.
-        height := newHeight.
-        sameOrigin ifFalse:[
-            self originChangedFlag:true.
-        ].
-        self extentChangedFlag:true.
-        subViews size > 0 ifTrue:[
-            self extentChangedBeforeCreatedFlag:true.
-        ].
+	"otherwise memorize the need for a sizeChanged message"
+
+	width := newWidth.
+	height := newHeight.
+	sameOrigin ifFalse:[
+	    self originChangedFlag:true.
+	].
+	self extentChangedFlag:true.
+	subViews size > 0 ifTrue:[
+	    self extentChangedBeforeCreatedFlag:true.
+	].
     ].
     sameOrigin ifFalse:[
-        self changed:#origin.
+	self changed:#origin.
     ].
 
     "Modified: / 25.5.1999 / 14:49:56 / cg"
@@ -7088,7 +7097,7 @@
     bw := borderWidth ? 0.
 
     superView isNil ifTrue:[
-	superWidth := device width + bw.      
+	superWidth := device width + bw.
 	superHeight := device height + bw.
 	superLeft := superTop := 0.
     ] ifFalse:[
@@ -7178,7 +7187,7 @@
 !
 
 windowGroupClass
-        ^ WindowGroup
+	^ WindowGroup
 ! !
 
 !SimpleView methodsFor:'queries'!
@@ -7205,7 +7214,7 @@
     ^ flagBits bitTest:FlagCornerChanged
 !
 
-cornerChangedFlag:aBoolean 
+cornerChangedFlag:aBoolean
     "/ cornerChangedFlag := aBoolean
     aBoolean ifTrue:[
 	flagBits := flagBits bitOr:FlagCornerChanged
@@ -7581,7 +7590,7 @@
 
     myClass := self class.
     (myClass == View or:[myClass == SimpleView]) ifTrue:[
-        ^ ViewSpec "/ CompositeSpecCollection
+	^ ViewSpec "/ CompositeSpecCollection
     ].
 
     "/ try: appending 'Spec' to my classes name
@@ -7589,8 +7598,8 @@
     myName := self class name.
     cls := Smalltalk classNamed:(myName , 'Spec').
     cls notNil ifTrue:[
-        cls := cls autoload.
-        (cls isSubclassOf:UISpecification) ifTrue:[^ cls].
+	cls := cls autoload.
+	(cls isSubclassOf:UISpecification) ifTrue:[^ cls].
     ].
 
     (myName endsWith:'View') ifTrue:[
@@ -7601,12 +7610,12 @@
 "/            (cls isSubclassOf:UISpecification) ifTrue:[^ cls].
 "/        ].
 
-        "/ try with 'View' replaced by 'Spec'
-        cls := Smalltalk classNamed:((myName copyWithoutLast:4) , 'View').
-        cls notNil ifTrue:[
-            cls := cls autoload.
-            (cls isSubclassOf:UISpecification) ifTrue:[^ cls].
-        ]
+	"/ try with 'View' replaced by 'Spec'
+	cls := Smalltalk classNamed:((myName copyWithoutLast:4) , 'View').
+	cls notNil ifTrue:[
+	    cls := cls autoload.
+	    (cls isSubclassOf:UISpecification) ifTrue:[^ cls].
+	]
     ].
 
     "/ fall back for all others
@@ -7614,7 +7623,7 @@
 
 
     "
-     FramedBox new specClass 
+     FramedBox new specClass
     "
 
     "Modified: / 31.10.1997 / 19:44:55 / cg"
@@ -7646,11 +7655,11 @@
      This does not make the view visible (needs a #map for that)"
 
     drawableId isNil ifTrue:[
-        "
-         make certain that superview is created also
-        "
-        superView notNil ifTrue:[
-             superView view create.
+	"
+	 make certain that superview is created also
+	"
+	superView notNil ifTrue:[
+	     superView view create.
 
 "/            "and put my controller into the superviews controller list"
 "/            controller notNil ifTrue:[
@@ -7658,44 +7667,44 @@
 "/                    controller manager:(superView controller manager)
 "/                ]
 "/            ]
-        ] ifFalse:[
-            "/
-            "/ if the display is not already dispatching events,
-            "/ this starts the event process.
-            "/
-            device startDispatch
-        ].
-
-        cursor notNil ifTrue:[
-            cursor := cursor onDevice:device.
-        ].
-
-        self extentChangedBeforeCreatedFlag ifTrue:[
-            "/ this is true, if the extent was changed before
-            "/ this view was created (and therefore, no sizeChangeEvent
-            "/ was sent to me, which would notify children.)
-            "/ have to do this here.
-            self sizeChanged:nil.   "/ must tell children (if any)
-        ].
-        explicitExtent ~~ true ifTrue:[
-            self resize
-        ].
-
-        self physicalCreate.
-
-        viewBackground notNil ifTrue:[
-           self setViewBackground
-        ].
-
-        "/ self initializeMiddleButtonMenu.
-        self initEvents.
-
-        "
-         this is the first create,
-         force sizechange messages to be sent to the view
-        "
-        self extentChangedFlag:true.
-        self originChangedFlag:true
+	] ifFalse:[
+	    "/
+	    "/ if the display is not already dispatching events,
+	    "/ this starts the event process.
+	    "/
+	    device startDispatch
+	].
+
+	cursor notNil ifTrue:[
+	    cursor := cursor onDevice:device.
+	].
+
+	self extentChangedBeforeCreatedFlag ifTrue:[
+	    "/ this is true, if the extent was changed before
+	    "/ this view was created (and therefore, no sizeChangeEvent
+	    "/ was sent to me, which would notify children.)
+	    "/ have to do this here.
+	    self sizeChanged:nil.   "/ must tell children (if any)
+	].
+	explicitExtent ~~ true ifTrue:[
+	    self resize
+	].
+
+	self physicalCreate.
+
+	viewBackground notNil ifTrue:[
+	   self setViewBackground
+	].
+
+	"/ self initializeMiddleButtonMenu.
+	self initEvents.
+
+	"
+	 this is the first create,
+	 force sizechange messages to be sent to the view
+	"
+	self extentChangedFlag:true.
+	self originChangedFlag:true
     ]
 
     "Modified: 28.3.1997 / 13:50:17 / cg"
@@ -7740,16 +7749,16 @@
      slowly migrating to use layoutObjects ...
     "
     layout notNil ifTrue:[
-        superView notNil ifTrue:[
-            (self originOrExtentOrCornerChanged) ifTrue:[
-                r := (layout rectangleRelativeTo:(superView viewRectangle)
-                                       preferred:[self preferredBounds]).
-                org := r origin rounded.
-                ext := r extent rounded.
-                self pixelOrigin:org extent:ext.
-            ].
-        ].
-        ^ self.
+	superView notNil ifTrue:[
+	    (self originOrExtentOrCornerChanged) ifTrue:[
+		r := (layout rectangleRelativeTo:(superView viewRectangle)
+				       preferred:[self preferredBounds]).
+		org := r origin rounded.
+		ext := r extent rounded.
+		self pixelOrigin:org extent:ext.
+	    ].
+	].
+	^ self.
     ].
 
     "if the extent is not the one we created the window with ..."
@@ -7760,21 +7769,21 @@
 
     self originChangedFlag ifTrue:[
 "/        org := self computeOrigin.
-"/        self pixelOrigin:org.    
-        originRule notNil ifTrue:[
-            self pixelOrigin:self computeOrigin
-        ] ifFalse:[
-            relativeOrigin notNil ifTrue:[
-                self originFromRelativeOrigin:relativeOrigin
-            ] ifFalse:[
-                shown ifTrue:[
-                    device moveWindow:drawableId x:left y:top.
-                ] ifFalse:[
-                    self pixelOrigin:left@top
-                ].
-            ].
-        ].
-        self originChangedFlag:false
+"/        self pixelOrigin:org.
+	originRule notNil ifTrue:[
+	    self pixelOrigin:self computeOrigin
+	] ifFalse:[
+	    relativeOrigin notNil ifTrue:[
+		self originFromRelativeOrigin:relativeOrigin
+	    ] ifFalse:[
+		shown ifTrue:[
+		    device moveWindow:drawableId x:left y:top.
+		] ifFalse:[
+		    self pixelOrigin:left@top
+		].
+	    ].
+	].
+	self originChangedFlag:false
     ]
 
     "Modified: 18.6.1996 / 21:44:03 / cg"
@@ -7794,7 +7803,7 @@
     windowGroup notNil ifTrue:[windowGroup focusView:nil].
 
     self unmap.
-    device flush. 
+    device flush.
 
     masterGroup notNil ifTrue:[
 	"
@@ -7806,7 +7815,7 @@
 	 not yet arrived.
 	"
 	Delay waitForSeconds:0.05.
-	masterGroup processExposeEvents   
+	masterGroup processExposeEvents
     ].
 
 "/    WindowGroup leaveSignal raise.
@@ -7883,9 +7892,9 @@
 	    realized := true.
 	    aPoint isNil ifTrue:[
 		iconified ifTrue:[
-		    device 
+		    device
 			mapView:self id:drawableId iconified:iconified
-			atX:0 y:0 
+			atX:0 y:0
 			width:width height:height
 			minExtent:(self minExtent) maxExtent:(self maxExtent).
 		] ifFalse:[
@@ -7894,17 +7903,17 @@
 	    ] ifFalse:[
 		left := aPoint x.
 		top := aPoint y.
-		device 
+		device
 		    mapView:self id:drawableId iconified:iconified
-		    atX:left y:top 
+		    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.
@@ -7937,7 +7946,7 @@
 !
 
 physicalCreate
-    "common code for create & recreate: 
+    "common code for create & recreate:
      physically create (but do not map) the view on the device."
 
     |sv isInputOnly|
@@ -7950,8 +7959,8 @@
 
     isInputOnly := self isInputOnly.
 
-    drawableId := device 
-		      createWindowFor:self 
+    drawableId := device
+		      createWindowFor:self
 			  type:nil
 			  origin:(left @ top)
 			  extent:(width @ height)
@@ -8065,8 +8074,8 @@
 !
 
 realizeInGroup
-    "special realize - leave windowgroup as is; 
-     This allows a view to be realized in any windowgroup; 
+    "special realize - leave windowgroup as is;
+     This allows a view to be realized in any windowgroup;
      for special applications, like the kill button in the Filebrowser which has
      a windowGroup different from its superview's and is handled as a separate process."
 
@@ -8080,7 +8089,7 @@
 
 realizeKeepingGroup:keepGroupAsIs at:position iconified:iconified
     "common helper for realize and realizeInGroup.
-     Create the view; if the keepGroupAsIs argument is not true, 
+     Create the view; if the keepGroupAsIs argument is not true,
      assign my windowGroup."
 
     |superGroup groupChange keep|
@@ -8089,96 +8098,96 @@
     self fetchDeviceResources.
 
     drawableId isNil ifTrue:[
-        self create.
-        drawableId isNil ifTrue:[
-            ('SimpleView [warning]: could not create view: ' , self class name) errorPrintCR.
-            ^ self
-        ]
+	self create.
+	drawableId isNil ifTrue:[
+	    ('SimpleView [warning]: could not create view: ' , self class name) errorPrintCR.
+	    ^ self
+	]
     ].
 
     groupChange := false.
 
-    (windowGroup notNil 
+    (windowGroup notNil
      and:[superView isNil
      and:[windowGroup isForModalSubview]]) ifTrue:[
-        keep := true.
+	keep := true.
     ] ifFalse:[
-        keep := keepGroupAsIs
+	keep := keepGroupAsIs
     ].
 
     keep ifFalse:[
-        "
-         put myself into superviews windowgroup if there is a superview
-         This is the default behavior, which may be suppressed by
-         passing true as keepGroupAsIs-argument.
-         (it may be useful to assign a separate windowGroup to
-          a childView to have it execute independent of the parent
-          -> an example is found in the fileBrowsers kill-button)
-        "
-        superView notNil ifTrue:[
-            superGroup := superView windowGroup.
-            (windowGroup notNil and:[superGroup ~~ windowGroup]) ifTrue:[
-                "
-                 mhmh - seems that the windowgroup has changed ....
-                "
+	"
+	 put myself into superviews windowgroup if there is a superview
+	 This is the default behavior, which may be suppressed by
+	 passing true as keepGroupAsIs-argument.
+	 (it may be useful to assign a separate windowGroup to
+	  a childView to have it execute independent of the parent
+	  -> an example is found in the fileBrowsers kill-button)
+	"
+	superView notNil ifTrue:[
+	    superGroup := superView windowGroup.
+	    (windowGroup notNil and:[superGroup ~~ windowGroup]) ifTrue:[
+		"
+		 mhmh - seems that the windowgroup has changed ....
+		"
 "/                'oops - wgroup change on realize' printNL.
-                groupChange := true.
-
-                "/
-                "/ recursively change the windowGroup of
-                "/ myself and all of my children
-                "/
-                self windowGroup:superGroup.
-            ] ifFalse:[
-                windowGroup isNil ifTrue:[
-                    "/
-                    "/ only change the group of myself -
-                    "/ subviews will fetch it when realized.
-                    "/
-                    windowGroup := superGroup.
-                    superGroup notNil ifTrue:[superGroup addView:self].
-                ]
-            ].
-        ].
+		groupChange := true.
+
+		"/
+		"/ recursively change the windowGroup of
+		"/ myself and all of my children
+		"/
+		self windowGroup:superGroup.
+	    ] ifFalse:[
+		windowGroup isNil ifTrue:[
+		    "/
+		    "/ only change the group of myself -
+		    "/ subviews will fetch it when realized.
+		    "/
+		    windowGroup := superGroup.
+		    superGroup notNil ifTrue:[superGroup addView:self].
+		]
+	    ].
+	].
     ].
 
     (self originOrExtentChanged) ifTrue:[
-        self fixSize.
-        self sizeChanged:nil.   
+	self fixSize.
+	self sizeChanged:nil.
     ].
     position notNil ifTrue:[
-        self origin:position.
+	self origin:position.
     ].
 
     (subViews notNil or:[components notNil]) ifTrue:[
-        (realized not or:[groupChange]) ifTrue:[
+	(realized not or:[groupChange]) ifTrue:[
 hiddenOnRealize ifFalse:[
-            self realizeAllSubViews.
+	    self realizeAllSubViews.
 ].
-        ].
+	].
     ].
 
     self preRealize.
 
     iconified ifTrue:[
-        realized ifFalse:[
-            self mapIconified
-        ]
+	realized ifFalse:[
+	    self mapIconified
+	]
     ] ifFalse:[
-        hiddenOnRealize ifFalse:[
-            self setInnerClip.
-
-            realized ifFalse:[
-                "
-                 now, make the view visible
-                "
-                self mapAt:position
-            ]
-        ]
+	hiddenOnRealize ifFalse:[
+	    self setInnerClip.
+
+	    realized ifFalse:[
+		"
+		 now, make the view visible
+		"
+		self mapAt:position
+	    ]
+	]
     ].
 
     controller notNil ifTrue:[
-        controller startUp
+	controller startUp
     ].
 
     self postRealize
@@ -8196,7 +8205,7 @@
 	self physicalCreate.
 
 	viewBackground notNil ifTrue:[
-	    self setViewBackground 
+	    self setViewBackground
 	].
 
 	"
@@ -8279,7 +8288,7 @@
 
 resize
     "resize myself to make everything fit into me.
-     Here, nothing special is done (except for setting my extent to the 
+     Here, nothing special is done (except for setting my extent to the
      preferredExtent), but may be redefined in some subclasses."
 
     explicitExtent ~~ true ifTrue:[
@@ -8391,30 +8400,30 @@
      until the receivers windowGroupProcess gets rescheduled."
 
     shown ifFalse:[
-        "/ 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
+	"/ 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
 
     "Modified: / 9.11.1998 / 21:04:16 / cg"
 !
 
 invalidate:aRectangle
     "add a damage to redraw part of the recevier, 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 multiple damage rectangles into 
-     single redraws. 
+     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 multiple damage rectangles into
+     single redraws.
      However, be aware, that the redrawing may be delayed for some time,
      intil the receivers 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
 
@@ -8423,25 +8432,25 @@
 
 invalidate:aRectangle repairNow:doRepairNow
     "add a damage to redraw part of the receiver, to its input event queue.
-     and (if repairNow is true), force the receiver to repair all of its 
+     and (if repairNow is true), force the receiver to repair all of its
      damaged areas right now.
      The given rectangle is in logical coordinate space."
 
     |r|
 
     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
     ].
 
     r := aRectangle.
     transformation notNil ifTrue:[
-        r := transformation applyTo:r.
+	r := transformation applyTo:r.
     ].
     self sensor addDamage:r view:self.
     doRepairNow ifTrue:[
-        self repairDamage
+	self repairDamage
     ]
 
     "Modified: / 10.11.1998 / 01:55:03 / cg"
@@ -8449,19 +8458,19 @@
 
 invalidateDeviceRectangle:aRectangle repairNow:doRepairNow
     "add a damage to redraw part of the receiver, to its input event queue.
-     and (if repairNow is true), force the receiver to repair all of its 
+     and (if repairNow is true), force the receiver to repair all of its
      damaged areas right now.
      The given rectangle is in device coordinate space."
 
     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 sensor addDamage:aRectangle view:self.
     doRepairNow ifTrue:[
-        self repairDamage
+	self repairDamage
     ]
 
     "Modified: / 10.11.1998 / 01:55:03 / cg"
@@ -8470,17 +8479,17 @@
 
 invalidateRepairNow:doRepair
     "add a damage to redraw all of the receiver, to its input event queue.
-     and (if repairNow is true), force the receiver to repair all of its 
+     and (if repairNow is true), force the receiver to repair all of its
      damaged areas right now."
 
     shown ifFalse:[
-        "/ 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:doRepair
+	"/ 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:doRepair
 
     "Created: 19.4.1997 / 11:58:04 / cg"
     "Modified: 19.4.1997 / 12:00:00 / cg"
@@ -8490,22 +8499,22 @@
     "add a damage to redraw all of the receiver, to its input event queue."
 
     shown ifFalse:[
-        "/ no need to add damage - will get a full-redraw anyway,
-        "/ when I will be shown again.
-        ^ self
-    ].
-    self invalidate:(Rectangle left:x top:y width:w height:h) 
+	"/ no need to add damage - will get a full-redraw anyway,
+	"/ when I will be shown again.
+	^ self
+    ].
+    self invalidate:(Rectangle left:x top:y width:w height:h)
 !
 
 invalidateX:x y:y width:w height:h repairNow:doRepair
     "add a damage to redraw all of the receiver, to its input event queue.
-     and (if repairNow is true), force the receiver to repair all of its 
+     and (if repairNow is true), force the receiver to repair all of its
      damaged areas right now."
 
     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:(Rectangle left:x top:y width:w height:h) repairNow:doRepair
 !
@@ -8522,7 +8531,7 @@
 redraw:aRectangle
     "redraw a part of the view immediately."
 
-    self 
+    self
 	redrawX:(aRectangle left)
 	      y:(aRectangle top)
 	  width:(aRectangle width)
@@ -8554,16 +8563,16 @@
 !
 
 redrawX:x y:y width:w height:h
-    "redraw part of myself immediately, given logical coordinates 
+    "redraw part of myself immediately, given logical coordinates
      (if transformation is nonNil)
-     The default here is to redraw everything 
+     The default here is to redraw everything
      - subclasses usually redefine this, adding more intelligence"
 
     |area oldClip|
 
     shown ifFalse:[^ self].
 
-    area := Rectangle left:x top:y width:w height:h.      
+    area := Rectangle left:x top:y width:w height:h.
     oldClip := clipRect.
     self clippingRectangle:area.
 
@@ -8588,7 +8597,7 @@
 !
 
 repairDamage
-    "force the receiver to repair all of its 
+    "force the receiver to repair all of its
      damaged areas right now."
 
     |wg|
@@ -8853,7 +8862,7 @@
     ^ (device verticalPixelPerMillimeter * 20) asInteger
 !
 
-widthForScrollBetween:yStart and:yEnd 
+widthForScrollBetween:yStart and:yEnd
     "return the width in pixels for a scroll between yStart and yEnd
      - return full width here since we do not know how wide contents is.
      Views which only use part of their space (short lists, text) may redefine
@@ -8866,9 +8875,9 @@
 
 !SimpleView methodsFor:'scrolling-basic'!
 
-scrollTo:newOrigin 
+scrollTo:newOrigin
     "change origin to have newOrigin be visible at the top-left.
-     The argument defines the integer device coordinates of the new top-left 
+     The argument defines the integer device coordinates of the new top-left
      point."
 
      ^ self scrollTo:newOrigin redraw:true
@@ -8879,28 +8888,28 @@
 
 scrollTo:newOrigin redraw:doRedraw
     "change origin to have newOrigin be visible at the top-left.
-     The argument defines the integer device coordinates of the new top-left 
+     The argument defines the integer device coordinates of the new top-left
      point."
 
     ^ self
-        scrollTo:newOrigin 
-        redraw:doRedraw 
-        allowScrollBeyondContents:false
+	scrollTo:newOrigin
+	redraw:doRedraw
+	allowScrollBeyondContents:false
 !
 
 scrollTo:newOrigin redraw:doRedraw allowScrollBehondContents:allowScrollBehondContents
     "change origin to have newOrigin be visible at the top-left.
-     The argument defines the integer device coordinates of the new top-left 
+     The argument defines the integer device coordinates of the new top-left
      point."
 
     self obsoleteMethodWarning:'use #scrollTo:redraw:allowScrollBehondContents:'.
     ^ self
-        scrollTo:newOrigin redraw:doRedraw allowScrollBeyondContents:allowScrollBehondContents
+	scrollTo:newOrigin redraw:doRedraw allowScrollBeyondContents:allowScrollBehondContents
 !
 
 scrollTo:newOrigin redraw:doRedraw allowScrollBeyondContents:allowScrollBehondContents
     "change origin to have newOrigin be visible at the top-left.
-     The argument defines the integer device coordinates of the new top-left 
+     The argument defines the integer device coordinates of the new top-left
      point."
 
     |dX   "{ Class:SmallInteger }"
@@ -8914,12 +8923,12 @@
     hCont := self heightOfContents.
     wCont := self widthOfContents.
     transformation isNil ifTrue:[
-        orgY := orgX := 0
+	orgY := orgX := 0
     ] ifFalse:[
-        wCont := (transformation applyScaleX:wCont) rounded.
-        hCont := (transformation applyScaleY:hCont) rounded.
-        orgY := transformation translation y negated.
-        orgX := transformation translation x negated
+	wCont := (transformation applyScaleX:wCont) rounded.
+	hCont := (transformation applyScaleY:hCont) rounded.
+	orgY := transformation translation y negated.
+	orgX := transformation translation x negated
     ].
 
     iw := self innerWidth.
@@ -8931,20 +8940,20 @@
     y := newOrigin y.
 
     allowScrollBehondContents ifFalse:[
-        x + iw > wCont ifTrue:[
-            x := wCont - iw.
-        ].
+	x + iw > wCont ifTrue:[
+	    x := wCont - iw.
+	].
     ].
     x < 0 ifTrue:[
-        x := 0
+	x := 0
     ].
     allowScrollBehondContents ifFalse:[
-        y + ih > hCont ifTrue:[
-            y := hCont - ih.
-        ].
+	y + ih > hCont ifTrue:[
+	    y := hCont - ih.
+	].
     ].
     y < 0 ifTrue:[
-        y := 0.
+	y := 0.
     ].
 
     dX := x - orgX.
@@ -8955,79 +8964,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.      
-"/                self 
-"/                    redrawDeviceX:margin y:redrawY 
+	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.      
-"/                self redrawDeviceX:redrawX y:toY 
+	    ].
+
+	    "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 
+"/                             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).
@@ -9044,7 +9053,7 @@
      Although #open is only to be sent to topviews (i.e. it could have been
      implemented in TopView), it is implemented here - therefore, every view
      can be opened as a topView.
-     This is redefined in ModalBox, which comes up modal (i.e. 
+     This is redefined in ModalBox, which comes up modal (i.e.
      control is under the current process, so that interaction with the
      current group is blocked while the modalBox is active).
 
@@ -9136,12 +9145,12 @@
 openAutonomous
     "create and schedule a new windowgroup for me and open the view.
      The view will be handled by its own process, effectively running in
-     parallel. 
+     parallel.
      Notice:
-        This entry is for NON-topviews, which want to be served
-        autonomous from their real topview. 
-        (see the fileBrowsers kill-button
-         when executing unix commands as an example)"
+	This entry is for NON-topviews, which want to be served
+	autonomous from their real topview.
+	(see the fileBrowsers kill-button
+	 when executing unix commands as an example)"
 
     |wg mainGroup|
 
@@ -9150,7 +9159,7 @@
 
     mainGroup := WindowGroup activeGroup.
     mainGroup notNil ifTrue:[
-        mainGroup := mainGroup mainGroup.
+	mainGroup := mainGroup mainGroup.
     ].
 
     wg isForModalSubview:true.        "/ make it handle update events for the main group
@@ -9164,7 +9173,7 @@
 
 openInGroup:aGroup
     "special open within another windowGroup.
-     This allows a view to be realized in any windowgroup; 
+     This allows a view to be realized in any windowgroup;
      for applications where multiple views act as a group
      (i.e. close and iconify together)."
 
@@ -9203,7 +9212,7 @@
      Stay in this modal loop while aBlock evaluates to true AND the receiver is
      visible.
      (i.e. control is returned to the sender when the receiver is closed)
-     This makes any interaction with the current window impossible - 
+     This makes any interaction with the current window impossible -
      however, other views (in other windowgroups) still work."
 
     |masterGroup|
@@ -9227,126 +9236,126 @@
      Stay in this modal loop while aBlock evaluates to true AND the receiver is
      visible.
      (i.e. control is returned to the sender when the receiver is closed)
-     This makes any interaction with the current window impossible - 
+     This makes any interaction with the current window impossible -
      however, other views (in other windowgroups) still work."
 
     |tops mainView mainViewID previousGroup |
 
     self isPopUpView ifFalse:[
-        ModalBox usingTransientViews ifTrue:[
-            "make view only transient, if there is a visible topView.
-             If none of them is visible, we do want an icon for ourself"
-        
-            mainGroup notNil ifTrue:[
-                (tops := mainGroup topViews) notNil ifTrue:[
-                    tops notEmpty ifTrue:[
-                        mainView := tops detect:[:v| v shown] ifNone:nil.
-                        mainView notNil ifTrue:[
-                            mainViewID := mainView id.
-                        ]
-                    ]
-                ].
-            ].
-
-            mainViewID isNil ifTrue:[
-                self origin:(device center - (self extent//2))
-            ].
-
-            drawableId isNil ifTrue:[self create].
-            mainView notNil ifTrue:[
-                device setTransient:drawableId for:mainViewID.
-            ].
-        ].
+	ModalBox usingTransientViews ifTrue:[
+	    "make view only transient, if there is a visible topView.
+	     If none of them is visible, we do want an icon for ourself"
+
+	    mainGroup notNil ifTrue:[
+		(tops := mainGroup topViews) notNil ifTrue:[
+		    tops notEmpty ifTrue:[
+			mainView := tops detect:[:v| v shown] ifNone:nil.
+			mainView notNil ifTrue:[
+			    mainViewID := mainView id.
+			]
+		    ]
+		].
+	    ].
+
+	    mainViewID isNil ifTrue:[
+		self origin:(device center - (self extent//2))
+	    ].
+
+	    drawableId isNil ifTrue:[self create].
+	    mainView notNil ifTrue:[
+		device setTransient:drawableId for:mainViewID.
+	    ].
+	].
     ].
 
     self raise.
 
     Processor activeProcessIsSystemProcess ifTrue:[
-        "
-         put myself into the modal group, let it handle events for
-         me as well. This is only a half way solution, since the view
-         is not modal at all ... however, the only situation
-         where this happens is with modal boxes popped while in a
-         modal browser. You will forgive me for that inconvenience.
-        "
-        windowGroup := mainGroup.
-        mainGroup notNil ifTrue:[mainGroup addTopView:self].
-        self realize
+	"
+	 put myself into the modal group, let it handle events for
+	 me as well. This is only a half way solution, since the view
+	 is not modal at all ... however, the only situation
+	 where this happens is with modal boxes popped while in a
+	 modal browser. You will forgive me for that inconvenience.
+	"
+	windowGroup := mainGroup.
+	mainGroup notNil ifTrue:[mainGroup addTopView:self].
+	self realize
     ] ifFalse:[
-        previousGroup := WindowGroup activeGroup.
-
-        "
-         show a stop-cursor in the main group
-        "
-        mainGroup notNil ifTrue:[
-            self isPopUpView ifFalse:[
-                mainGroup showCursor:(Cursor stop).
-                (previousGroup notNil and:[previousGroup ~~ mainGroup]) ifTrue:[
-                    previousGroup showCursor:(Cursor stop).
-                ].
-            ]
-        ].
-
-        "
-         create a new window group and put myself into it
-        "
-        windowGroup := self windowGroupClass new.
-        windowGroup addTopView:self.
-        windowGroup setPreviousGroup:previousGroup.
-
-        superView notNil ifTrue:[
-            "/
-            "/ special: this is a modal subview,
-            "/ prevent the view from reassigning its windowGroup when realized
-            "/ (subviews normally place themself into the superviews group)
-            "/        
-            windowGroup isForModalSubview:true.
-        ].
-
-        "
-         go dispatch events in this new group
-         (thus current windowgroup is blocked from interaction)
-        "
-        AbortSignal handle:[:ex |
-            self hide.
-            ex return.
-        ] do:[
-            [
-                [
-                    windowGroup startupModal:[realized and:aBlock] forGroup:mainGroup
-                ] ifCurtailed:[
-                    self hide.
-                ]
-            ] ensure:[
-                mainGroup notNil ifTrue:[
-                    mainGroup graphicsDevice sync.  "thats a round trip - make sure that all drawing has been processed"
-                    "/ ensure that eventListener runs here ...
-                    Delay waitForSeconds:0.05.    
-                    mainGroup processExposeEvents.
-
-                    ReturnFocusWhenClosingModalBoxes ifTrue:[
-                        "
-                         return input focus to previously active groups top.
-                         This helps with windowmanagers which need an explicit click
-                         on the view for the focus.
-                        "
-                        tops := mainGroup topViews.
-                        (tops notNil and:[tops notEmpty]) ifTrue:[
-                            tops first getKeyboardFocus
-                        ].
-                    ].
-
-                    "
-                     restore cursors in the main group & flush its buffered key & mouse events
-                    "
-                    mainGroup restoreCursors.
-                    (previousGroup notNil and:[previousGroup ~~ mainGroup]) ifTrue:[
-                        previousGroup restoreCursors.
-                    ].
+	previousGroup := WindowGroup activeGroup.
+
+	"
+	 show a stop-cursor in the main group
+	"
+	mainGroup notNil ifTrue:[
+	    self isPopUpView ifFalse:[
+		mainGroup showCursor:(Cursor stop).
+		(previousGroup notNil and:[previousGroup ~~ mainGroup]) ifTrue:[
+		    previousGroup showCursor:(Cursor stop).
+		].
+	    ]
+	].
+
+	"
+	 create a new window group and put myself into it
+	"
+	windowGroup := self windowGroupClass new.
+	windowGroup addTopView:self.
+	windowGroup setPreviousGroup:previousGroup.
+
+	superView notNil ifTrue:[
+	    "/
+	    "/ special: this is a modal subview,
+	    "/ prevent the view from reassigning its windowGroup when realized
+	    "/ (subviews normally place themself into the superviews group)
+	    "/
+	    windowGroup isForModalSubview:true.
+	].
+
+	"
+	 go dispatch events in this new group
+	 (thus current windowgroup is blocked from interaction)
+	"
+	AbortSignal handle:[:ex |
+	    self hide.
+	    ex return.
+	] do:[
+	    [
+		[
+		    windowGroup startupModal:[realized and:aBlock] forGroup:mainGroup
+		] ifCurtailed:[
+		    self hide.
+		]
+	    ] ensure:[
+		mainGroup notNil ifTrue:[
+		    mainGroup graphicsDevice sync.  "thats a round trip - make sure that all drawing has been processed"
+		    "/ ensure that eventListener runs here ...
+		    Delay waitForSeconds:0.05.
+		    mainGroup processExposeEvents.
+
+		    ReturnFocusWhenClosingModalBoxes ifTrue:[
+			"
+			 return input focus to previously active groups top.
+			 This helps with windowmanagers which need an explicit click
+			 on the view for the focus.
+			"
+			tops := mainGroup topViews.
+			(tops notNil and:[tops notEmpty]) ifTrue:[
+			    tops first getKeyboardFocus
+			].
+		    ].
+
+		    "
+		     restore cursors in the main group & flush its buffered key & mouse events
+		    "
+		    mainGroup restoreCursors.
+		    (previousGroup notNil and:[previousGroup ~~ mainGroup]) ifTrue:[
+			previousGroup restoreCursors.
+		    ].
 "/                    mainGroup sensor flushUserEvents.
-                ]
-            ]
-        ].
+		]
+	    ]
+	].
     ]
 
     "Created: 10.12.1995 / 14:06:14 / cg"
@@ -9452,21 +9461,21 @@
     drawableId isNil ifTrue:[self create].
 
     windowGroup isNil ifTrue:[
-        newGroup := true.
-        windowGroup := self windowGroupClass new.
+	newGroup := true.
+	windowGroup := self windowGroupClass new.
     ] ifFalse:[
-        newGroup := false.
+	newGroup := false.
     ].
 
     windowGroup addTopView:self.
     newGroup ifTrue:[
-        (aPoint isNil and:[iconified not]) ifTrue:[
-            windowGroup startupWith:[self realize].
-        ] ifFalse:[
-            windowGroup startupWith:[self realizeKeepingGroup:false at:aPoint iconified:iconified].
-        ].
+	(aPoint isNil and:[iconified not]) ifTrue:[
+	    windowGroup startupWith:[self realize].
+	] ifFalse:[
+	    windowGroup startupWith:[self realizeKeepingGroup:false at:aPoint iconified:iconified].
+	].
     ] ifFalse:[
-        self realizeInGroup.
+	self realizeInGroup.
     ].
 
     "
@@ -9503,48 +9512,48 @@
      first expose event.
      However, if you want to 'manually' draw into the view (for example,
      in doIt expressions), or subsequent views depend on some state of
-     another view (which is only available once visible), 
+     another view (which is only available once visible),
      use this to suspend the current process until the receiver is shown.
      Caveat:
-        we poll here for the view to be shown - we need a semaphore
-        which is raised by the view in order to do it right."
+	we poll here for the view to be shown - we need a semaphore
+	which is raised by the view in order to do it right."
 
     |wg n|
 
     n := 0.
     [self shown] whileFalse:[
-        (device notNil and:[device isOpen not]) ifTrue:[^ self].
-
-        "/ this was added to avoid a deadlock, when called from within
-        "/ the event dispatch process (as when doing foo inspect there).
-        n > (10 / 0.05) ifTrue:[
-            'SimpleView [info]: View not visible after 10 seconds - will not wait any longer in waitUntilVisible' infoPrintCR.
-            ^ self
-        ].
-        n := n + 1.
-        Delay waitForSeconds:0.05.
-        (wg := self windowGroup) ifNotNil:[
-            wg processExposeEvents.
-        ].
+	(device notNil and:[device isOpen not]) ifTrue:[^ self].
+
+	"/ this was added to avoid a deadlock, when called from within
+	"/ the event dispatch process (as when doing foo inspect there).
+	n > (10 / 0.05) ifTrue:[
+	    'SimpleView [info]: View not visible after 10 seconds - will not wait any longer in waitUntilVisible' infoPrintCR.
+	    ^ self
+	].
+	n := n + 1.
+	Delay waitForSeconds:0.05.
+	(wg := self windowGroup) ifNotNil:[
+	    wg processExposeEvents.
+	].
     ].
 
     "does not work (the view is in its opening phase,
      when we attempt to draw a line - this gives an error, since
      its internals are not yet correctly setup):
 
-        |v|
-
-        v := View new open.
-        v displayLineFrom:0@0 to:50@50
+	|v|
+
+	v := View new open.
+	v displayLineFrom:0@0 to:50@50
 
      does work (since we wait until the view has completely finished
      its startup phase):
 
-        |v|
-
-        v := View new open.
-        v waitUntilVisible.
-        v displayLineFrom:0@0 to:50@50
+	|v|
+
+	v := View new open.
+	v waitUntilVisible.
+	v displayLineFrom:0@0 to:50@50
     "
 ! !
 
@@ -9554,7 +9563,7 @@
     "like Objects warn, but translates the string via the
      resourcePack, thus giving a translated string automatically"
 
-    super warn:(resources stringWithCRs:aString) 
+    super warn:(resources stringWithCRs:aString)
 !
 
 warn:aString with:argument
@@ -9629,7 +9638,7 @@
 !SimpleView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.528 2005-12-21 18:42:30 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.529 2006-01-09 08:50:41 cg Exp $'
 ! !
 
 SimpleView initialize!