--- a/StandardSystemView.st Wed May 10 04:26:41 1995 +0200
+++ b/StandardSystemView.st Fri May 12 20:01:16 1995 +0200
@@ -13,7 +13,7 @@
TopView subclass:#StandardSystemView
instanceVariableNames:'label icon iconView iconLabel
minExtent maxExtent sizeFixed
- application'
+ application windowEventsForApplication'
classVariableNames: 'DefaultIcon TakeFocusWhenMapped'
poolDictionaries:''
category:'Views-Basic'
@@ -23,7 +23,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.25 1995-05-10 02:26:00 claus Exp $
+$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.26 1995-05-12 18:01:16 claus Exp $
'!
!StandardSystemView class methodsFor:'documentation'!
@@ -44,7 +44,7 @@
version
"
-$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.25 1995-05-10 02:26:00 claus Exp $
+$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.26 1995-05-12 18:01:16 claus Exp $
"
!
@@ -332,6 +332,8 @@
!
realize
+ "realize the view i.e. make it visible."
+
super realize.
windowGroup notNil ifTrue:[
"/
@@ -349,32 +351,6 @@
]
!
-focusSequence
- "return a sequence which defines the order in which the focus
- is passed for FocusNext and FocusPrevious keys.
- All views which like to support these keys should redefine
- this method and return a collection of (sub-) views.
- Or, if the model is some applicationModel, it may itself define
- the focusSequence.
- Notice: I dont think this is good style: the focusSequence seems
- to belong into the controller, ..."
-
- "/
- "/ if I have an application, its supposed to
- "/ know about the focusSequence
- "/
- application notNil ifTrue:[
- ^ application focusSequence
- ].
-
- (model notNil
- and:[(model respondsTo:#focusSequence)
- and:[model ~~ self]]) ifTrue:[
- ^ model focusSequence
- ].
- ^ nil
-!
-
restarted
"sent by my windowGroup, when restarted from an image.
Nothing done here, but can be redefined to perform any actions
@@ -390,6 +366,10 @@
!StandardSystemView methodsFor:'destroying'!
terminate
+ "terminate request from the windowManager. If there is an application,
+ let it decide if it really wants to be close. Otherwise, forward it to
+ superclasses terminate which knows how to do this."
+
application notNil ifTrue:[
application closeRequest
] ifFalse:[
@@ -398,6 +378,12 @@
!
saveAndTerminate
+ "save & terminate request from the windowManager. The application should
+ save its data/files/text etc. somehow and close.
+ If there is an application, let it decide how do do that.
+ Otherwise, forward it to superclasses which knows how to do this.
+ (it defaults to a terminate there)"
+
application notNil ifTrue:[
application saveAndTerminateRequest
] ifFalse:[
@@ -406,6 +392,8 @@
!
destroy
+ "destroy the view."
+
self removeFromCurrentProject
windowGroup notNil ifTrue:[
windowGroup focusSequence:nil.
@@ -550,6 +538,32 @@
].
label notNil ifTrue:[^ label].
^ super processName
+!
+
+focusSequence
+ "return a sequence which defines the order in which the focus
+ is passed for FocusNext and FocusPrevious keys.
+ All views which like to support these keys should redefine
+ this method and return a collection of (sub-) views.
+ Or, if the model is some applicationModel, it may itself define
+ the focusSequence.
+ Notice: I dont think this is good style: the focusSequence seems
+ to belong into the controller, ..."
+
+ "/
+ "/ if I have an application, its supposed to
+ "/ know about the focusSequence
+ "/
+ application notNil ifTrue:[
+ ^ application focusSequence
+ ].
+
+ (model notNil
+ and:[(model respondsTo:#focusSequence)
+ and:[model ~~ self]]) ifTrue:[
+ ^ model focusSequence
+ ].
+ ^ nil
! !
!StandardSystemView methodsFor:'accessing'!
@@ -738,6 +752,13 @@
!StandardSystemView methodsFor:'event handling'!
+sendWindowEvents:collectionOfEventSymbols
+ "define the events that are to be forwarded to the application.
+ This is being implemented ..."
+
+ windowEventsForApplication := collectionOfEventSymbols
+!
+
focusOut
"the view lost keyboard focus"