ApplicationModel.st
author Claus Gittinger <cg@exept.de>
Tue, 14 Jan 1997 18:02:37 +0100
changeset 365 47e0d48fd769
parent 362 52212e2a8c84
child 371 ce94ec6a38ee
permissions -rw-r--r--
commentary
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
50
53bc56e07e8f Initial revision
claus
parents:
diff changeset
     1
"
53bc56e07e8f Initial revision
claus
parents:
diff changeset
     2
 COPYRIGHT (c) 1995 by Claus Gittinger
53bc56e07e8f Initial revision
claus
parents:
diff changeset
     3
	      All Rights Reserved
53bc56e07e8f Initial revision
claus
parents:
diff changeset
     4
53bc56e07e8f Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
53bc56e07e8f Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
53bc56e07e8f Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
53bc56e07e8f Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
53bc56e07e8f Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    11
"
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    12
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    13
Model subclass:#ApplicationModel
310
3c3dbc074dbd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
    14
	instanceVariableNames:'builder resources device'
142
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
    15
	classVariableNames:''
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
    16
	poolDictionaries:''
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
    17
	category:'Interface-Framework'
50
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    18
!
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    19
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    20
ApplicationModel class instanceVariableNames:'ClassResources'
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    21
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    22
"
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    23
 The following class instance variables are inherited by this class:
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    24
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    25
	Model - 
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    26
	Object - 
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    27
"
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    28
!
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
    29
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
    30
!ApplicationModel class methodsFor:'documentation'!
50
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    31
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    32
copyright
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    33
"
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    34
 COPYRIGHT (c) 1995 by Claus Gittinger
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    35
	      All Rights Reserved
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    36
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    37
 This software is furnished under a license and may be used
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    38
 only in accordance with the terms of that license and with the
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    39
 inclusion of the above copyright notice.   This software may not
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    40
 be provided or otherwise made available to, or used by, any
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    41
 other person.  No title to or ownership of the software is
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    42
 hereby transferred.
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    43
"
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    44
!
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    45
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    46
documentation
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    47
"
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    48
    Since many ST-80 classes are subclasses of ApplicationModel, this class
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    49
    is provided here to allow easier porting of ST-80 code.
57
3984019e8f5f *** empty log message ***
claus
parents: 52
diff changeset
    50
63
claus
parents: 61
diff changeset
    51
    It does not (currently) provide much functionality and is NOT
claus
parents: 61
diff changeset
    52
    compatible to the corresponding ST80 class; therefore, manual
50
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    53
    changes have to be made to get those applications to run under ST/X.
57
3984019e8f5f *** empty log message ***
claus
parents: 52
diff changeset
    54
    (but at least, this enables you to fileIn that code and have a superclass
78
claus
parents: 72
diff changeset
    55
     for them)
claus
parents: 72
diff changeset
    56
claus
parents: 72
diff changeset
    57
    As time goes by, ST/X applications are going to be converted to
330
d7ce98930ad3 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 313
diff changeset
    58
    become subclasses of this abstract class - see Launcher for a
78
claus
parents: 72
diff changeset
    59
    first concrete example.
claus
parents: 72
diff changeset
    60
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    61
78
claus
parents: 72
diff changeset
    62
    ApplicationModel is prepared to build a view from a windowSpec, as
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    63
    created by the windowBuilder. If your subclass does not provide such
78
claus
parents: 72
diff changeset
    64
    a spec, you should at least redefine:
claus
parents: 72
diff changeset
    65
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    66
        #openInterface   - to create a topview and open it
78
claus
parents: 72
diff changeset
    67
claus
parents: 72
diff changeset
    68
    you may want to redefine:
claus
parents: 72
diff changeset
    69
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    70
        #closeRequest    - to catch window closing
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    71
        #focusSequence   - to define a sequence for focus-stepping
78
claus
parents: 72
diff changeset
    72
50
53bc56e07e8f Initial revision
claus
parents:
diff changeset
    73
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    74
    Once the interfaceBuilder is finished & released, subclasses can
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    75
    alternatively provide the spec via a #windowSpec method.
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    76
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
    77
    The classResources have been put into this class to allow ST/X
57
3984019e8f5f *** empty log message ***
claus
parents: 52
diff changeset
    78
    applications (which used to be subclasses of StandardSystemView)
