WindowBuilder.st
author ca
Wed, 05 Mar 1997 13:24:26 +0100
changeset 488 1686464333f6
parent 480 40218790e4ba
child 502 43ca81bcde49
permissions -rw-r--r--
encoding
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
89
claus
parents: 86
diff changeset
     1
"
claus
parents: 86
diff changeset
     2
 COPYRIGHT (c) 1995 by Claus Gittinger
434
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
     3
              All Rights Reserved
89
claus
parents: 86
diff changeset
     4
claus
parents: 86
diff changeset
     5
 This software is furnished under a license and may be used
claus
parents: 86
diff changeset
     6
 only in accordance with the terms of that license and with the
claus
parents: 86
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
claus
parents: 86
diff changeset
     8
 be provided or otherwise made available to, or used by, any
claus
parents: 86
diff changeset
     9
 other person.  No title to or ownership of the software is
claus
parents: 86
diff changeset
    10
 hereby transferred.
claus
parents: 86
diff changeset
    11
"
claus
parents: 86
diff changeset
    12
100
claus
parents: 99
diff changeset
    13
Object subclass:#WindowBuilder
480
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
    14
	instanceVariableNames:'window windowView application bindings visuals focusSequence
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
    15
		namedComponents componentCreationHook applicationClass
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
    16
		keyboardProcessor'
436
b5e56e1f367f checkin from browser
ca
parents: 434
diff changeset
    17
	classVariableNames:''
b5e56e1f367f checkin from browser
ca
parents: 434
diff changeset
    18
	poolDictionaries:''
b5e56e1f367f checkin from browser
ca
parents: 434
diff changeset
    19
	category:'Interface-Support-UI'
66
claus
parents:
diff changeset
    20
!
claus
parents:
diff changeset
    21
claus
parents:
diff changeset
    22
!WindowBuilder class methodsFor:'documentation'!
claus
parents:
diff changeset
    23
89
claus
parents: 86
diff changeset
    24
copyright
claus
parents: 86
diff changeset
    25
"
claus
parents: 86
diff changeset
    26
 COPYRIGHT (c) 1995 by Claus Gittinger
434
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
    27
              All Rights Reserved
89
claus
parents: 86
diff changeset
    28
claus
parents: 86
diff changeset
    29
 This software is furnished under a license and may be used
claus
parents: 86
diff changeset
    30
 only in accordance with the terms of that license and with the
claus
parents: 86
diff changeset
    31
 inclusion of the above copyright notice.   This software may not
claus
parents: 86
diff changeset
    32
 be provided or otherwise made available to, or used by, any
claus
parents: 86
diff changeset
    33
 other person.  No title to or ownership of the software is
claus
parents: 86
diff changeset
    34
 hereby transferred.
claus
parents: 86
diff changeset
    35
"
claus
parents: 86
diff changeset
    36
!
claus
parents: 86
diff changeset
    37
66
claus
parents:
diff changeset
    38
documentation
claus
parents:
diff changeset
    39
"
69
claus
parents: 66
diff changeset
    40
    a no-op class, for systems which do not use the UIBuilder.
66
claus
parents:
diff changeset
    41
    Concrete subclasses know how to create a view (with components) from
claus
parents:
diff changeset
    42
    some interface spec. Currently, an experimantal version of UIBuilder exists,
claus
parents:
diff changeset
    43
    and more may be added in the future (for example, to parse different UI
claus
parents:
diff changeset
    44
    specs - thinking of motifs UIL specs etc).
223
b65dc250db8d documentation
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
    45
b65dc250db8d documentation
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
    46
    [author:]
b65dc250db8d documentation
Claus Gittinger <cg@exept.de>
parents: 176
diff changeset
    47
        Claus Gittinger
66
claus
parents:
diff changeset
    48
"
claus
parents:
diff changeset
    49
! !
claus
parents:
diff changeset
    50
claus
parents:
diff changeset
    51
!WindowBuilder methodsFor:'accessing'!
claus
parents:
diff changeset
    52
463
75a8e06ef324 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
    53
