WinWorkstation.st
branchjv
changeset 8420 76e39223f5ab
parent 8272 b99e94212cb5
child 8426 e2051b1553f0
--- a/WinWorkstation.st	Thu Jan 25 10:48:17 2018 +0000
+++ b/WinWorkstation.st	Mon Jun 11 10:50:04 2018 +0100
@@ -1,5 +1,7 @@
 "
 COPYRIGHT (c) 1996 by Claus Gittinger
+COPYRIGHT (c) 2017 Patrik Svestka
+COPYRIGHT (c) 2015-2018 Jan Vrany
 	      All Rights Reserved
 
  This software is furnished under a license and may be used
@@ -5282,6 +5284,8 @@
 copyright
 "
 COPYRIGHT (c) 1996 by Claus Gittinger
+COPYRIGHT (c) 2017 Patrik Svestka
+COPYRIGHT (c) 2015-2018 Jan Vrany
 	      All Rights Reserved
 
  This software is furnished under a license and may be used
@@ -7941,19 +7945,19 @@
 !
 
 createWindowFor:aView type:typeSymbol
-                 origin:origin
-                 extent:extent
-                 minExtent:minExt
-                 maxExtent:maxExt
-                 borderWidth:bWidth
-                 subViewOf:wsuperView
-                 style:wStyle
-                 inputOnly:winputOnly
-                 label:wlabel
-                 owner:wowner
-                 icon:wicon
-                 iconMask:wiconMaskArg
-                 iconView:wiconView
+		 origin:origin
+		 extent:extent
+		 minExtent:minExt
+		 maxExtent:maxExt
+		 borderWidth:bWidth
+		 subViewOf:wsuperView
+		 style:wStyle
+		 inputOnly:winputOnly
+		 label:wlabel
+		 owner:wowner
+		 icon:wicon
+		 iconMask:wiconMaskArg
+		 iconView:wiconView
 
 
     |xpos ypos wwidth wheight minWidth minHeight maxWidth maxHeight
@@ -7964,59 +7968,59 @@
     "/  preferredVisual preferredDepth  viewGravity wcursorId
 
     displayId isNil ifTrue:[
-        self primitiveFailed.
-        ^ nil
+	self primitiveFailed.
+	^ nil
     ].
 
     origin notNil ifTrue:[
-        xpos := origin x.
-        ypos := origin y.
+	xpos := origin x.
+	ypos := origin y.
     ] ifFalse:[
-        xpos := ypos := 0.
+	xpos := ypos := 0.
     ].
     extent notNil ifTrue:[
-        wwidth := extent x.
-        wheight := extent y.
+	wwidth := extent x.
+	wheight := extent y.
     ] ifFalse:[
-        wwidth := 100.
-        wheight := 40.
+	wwidth := 100.
+	wheight := 40.
     ].
     minExt notNil ifTrue:[
-        minWidth := minExt x.
-        minHeight := minExt y
+	minWidth := minExt x.
+	minHeight := minExt y
     ] ifFalse:[
-        minWidth := 1.
-        minHeight := 1.
+	minWidth := 1.
+	minHeight := 1.
     ].
 
     maxExt notNil ifTrue:[
-        maxWidth := maxExt x.
-        maxHeight := maxExt y
+	maxWidth := maxExt x.
+	maxHeight := maxExt y
     ] ifFalse:[
-        "/ this is not really a good idea
-        "/ maxWidth := width.
-        "/ maxHeight := height.
+	"/ this is not really a good idea
+	"/ maxWidth := width.
+	"/ maxHeight := height.
     ].
 
     wsuperView notNil ifTrue:[
-        wsuperViewId := wsuperView id
+	wsuperViewId := wsuperView id
     ].
 
     wicon notNil ifTrue:[
-        wiconId := wicon id.
-        wiconHeight := wicon height.
-        wiconWidth  := wicon width.
-        wiconMask := wiconMaskArg.
-        wiconMask isNil ifTrue:[
-            wiconMask := wicon mask.
-        ].
-        wiconMask notNil ifTrue:[
-            "/ WIN32's mask has zeros for opaque pixels
-            invertedWiconMask := wiconMask copy.
-            invertedWiconMask bits invert.
-            invertedWiconMask := invertedWiconMask onDevice:self.
-            wiconMaskId := invertedWiconMask id
-        ].
+	wiconId := wicon id.
+	wiconHeight := wicon height.
+	wiconWidth  := wicon width.
+	wiconMask := wiconMaskArg.
+	wiconMask isNil ifTrue:[
+	    wiconMask := wicon mask.
+	].
+	wiconMask notNil ifTrue:[
+	    "/ WIN32's mask has zeros for opaque pixels
+	    invertedWiconMask := wiconMask copy.
+	    invertedWiconMask bits invert.
+	    invertedWiconMask := invertedWiconMask onDevice:self.
+	    wiconMaskId := invertedWiconMask id
+	].
     ].
 "/    wiconView notNil ifTrue:[
 "/        wiconViewId := wiconView id