3984019e8f5f *** empty log message ***
claus
parents: 52
diff changeset
    79
    to migrate smoothly into ApplicationModels (which is better design ...).
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
    80
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
    81
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    82
    [Instance variables:]
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    83
        resources    ResourcePack       language string translation
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    84
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    85
        builder      WindowBuilder      a builder who knows how to create
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    86
                                        a window hierarchy from a specification
78
claus
parents: 72
diff changeset
    87
claus
parents: 72
diff changeset
    88
claus
parents: 72
diff changeset
    89
    Notice: this class was implemented using protocol information
claus
parents: 72
diff changeset
    90
    from alpha testers and PD code - it may not be complete or compatible to
claus
parents: 72
diff changeset
    91
    the corresponding ST-80 class. If you encounter any incompatibilities,
claus
parents: 72
diff changeset
    92
    please forward a note to the ST/X team.
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    93
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    94
221
ea942fe5dc04 documentation
Claus Gittinger <cg@exept.de>
parents: 215
diff changeset
    95
    [author:]
ea942fe5dc04 documentation
Claus Gittinger <cg@exept.de>
parents: 215
diff changeset
    96
        Claus Gittinger
ea942fe5dc04 documentation
Claus Gittinger <cg@exept.de>
parents: 215
diff changeset
    97
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    98
    [see also:]
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
    99
        StandardSystemView
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   100
        WindowGroup DeviceWorkstation
50
53bc56e07e8f Initial revision
claus
parents:
diff changeset
   101
"
53bc56e07e8f Initial revision
claus
parents:
diff changeset
   102
! !
53bc56e07e8f Initial revision
claus
parents:
diff changeset
   103
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   104
!ApplicationModel class methodsFor:'initialization'!
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   105
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   106
initialize 
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   107
    self == ApplicationModel ifTrue:[
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   108
	Smalltalk addDependent:self
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   109
    ]
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   110
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   111
    "
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   112
     ApplicationModel initialize
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   113
    "
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   114
! !
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   115
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   116
!ApplicationModel class methodsFor:'instance creation'!
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   117
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   118
new
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   119
    "return a new initialized instance"
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   120
63
claus
parents: 61
diff changeset
   121
    ^ super new basicInitialize initialize
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   122
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   123
    "Modified: 24.4.1996 / 09:42:14 / cg"
311
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   124
!
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   125
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   126
onDevice:aDevice
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   127
    "return a new initialized instance, which shall open its interface
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   128
     on aDevice."
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   129
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   130
    ^ (super new basicInitialize
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   131
        setDevice:aDevice) initialize
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   132
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   133
    "Modified: 24.4.1996 / 09:42:14 / cg"
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   134
    "Created: 5.7.1996 / 12:19:15 / cg"
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   135
! !
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   136
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   137
!ApplicationModel class methodsFor:'change & update'!
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   138
302
edd5c8754ac8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
   139
update:something with:aParameter from:changedObject
69
claus
parents: 63
diff changeset
   140
    "flush resources on language changes"
claus
parents: 63
diff changeset
   141
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   142
    something == #Language ifTrue:[
302
edd5c8754ac8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
   143
        "flush resources on language changes"
edd5c8754ac8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
   144
        self flushAllClassResources
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   145
    ]
302
edd5c8754ac8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
   146
edd5c8754ac8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 287
diff changeset
   147
    "Created: 15.6.1996 / 15:13:29 / cg"
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   148
! !
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   149
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   150
!ApplicationModel class methodsFor:'queries'!
63
claus
parents: 61
diff changeset
   151
claus
parents: 61
diff changeset
   152
interfaceSpecFor:aSelector
69
claus
parents: 63
diff changeset
   153
    "return an interface spec"
claus
parents: 63
diff changeset
   154
63
claus
parents: 61
diff changeset
   155
    ^ self perform:aSelector
claus
parents: 61
diff changeset
   156