addBindings:moreBindings
75a8e06ef324 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
    54
    "used with subDialogs, which provide local bindings.
75a8e06ef324 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
    55
     All bindings from moreBindings overwrite any local bindings."
75a8e06ef324 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
    56
75a8e06ef324 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
    57
    moreBindings notNil ifTrue:[
75a8e06ef324 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
    58
        moreBindings keysAndValuesDo:[:aKey :aValue |
75a8e06ef324 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
    59
            bindings at:aKey put:aValue
75a8e06ef324 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
    60
        ]
75a8e06ef324 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
    61
    ]
75a8e06ef324 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
    62
75a8e06ef324 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
    63
    "Created: 28.2.1997 / 14:14:33 / cg"
75a8e06ef324 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
    64
!
75a8e06ef324 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 450
diff changeset
    65
100
claus
parents: 99
diff changeset
    66
application
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    67
    "return the application (an ApplicationModel),
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    68
     for which the view is built.
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    69
     This one is supposed to provide the aspects, menus etc."
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    70
100
claus
parents: 99
diff changeset
    71
    ^ application
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    72
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    73
    "Modified: 17.1.1997 / 19:04:40 / cg"
66
claus
parents:
diff changeset
    74
!
claus
parents:
diff changeset
    75
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    76
application:anApplicationModel
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    77
    "set the application (an ApplicationModel),
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    78
     for which the view is built.
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    79
     This one is supposed to provide the aspects, menus etc."
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    80
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    81
    application := anApplicationModel
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    82
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
    83
    "Modified: 17.1.1997 / 19:04:47 / cg"
66
claus
parents:
diff changeset
    84
!
claus
parents:
diff changeset
    85
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
    86
applicationClass:something
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
    87
    "set the value of the instance variable 'applicationClass' (automatically generated)"
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
    88
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
    89
    applicationClass := something.!
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
    90
66
claus
parents:
diff changeset
    91
aspectAt:aSymbol
433
31b52cc4451a *** empty log message ***
ca
parents: 428
diff changeset
    92
    |b|
31b52cc4451a *** empty log message ***
ca
parents: 428
diff changeset
    93
473
9ef922391c70 nil aspect
ca
parents: 467
diff changeset
    94
    aSymbol notNil ifTrue:[
9ef922391c70 nil aspect
ca
parents: 467
diff changeset
    95
        bindings notNil ifTrue:[
9ef922391c70 nil aspect
ca
parents: 467
diff changeset
    96
            b := bindings at:aSymbol ifAbsent:nil.
9ef922391c70 nil aspect
ca
parents: 467
diff changeset
    97
            b notNil ifTrue:[^ b].
9ef922391c70 nil aspect
ca
parents: 467
diff changeset
    98
        ].
434
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
    99
473
9ef922391c70 nil aspect
ca
parents: 467
diff changeset
   100
        application notNil ifTrue:[
9ef922391c70 nil aspect
ca
parents: 467
diff changeset
   101
            Object messageNotUnderstoodSignal catch:[
9ef922391c70 nil aspect
ca
parents: 467
diff changeset
   102
                ^ application aspectFor:aSymbol
9ef922391c70 nil aspect
ca
parents: 467
diff changeset
   103
            ]
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   104
        ]
433
31b52cc4451a *** empty log message ***
ca
parents: 428
diff changeset
   105
    ].
31b52cc4451a *** empty log message ***
ca
parents: 428
diff changeset
   106
    ^ nil
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   107
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   108
    "Modified: 17.1.1997 / 19:28:32 / cg"
66
claus
parents:
diff changeset
   109
!
claus
parents:
diff changeset
   110
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   111
aspectAt:aSymbol put:aModel
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   112
    bindings isNil ifTrue:[
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   113
        bindings := IdentityDictionary new
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   114
    ].
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   115
    ^ bindings at:aSymbol put:aModel
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   116
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   117
    "Modified: 17.1.1997 / 19:28:37 / cg"
100
claus
parents: 99
diff changeset
   118
