--- a/WindowSensor.st Thu Oct 28 13:45:56 1999 +0200
+++ b/WindowSensor.st Thu Oct 28 16:49:46 1999 +0200
@@ -447,6 +447,69 @@
EventListener := aListener
! !
+!WindowSensor class methodsFor:'event processing'!
+
+postViewCreateNotification:aView
+ "invoked right before a new view is created.
+ Notify listeners and allow for the origin/extent to be
+ changed. (For example, recorder/playback applications may
+ want to make certain that the playback view is at the same
+ position - or record any origin changes to translate later
+ synthetic events)."
+
+ |ret ev|
+
+ "/ backward compatibility ... will vanish
+ EventListener notNil ifTrue:[
+ EventListener postCreateView:aView.
+ ].
+
+ "/ new protocol
+ EventListeners size > 0 ifTrue:[
+ ev := WindowEvent
+ for:aView
+ type:#postCreateView
+ arguments:nil.
+ EventListeners do:[:aListener |
+ aListener processEvent:ev
+ ]
+ ].
+!
+
+preViewCreateNotification:aView
+ "invoked right before a new view is created.
+ Notify listeners and allow for the origin/extent to be
+ changed. (For example, recorder/playback applications may
+ want to make certain that the playback view is at the same
+ position - or record any origin changes to translate later
+ synthetic events)."
+
+ |ret ev|
+
+ "/ backward compatibility ... will vanish
+ EventListener notNil ifTrue:[
+ ret := EventListener preCreateView:aView origin:aView origin.
+ ret isPoint ifTrue:[
+ aView setOrigin:ret
+ ]
+ ].
+
+ "/ new protocol
+ EventListeners size > 0 ifTrue:[
+ ev := WindowEvent
+ for:aView
+ type:#preCreateView
+ arguments:nil.
+ EventListeners do:[:aListener |
+ aListener processEvent:ev
+ ]
+ ].
+
+
+
+
+! !
+
!WindowSensor class methodsFor:'queries'!
cursorPoint
@@ -2856,6 +2919,6 @@
!WindowSensor class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/WindowSensor.st,v 1.166 1999-10-28 10:23:32 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/WindowSensor.st,v 1.167 1999-10-28 14:49:46 cg Exp $'
! !
WindowSensor initialize!