StandardSystemView.st
changeset 3152 b64eeb833f5b
parent 3143 db2332366367
child 3210 250f55f80683
--- a/StandardSystemView.st	Mon Jan 24 17:34:12 2000 +0100
+++ b/StandardSystemView.st	Tue Jan 25 11:58:33 2000 +0100
@@ -359,19 +359,19 @@
     |nm i|
 
     (i := DefaultIcon) isNil ifTrue:[
-        i := self classResources at:'ICON' default:nil.
-        i isNil ifTrue:[
-            OperatingSystem platformName == #win32 ifTrue:[
-                nm := 'stx_16x16.xpm'.
-            ] ifFalse:[
-                nm := 'SmalltalkX.xbm'.
-            ].
-            nm := ClassResources at:'ICON_FILE' default:nm.
-            i := Smalltalk imageFromFileNamed:nm forClass:self.
-        ].
-        i notNil ifTrue:[
-            DefaultIcon := i := i onDevice:Display
-        ]
+	i := self classResources at:'ICON' default:nil.
+	i isNil ifTrue:[
+	    OperatingSystem platformName == #win32 ifTrue:[
+		nm := 'stx_16x16.xpm'.
+	    ] ifFalse:[
+		nm := 'SmalltalkX.xbm'.
+	    ].
+	    nm := ClassResources at:'ICON_FILE' default:nm.
+	    i := Smalltalk imageFromFileNamed:nm forClass:self.
+	].
+	i notNil ifTrue:[
+	    DefaultIcon := i := i onDevice:Display
+	]
     ].
     ^ i
 
@@ -637,27 +637,27 @@
      depends on good-will of window manager"
 
     maxExtent ~= max ifTrue:[
-        maxExtent := max.
-        maxExtent x isNil ifTrue:[
-            maxExtent := 9999 @ maxExtent y.
-        ].
-        maxExtent y isNil ifTrue:[
-            maxExtent := maxExtent x @ 9999.
-        ].
+	maxExtent := max.
+	maxExtent x isNil ifTrue:[
+	    maxExtent := 9999 @ maxExtent y.
+	].
+	maxExtent y isNil ifTrue:[
+	    maxExtent := maxExtent x @ 9999.
+	].
 
-        drawableId notNil ifTrue:[
-            device setWindowMinExtent:nil maxExtent:max in:drawableId
-        ].
+	drawableId notNil ifTrue:[
+	    device setWindowMinExtent:nil maxExtent:max in:drawableId
+	].
 
-        "/ if my current extent is larger than the new
-        "/ maxExtent, adjust.
+	"/ if my current extent is larger than the new
+	"/ maxExtent, adjust.
 
-        (width notNil and:[height notNil]) ifTrue:[
-            ((width > (max x)) or:
-             [height > (max y)]) ifTrue: [
-                self extent:(max min:self extent)
-            ]
-        ]
+	(width notNil and:[height notNil]) ifTrue:[
+	    ((width > (max x)) or:
+	     [height > (max y)]) ifTrue: [
+		self extent:(max min:self extent)
+	    ]
+	]
     ].
 !
 
@@ -672,20 +672,20 @@
      depends on good-will of window manager"
 
     minExtent ~= min ifTrue:[
-        minExtent := min.
-        drawableId notNil ifTrue:[
-            device setWindowMinExtent:min maxExtent:nil in:drawableId
-        ].
+	minExtent := min.
+	drawableId notNil ifTrue:[
+	    device setWindowMinExtent:min maxExtent:nil in:drawableId
+	].
 
-        "/ if my current extent is smaller than the new
-        "/ minExtent, adjust.
+	"/ if my current extent is smaller than the new
+	"/ minExtent, adjust.
 
-        (width notNil and:[height notNil]) ifTrue:[
-            ((width < (min x)) or:
-             [height < (min y)]) ifTrue: [
-                self extent:(min max:self extent)
-            ]
-        ]
+	(width notNil and:[height notNil]) ifTrue:[
+	    ((width < (min x)) or:
+	     [height < (min y)]) ifTrue: [
+		self extent:(min max:self extent)
+	    ]
+	]
     ]
 
 ! !
@@ -884,33 +884,33 @@
     |v|
 
     windowGroup notNil ifTrue:[
-        "/ I got the focus - tell the current focus-windowgroup
-        "/ that its focus is gone elsewhere ...
+	"/ I got the focus - tell the current focus-windowgroup
+	"/ that its focus is gone elsewhere ...
 "/ 'focusIn ' print. windowGroup process name printCR.
 "/ 'focusView is ' print. windowGroup focusView printCR.
 
-        WindowGroup takeFocusFromDevice:device.
+	WindowGroup takeFocusFromDevice:device.
 
-        v := windowGroup focusView.
-        v isNil ifTrue:[
-            UserPreferences current focusFollowsMouse ~~ false ifTrue:[
-                v := windowGroup pointerView.
+	v := windowGroup focusView.
+	v isNil ifTrue:[
+	    UserPreferences current focusFollowsMouse ~~ false ifTrue:[
+		v := windowGroup pointerView.
 "/ 'pointerView is ' print. v printCR.
-                (v notNil 
-                and:[v isKeyboardConsumer not
-                and:[v wantsFocusWithPointerEnter not]]) ifTrue:[
-                    "/ no - not this one
+		(v notNil 
+		and:[v isKeyboardConsumer not
+		and:[v wantsFocusWithPointerEnter not]]) ifTrue:[
+		    "/ no - not this one
 "/ 'not a kbdConsumer' printCR.
-                    v := nil.
-                ]
-            ]
-        ].
-        v isNil ifTrue:[
-            self assignKeyboardFocusToFirstInputField.
-        ] ifFalse:[
-            "/ v requestFocus.  - will be denied; but we must force it here
-            windowGroup focusView:v byTab:false.
-        ]
+		    v := nil.
+		]
+	    ]
+	].
+	v isNil ifTrue:[
+	    self assignKeyboardFocusToFirstInputField.
+	] ifFalse:[
+	    "/ v requestFocus.  - will be denied; but we must force it here
+	    windowGroup focusView:v byTab:false.
+	]
     ].
     super focusIn
 