! !
claus
parents: 61
diff changeset
   157
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   158
!ApplicationModel class methodsFor:'resources'!
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   159
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   160
classResources
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   161
    "if not already loaded, get the classes resourcePack
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   162
     and return it"
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   163
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   164
    ClassResources isNil ifTrue:[
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   165
	ClassResources := ResourcePack for:self.
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   166
    ].
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   167
    ^ ClassResources
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   168
!
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   169
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   170
classResources:aResourcePack
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   171
    "allow setting of the classResources"
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   172
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   173
    ClassResources := aResourcePack
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   174
!
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   175
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   176
flushAllClassResources
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   177
    "flush all classes resource translations.
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   178
     Needed after a resource file / language setting has changed."
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   179
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   180
    ResourcePack flushCachedResourcePacks.
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   181
    self flushClassResources.
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   182
    self allSubclassesDo:[:aClass |
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   183
	aClass flushClassResources.
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   184
    ]
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   185
!
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   186
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   187
flushClassResources
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   188
    "flush classes resource string translations.
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   189
     Needed whenever a resource file / language setting has changed"
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   190
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   191
    ClassResources := nil.
63
claus
parents: 61
diff changeset
   192
!
claus
parents: 61
diff changeset
   193
claus
parents: 61
diff changeset
   194
updateClassResources
claus
parents: 61
diff changeset
   195
    "update my classResources"
claus
parents: 61
diff changeset
   196
claus
parents: 61
diff changeset
   197
    ClassResources := nil.
claus
parents: 61
diff changeset
   198
    self classResources
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   199
! !
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   200
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   201
!ApplicationModel class methodsFor:'startup'!
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   202
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   203
open
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   204
    "create an instance of the application and open its view"
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   205
240
09028fa9ff5f return app in class>>open
Claus Gittinger <cg@exept.de>
parents: 221
diff changeset
   206
    ^ self new open
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   207
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   208
    "
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   209
     Launcher open
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   210
    "
240
09028fa9ff5f return app in class>>open
Claus Gittinger <cg@exept.de>
parents: 221
diff changeset
   211
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   212
    "Modified: 13.1.1997 / 20:54:50 / cg"
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   213
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   214
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   215
openInterface:anInterfaceSymbol
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   216
    "create an instance of the application and open a view as
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   217
     specified by anInterfaceSymbol."
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   218
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   219
    ^ self new openInterface:anInterfaceSymbol
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   220
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   221
    "Modified: 5.9.1995 / 17:54:50 / claus"
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   222
    "Modified: 13.1.1997 / 20:55:02 / cg"
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   223
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   224
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   225
openOn:anApplicationModel
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   226
    "send an open message to the argument, anApplicationModel.
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   227
     I dont really understand what this method is useful for ..."
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   228
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   229
    ^ anApplicationModel open
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   230
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   231
    "Modified: 13.1.1997 / 20:55:05 / cg"
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   232
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   233
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   234
openOnDevice:aDevice
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   235
    "create an instance of the application and open its view
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   236
     on ANOTHER device. 
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   237
     For more info, read the document on multiple display
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   238
     support and the documentation of the DeviceWorkstation class."
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   239
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   240
    ^ (self onDevice:aDevice) open
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   241
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   242
    "
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   243
     Launcher openOnDevice:Display
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   244
    "
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   245
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   246
    "Modified: 13.1.1997 / 20:55:27 / cg"
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   247
! !
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   248
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   249
!ApplicationModel methodsFor:'accessing'!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   250
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   251
builder
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   252
    "return the applications builder; this one has more information
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   253
     about views, components etc."
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   254
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   255
    ^ builder
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   256
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   257
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   258
builder:aBuilder
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   259
    "set the applications builder. Normally, you should not set it
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   260
     directly, but depend on the default builder, as created when the application
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   261
     was created."
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   262
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   263
    builder := aBuilder
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   264
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   265
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   266
focusSequence
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   267
    "return a focusSequence for stepping through the applications views.
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   268
     The builder usually keeps track of so-called 'tabable' views.
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   269
     Stepping is done with the FocusNext/FocusPrevius keys, which are 
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   270
     typically bound to Meta-CursorUp/Meta-CursorDown.
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   271
     Subclasses which do not use the builder (but instead build their view
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   272
     programmatically) should redefine this method to return a collection of
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   273
     views which defines the sequence."
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   274
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   275
    builder notNil ifTrue:[
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   276
	^ builder focusSequence
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   277
    ].
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   278
    ^ nil
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   279
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   280
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   281
resources
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   282
    "return the applications resources - thats a ResourcePack containing
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   283
     language strings"
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   284
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   285
    ^ resources
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   286
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   287
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   288
window
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   289
    "return my topWindow"
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   290
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   291
    ^ builder window
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   292
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   293
187
9e35ae67f07c added #window:
Claus Gittinger <cg@exept.de>
parents: 144
diff changeset
   294
