--- a/DisplaySurface.st Sat Jan 10 06:20:20 2015 +0000
+++ b/DisplaySurface.st Tue Feb 03 13:48:45 2015 +0000
@@ -85,6 +85,10 @@
[author:]
Claus Gittinger
"
+!
+
+version_CVS
+ ^ '$Header: /cvs/stx/stx/libview/DisplaySurface.st,v 1.162.2.2 2014-09-25 21:09:41 stefan Exp $'
! !
!DisplaySurface class methodsFor:'initialization'!
@@ -856,51 +860,7 @@
!DisplaySurface methodsFor:'binary storage'!
-readBinaryContentsFrom: stream manager: manager
- "tell the newly restored View to recreate itself.
- Bug: does not work correctly yet.
- (restored view looses its position & wg process)"
-
- |wasRealized|
-
- super readBinaryContentsFrom: stream manager: manager.
-
- wasRealized := realized.
- realized := false.
- self recreate.
- wasRealized ifTrue:[
- self remap
- ]
-
-
- "
- |s l|
- s := 'storedLabel.boss' asFilename writeStream binary.
- l := (Label label:'hello there') realize.
- Delay waitForSeconds:1.
- l storeBinaryOn:s.
- s close.
- "
-
- "
- |s l|
- s := 'storedLabel.boss' asFilename writeStream binary.
- (l := Label label:'hello there') open.
- (Delay forSeconds:10) wait.
- l storeBinaryOn:s.
- s close.
- l destroy.
- "
-
- "
- |s|
- s := 'storedLabel.boss' asFilename readStream binary.
- (Object readBinaryFrom:s)
- "
-
- "Modified: 3.5.1996 / 23:59:38 / stefan"
- "Modified: 14.2.1997 / 15:42:55 / cg"
-! !
+ !
!DisplaySurface methodsFor:'button menus'!
@@ -2209,50 +2169,50 @@
graphicsDevice := self graphicsDevice.
graphicsDevice scrollsAsynchronous ifFalse:[
- self setGotExposeFlag.
- ^ self
+ self setGotExposeFlag.
+ ^ self
].
wg := self windowGroup.
wg notNil ifTrue:[
- "/
- "/ a normal (suspendable) view.
- "/ wait by doing a real wait
- "/
- wg sensor waitForExposeFor:self
+ "/
+ "/ a normal (suspendable) view.
+ "/ wait by doing a real wait
+ "/
+ wg sensor waitForExposeFor:self
] ifFalse:[
- "/
- "/ a pure event driven view.
- "/ wait by doing a direct dispatch loop until the event arrives.
- "/ i.e. poll for the event
- "/
- graphicsDevice platformName = 'WIN32' ifTrue:[
- pollDelay := 1.
- ] ifFalse:[
- pollDelay := 3.
- ].
- endPollTime := Timestamp now addSeconds:pollDelay.
-
- [self gotExpose] whileFalse:[
- realized ifTrue:[
- (graphicsDevice exposeEventPendingFor:self drawableId withSync:true) ifTrue:[
- graphicsDevice dispatchExposeEventFor:self drawableId.
- ].
- ].
- realized ifFalse:[
- self setGotExposeFlag.
- ^ self
- ].
-
- "/ break out of the poll after a while
-
- Timestamp now > endPollTime ifTrue:[
- 'DisplaySurface [warning]: lost expose event' errorPrintCR.
- self setGotExposeFlag.
- ^ self
- ].
- Processor yield.
- ].
+ "/
+ "/ a pure event driven view.
+ "/ wait by doing a direct dispatch loop until the event arrives.
+ "/ i.e. poll for the event
+ "/
+ graphicsDevice isWindowsPlatform ifTrue:[
+ pollDelay := 1.
+ ] ifFalse:[
+ pollDelay := 3.
+ ].
+ endPollTime := Timestamp now addSeconds:pollDelay.
+
+ [self gotExpose] whileFalse:[
+ realized ifTrue:[
+ (graphicsDevice exposeEventPendingFor:self drawableId withSync:true) ifTrue:[
+ graphicsDevice dispatchExposeEventFor:self drawableId.
+ ].
+ ].
+ realized ifFalse:[
+ self setGotExposeFlag.
+ ^ self
+ ].
+
+ "/ break out of the poll after a while
+
+ Timestamp now > endPollTime ifTrue:[
+ 'DisplaySurface [warning]: lost expose event' errorPrintCR.
+ self setGotExposeFlag.
+ ^ self
+ ].
+ Processor yield.
+ ].
]
"Modified: / 9.1.1999 / 01:58:09 / cg"
@@ -2531,11 +2491,5 @@
"Modified: 18.5.1996 / 15:44:33 / cg"
! !
-!DisplaySurface class methodsFor:'documentation'!
-
-version_CVS
- ^ '$Header: /cvs/stx/stx/libview/DisplaySurface.st,v 1.164 2014-12-02 17:22:17 cg Exp $'
-! !
-
DisplaySurface initialize!