!
claus
parents: 99
diff changeset
   119
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   120
bindingAt:aSymbol
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   121
    bindings notNil ifTrue:[
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   122
        ^ bindings at:aSymbol ifAbsent:nil.
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   123
    ].
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   124
    ^ nil
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   125
!
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   126
100
claus
parents: 99
diff changeset
   127
bindings
claus
parents: 99
diff changeset
   128
    ^ bindings
claus
parents: 99
diff changeset
   129
!
claus
parents: 99
diff changeset
   130
claus
parents: 99
diff changeset
   131
bindings:aDictionary
claus
parents: 99
diff changeset
   132
    bindings := aDictionary
claus
parents: 99
diff changeset
   133
!
claus
parents: 99
diff changeset
   134
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   135
componentAt:name
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   136
    namedComponents isNil ifTrue:[^ nil].
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   137
    ^ namedComponents at:name asSymbol ifAbsent:nil
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   138
!
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   139
100
claus
parents: 99
diff changeset
   140
componentAt:name put:aComponent
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   141
    namedComponents isNil ifTrue:[
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   142
        namedComponents := IdentityDictionary new.
100
claus
parents: 99
diff changeset
   143
    ].
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   144
    namedComponents at:name asSymbol put:aComponent
100
claus
parents: 99
diff changeset
   145
!
claus
parents: 99
diff changeset
   146
410
2d21748e0d9c checkin from browser
ca
parents: 408
diff changeset
   147
componentCreationHook:something
2d21748e0d9c checkin from browser
ca
parents: 408
diff changeset
   148
    "set the value of the instance variable 'componentCreationHook' (automatically generated)"
2d21748e0d9c checkin from browser
ca
parents: 408
diff changeset
   149
2d21748e0d9c checkin from browser
ca
parents: 408
diff changeset
   150
    componentCreationHook := something.!
2d21748e0d9c checkin from browser
ca
parents: 408
diff changeset
   151
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   152
focusSequence 
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   153
    ^ focusSequence
66
claus
parents:
diff changeset
   154
!
claus
parents:
diff changeset
   155
477
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   156
keyboardProcessor
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   157
    keyboardProcessor isNil ifTrue:[
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   158
        keyboardProcessor := KeyboardProcessor new    
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   159
    ].
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   160
    ^ keyboardProcessor
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   161
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   162
    "Created: 3.3.1997 / 18:31:37 / cg"
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   163
    "Modified: 3.3.1997 / 18:32:27 / cg"
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   164
!
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   165
86
claus
parents: 80
diff changeset
   166
namedComponents
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   167
    ^ namedComponents
86
claus
parents: 80
diff changeset
   168
!
claus
parents: 80
diff changeset
   169
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   170
source
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   171
    "same as #application, for ST-80 compatibility"
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   172
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   173
    ^ application
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   174
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   175
    "Created: 17.1.1997 / 19:03:51 / cg"
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   176
!
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   177
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   178
source:anApplicationModel
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   179
    "same as #application:, for ST-80 compatibility"
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   180
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   181
    application := anApplicationModel
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   182
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   183
    "Modified: 17.1.1997 / 19:03:57 / cg"
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   184
!
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   185
475
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   186
visualAt:name
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   187
    visuals isNil ifTrue:[^ nil].
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   188
    ^ visuals at:name asSymbol ifAbsent:nil
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   189
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   190
    "Created: 3.3.1997 / 16:24:17 / cg"
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   191
!
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   192
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   193
visualAt:name put:aVisual
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   194
    visuals isNil ifTrue:[
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   195
        visuals := IdentityDictionary new.
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   196
    ].
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   197
    visuals at:name asSymbol put:aVisual
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   198
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   199
    "Created: 3.3.1997 / 16:24:41 / cg"
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   200
!
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   201
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   202
visuals
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   203
    ^ visuals
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   204
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   205
    "Created: 3.3.1997 / 16:24:00 / cg"
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   206
!
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   207
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   208
visuals:aDictionary
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   209
    visuals := aDictionary
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   210
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   211
    "Created: 3.3.1997 / 16:24:06 / cg"
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   212
!
fd94f2bc8b9e added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents: 473
diff changeset
   213
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   214
window
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   215
    "return the top window (view), for which an interface
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   216
     is (being) built"
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   217
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   218
    ^ window
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   219
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   220
    "Modified: 17.1.1997 / 19:30:00 / cg"
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   221
!
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   222
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   223
window:aView
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   224
    "set the top window (view), for which an interface
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   225
     is (being) built"
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   226
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   227
    window := aView
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   228
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   229
    "Modified: 17.1.1997 / 19:30:22 / cg"