window:aTopView
9e35ae67f07c added #window:
Claus Gittinger <cg@exept.de>
parents: 144
diff changeset
   295
    "set my topWindow"
9e35ae67f07c added #window:
Claus Gittinger <cg@exept.de>
parents: 144
diff changeset
   296
9e35ae67f07c added #window:
Claus Gittinger <cg@exept.de>
parents: 144
diff changeset
   297
    builder window:aTopView
9e35ae67f07c added #window:
Claus Gittinger <cg@exept.de>
parents: 144
diff changeset
   298
9e35ae67f07c added #window:
Claus Gittinger <cg@exept.de>
parents: 144
diff changeset
   299
    "Created: 18.4.1996 / 14:55:26 / cg"
9e35ae67f07c added #window:
Claus Gittinger <cg@exept.de>
parents: 144
diff changeset
   300
!
9e35ae67f07c added #window:
Claus Gittinger <cg@exept.de>
parents: 144
diff changeset
   301
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   302
windowGroup 
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   303
    "return the applications windowGroup"
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   304
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   305
    ^ builder window windowGroup
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   306
! !
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   307
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   308
!ApplicationModel methodsFor:'initialization'!
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   309
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   310
addTopViewsToCurrentProject
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   311
    "add all of my topViews to the current projects list of views.
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   312
     This allows hiding views on a per-project basis."
85
claus
parents: 83
diff changeset
   313
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   314
    self windowGroup topViews do:[:aView |
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   315
	aView addToCurrentProject
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   316
    ]
85
claus
parents: 83
diff changeset
   317
!
claus
parents: 83
diff changeset
   318
63
claus
parents: 61
diff changeset
   319
basicInitialize
69
claus
parents: 63
diff changeset
   320
    "initialize the application.
claus
parents: 63
diff changeset
   321
     Since ST-80 applications seem commonly to redefine initialize
claus
parents: 63
diff changeset
   322
     without doing a super initialize, the real initialization is
claus
parents: 63
diff changeset
   323
     done here ..."
claus
parents: 63
diff changeset
   324
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   325
    super initialize.
72
claus
parents: 71
diff changeset
   326
311
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   327
    device := Screen current.
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   328
72
claus
parents: 71
diff changeset
   329
    "claus: I wanted to delay the creation & assignment of the
claus
parents: 71
diff changeset
   330
     builder till later, to allow setting to another builder.
claus
parents: 71
diff changeset
   331
     however, some ST-80 code accesses the builder right after instance
claus
parents: 71
diff changeset
   332
     creation ..."
claus
parents: 71
diff changeset
   333
claus
parents: 71
diff changeset
   334
"/    "
claus
parents: 71
diff changeset
   335
"/     Create a windowBuilder to have someone around which
claus
parents: 71
diff changeset
   336
"/     understands the builder protocol. Since UIBuilder is not present
claus
parents: 71
diff changeset
   337
"/     in all systems, this allows operation without one (unless a spec
claus
parents: 71
diff changeset
   338
"/     is read later ...)
claus
parents: 71
diff changeset
   339
"/    "
85
claus
parents: 83
diff changeset
   340
    builder := self createBuilder.
78
claus
parents: 72
diff changeset
   341
    builder notNil ifTrue:[builder application:self].
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   342
    resources := self class classResources.
311
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   343
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   344
    "Modified: 5.7.1996 / 12:02:37 / cg"
63
claus
parents: 61
diff changeset
   345
!
claus
parents: 61
diff changeset
   346
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   347
createBuilder 
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   348
    "create a UI Builder for me.
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   349
     This method can be redefined if (eventually) there are
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   350
     spec readers for other UI languages (motif UIL ?)"
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   351
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   352
    |cls|
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   353
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   354
    (cls := UIBuilder) isNil ifTrue:[
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   355
	(cls := WindowBuilder) isNil ifTrue:[
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   356
	    ^ nil
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   357
	]
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   358
    ].
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   359
    ^ cls new
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   360
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   361
63
claus
parents: 61
diff changeset
   362
initialize
83
claus
parents: 81
diff changeset
   363
    "nothing done here;
claus
parents: 81
diff changeset
   364
     but can be redefined in concrete applications"
