7939 RETURN (nil); |
7939 RETURN (nil); |
7940 %} |
7940 %} |
7941 ! |
7941 ! |
7942 |
7942 |
7943 createWindowFor:aView type:typeSymbol |
7943 createWindowFor:aView type:typeSymbol |
7944 origin:origin |
7944 origin:origin |
7945 extent:extent |
7945 extent:extent |
7946 minExtent:minExt |
7946 minExtent:minExt |
7947 maxExtent:maxExt |
7947 maxExtent:maxExt |
7948 borderWidth:bWidth |
7948 borderWidth:bWidth |
7949 subViewOf:wsuperView |
7949 subViewOf:wsuperView |
7950 style:wStyle |
7950 style:wStyle |
7951 inputOnly:winputOnly |
7951 inputOnly:winputOnly |
7952 label:wlabel |
7952 label:wlabel |
7953 owner:wowner |
7953 owner:wowner |
7954 icon:wicon |
7954 icon:wicon |
7955 iconMask:wiconMaskArg |
7955 iconMask:wiconMaskArg |
7956 iconView:wiconView |
7956 iconView:wiconView |
7957 |
7957 |
7958 |
7958 |
7959 |xpos ypos wwidth wheight minWidth minHeight maxWidth maxHeight |
7959 |xpos ypos wwidth wheight minWidth minHeight maxWidth maxHeight |
7960 wsuperViewId wiconId wiconMask invertedWiconMask wiconMaskId windowId |
7960 wsuperViewId wiconId wiconMask invertedWiconMask wiconMaskId windowId |
7961 weventMask wiconWidth wiconHeight windowType windowClass moreArgs| |
7961 weventMask wiconWidth wiconHeight windowType windowClass moreArgs| |
7962 |
7962 |
7963 "/ bColorId wiconViewId bitGravity vBgColor vBgForm deepForm |
7963 "/ bColorId wiconViewId bitGravity vBgColor vBgForm deepForm |
7964 "/ preferredVisual preferredDepth viewGravity wcursorId |
7964 "/ preferredVisual preferredDepth viewGravity wcursorId |
7965 |
7965 |
7966 displayId isNil ifTrue:[ |
7966 displayId isNil ifTrue:[ |
7967 self primitiveFailed. |
7967 self primitiveFailed. |
7968 ^ nil |
7968 ^ nil |
7969 ]. |
7969 ]. |
7970 |
7970 |
7971 origin notNil ifTrue:[ |
7971 origin notNil ifTrue:[ |
7972 xpos := origin x. |
7972 xpos := origin x. |
7973 ypos := origin y. |
7973 ypos := origin y. |
7974 ] ifFalse:[ |
7974 ] ifFalse:[ |
7975 xpos := ypos := 0. |
7975 xpos := ypos := 0. |
7976 ]. |
7976 ]. |
7977 extent notNil ifTrue:[ |
7977 extent notNil ifTrue:[ |
7978 wwidth := extent x. |
7978 wwidth := extent x. |
7979 wheight := extent y. |
7979 wheight := extent y. |
7980 ] ifFalse:[ |
7980 ] ifFalse:[ |
7981 wwidth := 100. |
7981 wwidth := 100. |
7982 wheight := 40. |
7982 wheight := 40. |
7983 ]. |
7983 ]. |
7984 minExt notNil ifTrue:[ |
7984 minExt notNil ifTrue:[ |
7985 minWidth := minExt x. |
7985 minWidth := minExt x. |
7986 minHeight := minExt y |
7986 minHeight := minExt y |
7987 ] ifFalse:[ |
7987 ] ifFalse:[ |
7988 minWidth := 1. |
7988 minWidth := 1. |
7989 minHeight := 1. |
7989 minHeight := 1. |
7990 ]. |
7990 ]. |
7991 |
7991 |
7992 maxExt notNil ifTrue:[ |
7992 maxExt notNil ifTrue:[ |
7993 maxWidth := maxExt x. |
7993 maxWidth := maxExt x. |
7994 maxHeight := maxExt y |
7994 maxHeight := maxExt y |
7995 ] ifFalse:[ |
7995 ] ifFalse:[ |
7996 "/ this is not really a good idea |
7996 "/ this is not really a good idea |
7997 "/ maxWidth := width. |
7997 "/ maxWidth := width. |
7998 "/ maxHeight := height. |
7998 "/ maxHeight := height. |
7999 ]. |
7999 ]. |
8000 |
8000 |
8001 wsuperView notNil ifTrue:[ |
8001 wsuperView notNil ifTrue:[ |
8002 wsuperViewId := wsuperView id |
8002 wsuperViewId := wsuperView id |
8003 ]. |
8003 ]. |
8004 |
8004 |
8005 wicon notNil ifTrue:[ |
8005 wicon notNil ifTrue:[ |
8006 wiconId := wicon id. |
8006 wiconId := wicon id. |
8007 wiconHeight := wicon height. |
8007 wiconHeight := wicon height. |
8008 wiconWidth := wicon width. |
8008 wiconWidth := wicon width. |
8009 wiconMask := wiconMaskArg. |
8009 wiconMask := wiconMaskArg. |
8010 wiconMask isNil ifTrue:[ |
8010 wiconMask isNil ifTrue:[ |
8011 wiconMask := wicon mask. |
8011 wiconMask := wicon mask. |
8012 ]. |
8012 ]. |
8013 wiconMask notNil ifTrue:[ |
8013 wiconMask notNil ifTrue:[ |
8014 "/ WIN32's mask has zeros for opaque pixels |
8014 "/ WIN32's mask has zeros for opaque pixels |
8015 invertedWiconMask := wiconMask copy. |
8015 invertedWiconMask := wiconMask copy. |
8016 invertedWiconMask bits invert. |
8016 invertedWiconMask bits invert. |
8017 invertedWiconMask := invertedWiconMask onDevice:self. |
8017 invertedWiconMask := invertedWiconMask onDevice:self. |
8018 wiconMaskId := invertedWiconMask id |
8018 wiconMaskId := invertedWiconMask id |
8019 ]. |
8019 ]. |
8020 ]. |
8020 ]. |
8021 "/ wiconView notNil ifTrue:[ |
8021 "/ wiconView notNil ifTrue:[ |
8022 "/ wiconViewId := wiconView id |
8022 "/ wiconViewId := wiconView id |
8023 "/ ]. |
8023 "/ ]. |
8024 weventMask := aView eventMask. |
8024 weventMask := aView eventMask. |
8025 |
8025 |
8026 NativeWidgets ifTrue:[ |
8026 NativeWidgets ifTrue:[ |
8027 windowType := aView nativeWindowType. |
8027 windowType := aView nativeWindowType. |
8028 windowType notNil ifTrue:[ |
8028 windowType notNil ifTrue:[ |
8029 "/ must be a symbol and is used |
8029 "/ must be a symbol and is used |
8030 "/ as a key into the nativeClass translation map. |
8030 "/ as a key into the nativeClass translation map. |
8031 |
8031 |
8032 windowClass := NativeWidgetClassTable at:windowType ifAbsent:windowType. |
8032 windowClass := NativeWidgetClassTable at:windowType ifAbsent:windowType. |
8033 self class debugNative ifTrue:[ |
8033 self class debugNative ifTrue:[ |
8034 'WinWorkstation [info]: windowType: ' infoPrint. windowType infoPrint. |
8034 'WinWorkstation [info]: windowType: ' infoPrint. windowType infoPrint. |
8035 ' windowClass: ' infoPrint. windowClass infoPrintCR. |
8035 ' windowClass: ' infoPrint. windowClass infoPrintCR. |
8036 ]. |
8036 ]. |
8037 ]. |
8037 ]. |
8038 ]. |
8038 ]. |
8039 aView isMDIClientView ifTrue:[ |
8039 aView isMDIClientView ifTrue:[ |
8040 windowClass := 'mdiclient'. |
8040 windowClass := 'mdiclient'. |
8041 ]. |
8041 ]. |
8042 |
8042 |
8043 windowClass notNil ifTrue:[ |
8043 windowClass notNil ifTrue:[ |
8044 aView beNativeWidget. |
8044 aView beNativeWidget. |
8045 ] ifFalse:[ |
8045 ] ifFalse:[ |
8046 aView beNonNativeWidget. |
8046 aView beNonNativeWidget. |
8047 ]. |
8047 ]. |
8048 |
8048 |
8049 moreArgs := Array new:20. |
8049 moreArgs := Array new:20. |
8050 moreArgs at:1 put:xpos. |
8050 moreArgs at:1 put:xpos. |
8051 moreArgs at:2 put:ypos. |
8051 moreArgs at:2 put:ypos. |
8066 moreArgs at:17 put:weventMask. |
8066 moreArgs at:17 put:weventMask. |
8067 moreArgs at:18 put:(aView className asString). |
8067 moreArgs at:18 put:(aView className asString). |
8068 |
8068 |
8069 [ |
8069 [ |
8070 windowId := self |
8070 windowId := self |
8071 primCreateWindowFor:aView |
8071 primCreateWindowFor:aView |
8072 type:typeSymbol |
8072 type:typeSymbol |
8073 borderWidth:bWidth |
8073 borderWidth:bWidth |
8074 subViewOf:wsuperView |
8074 subViewOf:wsuperView |
8075 style:wStyle |
8075 style:wStyle |
8076 inputOnly:winputOnly |
8076 inputOnly:winputOnly |
8077 label:wlabel |
8077 label:wlabel |
8078 owner:wowner |
8078 owner:wowner |
8079 icon:wicon |
8079 icon:wicon |
8080 iconMask:wiconMask |
8080 iconMask:wiconMask |
8081 moreArgs:moreArgs. |
8081 moreArgs:moreArgs. |
8082 aView graphicsContext setId:windowId. |
8082 aView graphicsContext setId:windowId. |
8083 ] valueUninterruptably. |
8083 ] valueUninterruptably. |
8084 |
8084 |
8085 windowId notNil ifTrue:[ |
8085 windowId notNil ifTrue:[ |
8086 self addKnownView:aView withId:windowId |
8086 self addKnownView:aView withId:windowId. |
|
8087 (aView windowStyle == #toolWindow) ifTrue:[ |
|
8088 self raiseWindowToTopMost: aView id. |
|
8089 ]. |
8087 ]. |
8090 ]. |
8088 ^ windowId |
8091 ^ windowId |
8089 |
8092 |
8090 "Modified: / 28-01-2012 / 10:20:30 / cg" |
8093 "Modified: / 28-01-2012 / 10:20:30 / cg" |
|
8094 "Modified: / 25-01-2018 / 10:19:46 / jv" |
8091 ! |
8095 ! |
8092 |
8096 |
8093 dcGetClipBoxForGC: gcId |
8097 dcGetClipBoxForGC: gcId |
8094 "Return clipping box for given device context (as #(left top right bottom) ). " |
8098 "Return clipping box for given device context (as #(left top right bottom) ). " |
8095 |
8099 |