--- a/SimpleView.st Thu Dec 14 18:27:19 1995 +0100
+++ b/SimpleView.st Thu Dec 14 18:39:48 1995 +0100
@@ -12,16 +12,16 @@
PseudoView subclass:#SimpleView
instanceVariableNames:'superView subViews components styleSheet resources borderColor
- borderWidth borderShape viewShape top left extentChanged
- originChanged cornerChanged relativeOrigin relativeExtent
- relativeCorner originRule extentRule cornerRule insets viewport
- layout shown hiddenOnRealize name level margin innerClipRect
- shadowColor lightColor bitGravity viewGravity controller
- windowGroup'
+ borderWidth borderShape viewShape top left extentChanged
+ originChanged cornerChanged relativeOrigin relativeExtent
+ relativeCorner originRule extentRule cornerRule insets viewport
+ layout shown hiddenOnRealize name level margin innerClipRect
+ shadowColor lightColor bitGravity viewGravity controller
+ windowGroup'
classVariableNames:'Grey CentPoint ViewSpacing DefaultStyle StyleSheet
- DefaultViewBackgroundColor DefaultBorderColor DefaultLightColor
- DefaultShadowColor DefaultBorderWidth DefaultFont
- DefaultFocusColor DefaultFocusBorderWidth'
+ DefaultViewBackgroundColor DefaultBorderColor DefaultLightColor
+ DefaultShadowColor DefaultBorderWidth DefaultFont
+ DefaultFocusColor DefaultFocusBorderWidth'
poolDictionaries:''
category:'Views-Basic'
!
@@ -4485,6 +4485,10 @@
].
super destroy.
+ superView isNil ifTrue:[
+ device flush
+ ].
+
controller notNil ifTrue:[
controller release.
controller := nil.
@@ -5475,47 +5479,47 @@
|tops|
Processor activeProcessIsSystemProcess ifTrue:[
- "
- put myself into the modal group, let it handle events for
- me as well. This is only a half way solution, since the view
- is not modal at all ... however, the only situation
- where this happens is with modal boxes popped while in a
- modal browser. You will forgive me for that inconvenience.
- "
- windowGroup := mainGroup.
- mainGroup notNil ifTrue:[mainGroup addTopView:self].
- self realize
+ "
+ put myself into the modal group, let it handle events for
+ me as well. This is only a half way solution, since the view
+ is not modal at all ... however, the only situation
+ where this happens is with modal boxes popped while in a
+ modal browser. You will forgive me for that inconvenience.
+ "
+ windowGroup := mainGroup.
+ mainGroup notNil ifTrue:[mainGroup addTopView:self].
+ self realize
] ifFalse:[
- "
- create a new window group and put myself into it
- "
- windowGroup := WindowGroup new.
- windowGroup addTopView:self.
- "
- go dispatch events in this new group
- (thus current windowgroup is blocked from interaction)
- "
- Object abortSignal handle:[:ex |
- self hide.
- ex return.
- ] do:[
- [
- windowGroup startupModal:[realized and:aBlock] forGroup:mainGroup
- ] valueOnUnwindDo:[
- self hide.
- ]
- ].
- "
- return input focus to previously active groups top.
- This helps with windowmanagers which need an explicit click
- on the view for the focus.
- "
- mainGroup notNil ifTrue:[
- tops := mainGroup topViews.
- (tops notNil and:[tops notEmpty]) ifTrue:[
- tops first getKeyboardFocus
- ]
- ]
+ "
+ create a new window group and put myself into it
+ "
+ windowGroup := WindowGroup new.
+ windowGroup addTopView:self.
+ "
+ go dispatch events in this new group
+ (thus current windowgroup is blocked from interaction)
+ "
+ Object abortSignal handle:[:ex |
+ self hide.
+ ex return.
+ ] do:[
+ [
+ windowGroup startupModal:[realized and:aBlock] forGroup:mainGroup
+ ] valueOnUnwindDo:[
+ self hide.
+ ]
+ ].
+ "
+ return input focus to previously active groups top.
+ This helps with windowmanagers which need an explicit click
+ on the view for the focus.
+ "
+ mainGroup notNil ifTrue:[
+ tops := mainGroup topViews.
+ (tops notNil and:[tops notEmpty]) ifTrue:[
+ tops first getKeyboardFocus
+ ]
+ ]
]
"Created: 10.12.1995 / 14:06:14 / cg"
@@ -5688,6 +5692,6 @@
!SimpleView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.33 1995-12-10 15:19:59 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.34 1995-12-14 17:39:48 cg Exp $'
! !
SimpleView initialize!