311
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   365
!
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   366
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   367
setDevice:aDevice
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   368
    "set the device (i.e. some Screen), where the application
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   369
     shall open its view(s).
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   370
     The default device is the current screen."
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   371
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   372
    device := aDevice
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   373
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   374
    "Created: 5.7.1996 / 12:01:40 / cg"
fa222d8a208c allow opening an app on another device
Claus Gittinger <cg@exept.de>
parents: 310
diff changeset
   375
    "Modified: 5.7.1996 / 12:01:53 / cg"
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   376
! !
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   377
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   378
!ApplicationModel methodsFor:'misc'!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   379
287
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   380
restoreCursors
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   381
    "restore the original cursors in all of my views"
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   382
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   383
    ^ self window windowGroup restoreCursors
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   384
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   385
    "Created: 1.6.1996 / 17:01:24 / cg"
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   386
!
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   387
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   388
showCursor:aCursor
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   389
    "set all of my views cursor to aCursor.
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   390
     It can be restored with #restoreCursor."
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   391
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   392
    ^ self window windowGroup showCursor:aCursor
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   393
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   394
    "Created: 1.6.1996 / 17:01:09 / cg"
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   395
!
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   396
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   397
withCursor:aCursor do:aBlock
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   398
    "evaluate aBlock, showing aCursor in my topView and all of its subviews.
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   399
     Return the value of aBlock."
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   400
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   401
    ^ self window withCursor:aCursor do:aBlock
63
claus
parents: 61
diff changeset
   402
!
claus
parents: 61
diff changeset
   403
142
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
   404
withExecuteCursorDo:aBlock
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
   405
    "evaluate aBlock, showing an executeCursor in my topView and all of its subviews.
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
   406
     Return the value of aBlock."
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
   407
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
   408
    ^ self withCursor:(Cursor execute) do:aBlock
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
   409
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
   410
    "Created: 14.12.1995 / 20:57:03 / cg"
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
   411
!
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
   412
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
   413
withReadCursorDo:aBlock
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
   414
    "evaluate aBlock, showing a readCursor in my topView and all of its subviews.
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
   415
     Return the value of aBlock."
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
   416
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
   417
    ^ self withCursor:(Cursor read) do:aBlock
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
   418
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
   419
    "Created: 14.12.1995 / 20:56:47 / cg"
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
   420
    "Modified: 14.12.1995 / 20:57:36 / cg"
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
   421
!
6c6259d788a4 added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
   422
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   423
withWaitCursorDo:aBlock
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   424
    "evaluate aBlock, showing a waitCursor in my topView and all of its subviews.
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   425
     Return the value of aBlock."
63
claus
parents: 61
diff changeset
   426
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   427
    ^ self withCursor:Cursor wait do:aBlock
52
6dc870beba69 *** empty log message ***
claus
parents: 50
diff changeset
   428
! !
57
3984019e8f5f *** empty log message ***
claus
parents: 52
diff changeset
   429
71
claus
parents: 69
diff changeset
   430
!ApplicationModel methodsFor:'queries'!
claus
parents: 69
diff changeset
   431
313
09c2e83252f4 added access to graphicsDevice
Claus Gittinger <cg@exept.de>
parents: 311
diff changeset
   432
graphicsDevice
09c2e83252f4 added access to graphicsDevice
Claus Gittinger <cg@exept.de>
parents: 311
diff changeset
   433
    "return the device I want to open my views on.
