author | Claus Gittinger <cg@exept.de> |
Tue, 26 Feb 2008 11:20:50 +0100 | |
changeset 2297 | ee43ce83094d |
parent 2283 | b14becb50aac |
child 2316 | 32e98f335115 |
permissions | -rw-r--r-- |
164 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by eXept Software AG |
|
3 |
All Rights Reserved |
|
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 |
" |
|
1386 | 12 |
"{ Package: 'stx:libtool2' }" |
13 |
||
164 | 14 |
ApplicationModel subclass:#UISpecificationTool |
759 | 15 |
instanceVariableNames:'modifiedHolder aspects specification selection specChannel |
1307 | 16 |
buildInView listOfSpecViews' |
164 | 17 |
classVariableNames:'' |
18 |
poolDictionaries:'' |
|
19 |
category:'Interface-UIPainter' |
|
20 |
! |
|
21 |
||
1307 | 22 |
ViewScroller subclass:#BuildInView |
1573 | 23 |
instanceVariableNames:'' |
1307 | 24 |
classVariableNames:'' |
25 |
poolDictionaries:'' |
|
26 |
privateIn:UISpecificationTool |
|
27 |
! |
|
28 |
||
164 | 29 |
!UISpecificationTool class methodsFor:'documentation'! |
30 |
||
31 |
copyright |
|
32 |
" |
|
33 |
COPYRIGHT (c) 1995 by eXept Software AG |
|
34 |
All Rights Reserved |
|
35 |
||
36 |
This software is furnished under a license and may be used |
|
37 |
only in accordance with the terms of that license and with the |
|
38 |
inclusion of the above copyright notice. This software may not |
|
39 |
be provided or otherwise made available to, or used by, any |
|
40 |
other person. No title to or ownership of the software is |
|
41 |
hereby transferred. |
|
42 |
" |
|
43 |
||
44 |
||
45 |
||
46 |
! |
|
47 |
||
48 |
documentation |
|
49 |
" |
|
50 |
used by the UIPainter to manipulate the specifications of the selected component |
|
51 |
||
52 |
[author:] |
|
53 |
Claus Atzkern |
|
54 |
||
55 |
[see also:] |
|
56 |
UIPainter |
|
57 |
UILayoutTool |
|
58 |
UIHelpTool |
|
59 |
" |
|
60 |
! ! |
|
61 |
||
1963
a0c51ed97fc3
autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents:
1956
diff
changeset
|
62 |
!UISpecificationTool class methodsFor:'help specs'! |
a0c51ed97fc3
autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents:
1956
diff
changeset
|
63 |
|
a0c51ed97fc3
autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents:
1956
diff
changeset
|
64 |
helpSpec |
a0c51ed97fc3
autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents:
1956
diff
changeset
|
65 |
"This resource specification was automatically generated |
a0c51ed97fc3
autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents:
1956
diff
changeset
|
66 |
by the UIHelpTool of ST/X." |
a0c51ed97fc3
autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents:
1956
diff
changeset
|
67 |
|
a0c51ed97fc3
autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents:
1956
diff
changeset
|
68 |
"Do not manually edit this!! If it is corrupted, |
a0c51ed97fc3
autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents:
1956
diff
changeset
|
69 |
the UIHelpTool may not be able to read the specification." |
a0c51ed97fc3
autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents:
1956
diff
changeset
|
70 |
|
a0c51ed97fc3
autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents:
1956
diff
changeset
|
71 |
" |
a0c51ed97fc3
autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents:
1956
diff
changeset
|
72 |
UIHelpTool openOnClass:UISpecificationTool |
a0c51ed97fc3
autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents:
1956
diff
changeset
|
73 |
" |
a0c51ed97fc3
autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents:
1956
diff
changeset
|
74 |
|
a0c51ed97fc3
autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents:
1956
diff
changeset
|
75 |
<resource: #help> |
a0c51ed97fc3
autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents:
1956
diff
changeset
|
76 |
|
a0c51ed97fc3
autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents:
1956
diff
changeset
|
77 |
^ super helpSpec addPairsFrom:#( |
a0c51ed97fc3
autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents:
1956
diff
changeset
|
78 |
|
a0c51ed97fc3
autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents:
1956
diff
changeset
|
79 |
#autoScrollHorizontal |
a0c51ed97fc3
autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents:
1956
diff
changeset
|
80 |
'' |
a0c51ed97fc3
autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents:
1956
diff
changeset
|
81 |
|
2209
c7ac53d62021
action creation/browse added
Claus Gittinger <cg@exept.de>
parents:
2160
diff
changeset
|
82 |
#browseAction |
c7ac53d62021
action creation/browse added
Claus Gittinger <cg@exept.de>
parents:
2160
diff
changeset
|
83 |
'Browse/Create the Action method.' |
c7ac53d62021
action creation/browse added
Claus Gittinger <cg@exept.de>
parents:
2160
diff
changeset
|
84 |
|
2237
c1d95982e1c3
browse/generate aspect methods
Claus Gittinger <cg@exept.de>
parents:
2211
diff
changeset
|
85 |
#browseAspectMethod |
c1d95982e1c3
browse/generate aspect methods
Claus Gittinger <cg@exept.de>
parents:
2211
diff
changeset
|
86 |
'Browse/Create the Aspect method.' |
c1d95982e1c3
browse/generate aspect methods
Claus Gittinger <cg@exept.de>
parents:
2211
diff
changeset
|
87 |
|
2283 | 88 |
#editListSpec |
89 |
'Edit the contents of the list (inline)' |
|
90 |
||
2239
2f8dda52674e
aspect chooser in inputFieldSpec (prep)
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
91 |
#formatString |
2f8dda52674e
aspect chooser in inputFieldSpec (prep)
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
92 |
'' |
2f8dda52674e
aspect chooser in inputFieldSpec (prep)
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
93 |
|
2f8dda52674e
aspect chooser in inputFieldSpec (prep)
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
94 |
#textModel |
2f8dda52674e
aspect chooser in inputFieldSpec (prep)
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
95 |
'' |
2f8dda52674e
aspect chooser in inputFieldSpec (prep)
Claus Gittinger <cg@exept.de>
parents:
2237
diff
changeset
|
96 |
|
1963
a0c51ed97fc3
autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents:
1956
diff
changeset
|
97 |
) |
a0c51ed97fc3
autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents:
1956
diff
changeset
|
98 |
! ! |
a0c51ed97fc3
autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents:
1956
diff
changeset
|
99 |
|
2209
c7ac53d62021
action creation/browse added
Claus Gittinger <cg@exept.de>
parents:
2160
diff
changeset
|
100 |
!UISpecificationTool class methodsFor:'image specs'! |
c7ac53d62021
action creation/browse added
Claus Gittinger <cg@exept.de>
parents:
2160
diff
changeset
|
101 |
|
c7ac53d62021
action creation/browse added
Claus Gittinger <cg@exept.de>
parents:
2160
diff
changeset
|
102 |
browseActionImage |
c7ac53d62021
action creation/browse added
Claus Gittinger <cg@exept.de>
parents:
2160
diff
changeset
|
103 |
^ UIPainter browseActionImage |
2283 | 104 |
! |
105 |
||
106 |
editTableIcon |
|
107 |
^ UIPainter editTableIcon |
|
2209
c7ac53d62021
action creation/browse added
Claus Gittinger <cg@exept.de>
parents:
2160
diff
changeset
|
108 |
! ! |
c7ac53d62021
action creation/browse added
Claus Gittinger <cg@exept.de>
parents:
2160
diff
changeset
|
109 |
|
164 | 110 |
!UISpecificationTool class methodsFor:'interface specs'! |
111 |
||
112 |
windowSpec |
|
1307 | 113 |
"This resource specification was automatically generated |
114 |
by the UIPainter of ST/X." |
|
164 | 115 |
|
1307 | 116 |
"Do not manually edit this!! If it is corrupted, |
117 |
the UIPainter may not be able to read the specification." |
|
164 | 118 |
|
119 |
" |
|
120 |
UIPainter new openOnClass:UISpecificationTool andSelector:#windowSpec |
|
121 |
UISpecificationTool new openInterface:#windowSpec |
|
1307 | 122 |
UISpecificationTool open |
164 | 123 |
" |
124 |
||
125 |
<resource: #canvas> |
|
126 |
||
1307 | 127 |
^ |
128 |
#(#FullSpec |
|
129 |
#name: #windowSpec |
|
130 |
#window: |
|
131 |
#(#WindowSpec |
|
132 |
#label: 'unnamed canvas' |
|
133 |
#name: 'unnamed canvas' |
|
1313 | 134 |
#bounds: #(#Rectangle 12 22 312 322) |
1307 | 135 |
) |
136 |
#component: |
|
137 |
#(#SpecCollection |
|
138 |
#collection: #( |
|
139 |
#(#ArbitraryComponentSpec |
|
1313 | 140 |
#name: 'BuildInView' |
1307 | 141 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
1313 | 142 |
#hasVerticalScrollBar: true |
143 |
#miniScrollerVertical: true |
|
144 |
#autoHideScrollBars: true |
|
1307 | 145 |
#hasBorder: false |
1313 | 146 |
#component: #buildInView |
1307 | 147 |
) |
148 |
) |
|
149 |
||
150 |
) |
|
164 | 151 |
) |
152 |
! ! |
|
153 |
||
1781
d67090b1ad57
resources shared with UIPainter class
Claus Gittinger <cg@exept.de>
parents:
1677
diff
changeset
|
154 |
!UISpecificationTool class methodsFor:'resources'! |
d67090b1ad57
resources shared with UIPainter class
Claus Gittinger <cg@exept.de>
parents:
1677
diff
changeset
|
155 |
|
d67090b1ad57
resources shared with UIPainter class
Claus Gittinger <cg@exept.de>
parents:
1677
diff
changeset
|
156 |
classResources |
d67090b1ad57
resources shared with UIPainter class
Claus Gittinger <cg@exept.de>
parents:
1677
diff
changeset
|
157 |
"my translations are found in the UIPainter classes resources" |
d67090b1ad57
resources shared with UIPainter class
Claus Gittinger <cg@exept.de>
parents:
1677
diff
changeset
|
158 |
|
d67090b1ad57
resources shared with UIPainter class
Claus Gittinger <cg@exept.de>
parents:
1677
diff
changeset
|
159 |
^ UIPainter classResources |
d67090b1ad57
resources shared with UIPainter class
Claus Gittinger <cg@exept.de>
parents:
1677
diff
changeset
|
160 |
! ! |
d67090b1ad57
resources shared with UIPainter class
Claus Gittinger <cg@exept.de>
parents:
1677
diff
changeset
|
161 |
|
1331 | 162 |
!UISpecificationTool methodsFor:'accessing-channels'! |
1315 | 163 |
|
164 |
modifiedHolder:aValueHolder |
|
165 |
"set the value holder set to true in case of modifying attributes |
|
166 |
" |
|
167 |
||
168 |
modifiedHolder removeDependent:self. |
|
164 | 169 |
|
1315 | 170 |
(modifiedHolder := aValueHolder) notNil ifTrue:[ |
171 |
modifiedHolder addDependent:self. |
|
172 |
]. |
|
1063
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1051
diff
changeset
|
173 |
|
1315 | 174 |
! ! |
175 |
||
1331 | 176 |
!UISpecificationTool methodsFor:'accessing-specification'! |
1063
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1051
diff
changeset
|
177 |
|
2245 | 178 |
listOfAspects |
179 |
^ masterApplication listOfAspects |
|
180 |
||
181 |
"Created: / 12-01-2008 / 19:24:39 / cg" |
|
182 |
! |
|
183 |
||
184 |
listOfCallbacks |
|
185 |
^ masterApplication listOfCallbacks |
|
186 |
||
187 |
"Created: / 12-01-2008 / 19:25:05 / cg" |
|
188 |
! |
|
189 |
||
172 | 190 |
specification |
191 |
"gets current edit specification |
|
192 |
" |
|
193 |
^ specification |
|
194 |
||
195 |
||
196 |
! |
|
197 |
||
198 |
specification:aSpec |
|
199 |
"sets current edit specification |
|
200 |
" |
|
1315 | 201 |
aSpec notNil ifTrue:[ |
202 |
"/ same type of spec - simply change the spec; no need to setup everything |
|
203 |
specification class == aSpec class ifTrue:[ |
|
204 |
specification := aSpec. |
|
205 |
specChannel value:specification. |
|
206 |
^ self |
|
207 |
] |
|
1307 | 208 |
]. |
428 | 209 |
|
1315 | 210 |
"/ release resources |
211 |
specChannel release. |
|
212 |
aspects release. |
|
213 |
selection := listOfSpecViews := nil. |
|
1573 | 214 |
buildInView destroyAllClientViews. |
1315 | 215 |
|
216 |
(specification := aSpec) isNil ifTrue:[ |
|
217 |
aspects := specChannel := nil. |
|
218 |
^ self |
|
1307 | 219 |
]. |
220 |
||
221 |
"/ some tricky specs need the builder during the addBindings phase. |
|
222 |
"/ This is passed down in a special UIBindingsDictionary |
|
223 |
"/ (remain backward compatible) |
|
536
3991e37ec19f
pass special dictionary as bindings-environmnt
Claus Gittinger <cg@exept.de>
parents:
428
diff
changeset
|
224 |
|
1307 | 225 |
aspects := UISpecification newBindingsDictionary. |
226 |
aspects builder:builder. |
|
227 |
aspects at:#modifiedChannel put:modifiedHolder. |
|
228 |
aspects at:#acceptChannel put:self acceptChannel. |
|
172 | 229 |
|
2245 | 230 |
aspects at:#listOfAspects put:[self listOfAspects]. |
231 |
aspects at:#listOfCallbacks put:[self listOfCallbacks]. |
|
232 |
||
1307 | 233 |
specChannel := specification asValue. |
234 |
specification class addBindingsTo:aspects for:specification channel:specChannel. |
|
536
3991e37ec19f
pass special dictionary as bindings-environmnt
Claus Gittinger <cg@exept.de>
parents:
428
diff
changeset
|
235 |
|
1307 | 236 |
"/ arrange for being notified, if any aspect changes |
237 |
aspects do:[:el| el addDependent:self ]. |
|
2245 | 238 |
|
239 |
"Modified: / 12-01-2008 / 19:28:47 / cg" |
|
172 | 240 |
! ! |
241 |
||
364 | 242 |
!UISpecificationTool methodsFor:'actions'! |
243 |
||
244 |
setMaxExtent |
|
245 |
"set the windows maxExtent from its current extent" |
|
246 |
||
247 |
|canvas currentExtent| |
|
248 |
||
2211 | 249 |
canvas := self masterApplication canvas. |
364 | 250 |
currentExtent := canvas extent. |
251 |
(self aspectFor:#maxX) value:currentExtent x. |
|
252 |
(self aspectFor:#maxY) value:currentExtent y. |
|
253 |
||
254 |
"Modified: / 29.10.1997 / 18:29:17 / cg" |
|
255 |
! |
|
256 |
||
257 |
setMinExtent |
|
258 |
"set the windows minExtent from its current extent" |
|
259 |
||
260 |
|canvas currentExtent| |
|
261 |
||
2211 | 262 |
canvas := self masterApplication canvas. |
364 | 263 |
currentExtent := canvas extent. |
264 |
(self aspectFor:#minX) value:currentExtent x. |
|
265 |
(self aspectFor:#minY) value:currentExtent y. |
|
266 |
||
267 |
"Created: / 29.10.1997 / 18:17:55 / cg" |
|
268 |
"Modified: / 29.10.1997 / 18:28:53 / cg" |
|
269 |
! ! |
|
270 |
||
164 | 271 |
!UISpecificationTool methodsFor:'bindings'! |
272 |
||
1315 | 273 |
acceptChannel |
2245 | 274 |
^ masterApplication acceptChannel |
1315 | 275 |
|
2245 | 276 |
"Modified: / 12-01-2008 / 11:28:38 / cg" |
1315 | 277 |
! |
278 |
||
164 | 279 |
aspectFor:aKey |
2245 | 280 |
"returns the aspect for a key or nil" |
281 |
||
164 | 282 |
aspects notNil ifTrue:[ |
283 |
^ aspects at:aKey ifAbsent:nil |
|
284 |
]. |
|
285 |
^ super aspectFor:aKey |
|
286 |
||
2245 | 287 |
"Modified: / 12-01-2008 / 11:28:52 / cg" |
428 | 288 |
! |
289 |
||
1313 | 290 |
buildInView |
291 |
^ buildInView |
|
1307 | 292 |
! |
293 |
||
584
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
294 |
specificationFor:aKey |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
295 |
"this is called if our current specification contains |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
296 |
subspecifications or subcanvases. |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
297 |
Get the subspecification from the current specification" |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
298 |
|
1307 | 299 |
specification notNil ifTrue:[ |
300 |
^ specification class perform:aKey ifNotUnderstood:nil |
|
584
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
301 |
]. |
351914fcc5a4
Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents:
580
diff
changeset
|
302 |
^ nil |
172 | 303 |
! ! |
304 |
||
305 |
!UISpecificationTool methodsFor:'change & update'! |
|
164 | 306 |
|
172 | 307 |
update |
308 |
"reload specification |
|
164 | 309 |
" |
172 | 310 |
specChannel notNil ifTrue:[ |
311 |
specChannel value:specification. |
|
312 |
] |
|
164 | 313 |
|
314 |
||
315 |
! |
|
316 |
||
317 |
update:something with:someArgument from:someone |
|
318 |
"any attribute changed its state in the current specification |
|
319 |
" |
|
320 |
someone ~~ modifiedHolder ifTrue:[ |
|
893 | 321 |
"/ any in the spec has changed. |
322 |
"/ update my modified holders value |
|
323 |
||
1071 | 324 |
modifiedHolder value:true |
164 | 325 |
] |
326 |
||
893 | 327 |
"Modified: / 16.7.1998 / 19:25:59 / cg" |
164 | 328 |
! ! |
329 |
||
1956 | 330 |
!UISpecificationTool methodsFor:'help'! |
331 |
||
332 |
basicHelpTextForKey:aKey |
|
333 |
"activeHelp interface: return some help text for a key. |
|
334 |
Redefined to ask the current components Spec first." |
|
335 |
||
336 |
|helpText| |
|
337 |
||
338 |
"/ first, ask the spec |
|
339 |
helpText := (specification helpSpec) at:aKey ifAbsent:nil. |
|
340 |
"/ DEBUG: helpText isNil ifTrue:[^ 'No help for key: ', aKey ]. |
|
341 |
||
342 |
helpText isNil ifTrue:[ |
|
343 |
helpText := super basicHelpTextForKey:aKey. |
|
344 |
]. |
|
345 |
"/ DEBUG: ^ aKey , ': ' , helpText |
|
346 |
^ helpText |
|
347 |
! ! |
|
348 |
||
1315 | 349 |
!UISpecificationTool methodsFor:'initialization'! |
350 |
||
351 |
initialize |
|
352 |
super initialize. |
|
353 |
buildInView := BuildInView new. |
|
1573 | 354 |
buildInView keepViews:true. |
1315 | 355 |
! ! |
356 |
||
164 | 357 |
!UISpecificationTool methodsFor:'selection'! |
358 |
||
359 |
selection:something |
|
172 | 360 |
"selection changed |
361 |
" |
|
1307 | 362 |
|slices index spec window| |
164 | 363 |
|
172 | 364 |
specification notNil ifTrue:[ |
365 |
slices := specification class slices. |
|
1307 | 366 |
index := slices findFirst:[:aSlice| aSlice first = something ]. |
164 | 367 |
|
1307 | 368 |
index ~~ 0 ifTrue:[ |
369 |
spec := specification class perform:((slices at:index) last) |
|
428 | 370 |
] |
164 | 371 |
]. |
372 |
||
172 | 373 |
spec ~= selection ifTrue:[ |
1307 | 374 |
(selection := spec) notNil ifTrue:[ |
375 |
listOfSpecViews isNil ifTrue:[ |
|
376 |
listOfSpecViews := Array new:(slices size). |
|
377 |
] ifFalse:[ |
|
378 |
window := listOfSpecViews at:index |
|
379 |
]. |
|
380 |
window isNil ifTrue:[ |
|
381 |
builder buildFromSpec:spec in:(window := SimpleView new). |
|
382 |
listOfSpecViews at:index put:window. |
|
383 |
]. |
|
384 |
]. |
|
1315 | 385 |
buildInView scrolledView:window. |
164 | 386 |
]. |
387 |
! ! |
|
388 |
||
1307 | 389 |
!UISpecificationTool::BuildInView methodsFor:'accessing'! |
759 | 390 |
|
2160 | 391 |
mapped |
392 |
super mapped. |
|
393 |
||
394 |
scrolledView notNil ifTrue:[ |
|
395 |
scrolledView beVisible. |
|
396 |
scrolledView raise. |
|
397 |
]. |
|
398 |
! |
|
399 |
||
1307 | 400 |
scrolledView:aView |
401 |
"set the view to be scrolled" |
|
1573 | 402 |
|wrapper y| |
1307 | 403 |
|
404 |
scrolledView == aView ifTrue:[^ self]. |
|
759 | 405 |
|
2160 | 406 |
scrolledView notNil ifTrue:[ |
407 |
scrolledView unmap. |
|
408 |
]. |
|
409 |
(scrolledView := aView) notNil ifTrue:[ |
|
410 |
scrolledView superView ~~ frame ifTrue:[ |
|
411 |
scrolledView borderWidth:0; level:0. |
|
1307 | 412 |
|
2160 | 413 |
frame addSubView:scrolledView. |
1573 | 414 |
|
2160 | 415 |
scrolledView subViews size == 1 ifTrue:[ |
416 |
wrapper := scrolledView subViews first. |
|
417 |
wrapper isScrollWrapper ifTrue:[ |
|
418 |
"/ give it a full-relative size, and let it do |
|
419 |
"/ the scrolling itself. |
|
420 |
y := 1.0 |
|
421 |
] |
|
422 |
]. |
|
423 |
y isNil ifTrue:[ |
|
424 |
y := scrolledView preferredExtent y |
|
425 |
]. |
|
426 |
scrolledView origin:0@0 corner:1.0 @ y. |
|
427 |
scrolledView allViewBackground:(self viewBackground). |
|
1351
811686e8acab
no additional scrollBar, if embedded view is itself a scrollable
Claus Gittinger <cg@exept.de>
parents:
1344
diff
changeset
|
428 |
]. |
2160 | 429 |
]. |
430 |
shown ifTrue:[ |
|
431 |
scrolledView beVisible. |
|
432 |
scrolledView raise. |
|
1307 | 433 |
self sizeChanged:nil. |
434 |
]. |
|
1573 | 435 |
model value:scrolledView. |
759 | 436 |
! ! |
437 |
||
1313 | 438 |
!UISpecificationTool::BuildInView methodsFor:'initialization'! |
439 |
||
440 |
level:aLevel |
|
441 |
super level:0 |
|
442 |
! |
|
443 |
||
444 |
realize |
|
1315 | 445 |
|
1313 | 446 |
super realize. |
447 |
superView notNil ifTrue:[superView level:0]. |
|
448 |
! ! |
|
449 |
||
164 | 450 |
!UISpecificationTool class methodsFor:'documentation'! |
451 |
||
452 |
version |
|
453 |
^ '$Header$' |
|
454 |
! ! |