66
claus
parents:
diff changeset
   230
!
claus
parents:
diff changeset
   231
claus
parents:
diff changeset
   232
windowGroup
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   233
self halt.
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   234
    ^ window windowGroup
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   235
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   236
    "Modified: 17.1.1997 / 19:30:26 / cg"
66
claus
parents:
diff changeset
   237
! !
claus
parents:
diff changeset
   238
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   239
!WindowBuilder methodsFor:'building'!
66
claus
parents:
diff changeset
   240
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   241
buildFromSpec:aSpec
176
3890e2b312e0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 132
diff changeset
   242
    ^ self subclassResponsibility
408
93582137e1c7 tabable
ca
parents: 374
diff changeset
   243
!
93582137e1c7 tabable
ca
parents: 374
diff changeset
   244
93582137e1c7 tabable
ca
parents: 374
diff changeset
   245
makeTabable:aComponent
93582137e1c7 tabable
ca
parents: 374
diff changeset
   246
    focusSequence isNil ifTrue:[
93582137e1c7 tabable
ca
parents: 374
diff changeset
   247
        focusSequence := OrderedCollection new.
93582137e1c7 tabable
ca
parents: 374
diff changeset
   248
    ].
93582137e1c7 tabable
ca
parents: 374
diff changeset
   249
    focusSequence add:aComponent
66
claus
parents:
diff changeset
   250
! !
100
claus
parents: 99
diff changeset
   251
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   252
!WindowBuilder methodsFor:'spec creation aspect fetch'!
100
claus
parents: 99
diff changeset
   253
374
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   254
actionFor:aKey
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   255
    "return an action for aKey. This is invoked during window building
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   256
     (by the builder) to ask for an ActionButtons actionBlock.
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   257
     Here, first the local bindings are searched, then the application and
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   258
     finally the applications class is asked for a corresponding action.
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   259
     The returned object is typically a block."
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   260
434
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   261
    |b|
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   262
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   263
    bindings notNil ifTrue:[
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   264
        b := bindings at:aKey ifAbsent:nil.
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   265
        b notNil ifTrue:[^ b].
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   266
    ].
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   267
374
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   268
    application notNil ifTrue:[
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   269
        Object messageNotUnderstoodSignal catch:[
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   270
            ^ application actionFor:aKey
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   271
        ]
374
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   272
    ].
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   273
    applicationClass notNil ifTrue:[
424
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   274
        (applicationClass respondsTo:#actionFor:) ifTrue:[
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   275
            ^ applicationClass actionFor:aKey
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   276
        ]
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   277
    ].
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   278
    ^ []
374
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   279
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   280
    "Created: 17.1.1997 / 21:08:22 / cg"
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   281
!
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   282
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   283
aspectFor:aKey
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   284
    "return a model for aKey. This is invoked during window building
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   285
     (by the builder) to ask for an Editfields, a Toggles etc. model.
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   286
     Here, first the local bindings are searched, then the application and
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   287
     finally the applications class is asked for a corresponding action.
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   288
     The returned object is typically a valueHolder."
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   289
434
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   290
    |b|
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   291
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   292
    bindings notNil ifTrue:[
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   293
        b := bindings at:aKey ifAbsent:nil.
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   294
        b notNil ifTrue:[^ b].
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   295
    ].
eeb7ba6aede3 *** empty log message ***
ca
parents: 433
diff changeset
   296
