UIBuilder.st
author Claus Gittinger <cg@exept.de>
Thu, 27 Feb 1997 12:50:58 +0100
changeset 461 bacef118f54a
parent 373 66283cb455bf
child 474 c337e7ad2220
permissions -rw-r--r--
more signals to be raised if anything happens during an image save operation.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
88
claus
parents: 86
diff changeset
     1
"
claus
parents: 86
diff changeset
     2
 COPYRIGHT (c) 1995 by Claus Gittinger
100
claus
parents: 96
diff changeset
     3
	      All Rights Reserved
88
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: 96
diff changeset
    13
WindowBuilder subclass:#UIBuilder
223
b65dc250db8d documentation
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
    14
	instanceVariableNames:'view currentMenuSelector menuAspect spec'
b65dc250db8d documentation
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
    15
	classVariableNames:'Verbose'
b65dc250db8d documentation
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
    16
	poolDictionaries:''
b65dc250db8d documentation
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
    17
	category:'Interface-Support-UI'
66
claus
parents:
diff changeset
    18
!
claus
parents:
diff changeset
    19
claus
parents:
diff changeset
    20
!UIBuilder class methodsFor:'documentation'!
claus
parents:
diff changeset
    21
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    22
copyright
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    23
"
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    24
 COPYRIGHT (c) 1995 by Claus Gittinger
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    25
	      All Rights Reserved
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    26
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    27
 This software is furnished under a license and may be used
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    28
 only in accordance with the terms of that license and with the
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    29
 inclusion of the above copyright notice.   This software may not
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    30
 be provided or otherwise made available to, or used by, any
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    31
 other person.  No title to or ownership of the software is
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    32
 hereby transferred.
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    33
"
88
claus
parents: 86
diff changeset
    34
!
claus
parents: 86
diff changeset
    35
66
claus
parents:
diff changeset
    36
documentation
claus
parents:
diff changeset
    37
"
claus
parents:
diff changeset
    38
    this class will (eventually) allow parsing windowSpecs as
claus
parents:
diff changeset
    39
    created by ST-80's UIPainter, and thereby allow to run applications
claus
parents:
diff changeset
    40
    built with this tool.
claus
parents:
diff changeset
    41
    It was created to allow execution of PD applications which were
claus
parents:
diff changeset
    42
    written using that tool (and more and more are appearing ...).
claus
parents:
diff changeset
    43
claus
parents:
diff changeset
    44
    The class is not completed yet and certainly not bug free.
claus
parents:
diff changeset
    45
    Also, it is not quaranteed that all winSpecs are understood.
223
b65dc250db8d documentation
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
    46
373
66283cb455bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
    47
    Notice: 
66283cb455bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
    48
        this class was implemented using protocol information
66283cb455bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
    49
        from alpha testers, literature and by read public domain code
66283cb455bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
    50
        - it may not be complete or compatible to
66283cb455bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
    51
        the corresponding ST-80 class. 
66283cb455bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
    52
        If you encounter any incompatibilities, please forward a note 
66283cb455bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
    53
        describing the incompatibility verbal (i.e. no code) to the ST/X team.
66283cb455bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
    54
223
b65dc250db8d documentation
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
    55
    [author:]
b65dc250db8d documentation
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
    56
        Claus Gittinger
66
claus
parents:
diff changeset
    57
"
claus
parents:
diff changeset
    58
! !
claus
parents:
diff changeset
    59
claus
parents:
diff changeset
    60
!UIBuilder class methodsFor:'initialization'!
claus
parents:
diff changeset
    61
claus
parents:
diff changeset
    62
initialize
claus
parents:
diff changeset
    63
    Verbose := false    "/ debugging flag
claus
parents:
diff changeset
    64
! !
claus
parents:
diff changeset
    65
86
claus
parents: 80
diff changeset
    66
!UIBuilder methodsFor:'accessing'!
claus
parents: 80
diff changeset
    67
claus
parents: 80
diff changeset
    68
menuAspect
claus
parents: 80
diff changeset
    69
    ^ menuAspect
claus
parents: 80
diff changeset
    70
