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-- |
88 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
100 | 3 |
All Rights Reserved |
88 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
100 | 13 |
WindowBuilder subclass:#UIBuilder |
223 | 14 |
instanceVariableNames:'view currentMenuSelector menuAspect spec' |
15 |
classVariableNames:'Verbose' |
|
16 |
poolDictionaries:'' |
|
17 |
category:'Interface-Support-UI' |
|
66 | 18 |
! |
19 |
||
20 |
!UIBuilder class methodsFor:'documentation'! |
|
21 |
||
125 | 22 |
copyright |
23 |
" |
|
24 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
25 |
All Rights Reserved |
|
26 |
||
27 |
This software is furnished under a license and may be used |
|
28 |
only in accordance with the terms of that license and with the |
|
29 |
inclusion of the above copyright notice. This software may not |
|
30 |
be provided or otherwise made available to, or used by, any |
|
31 |
other person. No title to or ownership of the software is |
|
32 |
hereby transferred. |
|
33 |
" |
|
88 | 34 |
! |
35 |
||
66 | 36 |
documentation |
37 |
" |
|
38 |
this class will (eventually) allow parsing windowSpecs as |
|
39 |
created by ST-80's UIPainter, and thereby allow to run applications |
|
40 |
built with this tool. |
|
41 |
It was created to allow execution of PD applications which were |
|
42 |
written using that tool (and more and more are appearing ...). |
|
43 |
||
44 |
The class is not completed yet and certainly not bug free. |
|
45 |
Also, it is not quaranteed that all winSpecs are understood. |
|
223 | 46 |
|
47 |
[author:] |
|
48 |
Claus Gittinger |
|
66 | 49 |
" |
50 |
! ! |
|
51 |
||
52 |
!UIBuilder class methodsFor:'initialization'! |
|
53 |
||
54 |
initialize |
|
55 |
Verbose := false "/ debugging flag |
|
56 |
! ! |
|
57 |
||
86 | 58 |
!UIBuilder methodsFor:'accessing'! |
59 |
||
60 |
menuAspect |
|
61 |
^ menuAspect |
|
62 |
! ! |
|
63 |
||
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
367
diff
changeset
|
64 |
!UIBuilder methodsFor:'building'! |
66 | 65 |
|
367 | 66 |
add:aSpec |
67 |
view := aSpec buildViewFor:self. |
|
68 |
^ view |
|
69 |
||
70 |
"Modified: 16.1.1997 / 00:45:07 / cg" |
|
71 |
! |
|
72 |
||
100 | 73 |
buildFromSpec:aSpecArray |
74 |
|m spec| |
|
75 |
||
76 |
"/ old: |
|
77 |
"/ self readSpec:aSpecArray. |
|
78 |
||
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 | 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 | 93 |
|
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
367
diff
changeset
|
94 |
^ window |
66 | 95 |
|
100 | 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 | 98 |
! |
99 |
||
100 |
buildFromSpec:aSpecArray in:aView |
|
101 |
|m spec| |
|
102 |
||
103 |
spec := UISpecification from:aSpecArray. |
|
104 |
||
105 |
view := spec buildViewFor:self in:aView. |
|
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 | 118 |
|
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
367
diff
changeset
|
119 |
^ view |
125 | 120 |
|
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 | 128 |
! ! |
86 | 129 |
|
132 | 130 |
!UIBuilder class methodsFor:'documentation'! |
131 |
||
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 | 134 |
! ! |
100 | 135 |
UIBuilder initialize! |