374
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   297
    application notNil ifTrue:[
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   298
        Object messageNotUnderstoodSignal catch:[
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   299
            ^ application aspectFor:aKey
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   300
        ]
374
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   301
    ].
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   302
    applicationClass notNil ifTrue:[
424
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   303
        (applicationClass respondsTo:#aspectFor:) ifTrue:[
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   304
            ^ applicationClass aspectFor:aKey
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   305
        ]
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   306
    ].
374
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   307
    ^ self aspectAt:aKey
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   308
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   309
    "Created: 17.1.1997 / 21:06:16 / cg"
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   310
!
5be095a54715 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   311
423
64c2d739caf1 *** empty log message ***
ca
parents: 422
diff changeset
   312
componentFor:aKey
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   313
    "return a component for aKey. This is invoked during window building
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   314
     (by the builder) to ask for an ArbitraryComponents view.
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   315
     Here, first the local bindings are searched, then the application and
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   316
     finally the applications class is asked for a corresponding action.
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   317
     The returned object is typically a view."
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   318
423
64c2d739caf1 *** empty log message ***
ca
parents: 422
diff changeset
   319
    |cls|
64c2d739caf1 *** empty log message ***
ca
parents: 422
diff changeset
   320
64c2d739caf1 *** empty log message ***
ca
parents: 422
diff changeset
   321
    application notNil ifTrue:[
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   322
        Object messageNotUnderstoodSignal catch:[
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   323
            ^ application componentFor:aKey
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   324
        ]
423
64c2d739caf1 *** empty log message ***
ca
parents: 422
diff changeset
   325
    ].
64c2d739caf1 *** empty log message ***
ca
parents: 422
diff changeset
   326
    applicationClass notNil ifTrue:[
424
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   327
        (applicationClass respondsTo:#componentFor:) ifTrue:[
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   328
            ^ applicationClass componentFor:aKey
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   329
        ]
423
64c2d739caf1 *** empty log message ***
ca
parents: 422
diff changeset
   330
    ].
64c2d739caf1 *** empty log message ***
ca
parents: 422
diff changeset
   331
    ^ self aspectAt:aKey
64c2d739caf1 *** empty log message ***
ca
parents: 422
diff changeset
   332
64c2d739caf1 *** empty log message ***
ca
parents: 422
diff changeset
   333
!
64c2d739caf1 *** empty log message ***
ca
parents: 422
diff changeset
   334
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   335
labelFor:aKey
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   336
    "return a label for aKey. This is invoked during window building
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   337
     (by the builder) to ask for a ???'s label.
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   338
     Here, first the local bindings are searched, then the application and
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   339
     finally the applications class is asked for a corresponding action.
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   340
     The returned object is typically a string."
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   341
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   342
    |cls|
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   343
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   344
    application notNil ifTrue:[
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   345
        Object messageNotUnderstoodSignal catch:[
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   346
            ^ application labelFor:aKey
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   347
        ]
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   348
    ].
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   349
    applicationClass notNil ifTrue:[
424
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   350
        (applicationClass respondsTo:#labelFor:) ifTrue:[
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   351
            ^ applicationClass labelFor:aKey
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   352
        ]
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   353
    ].
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   354
    ^ self aspectAt:aKey
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   355
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   356
!
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   357
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   358
listFor:aKey
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   359
    "return a list for aKey. This is invoked during window building
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   360
     (by the builder) to ask for a ???'s label.
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   361
     Here, first the local bindings are searched, then the application and
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   362
     finally the applications class is asked for a corresponding action.
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   363
     The returned object is typically a list."
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   364
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   365
    application notNil ifTrue:[
450
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   366
        Object messageNotUnderstoodSignal catch:[
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   367
            ^ application listFor:aKey
2a6e2eb653f0 so far ...
ca
parents: 436
diff changeset
   368
        ]
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   369
    ].
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   370
    applicationClass notNil ifTrue:[
424
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   371
        (applicationClass respondsTo:#listFor:) ifTrue:[
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   372
            ^ applicationClass listFor:aKey
098447d8c614 checkin from browser
ca
parents: 423
diff changeset
   373
        ]
422
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   374
    ].
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   375
    ^ self aspectAt:aKey
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   376
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   377
    "Created: 17.1.1997 / 21:08:45 / cg"
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   378
! !
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   379
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   380
!WindowBuilder methodsFor:'spec creation callbacks'!
ccffe7647895 changed binding access
ca
parents: 420
diff changeset
   381