! !
claus
parents: 80
diff changeset
    71
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    72
!UIBuilder methodsFor:'building'!
66
claus
parents:
diff changeset
    73
367
7316abe03075 made obsolete stuff ignored
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
    74
add:aSpec
7316abe03075 made obsolete stuff ignored
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
    75
    view := aSpec buildViewFor:self.
7316abe03075 made obsolete stuff ignored
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
    76
    ^ view
7316abe03075 made obsolete stuff ignored
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
    77
7316abe03075 made obsolete stuff ignored
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
    78
    "Modified: 16.1.1997 / 00:45:07 / cg"
7316abe03075 made obsolete stuff ignored
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
    79
!
7316abe03075 made obsolete stuff ignored
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
    80
100
claus
parents: 96
diff changeset
    81
buildFromSpec:aSpecArray
claus
parents: 96
diff changeset
    82
    |m spec|
claus
parents: 96
diff changeset
    83
claus
parents: 96
diff changeset
    84
"/ old:
claus
parents: 96
diff changeset
    85
"/    self readSpec:aSpecArray.
claus
parents: 96
diff changeset
    86
claus
parents: 96
diff changeset
    87
    spec := UISpecification from:aSpecArray.
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    88
    window := view := spec buildViewFor:self.
100
claus
parents: 96
diff changeset
    89
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    90
"/    menuAspect notNil ifTrue:[
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    91
"/        m := self componentAt:menuAspect.
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    92
"/        m notNil ifTrue:[
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    93
"/            m := m value.
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    94
"/            m notNil ifTrue:[
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    95
"/                m receiver:application.
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    96
"/                window add:m.
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    97
"/                view topInset:(m heightIncludingBorder).
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    98
"/            ]
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    99
"/        ]
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   100
"/    ].
86
claus
parents: 80
diff changeset
   101
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   102
    ^ window
66
claus
parents:
diff changeset
   103
100
claus
parents: 96
diff changeset
   104
    "Modified: 5.9.1995 / 21:43:29 / claus"
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   105
    "Modified: 17.1.1997 / 19:33:05 / cg"
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   106
!
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   107
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   108
buildFromSpec:aSpecArray in:aView
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   109
    |m spec|
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   110
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   111
    spec := UISpecification from:aSpecArray.
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   112
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   113
    view := spec buildViewFor:self in:aView.
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: 367
diff changeset
   115
"/    menuAspect notNil ifTrue:[
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   116
"/        m := self componentAt:menuAspect.
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   117
"/        m notNil ifTrue:[
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   118
"/            m := m value.
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   119
"/            m notNil ifTrue:[
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   120
"/                m receiver:application.
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   121
"/                window add:m.
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   122
"/                view topInset:(m heightIncludingBorder).
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   123
"/            ]
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   124
"/        ]
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   125
"/    ].
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   126
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   127
    ^ view
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   128
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   129
    "Modified: 5.9.1995 / 21:48:09 / claus"
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   130
    "Modified: 17.1.1997 / 19:33:48 / cg"
363
c7a26a5ebaba doFinalHookup (ST-80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 344
diff changeset
   131
!
c7a26a5ebaba doFinalHookup (ST-80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 344
diff changeset
   132
c7a26a5ebaba doFinalHookup (ST-80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 344
diff changeset
   133
doFinalHookup
c7a26a5ebaba doFinalHookup (ST-80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 344
diff changeset
   134
c7a26a5ebaba doFinalHookup (ST-80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 344
diff changeset
   135
    "Created: 14.2.1997 / 14:52:27 / cg"
100
claus
parents: 96
diff changeset
   136
! !
86
claus
parents: 80
diff changeset
   137
132
0a8fe342ed91 version method at the end
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   138
!UIBuilder class methodsFor:'documentation'!
0a8fe342ed91 version method at the end
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   139
0a8fe342ed91 version method at the end
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   140
version
373
66283cb455bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
   141
    ^ '$Header: /cvs/stx/stx/libview2/UIBuilder.st,v 1.19 1997-01-17 20:36:49 cg Exp $'
132
0a8fe342ed91 version method at the end
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   142
! !
100
claus
parents: 96
diff changeset
   143
UIBuilder initialize!