changed: #createWindowFor:type:origin:extent:minExtent:maxExtent:borderWidth:subViewOf:style:inputOnly:label:owner:icon:iconMask:iconView:
do NOT limit window extents to the size of the first screen.
--- a/WinWorkstation.st Wed Jan 25 11:52:57 2012 +0100
+++ b/WinWorkstation.st Mon Jan 30 16:46:13 2012 +0100
@@ -7647,19 +7647,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
@@ -7670,58 +7670,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:[
- 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
@@ -7729,26 +7730,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.
@@ -7773,24 +7774,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 setId:windowId.
] valueUninterruptably.
windowId notNil ifTrue:[
- self addKnownView:aView withId:windowId
+ self addKnownView:aView withId:windowId
].
^ windowId
+
+ "Modified: / 28-01-2012 / 10:20:30 / cg"
!
destroyGC:aGCId
@@ -15104,6 +15107,12 @@
EnumDisplayMonitors(NULL, NULL, EnumDisplayMonitorsProc, (long)(&data));
%}.
^ handleArray
+
+ "
+ Screen default monitorHandles
+ "
+
+ "Modified (comment): / 28-01-2012 / 10:26:55 / cg"
!
setInputFocusTo:aWindowId
@@ -19038,11 +19047,11 @@
!WinWorkstation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.454 2011-12-22 18:58:03 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.455 2012-01-30 15:46:13 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.454 2011-12-22 18:58:03 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.455 2012-01-30 15:46:13 cg Exp $'
! !
WinWorkstation initialize!