100
claus
parents: 99
diff changeset
   382
createdComponent:aView forSpec:spec
410
2d21748e0d9c checkin from browser
ca
parents: 408
diff changeset
   383
    componentCreationHook notNil ifTrue:[
2d21748e0d9c checkin from browser
ca
parents: 408
diff changeset
   384
        componentCreationHook value:aView value:spec value:self
2d21748e0d9c checkin from browser
ca
parents: 408
diff changeset
   385
    ]
100
claus
parents: 99
diff changeset
   386
claus
parents: 99
diff changeset
   387
    "Modified: 5.9.1995 / 21:42:54 / claus"
claus
parents: 99
diff changeset
   388
! !
claus
parents: 99
diff changeset
   389
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   390
!WindowBuilder methodsFor:'startup'!
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   391
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   392
closeRequest
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   393
    window destroy
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   394
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   395
    "Modified: 17.1.1997 / 19:30:32 / cg"
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   396
!
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   397
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   398
open
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   399
    "open my topView, as previously created"
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   400
477
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   401
    |type|
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   402
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   403
    application isNil ifTrue:[
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   404
        type := #normal
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   405
    ] ifFalse:[
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   406
        type := application defaultWindowType
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   407
    ].
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   408
    self 
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   409
        openWithExtent:nil
477
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   410
        andType:type
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   411
477
4473bdcb24cb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 475
diff changeset
   412
    "Modified: 3.3.1997 / 19:43:57 / cg"
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   413
!
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   414
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   415
openAt:aPoint
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   416
    "open my topView at some location"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   417
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   418
    self 
467
8fb5fa11956c better dialog opening
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
   419
        openAt:aPoint 
8fb5fa11956c better dialog opening
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
   420
        withExtent:nil  
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   421
        andType:(application defaultWindowType)
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   422
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   423
    "Created: 14.2.1997 / 20:21:57 / cg"
467
8fb5fa11956c better dialog opening
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
   424
    "Modified: 28.2.1997 / 22:50:29 / cg"
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   425
!
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   426
436
b5e56e1f367f checkin from browser
ca
parents: 434
diff changeset
   427
openAt:origin withExtent:ext andType:type
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   428
    "open my window, as previously created, optionally defining the
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   429
     windows origin and/or extent. 
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   430
     The type argument may be #dialog or #normal, and specifies if the view 
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   431
     should be opened as a modal view, blocking interaction to the currently 
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   432
     active view, or as a normal view."
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   433
480
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   434
    |mainSubView|
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   435
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   436
    origin notNil ifTrue:[
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   437
        window origin:origin
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   438
    ].
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   439
    ext notNil ifTrue:[
480
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   440
        window extent:ext.
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   441
    ] ifFalse:[
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   442
        type == #dialog ifTrue:[
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   443
            window fixSize
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   444
        ]
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   445
    ].
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   446
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   447
    (windowView notNil and:[windowView ~~ window]) ifTrue:[
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   448
        windowView extent:(window extent).
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   449
    ].
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   450
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   451
    type == #dialog ifTrue:[
467
8fb5fa11956c better dialog opening
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
   452
        window fixPosition:(window device pointerPosition - window positionOffset).
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   453
        window openModal.
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   454
        ^ self
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   455
    ].
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   456
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   457
    type == #normal ifTrue:[
480
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   458
        window isNil ifTrue:[
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   459
            self setupWindowFor:(StandardSystemView new).
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   460
        ].
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   461
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   462
        window open.
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   463
        ^ self
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   464
    ].
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   465
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   466
    type == #popUp ifTrue:[
467
8fb5fa11956c better dialog opening
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
   467
        window fixPosition:(window device pointerPosition).