@@ -924,10 +924,10 @@
     |v|
 
     windowGroup notNil ifTrue:[
-        (v := windowGroup focusView) notNil ifTrue:[
-            v showNoFocus:(windowGroup explicitFocusView == v).
-            v hasKeyboardFocus:false.
-        ]
+	(v := windowGroup focusView) notNil ifTrue:[
+	    v showNoFocus:(windowGroup explicitFocusView == v).
+	    v hasKeyboardFocus:false.
+	]
     ].
     super focusOut
 
@@ -981,9 +981,9 @@
 
     borderWidth := 2.         "- notice: many window managers ignore this"
     device platformName = 'WIN32' ifTrue:[
-        minExtent := 0 @ 0.
+	minExtent := 0 @ 0.
     ] ifFalse:[
-        minExtent := 10 @ 10.
+	minExtent := 10 @ 10.
     ].
     maxExtent := device usableExtent "- (0 @ device captionHeight)".
     label isNil ifTrue:[label := self class defaultLabel].
@@ -1023,7 +1023,7 @@
 
     "if I have already been reinited - return"
     drawableId notNil ifTrue:[
-        ^ self
+	^ self
     ].
 
     "have to kludge with the controller 
@@ -1037,13 +1037,13 @@
 
     "if I was iconified (not realized), remap iconified"
     device 
-        mapView:self id:drawableId iconified:(realized "shown" not) 
-        atX:left y:top width:width height:height
-        minExtent:minExtent maxExtent:maxExtent.
+	mapView:self id:drawableId iconified:(realized "shown" not) 
+	atX:left y:top width:width height:height
+	minExtent:minExtent maxExtent:maxExtent.
 
     "and restart the window-group process"
     windowGroup notNil ifTrue:[
-        windowGroup restart
+	windowGroup restart
     ].
 
     "restore controller"
@@ -1175,7 +1175,7 @@
     device supportsIconMasks ifFalse:[^ nil].
 
     aMask depth ~~ 1 ifTrue:[
-        ^ aMask asMonochromeFormOn:device
+	^ aMask asMonochromeFormOn:device
     ].
     ^ aMask
 
@@ -1353,10 +1353,10 @@
     l := self windowLabelFor:label.
 
     icon notNil ifTrue:[
-        icn := self convertedIcon:icon.
-        (icnMask := icon mask) notNil ifTrue:[
-            icnMask := self convertedIconMask:icnMask
-        ]
+	icn := self convertedIcon:icon.
+	(icnMask := icon mask) notNil ifTrue:[
+	    icnMask := self convertedIconMask:icnMask
+	]
     ].
 
     "/ give global eventListeners a chance to intercept windowCreation
@@ -1366,20 +1366,20 @@
     org := left @ top.
 
     drawableId := device 
-                      createWindowFor:self 
-                      type:nil
-                      origin:org
-                      extent:(width @ height)
-                      minExtent:minExtent
-                      maxExtent:maxExtent
-                      borderWidth:borderWidth
-                      subViewOf:nil 
-                      style:(self windowStyle)
-                      inputOnly:(self isInputOnly)
-                      label:l
-                      owner:nil
-                      icon:icn iconMask:icnMask
-                      iconView:iconView.
+		      createWindowFor:self 
+		      type:nil
+		      origin:org
+		      extent:(width @ height)
+		      minExtent:minExtent
+		      maxExtent:maxExtent
+		      borderWidth:borderWidth
+		      subViewOf:nil 
+		      style:(self windowStyle)
+		      inputOnly:(self isInputOnly)
+		      label:l
+		      owner:nil
+		      icon:icn iconMask:icnMask
+		      iconView:iconView.
 
     Lobby registerChange:self.
 
@@ -1390,7 +1390,7 @@
     originChanged := false.
 
     (borderColor notNil and:[borderColor ~= Black]) ifTrue:[
-        self setBorderColor
+	self setBorderColor
     ].
 
 "/  (viewGravity notNil "and:[viewGravity ~~ #NorthWest]") ifTrue:[
@@ -1402,17 +1402,17 @@
 "/  ].
 
     viewShape notNil ifTrue:[
-        self setViewShape
+	self setViewShape
     ].
 
     (backed notNil and:[backed ~~ false]) ifTrue:[
-        device setBackingStore:backed in:drawableId
+	device setBackingStore:backed in:drawableId
     ].
-    saveUnder ifTrue:[
-        device setSaveUnder:true in:drawableId
+    self saveUnder ifTrue:[
+	device setSaveUnder:true in:drawableId
     ].
     cursor notNil ifTrue:[
-        self setCursor
+	self setCursor
     ].
     device setWindowClass:('Stx', self className) name:name in:drawableId.
 
@@ -1428,9 +1428,9 @@
     "/ let the application add its views to the current project
     "/
     application notNil ifTrue:[
-        application opened:self.
+	application opened:self.
     ] ifFalse:[
-        self addToCurrentProject.
+	self addToCurrentProject.
     ].
 
     "Created: 24.7.1997 / 18:11:26 / cg"
@@ -1469,6 +1469,6 @@
 !StandardSystemView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.129 2000-01-17 11:12:56 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.130 2000-01-25 10:58:32 cg Exp $'
 ! !
 StandardSystemView initialize!