@@ -8024,26 +8028,26 @@
     weventMask := aView eventMask.
 
     NativeWidgets ifTrue:[
-        windowType := aView nativeWindowType.
-        windowType notNil ifTrue:[
-            "/ must be a symbol and is used
-            "/ as a key into the nativeClass translation map.
-
-            windowClass := NativeWidgetClassTable at:windowType ifAbsent:windowType.
-            self class debugNative ifTrue:[
-                'WinWorkstation [info]: windowType: ' infoPrint. windowType infoPrint.
-                ' windowClass: ' infoPrint. windowClass infoPrintCR.
-            ].
-        ].
+	windowType := aView nativeWindowType.
+	windowType notNil ifTrue:[
+	    "/ must be a symbol and is used
+	    "/ as a key into the nativeClass translation map.
+
+	    windowClass := NativeWidgetClassTable at:windowType ifAbsent:windowType.
+	    self class debugNative ifTrue:[
+		'WinWorkstation [info]: windowType: ' infoPrint. windowType infoPrint.
+		' windowClass: ' infoPrint. windowClass infoPrintCR.
+	    ].
+	].
     ].
     aView isMDIClientView ifTrue:[
-        windowClass := 'mdiclient'.
+	windowClass := 'mdiclient'.
     ].
 
     windowClass notNil ifTrue:[
-        aView beNativeWidget.
+	aView beNativeWidget.
     ] ifFalse:[
-        aView beNonNativeWidget.
+	aView beNonNativeWidget.
     ].
 
     moreArgs := Array new:20.
@@ -8068,30 +8072,26 @@
 
     [
       windowId := self
-                  primCreateWindowFor:aView
-                  type:typeSymbol
-                  borderWidth:bWidth
-                  subViewOf:wsuperView
-                  style:wStyle
-                  inputOnly:winputOnly
-                  label:wlabel
-                  owner:wowner
-                  icon:wicon
-                  iconMask:wiconMask
-                  moreArgs:moreArgs.
+		  primCreateWindowFor:aView
+		  type:typeSymbol
+		  borderWidth:bWidth
+		  subViewOf:wsuperView
+		  style:wStyle
+		  inputOnly:winputOnly
+		  label:wlabel
+		  owner:wowner
+		  icon:wicon
+		  iconMask:wiconMask
+		  moreArgs:moreArgs.
       aView graphicsContext setId:windowId.
     ] valueUninterruptably.
 
     windowId notNil ifTrue:[
-        self addKnownView:aView withId:windowId.
-        (aView windowStyle == #toolWindow) ifTrue:[ 
-            self raiseWindowToTopMost: aView id.  
-        ].  
+	self addKnownView:aView withId:windowId
     ].
     ^ windowId
 
     "Modified: / 28-01-2012 / 10:20:30 / cg"
-    "Modified: / 25-01-2018 / 10:19:46 / jv"
 !
 
 dcGetClipBoxForGC: gcId