09c2e83252f4 added access to graphicsDevice
Claus Gittinger <cg@exept.de>
parents: 311
diff changeset
   434
     The default (if not created with #onDevice:) is the currently
09c2e83252f4 added access to graphicsDevice
Claus Gittinger <cg@exept.de>
parents: 311
diff changeset
   435
     active screen."
09c2e83252f4 added access to graphicsDevice
Claus Gittinger <cg@exept.de>
parents: 311
diff changeset
   436
09c2e83252f4 added access to graphicsDevice
Claus Gittinger <cg@exept.de>
parents: 311
diff changeset
   437
    ^ device
09c2e83252f4 added access to graphicsDevice
Claus Gittinger <cg@exept.de>
parents: 311
diff changeset
   438
09c2e83252f4 added access to graphicsDevice
Claus Gittinger <cg@exept.de>
parents: 311
diff changeset
   439
    "Created: 5.7.1996 / 17:51:31 / cg"
09c2e83252f4 added access to graphicsDevice
Claus Gittinger <cg@exept.de>
parents: 311
diff changeset
   440
!
09c2e83252f4 added access to graphicsDevice
Claus Gittinger <cg@exept.de>
parents: 311
diff changeset
   441
71
claus
parents: 69
diff changeset
   442
processName
claus
parents: 69
diff changeset
   443
    "return a name to be shown for me in the process monitor"
claus
parents: 69
diff changeset
   444
claus
parents: 69
diff changeset
   445
    ^ 'Application'
claus
parents: 69
diff changeset
   446
! !
claus
parents: 69
diff changeset
   447
57
3984019e8f5f *** empty log message ***
claus
parents: 52
diff changeset
   448
!ApplicationModel methodsFor:'startup'!
3984019e8f5f *** empty log message ***
claus
parents: 52
diff changeset
   449
63
claus
parents: 61
diff changeset
   450
allButOpenFrom:aSpec
69
claus
parents: 63
diff changeset
   451
    "create my views but do not open the main window"
claus
parents: 63
diff changeset
   452
71
claus
parents: 69
diff changeset
   453
    |realBuilder|
claus
parents: 69
diff changeset
   454
72
claus
parents: 71
diff changeset
   455
"/ DISABLED; see comment in basicInitialize
claus
parents: 71
diff changeset
   456
"/
claus
parents: 71
diff changeset
   457
"/    "
claus
parents: 71
diff changeset
   458
"/     here, we kludge a bit: up to now, the builder was an
claus
parents: 71
diff changeset
   459
"/     instance of the no-op WindowBuilder. Now, it becomes
claus
parents: 71
diff changeset
   460
"/     a UIBuilder ....
claus
parents: 71
diff changeset
   461
"/     This allows for ApplicationModels without a UIBuilder
claus
parents: 71
diff changeset
   462
"/     if not needed.
claus
parents: 71
diff changeset
   463
"/    "
claus
parents: 71
diff changeset
   464
"/    realBuilder := UIBuilder new.
claus
parents: 71
diff changeset
   465
"/    builder := realBuilder.
claus
parents: 71
diff changeset
   466
"/    builder application:self.
claus
parents: 71
diff changeset
   467
"/    builder bindings:builder bindings.
71
claus
parents: 69
diff changeset
   468
63
claus
parents: 61
diff changeset
   469
    self preBuildWith:builder.
claus
parents: 61
diff changeset
   470
    builder buildFromSpec:aSpec.
85
claus
parents: 83
diff changeset
   471
    builder window model:self.
claus
parents: 83
diff changeset
   472
    builder window application:self.
63
claus
parents: 61
diff changeset
   473
    self postBuildWith:builder.
claus
parents: 61
diff changeset
   474
!
57
3984019e8f5f *** empty log message ***
claus
parents: 52
diff changeset
   475
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   476
allButOpenInterface:aSymbol
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   477
    "create my views but do not open the main window"
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   478
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   479
    |spec|
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   480
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   481
    spec := self class interfaceSpecFor:aSymbol.
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   482
    self allButOpenFrom:spec.
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   483
    ^ builder
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   484
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   485
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   486
close
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   487
    "this is sent by my topView when about to be closed
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   488
     by the program (not by the windowManager).
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   489
     Could be redefined in subclasses."
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   490
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   491
    self closeDownViews
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   492
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   493
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   494
closeDownViews
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   495
    "close down the applications view"
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   496
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   497
    |wg views|
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   498
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   499
    (wg := self windowGroup) notNil ifTrue:[
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   500
	views := wg topViews.
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   501
	views notNil ifTrue:[
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   502
	    views copy do:[:aView |
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   503
		aView notNil ifTrue:[aView destroy]
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   504
	    ]
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   505
	]
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   506
    ]
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   507
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   508
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   509
closeRequest
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   510
    "this is sent by my topView when about to be closed by the
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   511
     windowmanager. Can be redefined to inform & query about unsafed
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   512
     view contents, to send #close on ok, or ignore the closeRequest."
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   513
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   514
    self closeDownViews
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   515
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   516
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   517
menuFor:aSymbol
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   518
    "create a new menuBuilder, to read specs and
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   519
     create a menu from it. Return this menu"
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   520
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   521
    |spec mbuilder|
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   522
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   523
    spec := self class interfaceSpecFor:aSymbol.
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   524
    mbuilder := UIBuilder new.
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   525
    mbuilder buildFromSpec:spec.
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   526
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   527
    builder componentAt:#windowMenuHolder put:(mbuilder window asValue).
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   528
    ^ mbuilder window
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   529
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   530
69
claus
parents: 63
diff changeset
   531
open
claus
parents: 63
diff changeset
   532
    "open a standard interface"
claus
parents: 63
diff changeset
   533
240
09028fa9ff5f return app in class>>open
Claus Gittinger <cg@exept.de>
parents: 221
diff changeset
   534
    ^ self openInterface
09028fa9ff5f return app in class>>open
Claus Gittinger <cg@exept.de>
parents: 221
diff changeset
   535
09028fa9ff5f return app in class>>open
Claus Gittinger <cg@exept.de>
parents: 221
diff changeset
   536
    "Modified: 3.5.1996 / 13:39:15 / cg"
69
claus
parents: 63
diff changeset
   537
!
claus
parents: 63
diff changeset
   538
63
claus
parents: 61
diff changeset
   539
openInterface
78
claus
parents: 72
diff changeset
   540
    "open a standard interface on another device.
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   541
78
claus
parents: 72
diff changeset
   542
     Subclasses which do not have an interfaceSpec 
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   543
     should redefine this method and create & open their view(s) there.
330
d7ce98930ad3 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 313
diff changeset
   544
     (see Launcher as an example)."
69
claus
parents: 63
diff changeset
   545
63
claus
parents: 61
diff changeset
   546
    self openInterface:#windowSpec
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   547
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   548
    "Modified: 24.4.1996 / 09:35:43 / cg"
330
d7ce98930ad3 Rename Launcher-->OldLauncher, NewLauncher-->Launcher.
Stefan Vogel <sv@exept.de>
parents: 313
diff changeset
   549
    "Modified: 9.9.1996 / 22:39:23 / stefan"
57
3984019e8f5f *** empty log message ***
claus
parents: 52
diff changeset
   550
!
3984019e8f5f *** empty log message ***
claus
parents: 52
diff changeset
   551
63
claus
parents: 61
diff changeset
   552
openInterface:aSymbol
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   553
    "open a specific interface. 
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   554
     The argument, aSymbol specifies which interface. The concrete
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   555
     application subclass must provide a method with that name,
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   556
     which must return an interfaceSpec. This is forwarded to
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   557
     the builder to create the views.
69
claus
parents: 63
diff changeset
   558
     Typically, applications only use one interface, 
78
claus
parents: 72
diff changeset
   559
     returned by the #windowSpec method."
69
claus
parents: 63
diff changeset
   560
85
claus
parents: 83
diff changeset
   561
    self allButOpenInterface:aSymbol.
78
claus
parents: 72
diff changeset
   562
    builder openWithExtent:nil.
claus
parents: 72
diff changeset
   563
63
claus
parents: 61
diff changeset
   564
    ^ builder
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   565
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   566
    "Modified: 24.4.1996 / 09:37:11 / cg"
63
claus
parents: 61
diff changeset
   567
!
claus
parents: 61
diff changeset
   568
362
52212e2a8c84 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
   569
openOnDevice:aDevice
52212e2a8c84 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
   570
    "open a standard interface on some other device"
52212e2a8c84 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
   571
52212e2a8c84 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
   572
    self setDevice:aDevice.
52212e2a8c84 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
   573
    ^ self open
52212e2a8c84 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
   574
52212e2a8c84 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
   575
    "Created: 13.1.1997 / 21:24:11 / cg"
52212e2a8c84 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
   576
    "Modified: 13.1.1997 / 21:24:30 / cg"
52212e2a8c84 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
   577
!
52212e2a8c84 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
   578
63
claus
parents: 61
diff changeset
   579
opened
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   580
    "the topView has been opened.
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   581
     This is sent by my topView when its finally open"
63
claus
parents: 61
diff changeset
   582
claus
parents: 61
diff changeset
   583
    self addTopViewsToCurrentProject.
claus
parents: 61
diff changeset
   584
    self postOpenWith:builder
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   585
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   586
    "Modified: 24.4.1996 / 09:37:28 / cg"
57
3984019e8f5f *** empty log message ***
claus
parents: 52
diff changeset
   587
!
3984019e8f5f *** empty log message ***
claus
parents: 52
diff changeset
   588
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   589
postBuildWith:aBuilder
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   590
    "this is sent after an interface is built from a spec.
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   591
     Can be redefined in subclasses.
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   592
     mhmh - what should this do here ?"
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   593
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   594
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   595
postOpenWith:aBuilder
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   596
    "this is sent after the applications main window is opened.
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   597
     Can be redefined in subclasses.
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   598
     mhmh - what should this do here ?"
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   599
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   600
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   601
preBuildWith:aBuilder
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   602
    "this is sent before an interface is built from a spec.
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   603
     Can be redefined in subclasses.
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   604
     mhmh - what should this do here ?"
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   605
!
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   606
69
claus
parents: 63
diff changeset
   607
restarted
287
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   608
    "sent by my topWindow, when restarted from an image.
69
claus
parents: 63
diff changeset
   609
     Nothing done here, but can be redefined to perform any actions
claus
parents: 63
diff changeset
   610
     required to reset the application after an image-restart.
claus
parents: 63
diff changeset
   611
     (for example: check if application files are still around, restart
287
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   612
      subprocesses etc.)."
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   613
7a733e0b5465 cursor stuff
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   614
    "Modified: 1.6.1996 / 16:55:50 / cg"
63
claus
parents: 61
diff changeset
   615
!
57
3984019e8f5f *** empty log message ***
claus
parents: 52
diff changeset
   616
63
claus
parents: 61
diff changeset
   617
saveAndTerminateRequest
claus
parents: 61
diff changeset
   618
    "some windowManagers send this to shut down an application
claus
parents: 61
diff changeset
   619
     and have it save its state for restart.
claus
parents: 61
diff changeset
   620
     Can be redefined in subclasses"
claus
parents: 61
diff changeset
   621
claus
parents: 61
diff changeset
   622
    self closeRequest
57
3984019e8f5f *** empty log message ***
claus
parents: 52
diff changeset
   623
! !
72
claus
parents: 71
diff changeset
   624
85
claus
parents: 83
diff changeset
   625
!ApplicationModel methodsFor:'window events'!
claus
parents: 83
diff changeset
   626
144
a75a0c558a77 activity notification added
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   627
showActivity:someMessage
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   628
    "some activityNotification shalt be communicated to
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   629
     the user. Forwarded from the topView and ignored here.
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   630
     Can be redefined in concrete applications to show the
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   631
     message either in some infoView (infoLabel as in Windows)
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   632
     or in the title area (as done in the browsers)"
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   633
144
a75a0c558a77 activity notification added
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   634
    ^ self
a75a0c558a77 activity notification added
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   635
a75a0c558a77 activity notification added
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   636
    "Created: 16.12.1995 / 18:41:04 / cg"
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   637
    "Modified: 24.4.1996 / 09:34:22 / cg"
144
a75a0c558a77 activity notification added
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   638
!
a75a0c558a77 activity notification added
Claus Gittinger <cg@exept.de>
parents: 142
diff changeset
   639
85
claus
parents: 83
diff changeset
   640
windowEvent:anEvent from:anApplicationWindow
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   641
    "dummy: windowEvent forwarding is not yet implemented"
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   642
85
claus
parents: 83
diff changeset
   643
    ^ self
215
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   644
369b0376e859 commentary
Claus Gittinger <cg@exept.de>
parents: 187
diff changeset
   645
    "Modified: 24.4.1996 / 09:32:50 / cg"
85
claus
parents: 83
diff changeset
   646
! !
claus
parents: 83
diff changeset
   647
361
765fe20a26d1 fixed #openOnDevice:;
Claus Gittinger <cg@exept.de>
parents: 330
diff changeset
   648
!ApplicationModel class methodsFor:'documentation'!
72
claus
parents: 71
diff changeset
   649
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   650
version
362
52212e2a8c84 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 361
diff changeset
   651
    ^ '$Header: /cvs/stx/stx/libview2/ApplicationModel.st,v 1.32 1997-01-13 20:24:36 cg Exp $'
81
claus
parents: 78
diff changeset
   652
! !
138
492fb73ca439 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   653
ApplicationModel initialize!