UIBuilder.st
author Claus Gittinger <cg@exept.de>
Fri, 17 Jan 1997 20:53:59 +0100
changeset 372 6d7718f3d298
parent 367 7316abe03075
child 373 66283cb455bf
permissions -rw-r--r--
more ST-80 compatibility stuff
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
b65dc250db8d documentation
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
    47
    [author:]
b65dc250db8d documentation
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
    48
        Claus Gittinger
66
claus
parents:
diff changeset
    49
"
claus
parents:
diff changeset
    50
! !
claus
parents:
diff changeset
    51
claus
parents:
diff changeset
    52
!UIBuilder class methodsFor:'initialization'!
claus
parents:
diff changeset
    53
claus
parents:
diff changeset
    54
initialize
claus
parents:
diff changeset
    55
    Verbose := false    "/ debugging flag
claus
parents:
diff changeset
    56
! !
claus
parents:
diff changeset
    57
86
claus
parents: 80
diff changeset
    58
!UIBuilder methodsFor:'accessing'!
claus
parents: 80
diff changeset
    59
claus
parents: 80
diff changeset
    60
menuAspect
claus
parents: 80
diff changeset
    61
    ^ menuAspect
claus
parents: 80
diff changeset
    62
! !
claus
parents: 80
diff changeset
    63
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    64
!UIBuilder methodsFor:'building'!
66
claus
parents:
diff changeset
    65
367
7316abe03075 made obsolete stuff ignored
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
    66
add:aSpec
7316abe03075 made obsolete stuff ignored
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
    67
    view := aSpec buildViewFor:self.
7316abe03075 made obsolete stuff ignored
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
    68
    ^ view
7316abe03075 made obsolete stuff ignored
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
    69
7316abe03075 made obsolete stuff ignored
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
    70
    "Modified: 16.1.1997 / 00:45:07 / cg"
7316abe03075 made obsolete stuff ignored
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
    71
!
7316abe03075 made obsolete stuff ignored
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
    72
100
claus
parents: 96
diff changeset
    73
buildFromSpec:aSpecArray
claus
parents: 96
diff changeset
    74
    |m spec|
claus
parents: 96
diff changeset
    75
claus
parents: 96
diff changeset
    76
"/ old:
claus
parents: 96
diff changeset
    77
"/    self readSpec:aSpecArray.
claus
parents: 96
diff changeset
    78
claus
parents: 96
diff changeset
    79
    spec := UISpecification from:aSpecArray.
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    80
    window := view := spec buildViewFor:self.
100
claus
parents: 96
diff changeset
    81
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    82
"/    menuAspect notNil ifTrue:[
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    83
"/        m := self componentAt:menuAspect.
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    84
"/        m notNil ifTrue:[
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    85
"/            m := m value.
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    86
"/            m notNil ifTrue:[
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    87
"/                m receiver:application.
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    88
"/                window add:m.
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    89
"/                view topInset:(m heightIncludingBorder).
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    90
"/            ]
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    91
"/        ]
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    92
"/    ].
86
claus
parents: 80
diff changeset
    93
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    94
    ^ window
66
claus
parents:
diff changeset
    95
100
claus
parents: 96
diff changeset
    96
    "Modified: 5.9.1995 / 21:43:29 / claus"
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    97
    "Modified: 17.1.1997 / 19:33:05 / cg"
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    98
!
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    99
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   100
buildFromSpec:aSpecArray in:aView
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   101
    |m spec|
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   102
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   103
    spec := UISpecification from:aSpecArray.
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   104
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   105
    view := spec buildViewFor:self in:aView.
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   106
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   107
"/    menuAspect notNil ifTrue:[
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   108
"/        m := self componentAt:menuAspect.
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   109
"/        m notNil ifTrue:[
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   110
"/            m := m value.
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   111
"/            m notNil ifTrue:[
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   112
"/                m receiver:application.
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   113
"/                window add:m.
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   114
"/                view topInset:(m heightIncludingBorder).
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   115
"/            ]
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   116
"/        ]
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   117
"/    ].
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   118
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   119
    ^ view
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   120
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
   121
    "Modified: 5.9.1995 / 21:48:09 / claus"
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   122
    "Modified: 17.1.1997 / 19:33:48 / cg"
363
c7a26a5ebaba doFinalHookup (ST-80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 344
diff changeset
   123
!
c7a26a5ebaba doFinalHookup (ST-80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 344
diff changeset
   124
c7a26a5ebaba doFinalHookup (ST-80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 344
diff changeset
   125
doFinalHookup
c7a26a5ebaba doFinalHookup (ST-80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 344
diff changeset
   126
c7a26a5ebaba doFinalHookup (ST-80 compatibility)
Claus Gittinger <cg@exept.de>
parents: 344
diff changeset
   127
    "Created: 14.2.1997 / 14:52:27 / cg"
100
claus
parents: 96
diff changeset
   128
! !
86
claus
parents: 80
diff changeset
   129
132
0a8fe342ed91 version method at the end
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   130
!UIBuilder class methodsFor:'documentation'!
0a8fe342ed91 version method at the end
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   131
0a8fe342ed91 version method at the end
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   132
version
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   133
    ^ '$Header: /cvs/stx/stx/libview2/UIBuilder.st,v 1.18 1997-01-17 19:53:59 cg Exp $'
132
0a8fe342ed91 version method at the end
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   134
! !
100
claus
parents: 96
diff changeset
   135
UIBuilder initialize!