--- a/GLXWorkstat.st Thu Sep 18 05:48:35 1997 +0200
+++ b/GLXWorkstat.st Thu Sep 18 22:21:25 1997 +0200
@@ -1977,7 +1977,7 @@
To animate things smoothly, draw into the backBuffer while the frontBuffer is
displayed and swap them for every frame."
-%{ /* NOCONTEXT */
+%{ /* UNLIMITEDSTACK */
SETWIN(aGLXWindowId)
#ifdef OPENGL
#else
@@ -8792,5 +8792,5 @@
!GLXWorkstation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/Attic/GLXWorkstat.st,v 1.66 1997-09-17 22:31:02 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/Attic/GLXWorkstat.st,v 1.67 1997-09-18 20:21:07 cg Exp $'
! !
--- a/GLXWorkstation.st Thu Sep 18 05:48:35 1997 +0200
+++ b/GLXWorkstation.st Thu Sep 18 22:21:25 1997 +0200
@@ -1977,7 +1977,7 @@
To animate things smoothly, draw into the backBuffer while the frontBuffer is
displayed and swap them for every frame."
-%{ /* NOCONTEXT */
+%{ /* UNLIMITEDSTACK */
SETWIN(aGLXWindowId)
#ifdef OPENGL
#else
@@ -8792,5 +8792,5 @@
!GLXWorkstation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.66 1997-09-17 22:31:02 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/GLXWorkstation.st,v 1.67 1997-09-18 20:21:07 cg Exp $'
! !
--- a/SimpleView.st Thu Sep 18 05:48:35 1997 +0200
+++ b/SimpleView.st Thu Sep 18 22:21:25 1997 +0200
@@ -10,11 +10,11 @@
hereby transferred.
"
-'From Smalltalk/X, Version:3.1.9 on 29-aug-1997 at 1:17:37 pm' !
+'From Smalltalk/X, Version:3.1.10 on 18-sep-1997 at 11:12:47 pm' !
DisplaySurface subclass:#SimpleView
instanceVariableNames:'superView subViews components styleSheet resources borderColor
- borderWidth borderShape viewShape top left extentChanged
+ borderWidth viewShape top left extentChanged
originChanged cornerChanged relativeOrigin relativeExtent
relativeCorner originRule extentRule cornerRule insets layout
shown hiddenOnRealize name level margin innerClipRect shadowColor
@@ -41,6 +41,13 @@
"
!
+Object subclass:#ViewShape
+ instanceVariableNames:'viewShapeForm borderShapeForm'
+ classVariableNames:''
+ poolDictionaries:''
+ privateIn:SimpleView
+!
+
!SimpleView class methodsFor:'documentation'!
copyright
@@ -84,9 +91,7 @@
borderWidth <Number> borderWidth in pixels (device dep.)
- borderShape <Form> shape of border (if device supports it)
-
- viewShape <Form> shape of view (if device supports it)
+ viewShape <Form> shape of view & border (if device supports it)
top <Number> actual top coordinate (pixels) in superview
@@ -1387,10 +1392,15 @@
borderShape:aForm
"set the borderShape to aForm"
- borderShape := aForm.
+ viewShape isNil ifTrue:[
+ viewShape := ViewShape new
+ ].
+ viewShape borderShapeForm:aForm.
drawableId notNil ifTrue:[
- device setWindowBorderShape:(aForm id) in:drawableId
+ device setWindowBorderShape:(aForm id) in:drawableId
]
+
+ "Modified: 18.9.1997 / 11:09:40 / cg"
!
borderWidth
@@ -1527,10 +1537,16 @@
viewShape:aForm
"set the viewShape to aForm"
- viewShape := aForm.
+ viewShape isNil ifTrue:[
+ viewShape := ViewShape new
+ ].
+
+ viewShape viewShapeForm:aForm.
drawableId notNil ifTrue:[
- device setWindowShape:(aForm id) in:drawableId
+ device setWindowShape:(aForm id) in:drawableId
]
+
+ "Modified: 18.9.1997 / 11:11:04 / cg"
! !
!SimpleView methodsFor:'accessing-contents'!
@@ -5540,6 +5556,19 @@
self clippingRectangle:innerClipRect
"Modified: 28.5.1996 / 20:04:53 / cg"
+!
+
+setViewShape
+ |form|
+
+ (form := viewShape borderShapeForm) notNil ifTrue:[
+ device setWindowBorderShape:(form id) in:drawableId
+ ].
+ (form := viewShape viewShapeForm) notNil ifTrue:[
+ device setWindowShape:(form id) in:drawableId
+ ].
+
+ "Created: 18.9.1997 / 11:09:00 / cg"
! !
!SimpleView methodsFor:'queries'!
@@ -6137,27 +6166,27 @@
"/ and provide another origin.
(listener := WindowSensor eventListener) notNil ifTrue:[
- ret := listener preCreateView:self origin:org.
- ret isPoint ifTrue:[
- org := ret
- ]
+ ret := listener preCreateView:self origin:org.
+ ret isPoint ifTrue:[
+ org := ret
+ ]
].
drawableId := device
- createWindowFor:self
- type:nil
- origin:org
- extent:(width @ height)
- minExtent:nil
- maxExtent:nil
- borderWidth:borderWidth
- subViewOf:sv
- style:(self windowStyle)
- inputOnly:(self isInputOnly)
- label:nil
- cursor:cursor
- icon:nil iconMask:nil
- iconView:nil.
+ createWindowFor:self
+ type:nil
+ origin:org
+ extent:(width @ height)
+ minExtent:nil
+ maxExtent:nil
+ borderWidth:borderWidth
+ subViewOf:sv
+ style:(self windowStyle)
+ inputOnly:(self isInputOnly)
+ label:nil
+ cursor:cursor
+ icon:nil iconMask:nil
+ iconView:nil.
Lobby registerChange:self.
@@ -6165,7 +6194,7 @@
"/ give it a chance to track views
listener notNil ifTrue:[
- listener postCreateView:self.
+ listener postCreateView:self.
].
extentChanged := false.
@@ -6173,28 +6202,25 @@
(borderColor notNil and:[borderColor ~= Black]) ifTrue:[
"/ borderColor := borderColor on:device.
- self setBorderColor
+ self setBorderColor
].
(viewGravity notNil "and:[viewGravity ~~ #NorthWest]") ifTrue:[
- device setWindowGravity:viewGravity in:drawableId
+ device setWindowGravity:viewGravity in:drawableId
].
(bitGravity notNil "and:[bitGravity ~~ #NorthWest]") ifTrue:[
- device setBitGravity:bitGravity in:drawableId
- ].
- borderShape notNil ifTrue:[
- device setWindowBorderShape:(borderShape id) in:drawableId
+ device setBitGravity:bitGravity in:drawableId
].
viewShape notNil ifTrue:[
- device setWindowShape:(viewShape id) in:drawableId
+ 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
- ].
-
- "Modified: 2.5.1997 / 14:30:35 / cg"
+ device setSaveUnder:true in:drawableId
+ ].
+
+ "Modified: 18.9.1997 / 11:09:18 / cg"
!
postRealize
@@ -7604,9 +7630,43 @@
super warn:(resources string:aString with:arg1 with:arg2) withCRs
! !
+!SimpleView::ViewShape methodsFor:'accessing'!
+
+borderShapeForm
+ "return the value of the instance variable 'borderShapeForm' (automatically generated)"
+
+ ^ borderShapeForm
+
+ "Created: 18.9.1997 / 11:04:29 / cg"
+!
+
+borderShapeForm:something
+ "set the value of the instance variable 'borderShapeForm' (automatically generated)"
+
+ borderShapeForm := something.
+
+ "Created: 18.9.1997 / 11:04:29 / cg"
+!
+
+viewShapeForm
+ "return the value of the instance variable 'viewShapeForm' (automatically generated)"
+
+ ^ viewShapeForm
+
+ "Created: 18.9.1997 / 11:04:29 / cg"
+!
+
+viewShapeForm:something
+ "set the value of the instance variable 'viewShapeForm' (automatically generated)"
+
+ viewShapeForm := something.
+
+ "Created: 18.9.1997 / 11:04:29 / cg"
+! !
+
!SimpleView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.232 1997-09-06 17:32:01 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.233 1997-09-18 20:21:25 cg Exp $'
! !
SimpleView initialize!