author | Claus Gittinger <cg@exept.de> |
Fri, 15 Dec 2000 17:41:36 +0100 | |
changeset 1907 | e8efd065dc2b |
parent 1906 | 0b64cfae3419 |
child 1908 | e86e34794e84 |
permissions | -rw-r--r-- |
970
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
1 |
" |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
2 |
COPYRIGHT (c) 1998 by eXept Software AG |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
3 |
All Rights Reserved |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
4 |
|
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
5 |
This software is furnished under a license and may be used |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
6 |
only in accordance with the terms of that license and with the |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
7 |
inclusion of the above copyright notice. This software may not |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
8 |
be provided or otherwise made available to, or used by, any |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
9 |
other person. No title to or ownership of the software is |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
10 |
hereby transferred. |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
11 |
" |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
12 |
|
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
13 |
|
1818 | 14 |
"{ Package: 'stx:libwidg2' }" |
15 |
||
455 | 16 |
ScrollableView subclass:#SubCanvas |
1412 | 17 |
instanceVariableNames:'builder spec client clientHolder specHolder clientView |
1895
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
18 |
clientViewIsScrolled lateBuild useApplicationSubView |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
19 |
keepClientView useOwnBuilder' |
455 | 20 |
classVariableNames:'' |
21 |
poolDictionaries:'' |
|
22 |
category:'Views-Basic' |
|
23 |
! |
|
24 |
||
970
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
25 |
!SubCanvas class methodsFor:'documentation'! |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
26 |
|
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
27 |
copyright |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
28 |
" |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
29 |
COPYRIGHT (c) 1998 by eXept Software AG |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
30 |
All Rights Reserved |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
31 |
|
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
32 |
This software is furnished under a license and may be used |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
33 |
only in accordance with the terms of that license and with the |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
34 |
inclusion of the above copyright notice. This software may not |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
35 |
be provided or otherwise made available to, or used by, any |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
36 |
other person. No title to or ownership of the software is |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
37 |
hereby transferred. |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
38 |
" |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
39 |
|
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
40 |
! |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
41 |
|
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
42 |
documentation |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
43 |
" |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
44 |
a view for a subApplication. |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
45 |
|
1895
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
46 |
Made to be VW compatible as much as possible (try opening a RefactoringBrowser ...). |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
47 |
However, the default setup is not very useful, to embedd arbitrary applications |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
48 |
which are meant to be separate stand-alone applications. |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
49 |
Play with the settings: |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
50 |
keepClientView (default: true) |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
51 |
useApplicationSubView (default: false) |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
52 |
useOwnBuilder (default: false) |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
53 |
|
970
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
54 |
[author:] |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
55 |
Claus Atzkern |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
56 |
" |
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
57 |
! ! |
455 | 58 |
|
1414
faf0465c333b
defaults for hasHVScrollbar now defined in a class method.
tm
parents:
1412
diff
changeset
|
59 |
!SubCanvas class methodsFor:'defaults'! |
faf0465c333b
defaults for hasHVScrollbar now defined in a class method.
tm
parents:
1412
diff
changeset
|
60 |
|
faf0465c333b
defaults for hasHVScrollbar now defined in a class method.
tm
parents:
1412
diff
changeset
|
61 |
defaultHorizontalScrollable |
faf0465c333b
defaults for hasHVScrollbar now defined in a class method.
tm
parents:
1412
diff
changeset
|
62 |
^ false |
faf0465c333b
defaults for hasHVScrollbar now defined in a class method.
tm
parents:
1412
diff
changeset
|
63 |
|
faf0465c333b
defaults for hasHVScrollbar now defined in a class method.
tm
parents:
1412
diff
changeset
|
64 |
|
faf0465c333b
defaults for hasHVScrollbar now defined in a class method.
tm
parents:
1412
diff
changeset
|
65 |
! |
faf0465c333b
defaults for hasHVScrollbar now defined in a class method.
tm
parents:
1412
diff
changeset
|
66 |
|
faf0465c333b
defaults for hasHVScrollbar now defined in a class method.
tm
parents:
1412
diff
changeset
|
67 |
defaultVerticalScrollable |
faf0465c333b
defaults for hasHVScrollbar now defined in a class method.
tm
parents:
1412
diff
changeset
|
68 |
^ false |
faf0465c333b
defaults for hasHVScrollbar now defined in a class method.
tm
parents:
1412
diff
changeset
|
69 |
|
faf0465c333b
defaults for hasHVScrollbar now defined in a class method.
tm
parents:
1412
diff
changeset
|
70 |
|
faf0465c333b
defaults for hasHVScrollbar now defined in a class method.
tm
parents:
1412
diff
changeset
|
71 |
! ! |
faf0465c333b
defaults for hasHVScrollbar now defined in a class method.
tm
parents:
1412
diff
changeset
|
72 |
|
455 | 73 |
!SubCanvas methodsFor:'accessing'! |
74 |
||
503 | 75 |
builder |
76 |
"return the value of the instance variable 'builder' (automatically generated)" |
|
455 | 77 |
|
1893 | 78 |
^ builder |
79 |
! |
|
455 | 80 |
|
503 | 81 |
client |
82 |
"return the value of the instance variable 'client' (automatically generated)" |
|
455 | 83 |
|
1893 | 84 |
^ client |
85 |
! |
|
455 | 86 |
|
503 | 87 |
client:anApplication spec:aWindowSpecOrSpecSymbol builder:aBuilder |
455 | 88 |
"release existing components and generate new components from |
89 |
the given windowSpec, using the given builder." |
|
90 |
||
1471
09a5803325e4
when destroying or changing the client, release as subApp
Claus Gittinger <cg@exept.de>
parents:
1467
diff
changeset
|
91 |
|myApp| |
09a5803325e4
when destroying or changing the client, release as subApp
Claus Gittinger <cg@exept.de>
parents:
1467
diff
changeset
|
92 |
|
1686 | 93 |
(client notNil and:[client ~~ anApplication]) ifTrue:[ |
94 |
client releaseAsSubCanvas. |
|
95 |
client := nil. |
|
96 |
]. |
|
97 |
||
1546
452132649648
Moved #client: and #client:spec: to SimpleView.
Stefan Vogel <sv@exept.de>
parents:
1471
diff
changeset
|
98 |
(builder := aBuilder) isNil ifTrue:[ |
1846 | 99 |
builder := anApplication perform:#builder ifNotUnderstood:[UIBuilder new] |
1546
452132649648
Moved #client: and #client:spec: to SimpleView.
Stefan Vogel <sv@exept.de>
parents:
1471
diff
changeset
|
100 |
]. |
452132649648
Moved #client: and #client:spec: to SimpleView.
Stefan Vogel <sv@exept.de>
parents:
1471
diff
changeset
|
101 |
|
452132649648
Moved #client: and #client:spec: to SimpleView.
Stefan Vogel <sv@exept.de>
parents:
1471
diff
changeset
|
102 |
spec := aWindowSpecOrSpecSymbol. |
503 | 103 |
|
104 |
"/ check for master application |
|
105 |
(anApplication notNil and:[anApplication masterApplication isNil]) ifTrue:[ |
|
1471
09a5803325e4
when destroying or changing the client, release as subApp
Claus Gittinger <cg@exept.de>
parents:
1467
diff
changeset
|
106 |
myApp := self application. |
09a5803325e4
when destroying or changing the client, release as subApp
Claus Gittinger <cg@exept.de>
parents:
1467
diff
changeset
|
107 |
myApp ~~ anApplication ifTrue:[ |
09a5803325e4
when destroying or changing the client, release as subApp
Claus Gittinger <cg@exept.de>
parents:
1467
diff
changeset
|
108 |
anApplication masterApplication:myApp |
503 | 109 |
] |
110 |
]. |
|
1471
09a5803325e4
when destroying or changing the client, release as subApp
Claus Gittinger <cg@exept.de>
parents:
1467
diff
changeset
|
111 |
|
503 | 112 |
client := anApplication. |
113 |
self rebuild. |
|
1471
09a5803325e4
when destroying or changing the client, release as subApp
Claus Gittinger <cg@exept.de>
parents:
1467
diff
changeset
|
114 |
^ builder |
503 | 115 |
! |
116 |
||
1412 | 117 |
makeClientViewScrollable:aBoolean |
118 |
|vs| |
|
119 |
||
120 |
aBoolean ~~ clientViewIsScrolled ifTrue:[ |
|
1662 | 121 |
clientView isNil ifTrue:[ |
1895
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
122 |
useApplicationSubView ifTrue:[ |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
123 |
clientView := ApplicationSubView new. |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
124 |
] ifFalse:[ |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
125 |
clientView := View new. |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
126 |
] |
1662 | 127 |
]. |
1412 | 128 |
aBoolean ifTrue:[ |
129 |
self scrolledView:(vs := ViewScroller new). |
|
130 |
vs scrolledView:clientView. |
|
131 |
] ifFalse:[ |
|
132 |
self scrolledView:clientView. |
|
133 |
]. |
|
134 |
clientViewIsScrolled := aBoolean. |
|
135 |
] |
|
136 |
||
1662 | 137 |
"Modified: / 30.1.2000 / 21:36:29 / cg" |
1412 | 138 |
! |
139 |
||
1450 | 140 |
setClient:anApplicationModel |
141 |
"set the client - do NOT rebuild" |
|
142 |
||
143 |
client := anApplicationModel |
|
144 |
! |
|
145 |
||
503 | 146 |
spec |
147 |
"return the value of the instance variable 'spec' (automatically generated)" |
|
148 |
||
1893 | 149 |
^ spec |
150 |
! |
|
503 | 151 |
|
152 |
spec:something |
|
153 |
"set the value of the instance variable 'spec' (automatically generated)" |
|
154 |
||
155 |
spec := something. |
|
156 |
self rebuild. |
|
819 | 157 |
! |
158 |
||
159 |
widget |
|
160 |
"ST80 compatibility. |
|
161 |
I am my own widget" |
|
162 |
||
163 |
^ self |
|
164 |
||
165 |
"Created: / 10.3.1998 / 16:20:52 / stefan" |
|
503 | 166 |
! ! |
167 |
||
1895
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
168 |
!SubCanvas methodsFor:'accessing - canvasView handling'! |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
169 |
|
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
170 |
keepClientView:aBoolean |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
171 |
keepClientView := aBoolean |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
172 |
! |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
173 |
|
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
174 |
useApplicationSubView:aBoolean |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
175 |
useApplicationSubView := aBoolean |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
176 |
! |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
177 |
|
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
178 |
useOwnBuilder:aBoolean |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
179 |
useOwnBuilder := aBoolean |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
180 |
! ! |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
181 |
|
1818 | 182 |
!SubCanvas methodsFor:'accessing-channels'! |
503 | 183 |
|
184 |
clientHolder |
|
185 |
^ clientHolder |
|
186 |
! |
|
187 |
||
188 |
clientHolder:aValueHolder |
|
189 |
||
190 |
clientHolder notNil ifTrue:[ |
|
191 |
clientHolder removeDependent:self |
|
192 |
]. |
|
193 |
(clientHolder := aValueHolder) notNil ifTrue:[ |
|
194 |
clientHolder addDependent:self |
|
195 |
]. |
|
557 | 196 |
self updateFromChannels |
503 | 197 |
! |
198 |
||
1893 | 199 |
clientView:aView |
200 |
||
201 |
clientView notNil ifTrue:[ |
|
202 |
clientView destroy |
|
203 |
]. |
|
204 |
clientView := aView |
|
205 |
! |
|
206 |
||
503 | 207 |
specHolder |
208 |
^ specHolder |
|
209 |
! |
|
210 |
||
211 |
specHolder:aValueHolder |
|
1905 | 212 |
|oldSpec| |
503 | 213 |
|
214 |
specHolder notNil ifTrue:[ |
|
1905 | 215 |
oldSpec := specHolder value. |
503 | 216 |
specHolder removeDependent:self |
217 |
]. |
|
218 |
(specHolder := aValueHolder) notNil ifTrue:[ |
|
219 |
specHolder addDependent:self |
|
220 |
]. |
|
1905 | 221 |
oldSpec ~~ specHolder value ifTrue:[ |
222 |
self updateFromChannels |
|
223 |
] |
|
503 | 224 |
! ! |
225 |
||
226 |
!SubCanvas methodsFor:'building'! |
|
227 |
||
1584
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
228 |
XXrebuild |
503 | 229 |
"rebuild |
230 |
" |
|
1577 | 231 |
|v subSpec savedView builderClass boundsOrLayout| |
455 | 232 |
|
1548
299e14135d2d
Late building if subcanvas does not have a superView. (cg)
Stefan Vogel <sv@exept.de>
parents:
1546
diff
changeset
|
233 |
superView isNil ifTrue:[ |
299e14135d2d
Late building if subcanvas does not have a superView. (cg)
Stefan Vogel <sv@exept.de>
parents:
1546
diff
changeset
|
234 |
lateBuild := true. |
299e14135d2d
Late building if subcanvas does not have a superView. (cg)
Stefan Vogel <sv@exept.de>
parents:
1546
diff
changeset
|
235 |
^ self |
299e14135d2d
Late building if subcanvas does not have a superView. (cg)
Stefan Vogel <sv@exept.de>
parents:
1546
diff
changeset
|
236 |
]. |
299e14135d2d
Late building if subcanvas does not have a superView. (cg)
Stefan Vogel <sv@exept.de>
parents:
1546
diff
changeset
|
237 |
|
1412 | 238 |
clientView notNil ifTrue:[ |
239 |
clientView destroySubViews |
|
455 | 240 |
]. |
241 |
||
242 |
spec notNil ifTrue:[ |
|
970
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
243 |
(subSpec := spec) isSymbol ifTrue:[ |
554 | 244 |
client isNil ifTrue:[ |
1216
c9f8253a9e7c
give a warning with nil client
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
245 |
'SubCanvas [warning]: no client - cannot build spec' infoPrintCR. |
554 | 246 |
^ self |
553 | 247 |
]. |
970
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
248 |
(subSpec := client class interfaceSpecFor:spec) isNil ifTrue:[ |
1216
c9f8253a9e7c
give a warning with nil client
Claus Gittinger <cg@exept.de>
parents:
973
diff
changeset
|
249 |
"/ Transcript showCR:'SubCanvas: nil spec'. |
503 | 250 |
^ self |
251 |
] |
|
252 |
]. |
|
973 | 253 |
|
554 | 254 |
builder isNil ifTrue:[ |
1383 | 255 |
client isNil ifTrue:[ |
256 |
builderClass := UIBuilder |
|
257 |
] ifFalse:[ |
|
258 |
builderClass := client builderClass |
|
259 |
]. |
|
260 |
builder := builderClass new. |
|
554 | 261 |
]. |
973 | 262 |
|
970
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
263 |
"/ old: |
1412 | 264 |
"/ builder buildFromSpec:subSpec in:clientView. |
970
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
265 |
|
973 | 266 |
"/ new (let app know (somehow) that this is a build |
267 |
"/ for a subcanvas (i.e. it can redefine the buildSubCanvase-method |
|
268 |
"/: |
|
970
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
269 |
savedView := builder window. |
1412 | 270 |
builder window:clientView. |
1450 | 271 |
[ |
272 |
client buildSubCanvas:subSpec withBuilder:builder. |
|
273 |
] valueNowOrOnUnwindDo:[ |
|
274 |
builder window:savedView. |
|
275 |
]. |
|
1412 | 276 |
clientViewIsScrolled ifTrue:[ |
1577 | 277 |
boundsOrLayout := builder spec window layout. |
278 |
boundsOrLayout isNil ifTrue:[ |
|
279 |
boundsOrLayout := builder spec window bounds |
|
280 |
]. |
|
1412 | 281 |
clientView |
1577 | 282 |
extent:(boundsOrLayout rectangleRelativeTo:self bounds preferred:nil) extent. |
1412 | 283 |
]. |
284 |
||
503 | 285 |
self realized ifTrue:[ |
1412 | 286 |
clientView realizeAllSubViews |
503 | 287 |
] |
288 |
] |
|
970
8cbadf2b9825
also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents:
819
diff
changeset
|
289 |
|
973 | 290 |
"Modified: / 20.6.1998 / 14:29:00 / cg" |
503 | 291 |
! |
292 |
||
1584
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
293 |
container:aView |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
294 |
super container:aView. |
1846 | 295 |
|
296 |
"/ my builder can only build the components, when I have a container |
|
297 |
"/ lateBuild is set, if the spec was set some time ago, when I had no container |
|
298 |
"/ Now, we know where to build the GUI ... |
|
299 |
"/ ... and must hurry up to create the widgets. |
|
1584
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
300 |
lateBuild == true ifTrue:[ |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
301 |
lateBuild := false. |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
302 |
self rebuild |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
303 |
]. |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
304 |
! |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
305 |
|
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
306 |
rebuild |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
307 |
"rebuild |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
308 |
" |
1893 | 309 |
|v subSpec savedView savedBuilder builderClass| |
1584
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
310 |
|
1856 | 311 |
"/ if the superView is not yet created, |
312 |
"/ we MUST delay building... (sigh) |
|
1905 | 313 |
superView isNil ifTrue:[ |
1584
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
314 |
lateBuild := true. |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
315 |
^ self |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
316 |
]. |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
317 |
|
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
318 |
clientView notNil ifTrue:[ |
1893 | 319 |
clientView destroySubViews. |
1584
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
320 |
]. |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
321 |
|
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
322 |
spec notNil ifTrue:[ |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
323 |
(subSpec := spec) isSymbol ifTrue:[ |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
324 |
client isNil ifTrue:[ |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
325 |
'SubCanvas [warning]: no client - cannot build spec' infoPrintCR. |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
326 |
^ self |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
327 |
]. |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
328 |
(subSpec := client class interfaceSpecFor:spec) isNil ifTrue:[ |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
329 |
"/ Transcript showCR:'SubCanvas: nil spec'. |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
330 |
^ self |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
331 |
] |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
332 |
]. |
1662 | 333 |
subSpec isArray ifTrue:[ |
334 |
subSpec := subSpec decodeAsLiteralArray |
|
335 |
]. |
|
1584
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
336 |
|
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
337 |
builder isNil ifTrue:[ |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
338 |
client isNil ifTrue:[ |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
339 |
builderClass := UIBuilder |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
340 |
] ifFalse:[ |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
341 |
builderClass := client builderClass |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
342 |
]. |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
343 |
builder := builderClass new. |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
344 |
]. |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
345 |
|
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
346 |
"/ old: |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
347 |
"/ builder buildFromSpec:subSpec in:clientView. |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
348 |
|
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
349 |
"/ new (let app know (somehow) that this is a build |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
350 |
"/ for a subcanvas (i.e. it can redefine the buildSubCanvas-method): |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
351 |
|
1895
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
352 |
keepClientView ifFalse:[ |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
353 |
(clientView notNil and:[clientView application ~~ client]) ifTrue:[ |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
354 |
clientView destroy. |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
355 |
clientView := nil. |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
356 |
]. |
1893 | 357 |
]. |
358 |
||
359 |
clientView isNil ifTrue:[ |
|
1895
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
360 |
useApplicationSubView ifTrue:[ |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
361 |
clientView := ApplicationSubView new. |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
362 |
clientView application:client. |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
363 |
] ifFalse:[ |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
364 |
clientView := View new. |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
365 |
] |
1893 | 366 |
]. |
367 |
||
1584
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
368 |
savedView := builder window. |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
369 |
builder window:clientView. |
1895
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
370 |
useOwnBuilder ifTrue:[ |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
371 |
savedBuilder := client builder. |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
372 |
client builder:builder. |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
373 |
]. |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
374 |
|
1584
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
375 |
[ |
1905 | 376 |
|
1584
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
377 |
client buildSubCanvas:subSpec withBuilder:builder. |
1905 | 378 |
keepClientView ifFalse:[ |
379 |
(scrolledView notNil and:[clientView isSubViewOf:scrolledView]) ifTrue:[ |
|
1906 | 380 |
self error:'this should not happen' |
1905 | 381 |
] ifFalse:[ |
382 |
self scrolledView:clientView. |
|
383 |
] |
|
1907 | 384 |
] ifTrue:[ |
385 |
(clientView isSubViewOf:self) ifFalse:[ |
|
386 |
self scrolledView:clientView. |
|
387 |
] |
|
1905 | 388 |
] |
1584
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
389 |
] valueNowOrOnUnwindDo:[ |
1662 | 390 |
savedView notNil ifTrue:[ |
391 |
builder window:savedView. |
|
1893 | 392 |
]. |
1895
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
393 |
useOwnBuilder ifTrue:[ |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
394 |
savedBuilder notNil ifTrue:[ |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
395 |
client builder:savedBuilder. |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
396 |
] |
1662 | 397 |
] |
1584
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
398 |
]. |
1893 | 399 |
|
1664 | 400 |
clientViewIsScrolled ifTrue:[ |
1584
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
401 |
clientView extent:((subSpec window layout) ? (subSpec window bounds)) extent. |
1664 | 402 |
]. |
1584
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
403 |
|
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
404 |
self realized ifTrue:[ |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
405 |
clientView realizeAllSubViews |
1662 | 406 |
]. |
1584
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
407 |
] |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
408 |
|
1662 | 409 |
"Modified: / 30.1.2000 / 21:36:40 / cg" |
1584
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
410 |
! |
f020416e00ae
LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents:
1577
diff
changeset
|
411 |
|
503 | 412 |
releaseAllComponents |
1412 | 413 |
clientView destroySubViews. |
503 | 414 |
builder := nil. |
415 |
spec := nil. |
|
416 |
client := nil. |
|
1662 | 417 |
|
418 |
"Modified: / 31.1.2000 / 16:56:14 / cg" |
|
503 | 419 |
! ! |
420 |
||
421 |
!SubCanvas methodsFor:'change & update'! |
|
422 |
||
423 |
update:something with:aParameter from:changedObject |
|
424 |
"one of my models changed its value |
|
425 |
" |
|
557 | 426 |
(changedObject == clientHolder or:[changedObject == specHolder]) ifTrue:[ |
427 |
self updateFromChannels |
|
428 |
] ifFalse:[ |
|
429 |
super update:something with:aParameter from:changedObject. |
|
430 |
] |
|
431 |
||
432 |
! |
|
433 |
||
434 |
updateFromChannels |
|
435 |
"update canvas from channel |
|
436 |
" |
|
437 |
|client spec| |
|
438 |
||
439 |
clientHolder isNil ifTrue:[ |
|
440 |
client := self application |
|
441 |
] ifFalse:[ |
|
442 |
client := clientHolder value |
|
554 | 443 |
]. |
503 | 444 |
|
557 | 445 |
specHolder isNil ifTrue:[ |
446 |
spec := #windowSpec |
|
447 |
] ifFalse:[ |
|
448 |
spec := specHolder value |
|
449 |
]. |
|
450 |
(client notNil and:[spec notNil]) ifTrue:[ |
|
451 |
] ifFalse:[ |
|
1467 | 452 |
"/ spec notNil ifTrue:[ |
453 |
"/ self halt:'spec but no app'. |
|
454 |
"/ ]. |
|
1894 | 455 |
client := nil. |
456 |
spec := #windowSpec. "/ is that true ? |
|
457 |
]. |
|
1905 | 458 |
|
1894 | 459 |
self client:client spec:spec builder:nil |
503 | 460 |
|
1467 | 461 |
"Modified: / 5.8.1999 / 13:35:26 / cg" |
503 | 462 |
! ! |
463 |
||
464 |
!SubCanvas methodsFor:'initialization'! |
|
465 |
||
609 | 466 |
destroy |
1471
09a5803325e4
when destroying or changing the client, release as subApp
Claus Gittinger <cg@exept.de>
parents:
1467
diff
changeset
|
467 |
client notNil ifTrue:[ |
1702 | 468 |
client == self application ifTrue:[ |
469 |
client releaseAsSubCanvas. |
|
470 |
] ifFalse:[ |
|
471 |
client release |
|
472 |
]. |
|
1471
09a5803325e4
when destroying or changing the client, release as subApp
Claus Gittinger <cg@exept.de>
parents:
1467
diff
changeset
|
473 |
]. |
09a5803325e4
when destroying or changing the client, release as subApp
Claus Gittinger <cg@exept.de>
parents:
1467
diff
changeset
|
474 |
|
609 | 475 |
clientHolder notNil ifTrue:[ |
476 |
clientHolder removeDependent:self. |
|
477 |
clientHolder := nil. |
|
478 |
]. |
|
479 |
specHolder notNil ifTrue:[ |
|
480 |
specHolder removeDependent:self. |
|
481 |
specHolder := nil. |
|
482 |
]. |
|
483 |
super destroy. |
|
1702 | 484 |
|
485 |
"Modified: / 13.2.2000 / 23:31:12 / cg" |
|
609 | 486 |
! |
487 |
||
503 | 488 |
initialize |
1412 | 489 |
|
503 | 490 |
super initialize. |
1893 | 491 |
"/ self scrolledView:(clientView := ApplicationSubView new). |
1412 | 492 |
clientViewIsScrolled := false. |
493 |
||
1895
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
494 |
"/ these defaults make subCanvas compatible with VW; |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
495 |
"/ however, they make our life difficult sometimes. |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
496 |
keepClientView := true. |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
497 |
useApplicationSubView := false. |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
498 |
useOwnBuilder := false. |
a1b2502c91d7
went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents:
1894
diff
changeset
|
499 |
|
503 | 500 |
spec := #windowSpec. |
1662 | 501 |
|
502 |
"Modified: / 31.1.2000 / 16:56:31 / cg" |
|
503 | 503 |
! ! |
504 |
||
1720
d855968ce342
redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
505 |
!SubCanvas methodsFor:'layout'! |
d855968ce342
redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
506 |
|
d855968ce342
redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
507 |
usedScrolledViewHMarginWhenHasV:hasV andHasH:hasH |
d855968ce342
redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
508 |
"return the horizontal margin around (outer margin). |
d855968ce342
redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
509 |
Redefined to avoid margin when no scrollers are present" |
d855968ce342
redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
510 |
|
d855968ce342
redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
511 |
^ (hasV or:[hasH]) ifTrue:[scrolledViewHMargin] ifFalse:[0] |
d855968ce342
redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
512 |
|
d855968ce342
redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
513 |
|
d855968ce342
redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
514 |
! |
d855968ce342
redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
515 |
|
d855968ce342
redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
516 |
usedScrolledViewVMarginWhenHasV:hasV andHasH:hasH |
d855968ce342
redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
517 |
"return the horizontal margin around (outer margin). |
d855968ce342
redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
518 |
Redefined to avoid margin when no scrollers are present" |
d855968ce342
redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
519 |
|
d855968ce342
redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
520 |
^ (hasV or:[hasH]) ifTrue:[scrolledViewVMargin] ifFalse:[0] |
d855968ce342
redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
521 |
|
d855968ce342
redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
522 |
|
d855968ce342
redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
523 |
! ! |
d855968ce342
redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents:
1702
diff
changeset
|
524 |
|
503 | 525 |
!SubCanvas methodsFor:'queries'! |
526 |
||
527 |
application |
|
528 |
"return the application, under which this view was opened, |
|
529 |
" |
|
530 |
||
531 |
client notNil ifTrue:[ |
|
532 |
^ client |
|
455 | 533 |
]. |
503 | 534 |
^ super application |
535 |
||
455 | 536 |
! ! |
537 |
||
538 |
!SubCanvas class methodsFor:'documentation'! |
|
539 |
||
540 |
version |
|
1907 | 541 |
^ '$Header: /cvs/stx/stx/libwidg2/SubCanvas.st,v 1.34 2000-12-15 16:41:36 cg Exp $' |
455 | 542 |
! ! |