8fb5fa11956c better dialog opening
Claus Gittinger <cg@exept.de>
parents: 463
diff changeset
   468
        window openAsPopUp.
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   469
        ^ self
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   470
    ].
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   471
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   472
    "
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   473
     if ST-80 supports more types - these may be added later
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   474
    "
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   475
    self halt:'unimplemented'
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   476
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   477
    "Created: 14.2.1997 / 20:22:24 / cg"
480
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   478
    "Modified: 3.3.1997 / 22:27:52 / cg"
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   479
!
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   480
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   481
openDialog
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   482
    "open my topView, as previously created as a modal view,
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   483
     blocking interaction to the currently active view."
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   484
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   485
    self 
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   486
        openWithExtent:nil 
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   487
        andType:#dialog
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   488
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   489
    "Modified: 17.1.1997 / 19:59:29 / cg"
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   490
!
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   491
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   492
openDialogAt:aPoint withExtent:ext
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   493
    "open my topView, as previously created as a modal view,
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   494
     blocking interaction to the currently active view."
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   495
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   496
    self 
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   497
        openAt:aPoint withExtent:ext 
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   498
        andType:#dialog
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   499
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   500
    "Modified: 17.1.1997 / 19:59:36 / cg"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   501
    "Created: 14.2.1997 / 20:24:19 / cg"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   502
!
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   503
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   504
openDialogWithExtent:ext
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   505
    "open my topView, as previously created as a modal view,
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   506
     blocking interaction to the currently active view."
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   507
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   508
    self 
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   509
        openWithExtent:ext 
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   510
        andType:#dialog
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   511
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   512
    "Modified: 17.1.1997 / 19:59:36 / cg"
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   513
!
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   514
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   515
openPopUpAt:aPoint
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   516
    "open my topView, as previously created as a popUp view,
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   517
     blocking interaction to the currently active view."
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   518
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   519
    self 
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   520
        openAt:aPoint withExtent:nil 
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   521
        andType:#popUp
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   522
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   523
    "Modified: 17.1.1997 / 19:59:29 / cg"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   524
    "Created: 14.2.1997 / 20:24:38 / cg"
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   525
!
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   526
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   527
openPopUpIn:aRectangle
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   528
    "open my topView, as previously created as a popUp view,
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   529
     blocking interaction to the currently active view."
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   530
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   531
    self 
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   532
        openWithExtent:nil 
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   533
        andType:#popUp
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   534
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   535
    "Modified: 17.1.1997 / 19:59:29 / cg"
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   536
    "Created: 17.1.1997 / 20:01:24 / cg"
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   537
!
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   538
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   539
openWithExtent:aPoint
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   540
    "open my topView, as previously created, but override
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   541
     the extent."
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   542
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   543
    self 
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   544
        openWithExtent:aPoint 
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   545
        andType:(application defaultWindowType)
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   546
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   547
    "Modified: 17.1.1997 / 19:58:48 / cg"
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   548
!
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   549
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   550
openWithExtent:ext andType:type
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   551
    "open my window, as previously created. The type argument
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   552
     may be #dialog or #normal, and specifies if the view should
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   553
     be opened as a modal view, blocking interaction to the currently 
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   554
     active view, or as a normal view."
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   555
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   556
    ^ self openAt:nil withExtent:ext andType:type
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   557
428
25f3b4964f14 more startup variations
Claus Gittinger <cg@exept.de>
parents: 424
diff changeset
   558
    "Modified: 14.2.1997 / 20:22:47 / cg"
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   559
! !
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 223
diff changeset
   560
132
0a8fe342ed91 version method at the end
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   561
!WindowBuilder class methodsFor:'documentation'!
0a8fe342ed91 version method at the end
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   562
0a8fe342ed91 version method at the end
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   563
version
480
40218790e4ba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 477
diff changeset
   564
    ^ '$Header: /cvs/stx/stx/libview2/WindowBuilder.st,v 1.32 1997-03-03 21:28:34 cg Exp $'
132
0a8fe342ed91 version method at the end
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   565
! !