author | Claus Gittinger <cg@exept.de> |
Fri, 07 Mar 1997 15:25:27 +0100 | |
changeset 1113 | c0933ddd159d |
parent 1111 | bdad313b2397 |
child 1125 | bdbba5ef2e1c |
permissions | -rw-r--r-- |
0 | 1 |
" |
5 | 2 |
COPYRIGHT (c) 1989 by Claus Gittinger |
1111 | 3 |
All Rights Reserved |
0 | 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 |
||
119 | 13 |
SimpleView subclass:#ScrollableView |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
14 |
instanceVariableNames:'scrolledView vScrollBar hScrollBar helpView innerMargin |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
15 |
scrollBarPosition lockUpdates' |
1111 | 16 |
classVariableNames:'DefaultScrolledViewLevel DefaultScrolledViewMargin |
17 |
DefaultScrollBarSpacing DefaultScrolledViewBorderWidth |
|
18 |
DefaultLevel DefaultScrollBarLevel MyDefaultViewBackgroundColor' |
|
444
ef26eba8c854
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
300
diff
changeset
|
19 |
poolDictionaries:'' |
ef26eba8c854
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
300
diff
changeset
|
20 |
category:'Views-Basic' |
0 | 21 |
! |
22 |
||
852 | 23 |
!ScrollableView class methodsFor:'documentation'! |
38 | 24 |
|
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
1111 | 28 |
All Rights Reserved |
38 | 29 |
|
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! |
|
38 |
||
39 |
documentation |
|
40 |
" |
|
41 |
a view containing a scrollbar and some other (slave-)view. |
|
130 | 42 |
This view wraps scrollbar(s) around the view to be scrolled. |
65 | 43 |
The scrollbars are setup to send scrollUp/scrollDown/scrollVerticalTo |
44 |
and scrollLeft/scrollRight/scrollHorizontalTo- messages whenever moved. |
|
130 | 45 |
The view itself has to implement these (there is a default implementation |
65 | 46 |
in the common View class for this. |
47 |
||
48 |
For the scrollbars to know about the full (maximum) size, the view |
|
49 |
must implement #heightOfContents and/or #widthOfContents. |
|
130 | 50 |
The values returned by these methods are used to compute the fraction |
51 |
which is visible (i.e. the scrollers thumb heights). |
|
65 | 52 |
|
38 | 53 |
There are two ways to create a ScrollableView: |
54 |
if the type of the view to be scrolled is known in advance, |
|
55 |
use: |
|
584 | 56 |
v := ScrollableView for:<ViewClass> |
130 | 57 |
or: |
584 | 58 |
v := ScrollableView for:<ViewClass> in:someSuperView |
65 | 59 |
|
38 | 60 |
otherwise, create the scrollableView empty with: |
130 | 61 |
|
584 | 62 |
v := ScrollableView new |
130 | 63 |
or: |
584 | 64 |
v := ScrollableView in:someSuperView |
130 | 65 |
|
65 | 66 |
and define the view later with: |
130 | 67 |
|
584 | 68 |
v scrolledView:aViewToBeScrolled |
65 | 69 |
|
130 | 70 |
Finally, if the view to be scrolled has been already created, |
71 |
use: |
|
72 |
||
584 | 73 |
v := ScrollableView forView:aViewToBeScrolled |
130 | 74 |
or: |
584 | 75 |
v := ScrollableView forView:aViewToBeScrolled in:someSuperView |
65 | 76 |
|
130 | 77 |
It is also possible to change the scrolledView later (even multiple times). |
78 |
This may be useful, if different views are needed to display different types |
|
79 |
of data (see example2) and at creation time, it is not known what type |
|
80 |
of view is required (multimedia applications). |
|
81 |
||
82 |
If you want to scroll views (instead of a views contents), you need a |
|
83 |
companion class (ViewScroller). See the documentation there. |
|
65 | 84 |
|
85 |
If you need horizontal scrolling too, use an instance of HVScrollableView. |
|
113 | 86 |
|
87 |
By default, scrollbars are full size scrollbars - for horizontal scrolling |
|
88 |
(which is less often used), scrollableViews can optionally be created with |
|
89 |
miniscrollers which take up less screen space. |
|
130 | 90 |
|
91 |
TODO: |
|
584 | 92 |
this is pretty old and needs a rewrite. There are quite some |
93 |
historic leftovers found here and things can be done better |
|
94 |
(especially in initializeFor...) |
|
95 |
||
96 |
Also, it should be rewritten into one class which supports both |
|
97 |
Vertical-only, Horizontal-only and HV scrolling. |
|
98 |
Currently, horizontal-only scrolling is not available. |
|
99 |
(you have to write your own class ...) |
|
130 | 100 |
|
584 | 101 |
Finally, some means to hide scrollbars should be added - this would |
102 |
give more screenspace to the view when all is visible |
|
103 |
(and therefore, the scrollbars are not needed, anyway) |
|
104 |
||
105 |
Expect the above things to be fixed in an upcoming version. |
|
130 | 106 |
|
584 | 107 |
[author:] |
108 |
Claus Gittinger |
|
130 | 109 |
|
584 | 110 |
[see also:] |
111 |
ScrollBar Scroller |
|
112 |
HVScrollableView |
|
63 | 113 |
" |
114 |
! |
|
38 | 115 |
|
63 | 116 |
examples |
117 |
" |
|
65 | 118 |
example1 (simple scrolled text): |
591 | 119 |
[exBegin] |
120 |
|top scr txt| |
|
0 | 121 |
|
591 | 122 |
top := StandardSystemView label:'scroll example1'. |
123 |
top extent:200@100. |
|
113 | 124 |
|
1111 | 125 |
scr := NewScrollableView for:EditTextView in:top. |
591 | 126 |
scr origin:0.0@0.0 corner:1.0@1.0. |
127 |
txt := scr scrolledView. |
|
38 | 128 |
|
591 | 129 |
txt list:#('line1' |
130 |
'line2' |
|
131 |
'line3' |
|
132 |
'line4' |
|
133 |
'line5' |
|
134 |
'line7' |
|
135 |
'line8' |
|
136 |
'line9' |
|
137 |
'line10' |
|
138 |
). |
|
139 |
top open |
|
140 |
[exEnd] |
|
38 | 141 |
|
65 | 142 |
|
143 |
example2 (changing the scrolledView later): |
|
591 | 144 |
[exBegin] |
145 |
|top scr txtView1 txtView2 browserView| |
|
38 | 146 |
|
591 | 147 |
top := StandardSystemView label:'scroll example2'. |
148 |
top extent:300@100. |
|
113 | 149 |
|
591 | 150 |
scr := ScrollableView in:top. |
151 |
scr origin:0.0@0.0 corner:1.0@1.0. |
|
113 | 152 |
|
591 | 153 |
top open. |
0 | 154 |
|
591 | 155 |
(Delay forSeconds:5) wait. |
38 | 156 |
|
591 | 157 |
txtView1 := EditTextView new. |
158 |
txtView1 list:#( |
|
159 |
'wait 5 seconds to see the other text' |
|
160 |
'line2' |
|
161 |
'line3' |
|
162 |
'line4' |
|
163 |
'line5' |
|
164 |
'line7' |
|
165 |
'line8' |
|
166 |
'line9' |
|
167 |
'line10' |
|
168 |
). |
|
169 |
scr scrolledView:txtView1. |
|
38 | 170 |
|
591 | 171 |
(Delay forSeconds:5) wait. |
38 | 172 |
|
591 | 173 |
txtView2 := EditTextView new. |
174 |
txtView2 list:#('this is the other views text' |
|
175 |
'alternative line2' |
|
176 |
'alternative line3' |
|
177 |
'alternative line4' |
|
178 |
'alternative line5' |
|
179 |
'alternative line6'). |
|
180 |
scr scrolledView:txtView2. |
|
181 |
[exEnd] |
|
113 | 182 |
|
183 |
||
184 |
||
185 |
||
186 |
example3 (using a miniscroller): |
|
591 | 187 |
[exBegin] |
188 |
|top scr txt| |
|
113 | 189 |
|
591 | 190 |
top := StandardSystemView label:'scroll example3'. |
191 |
top extent:200@100. |
|
113 | 192 |
|
591 | 193 |
scr := ScrollableView for:EditTextView miniScroller:true in:top. |
194 |
scr origin:0.0@0.0 corner:1.0@1.0. |
|
195 |
txt := scr scrolledView. |
|
113 | 196 |
|
591 | 197 |
txt list:#('line1' |
198 |
'line2' |
|
199 |
'line3' |
|
200 |
'line4' |
|
201 |
'line5' |
|
202 |
'line7' |
|
203 |
'line8' |
|
204 |
'line9' |
|
205 |
'line10' |
|
206 |
). |
|
207 |
top open |
|
208 |
[exEnd] |
|
113 | 209 |
|
210 |
||
211 |
||
212 |
example4 (scrolling in both directions): |
|
591 | 213 |
[exBegin] |
214 |
|top scr txt| |
|
113 | 215 |
|
591 | 216 |
top := StandardSystemView label:'scroll example4'. |
217 |
top extent:200@100. |
|
113 | 218 |
|
591 | 219 |
scr := HVScrollableView for:EditTextView in:top. |
220 |
scr origin:0.0@0.0 corner:1.0@1.0. |
|
221 |
txt := scr scrolledView. |
|
113 | 222 |
|
591 | 223 |
txt list:#('line1' |
224 |
'line2' |
|
225 |
'line3' |
|
226 |
'line4' |
|
227 |
'line5' |
|
228 |
'line7' |
|
229 |
'line8' |
|
230 |
'line9' |
|
231 |
'line10' |
|
232 |
). |
|
233 |
top open |
|
234 |
[exEnd] |
|
113 | 235 |
|
236 |
||
237 |
||
238 |
example5 (using a full scroller vertically, miniscroller horizontally): |
|
591 | 239 |
[exBegin] |
240 |
|top scr txt| |
|
113 | 241 |
|
591 | 242 |
top := StandardSystemView label:'scroll example5'. |
243 |
top extent:200@100. |
|
113 | 244 |
|
591 | 245 |
scr := HVScrollableView for:EditTextView miniScrollerH:true in:top. |
246 |
scr origin:0.0@0.0 corner:1.0@1.0. |
|
247 |
txt := scr scrolledView. |
|
113 | 248 |
|
591 | 249 |
txt list:#('line1' |
250 |
'line2' |
|
251 |
'line3' |
|
252 |
'line4' |
|
253 |
'line5' |
|
254 |
'line7' |
|
255 |
'line8' |
|
256 |
'line9' |
|
257 |
'line10' |
|
258 |
). |
|
259 |
top open |
|
260 |
[exEnd] |
|
113 | 261 |
|
262 |
||
263 |
||
264 |
example6 (using miniscrollers for both directions ): |
|
591 | 265 |
[exBegin] |
266 |
|top scr txt| |
|
113 | 267 |
|
591 | 268 |
top := StandardSystemView label:'scroll example6'. |
269 |
top extent:200@100. |
|
113 | 270 |
|
591 | 271 |
scr := HVScrollableView for:EditTextView miniScroller:true in:top. |
272 |
scr origin:0.0@0.0 corner:1.0@1.0. |
|
273 |
txt := scr scrolledView. |
|
113 | 274 |
|
591 | 275 |
txt list:#('line1' |
276 |
'line2' |
|
277 |
'line3' |
|
278 |
'line4' |
|
279 |
'line5' |
|
280 |
'line7' |
|
281 |
'line8' |
|
282 |
'line9' |
|
283 |
'line10' |
|
284 |
). |
|
285 |
top open |
|
286 |
[exEnd] |
|
38 | 287 |
" |
288 |
! ! |
|
0 | 289 |
|
852 | 290 |
!ScrollableView class methodsFor:'instance creation'! |
217 | 291 |
|
292 |
for:aViewClass |
|
293 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
294 |
The subview is created here. |
|
295 |
The view will have full scrollbars." |
|
296 |
||
1111 | 297 |
^ self |
298 |
for:aViewClass |
|
299 |
hasHorizontalScrollBar:(self == HVScrollableView) |
|
300 |
hasVerticalScrollBar:true |
|
301 |
miniScrollerH:false |
|
302 |
miniScrollerV:false |
|
303 |
origin:nil |
|
304 |
corner:nil |
|
305 |
in:nil |
|
306 |
||
307 |
"Created: 6.3.1997 / 18:06:22 / cg" |
|
308 |
"Modified: 6.3.1997 / 23:18:32 / cg" |
|
309 |
! |
|
310 |
||
311 |
for:aViewClass hasHorizontalScrollBar:hasH hasVerticalScrollBar:hasV miniScrollerH:miniH miniScrollerV:miniV origin:org corner:corn in:aView |
|
312 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
313 |
The subview is created here. |
|
314 |
The view will have full scrollbars if the corresponding miniH/miniV |
|
315 |
is false, miniscrollers if true." |
|
316 |
||
317 |
|newView| |
|
318 |
||
319 |
aViewClass notNil ifTrue:[ |
|
320 |
newView := aViewClass new. |
|
321 |
]. |
|
322 |
^ self |
|
323 |
forView:newView |
|
324 |
hasHorizontalScrollBar:hasH |
|
325 |
hasVerticalScrollBar:hasV |
|
326 |
miniScrollerH:miniH |
|
327 |
miniScrollerV:miniV |
|
328 |
origin:org |
|
329 |
corner:corn |
|
330 |
in:aView |
|
331 |
||
332 |
" |
|
333 |
|top scr| |
|
334 |
||
335 |
top := StandardSystemView extent:200@200. |
|
336 |
scr := NewScrollableView for:nil |
|
337 |
hasHorizontalScrollBar:true |
|
338 |
hasVerticalScrollBar:true |
|
339 |
miniScrollerH:false |
|
340 |
miniScrollerV:false |
|
341 |
origin:0.0@0.0 |
|
342 |
corner:1.0@1.0 |
|
343 |
in:top. |
|
344 |
top open |
|
345 |
" |
|
346 |
||
347 |
"Modified: 6.3.1997 / 18:36:01 / cg" |
|
217 | 348 |
! |
349 |
||
350 |
for:aViewClass in:aView |
|
351 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
352 |
The subview is created here. |
|
353 |
The view will have full scrollbars." |
|
354 |
||
1111 | 355 |
^ self |
356 |
for:aViewClass |
|
357 |
hasHorizontalScrollBar:(self == HVScrollableView) |
|
358 |
hasVerticalScrollBar:true |
|
359 |
miniScrollerH:false |
|
360 |
miniScrollerV:false |
|
361 |
origin:nil |
|
362 |
corner:nil |
|
363 |
in:aView |
|
364 |
||
365 |
"Modified: 6.3.1997 / 23:18:41 / cg" |
|
217 | 366 |
! |
367 |
||
368 |
for:aViewClass miniScroller:mini |
|
369 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
370 |
The subview is created here. |
|
371 |
The view will have full scrollbars if mini is false, miniscrollers |
|
372 |
if true." |
|
373 |
||
1111 | 374 |
^ self |
375 |
for:aViewClass |
|
376 |
hasHorizontalScrollBar:(self == HVScrollableView) |
|
377 |
hasVerticalScrollBar:true |
|
378 |
miniScrollerH:mini |
|
379 |
miniScrollerV:mini |
|
380 |
origin:nil |
|
381 |
corner:nil |
|
382 |
in:nil |
|
383 |
||
384 |
"Modified: 6.3.1997 / 23:18:45 / cg" |
|
217 | 385 |
! |
386 |
||
387 |
for:aViewClass miniScroller:mini in:aView |
|
388 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
389 |
The subview is created here. |
|
390 |
The view will have full scrollbars if mini is false, miniscrollers |
|
391 |
if true." |
|
392 |
||
1111 | 393 |
^ self |
394 |
for:aViewClass |
|
395 |
hasHorizontalScrollBar:(self == HVScrollableView) |
|
396 |
hasVerticalScrollBar:true |
|
397 |
miniScrollerH:mini |
|
398 |
miniScrollerV:mini |
|
399 |
origin:nil |
|
400 |
corner:nil |
|
401 |
in:aView |
|
402 |
||
403 |
"Modified: 6.3.1997 / 23:18:50 / cg" |
|
217 | 404 |
! |
153 | 405 |
|
546
b643875bda30
more inst creation variations
Claus Gittinger <cg@exept.de>
parents:
492
diff
changeset
|
406 |
for:aViewClass miniScroller:mini origin:org corner:corn in:aView |
b643875bda30
more inst creation variations
Claus Gittinger <cg@exept.de>
parents:
492
diff
changeset
|
407 |
"return a new scrolling view scrolling an instance of aViewClass. |
b643875bda30
more inst creation variations
Claus Gittinger <cg@exept.de>
parents:
492
diff
changeset
|
408 |
The subview is created here. |
b643875bda30
more inst creation variations
Claus Gittinger <cg@exept.de>
parents:
492
diff
changeset
|
409 |
The view will have full scrollbars if mini is false, miniscrollers |
b643875bda30
more inst creation variations
Claus Gittinger <cg@exept.de>
parents:
492
diff
changeset
|
410 |
if true." |
b643875bda30
more inst creation variations
Claus Gittinger <cg@exept.de>
parents:
492
diff
changeset
|
411 |
|
1111 | 412 |
^ self |
413 |
for:aViewClass |
|
414 |
hasHorizontalScrollBar:(self == HVScrollableView) |
|
415 |
hasVerticalScrollBar:true |
|
416 |
miniScrollerH:mini |
|
417 |
miniScrollerV:mini |
|
418 |
origin:org |
|
419 |
corner:corn |
|
420 |
in:aView |
|
546
b643875bda30
more inst creation variations
Claus Gittinger <cg@exept.de>
parents:
492
diff
changeset
|
421 |
|
1111 | 422 |
"Modified: 6.3.1997 / 23:18:53 / cg" |
546
b643875bda30
more inst creation variations
Claus Gittinger <cg@exept.de>
parents:
492
diff
changeset
|
423 |
! |
b643875bda30
more inst creation variations
Claus Gittinger <cg@exept.de>
parents:
492
diff
changeset
|
424 |
|
217 | 425 |
for:aViewClass miniScrollerH:miniH |
426 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
427 |
The subview is created here. |
|
428 |
The view will have full scrollbars if miniH is false, |
|
429 |
and a horizontal miniscroller if true." |
|
430 |
||
1111 | 431 |
^ self |
432 |
for:aViewClass |
|
433 |
hasHorizontalScrollBar:true |
|
434 |
hasVerticalScrollBar:true |
|
435 |
miniScrollerH:miniH |
|
436 |
miniScrollerV:false |
|
437 |
origin:nil |
|
438 |
corner:nil |
|
439 |
in:nil |
|
440 |
||
441 |
"Modified: 6.3.1997 / 18:30:15 / cg" |
|
217 | 442 |
! |
443 |
||
444 |
for:aViewClass miniScrollerH:miniH in:aView |
|
445 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
446 |
The subview is created here. |
|
546
b643875bda30
more inst creation variations
Claus Gittinger <cg@exept.de>
parents:
492
diff
changeset
|
447 |
The view will have full scrollbars if the corresponding miniH/miniV |
b643875bda30
more inst creation variations
Claus Gittinger <cg@exept.de>
parents:
492
diff
changeset
|
448 |
is false, miniscrollers if true." |
217 | 449 |
|
1111 | 450 |
^ self |
451 |
for:aViewClass |
|
452 |
hasHorizontalScrollBar:true |
|
453 |
hasVerticalScrollBar:true |
|
454 |
miniScrollerH:miniH |
|
455 |
miniScrollerV:false |
|
456 |
origin:nil |
|
457 |
corner:nil |
|
458 |
in:aView |
|
546
b643875bda30
more inst creation variations
Claus Gittinger <cg@exept.de>
parents:
492
diff
changeset
|
459 |
|
1111 | 460 |
"Modified: 6.3.1997 / 18:30:31 / cg" |
217 | 461 |
! |
153 | 462 |
|
217 | 463 |
for:aViewClass miniScrollerH:miniH miniScrollerV:miniV |
464 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
465 |
The subview is created here. |
|
466 |
The view will have full scrollbars if the corresponding miniH/miniV |
|
467 |
is false, miniscrollers if true." |
|
468 |
||
1111 | 469 |
^ self |
470 |
for:aViewClass |
|
471 |
hasHorizontalScrollBar:true |
|
472 |
hasVerticalScrollBar:true |
|
473 |
miniScrollerH:miniH |
|
474 |
miniScrollerV:miniV |
|
475 |
origin:nil |
|
476 |
corner:nil |
|
477 |
in:nil |
|
478 |
||
479 |
"Modified: 6.3.1997 / 18:30:47 / cg" |
|
217 | 480 |
! |
481 |
||
482 |
for:aViewClass miniScrollerH:miniH miniScrollerV:miniV in:aView |
|
483 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
484 |
The subview is created here. |
|
485 |
The view will have full scrollbars if the corresponding miniH/miniV |
|
486 |
is false, miniscrollers if true." |
|
487 |
||
1111 | 488 |
^ self |
489 |
for:aViewClass |
|
490 |
hasHorizontalScrollBar:true |
|
491 |
hasVerticalScrollBar:true |
|
492 |
miniScrollerH:miniH |
|
493 |
miniScrollerV:miniV |
|
494 |
origin:nil |
|
495 |
corner:nil |
|
496 |
in:aView |
|
497 |
||
498 |
"Modified: 6.3.1997 / 18:31:02 / cg" |
|
499 |
! |
|
500 |
||
501 |
for:aViewClass miniScrollerH:miniH miniScrollerV:miniV origin:org corner:corn in:aView |
|
502 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
503 |
The subview is created here. |
|
504 |
The view will have full scrollbars if the corresponding miniH/miniV |
|
505 |
is false, miniscrollers if true." |
|
506 |
||
507 |
^ self |
|
508 |
for:aViewClass |
|
509 |
hasHorizontalScrollBar:true |
|
510 |
hasVerticalScrollBar:true |
|
511 |
miniScrollerH:miniH |
|
512 |
miniScrollerV:miniV |
|
513 |
origin:org |
|
514 |
corner:corn |
|
515 |
in:aView |
|
516 |
||
517 |
"Modified: 6.3.1997 / 18:31:17 / cg" |
|
518 |
! |
|
519 |
||
520 |
for:aViewClass miniScrollerH:miniH origin:org corner:corn in:aView |
|
521 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
522 |
The subview is created here. |
|
523 |
The view will have a full horizontal scrollbar if miniH is false, |
|
524 |
a miniscroller if true." |
|
525 |
||
526 |
^ self |
|
527 |
for:aViewClass |
|
528 |
hasHorizontalScrollBar:true |
|
529 |
hasVerticalScrollBar:true |
|
530 |
miniScrollerH:miniH |
|
531 |
miniScrollerV:false |
|
532 |
origin:org |
|
533 |
corner:corn |
|
534 |
in:aView |
|
535 |
||
536 |
"Modified: 6.3.1997 / 18:31:28 / cg" |
|
537 |
! |
|
538 |
||
539 |
for:aViewClass miniScrollerV:miniV origin:org corner:corn in:aView |
|
540 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
541 |
The subview is created here. |
|
542 |
The view will have a full vertical scrollbar if miniV is false, |
|
543 |
a miniscroller if true." |
|
544 |
||
545 |
^ self |
|
546 |
for:aViewClass |
|
547 |
hasHorizontalScrollBar:true |
|
548 |
hasVerticalScrollBar:true |
|
549 |
miniScrollerH:false |
|
550 |
miniScrollerV:miniV |
|
551 |
origin:org |
|
552 |
corner:corn |
|
553 |
in:aView |
|
554 |
||
555 |
"Modified: 6.3.1997 / 18:31:41 / cg" |
|
556 |
! |
|
557 |
||
558 |
for:aViewClass origin:org corner:corner in:aView |
|
559 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
560 |
The subview is created here. |
|
561 |
The view will have full scrollbars." |
|
562 |
||
563 |
^ self |
|
564 |
for:aViewClass |
|
565 |
hasHorizontalScrollBar:(self == HVScrollableView) |
|
566 |
hasVerticalScrollBar:true |
|
567 |
miniScrollerH:false |
|
568 |
miniScrollerV:false |
|
569 |
origin:org |
|
570 |
corner:corner |
|
571 |
in:aView |
|
572 |
||
573 |
"Modified: 6.3.1997 / 23:19:05 / cg" |
|
574 |
! |
|
575 |
||
576 |
forView:aView |
|
577 |
"return a new scrolling view scrolling aView. |
|
578 |
The view will have full scrollbars." |
|
579 |
||
580 |
^ self |
|
581 |
forView:aView |
|
582 |
hasHorizontalScrollBar:(self == HVScrollableView) |
|
583 |
hasVerticalScrollBar:true |
|
584 |
miniScrollerH:false |
|
585 |
miniScrollerV:false |
|
586 |
origin:nil |
|
587 |
corner:nil |
|
588 |
in:nil |
|
589 |
||
590 |
"Modified: 6.3.1997 / 23:19:08 / cg" |
|
591 |
! |
|
592 |
||
593 |
forView:aScrolledView hasHorizontalScrollBar:hasH hasVerticalScrollBar:hasV miniScrollerH:miniH miniScrollerV:miniV origin:org corner:corn in:aView |
|
594 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
595 |
The subview is created here. |
|
596 |
The view will have full scrollbars if the corresponding miniH/miniV |
|
597 |
is false, miniscrollers if true." |
|
598 |
||
300 | 599 |
|newView dev| |
217 | 600 |
|
601 |
aView notNil ifTrue:[ |
|
703 | 602 |
dev := aView graphicsDevice |
300 | 603 |
] ifFalse:[ |
703 | 604 |
dev := Screen current |
300 | 605 |
]. |
606 |
newView := self basicNew device:dev. |
|
1111 | 607 |
newView initialize. |
608 |
newView setupVertical:hasV mini:miniV horizontal:hasH mini:miniH. |
|
609 |
||
610 |
aScrolledView notNil ifTrue:[ |
|
611 |
newView scrolledView:aScrolledView. |
|
612 |
]. |
|
613 |
||
614 |
newView setupDimensions. |
|
615 |
||
616 |
org notNil ifTrue:[ |
|
617 |
newView origin:org |
|
618 |
]. |
|
619 |
corn notNil ifTrue:[ |
|
620 |
newView corner:corn |
|
621 |
]. |
|
622 |
||
300 | 623 |
aView notNil ifTrue:[ |
703 | 624 |
aView addSubView:newView |
153 | 625 |
]. |
217 | 626 |
^ newView |
703 | 627 |
|
1111 | 628 |
" |
629 |
|top scr| |
|
546
b643875bda30
more inst creation variations
Claus Gittinger <cg@exept.de>
parents:
492
diff
changeset
|
630 |
|
1111 | 631 |
top := StandardSystemView extent:200@200. |
632 |
scr := NewScrollableView |
|
633 |
forView:(TextView new) |
|
634 |
hasHorizontalScrollBar:true |
|
635 |
hasVerticalScrollBar:true |
|
636 |
miniScrollerH:false |
|
637 |
miniScrollerV:false |
|
638 |
origin:0.0@0.0 |
|
639 |
corner:1.0@1.0 |
|
640 |
in:top. |
|
641 |
top open |
|
642 |
" |
|
546
b643875bda30
more inst creation variations
Claus Gittinger <cg@exept.de>
parents:
492
diff
changeset
|
643 |
|
1111 | 644 |
"Modified: 6.3.1997 / 18:42:40 / cg" |
217 | 645 |
! |
646 |
||
852 | 647 |
forView:aView in:aSuperView |
648 |
"return a new scrolling view scrolling aView. |
|
649 |
The view will have full scrollbars." |
|
650 |
||
1111 | 651 |
^ self |
652 |
forView:aView |
|
653 |
hasHorizontalScrollBar:(self == HVScrollableView) |
|
654 |
hasVerticalScrollBar:true |
|
655 |
miniScrollerH:false |
|
656 |
miniScrollerV:false |
|
657 |
origin:nil |
|
658 |
corner:nil |
|
659 |
in:aSuperView |
|
852 | 660 |
|
1111 | 661 |
"Modified: 6.3.1997 / 23:19:12 / cg" |
852 | 662 |
! |
663 |
||
248 | 664 |
forView:aView miniScrollerH:mini |
665 |
"return a new scrolling view scrolling aView. |
|
666 |
The view will have a full vertical scrollbar and a horizontal |
|
667 |
miniScroller if mini is true." |
|
668 |
||
1111 | 669 |
^ self |
670 |
forView:aView |
|
671 |
hasHorizontalScrollBar:true |
|
672 |
hasVerticalScrollBar:true |
|
673 |
miniScrollerH:mini |
|
674 |
miniScrollerV:false |
|
675 |
origin:nil |
|
676 |
corner:nil |
|
677 |
in:nil |
|
248 | 678 |
|
1111 | 679 |
"Modified: 6.3.1997 / 18:32:58 / cg" |
248 | 680 |
! |
681 |
||
217 | 682 |
forView:scrolledView miniScrollerH:miniH miniScrollerV:miniV in:aView |
683 |
"return a new scrolling view, scrolling aView. |
|
684 |
The view will have full scrollbars if the corresponding miniH/miniV |
|
685 |
is false, miniscrollers if true." |
|
153 | 686 |
|
1111 | 687 |
^ self |
688 |
forView:scrolledView |
|
689 |
hasHorizontalScrollBar:true |
|
690 |
hasVerticalScrollBar:true |
|
691 |
miniScrollerH:miniH |
|
692 |
miniScrollerV:miniV |
|
693 |
origin:nil |
|
694 |
corner:nil |
|
695 |
in:aView |
|
217 | 696 |
|
1111 | 697 |
"Modified: 6.3.1997 / 18:33:20 / cg" |
217 | 698 |
! |
153 | 699 |
|
217 | 700 |
in:aView |
701 |
"return a new scrolling view to be contained in aView. |
|
702 |
There is no slave view now - this has to be set later via |
|
703 |
the scrolledView: method. |
|
704 |
The view will have full scrollbars." |
|
705 |
||
1111 | 706 |
^ self |
707 |
forView:nil |
|
708 |
hasHorizontalScrollBar:(self == HVScrollableView) |
|
709 |
hasVerticalScrollBar:true |
|
710 |
miniScrollerH:false |
|
711 |
miniScrollerV:false |
|
712 |
origin:nil |
|
713 |
corner:nil |
|
714 |
in:aView |
|
715 |
||
716 |
"Modified: 6.3.1997 / 23:19:19 / cg" |
|
217 | 717 |
! |
0 | 718 |
|
93 | 719 |
miniScroller:mini |
720 |
"return a new scrolling view. The subview will be created later. |
|
721 |
The view will have full scrollbars if mini is false, |
|
722 |
miniscrollers if true." |
|
723 |
||
1111 | 724 |
^ self |
725 |
forView:nil |
|
726 |
hasHorizontalScrollBar:(self == HVScrollableView) |
|
727 |
hasVerticalScrollBar:true |
|
728 |
miniScrollerH:mini |
|
729 |
miniScrollerV:mini |
|
730 |
origin:nil |
|
731 |
corner:nil |
|
732 |
in:nil |
|
733 |
||
734 |
"Modified: 6.3.1997 / 23:19:21 / cg" |
|
93 | 735 |
! |
736 |
||
113 | 737 |
miniScrollerH:miniH |
738 |
"return a new scrolling view. The subview will be created later. |
|
739 |
The view will have full scrollbars if miniH is false, |
|
740 |
and a horizontal miniscroller if true." |
|
741 |
||
1111 | 742 |
^ self |
743 |
forView:nil |
|
744 |
hasHorizontalScrollBar:true |
|
745 |
hasVerticalScrollBar:true |
|
746 |
miniScrollerH:miniH |
|
747 |
miniScrollerV:false |
|
748 |
origin:nil |
|
749 |
corner:nil |
|
750 |
in:nil |
|
751 |
||
752 |
"Modified: 6.3.1997 / 18:34:06 / cg" |
|
113 | 753 |
! |
754 |
||
93 | 755 |
miniScrollerH:miniH miniScrollerV:miniV |
756 |
"return a new scrolling view. The subview will be created later. |
|
757 |
The view will have full scrollbars if the corresponding miniH/miniV |
|
113 | 758 |
is false, miniscrollers if true." |
93 | 759 |
|
1111 | 760 |
^ self |
761 |
forView:nil |
|
762 |
hasHorizontalScrollBar:true |
|
763 |
hasVerticalScrollBar:true |
|
764 |
miniScrollerH:miniH |
|
765 |
miniScrollerV:miniV |
|
766 |
origin:nil |
|
767 |
corner:nil |
|
768 |
in:nil |
|
769 |
||
770 |
"Modified: 6.3.1997 / 18:34:16 / cg" |
|
217 | 771 |
! ! |
93 | 772 |
|
852 | 773 |
!ScrollableView class methodsFor:'defaults'! |
217 | 774 |
|
775 |
updateStyleCache |
|
444
ef26eba8c854
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
300
diff
changeset
|
776 |
"extract values from the styleSheet and cache them in class variables" |
ef26eba8c854
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
300
diff
changeset
|
777 |
|
1111 | 778 |
<resource: #style (#scrolledViewLevel #scrolledViewMargin)> |
779 |
||
780 |
|defLevel defMargin defSpacing| |
|
444
ef26eba8c854
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
300
diff
changeset
|
781 |
|
1111 | 782 |
StyleSheet is3D ifTrue:[ |
783 |
defLevel := -1. |
|
784 |
defMargin := ViewSpacing // 2. |
|
785 |
defSpacing := defMargin. |
|
217 | 786 |
] ifFalse:[ |
1111 | 787 |
defLevel := 0. |
788 |
defMargin := 0. |
|
789 |
defSpacing := 0 |
|
217 | 790 |
]. |
1111 | 791 |
DefaultScrolledViewLevel := StyleSheet at:'scrolledViewLevel' default:defLevel. |
792 |
DefaultScrolledViewBorderWidth := StyleSheet at:'scrolledViewBorderWidth' default:nil. |
|
793 |
DefaultScrolledViewMargin := StyleSheet at:'scrolledViewMargin' default:defMargin. |
|
794 |
DefaultScrollBarSpacing := StyleSheet at:'scrollBarSpacing' default:defSpacing. |
|
795 |
DefaultLevel := StyleSheet at:'scrollableViewLevel' default:nil. |
|
796 |
DefaultScrollBarLevel := StyleSheet at:'scrollBarLevel' default:nil. |
|
797 |
MyDefaultViewBackgroundColor := StyleSheet at:'scrollableViewBackgroundColor' default:DefaultViewBackgroundColor. |
|
0 | 798 |
|
1111 | 799 |
" |
800 |
self updateStyleCache |
|
801 |
" |
|
802 |
||
803 |
"Modified: 7.3.1997 / 15:03:37 / cg" |
|
217 | 804 |
! ! |
805 |
||
678
c1967a46b2c1
added query for lines/cols - prefExt
Claus Gittinger <cg@exept.de>
parents:
608
diff
changeset
|
806 |
!ScrollableView methodsFor:'accessing - components'! |
119 | 807 |
|
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
808 |
horizontalScrollBar |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
809 |
"return the horizontal scrollbar (or nil, if there is none)" |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
810 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
811 |
^ hScrollBar |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
812 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
813 |
"Modified: 6.3.1997 / 16:59:24 / cg" |
1111 | 814 |
"Created: 6.3.1997 / 18:06:23 / cg" |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
815 |
! |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
816 |
|
217 | 817 |
scrollBar |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
818 |
"return the vertical scrollbar (or nil, if there is none)" |
217 | 819 |
|
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
820 |
^ vScrollBar |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
821 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
822 |
"Modified: 6.3.1997 / 16:59:29 / cg" |
1111 | 823 |
"Created: 6.3.1997 / 18:06:23 / cg" |
119 | 824 |
! |
825 |
||
217 | 826 |
scrolledView |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
827 |
"return the scrolled view (or nil, if there is none)" |
38 | 828 |
|
217 | 829 |
^ scrolledView |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
830 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
831 |
"Modified: 6.3.1997 / 16:48:09 / cg" |
1111 | 832 |
"Created: 6.3.1997 / 18:06:23 / cg" |
113 | 833 |
! |
834 |
||
217 | 835 |
scrolledView:aView |
836 |
"set the view to scroll" |
|
837 |
||
838 |
scrolledView notNil ifTrue:[ |
|
982 | 839 |
scrolledView removeDependent:self. |
814 | 840 |
scrolledView destroy. |
841 |
scrolledView := nil. |
|
217 | 842 |
]. |
982 | 843 |
|
217 | 844 |
scrolledView := aView. |
1111 | 845 |
super addSubViewFirst:aView. |
77 | 846 |
|
1111 | 847 |
self setupDimensions. |
217 | 848 |
self setScrollActions. |
849 |
||
814 | 850 |
realized ifTrue:[ |
851 |
self sizeChanged:nil. |
|
852 |
scrolledView realize |
|
853 |
]. |
|
217 | 854 |
|
1111 | 855 |
"Created: 6.3.1997 / 18:06:23 / cg" |
856 |
"Modified: 6.3.1997 / 18:43:43 / cg" |
|
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
857 |
! |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
858 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
859 |
verticalScrollBar |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
860 |
"return the vertical scrollbar (or nil, if there is none)" |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
861 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
862 |
^ vScrollBar |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
863 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
864 |
"Modified: 6.3.1997 / 16:59:24 / cg" |
1111 | 865 |
"Created: 6.3.1997 / 18:06:23 / cg" |
217 | 866 |
! ! |
867 |
||
868 |
!ScrollableView methodsFor:'changes '! |
|
869 |
||
870 |
update:something with:argument from:changedObject |
|
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
871 |
"whenever the scrolledView changes its contents, the scroller(s) must |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
872 |
be updated as well" |
132 | 873 |
|
217 | 874 |
changedObject == scrolledView ifTrue:[ |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
875 |
something == #sizeOfContents ifTrue:[ |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
876 |
vScrollBar notNil ifTrue:[ |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
877 |
vScrollBar setThumbFor:scrolledView. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
878 |
]. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
879 |
hScrollBar notNil ifTrue:[ |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
880 |
hScrollBar setThumbFor:scrolledView. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
881 |
]. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
882 |
^ self |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
883 |
]. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
884 |
something == #originOfContents ifTrue:[ |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
885 |
lockUpdates ifFalse:[ |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
886 |
vScrollBar notNil ifTrue:[ |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
887 |
vScrollBar setThumbOriginFor:scrolledView. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
888 |
]. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
889 |
hScrollBar notNil ifTrue:[ |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
890 |
hScrollBar setThumbOriginFor:scrolledView. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
891 |
]. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
892 |
]. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
893 |
^ self |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
894 |
]. |
217 | 895 |
]. |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
896 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
897 |
"Modified: 6.3.1997 / 17:00:23 / cg" |
1111 | 898 |
"Created: 6.3.1997 / 18:06:23 / cg" |
217 | 899 |
! ! |
38 | 900 |
|
217 | 901 |
!ScrollableView methodsFor:'event processing'! |
902 |
||
903 |
keyPress:key x:x y:y |
|
904 |
"a key was pressed - handle page-keys here" |
|
905 |
||
906 |
<resource: #keyboard ( #Prior #Next ) > |
|
907 |
||
908 |
(key == #Prior) ifTrue: [^ self pageUp]. |
|
909 |
(key == #Next) ifTrue: [^ self pageDown]. |
|
910 |
||
911 |
super keyPress:key x:x y:y |
|
1111 | 912 |
|
913 |
"Created: 6.3.1997 / 18:06:23 / cg" |
|
38 | 914 |
! |
915 |
||
217 | 916 |
sizeChanged:how |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
917 |
|orgX orgY scroll| |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
918 |
|
1111 | 919 |
"/ resize components manually, in an order which is optimal |
920 |
||
921 |
how == #smaller ifTrue:[ |
|
922 |
"/ first resize the horizontalScrollBar, |
|
923 |
||
924 |
scrolledView notNil ifTrue:[ |
|
925 |
scrolledView containerChangedSize |
|
926 |
]. |
|
927 |
hScrollBar notNil ifTrue:[ |
|
928 |
hScrollBar containerChangedSize |
|
929 |
]. |
|
930 |
vScrollBar notNil ifTrue:[ |
|
931 |
vScrollBar containerChangedSize |
|
932 |
]. |
|
933 |
] ifFalse:[ |
|
934 |
hScrollBar notNil ifTrue:[ |
|
935 |
hScrollBar containerChangedSize |
|
936 |
]. |
|
937 |
vScrollBar notNil ifTrue:[ |
|
938 |
vScrollBar containerChangedSize |
|
939 |
]. |
|
940 |
scrolledView notNil ifTrue:[ |
|
941 |
scrolledView containerChangedSize |
|
942 |
]. |
|
943 |
]. |
|
819
32ac89843fa8
Send only one scroll message for horizontal and vertical scroll
Stefan Vogel <sv@exept.de>
parents:
814
diff
changeset
|
944 |
|
32ac89843fa8
Send only one scroll message for horizontal and vertical scroll
Stefan Vogel <sv@exept.de>
parents:
814
diff
changeset
|
945 |
"/ The following action will be done in a atomic operation |
32ac89843fa8
Send only one scroll message for horizontal and vertical scroll
Stefan Vogel <sv@exept.de>
parents:
814
diff
changeset
|
946 |
"/ in HVScrollableView |
32ac89843fa8
Send only one scroll message for horizontal and vertical scroll
Stefan Vogel <sv@exept.de>
parents:
814
diff
changeset
|
947 |
|
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
948 |
scrolledView isNil ifTrue:[^ self]. |
1111 | 949 |
(hScrollBar isNil and:[vScrollBar isNil]) ifTrue:[^ self]. |
950 |
||
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
951 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
952 |
vScrollBar notNil ifTrue:[ |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
953 |
vScrollBar setThumbFor:scrolledView. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
954 |
]. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
955 |
hScrollBar notNil ifTrue:[ |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
956 |
hScrollBar setThumbFor:scrolledView. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
957 |
]. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
958 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
959 |
hScrollBar isNil ifTrue:[ |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
960 |
"/ only care for vertical ... |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
961 |
vScrollBar thumbOrigin + vScrollBar thumbHeight >= 100 ifTrue:[ |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
962 |
vScrollBar thumbOrigin:(100 - vScrollBar thumbHeight). |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
963 |
scrolledView scrollVerticalToPercent:vScrollBar thumbOrigin. |
819
32ac89843fa8
Send only one scroll message for horizontal and vertical scroll
Stefan Vogel <sv@exept.de>
parents:
814
diff
changeset
|
964 |
]. |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
965 |
^ self |
217 | 966 |
]. |
113 | 967 |
|
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
968 |
vScrollBar isNil ifTrue:[ |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
969 |
"/ only care for horizontal ... |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
970 |
hScrollBar thumbOrigin + hScrollBar thumbHeight >= 100 ifTrue:[ |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
971 |
hScrollBar thumbOrigin:(100 - hScrollBar thumbHeight). |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
972 |
scrolledView scrollVerticalToPercent:hScrollBar thumbOrigin. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
973 |
]. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
974 |
^ self |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
975 |
]. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
976 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
977 |
"/ care for both ... |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
978 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
979 |
orgY := vScrollBar thumbOrigin. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
980 |
orgX := hScrollBar thumbOrigin. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
981 |
scroll := false. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
982 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
983 |
orgY + vScrollBar thumbHeight >= 100 ifTrue:[ |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
984 |
vScrollBar thumbOrigin:(100 - vScrollBar thumbHeight). |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
985 |
orgY := vScrollBar thumbOrigin. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
986 |
scroll := true. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
987 |
]. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
988 |
orgX + hScrollBar thumbHeight >= 100 ifTrue:[ |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
989 |
hScrollBar thumbOrigin:(100 - hScrollBar thumbHeight). |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
990 |
orgX := hScrollBar thumbOrigin. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
991 |
scroll := true. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
992 |
]. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
993 |
scroll ifTrue:[ |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
994 |
scrolledView scrollToPercent:(orgX@orgY). |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
995 |
]. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
996 |
|
1111 | 997 |
"Created: 6.3.1997 / 18:06:23 / cg" |
998 |
"Modified: 7.3.1997 / 00:35:52 / cg" |
|
217 | 999 |
! ! |
1000 |
||
1001 |
!ScrollableView methodsFor:'forced scroll'! |
|
1002 |
||
1003 |
pageDown |
|
1004 |
"page down" |
|
1005 |
||
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1006 |
vScrollBar notNil ifTrue:[ |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1007 |
vScrollBar pageDown |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1008 |
] |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1009 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1010 |
"Modified: 6.3.1997 / 17:01:51 / cg" |
1111 | 1011 |
"Created: 6.3.1997 / 18:06:23 / cg" |
113 | 1012 |
! |
1013 |
||
217 | 1014 |
pageUp |
1015 |
"page up" |
|
0 | 1016 |
|
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1017 |
vScrollBar notNil ifTrue:[ |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1018 |
vScrollBar pageUp |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1019 |
] |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1020 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1021 |
"Modified: 6.3.1997 / 17:01:58 / cg" |
1111 | 1022 |
"Created: 6.3.1997 / 18:06:23 / cg" |
0 | 1023 |
! ! |
1024 |
||
1025 |
!ScrollableView methodsFor:'initialization'! |
|
1026 |
||
217 | 1027 |
initStyle |
958 | 1028 |
"initialize style specifics" |
1029 |
||
608 | 1030 |
<resource: #style (#scrollBarPosition)> |
1031 |
||
217 | 1032 |
super initStyle. |
1033 |
||
1111 | 1034 |
viewBackground := MyDefaultViewBackgroundColor. |
217 | 1035 |
scrollBarPosition := styleSheet at:'scrollBarPosition' default:#left |
608 | 1036 |
|
1111 | 1037 |
"Created: 6.3.1997 / 18:06:23 / cg" |
1038 |
"Modified: 7.3.1997 / 15:03:49 / cg" |
|
0 | 1039 |
! |
1040 |
||
1041 |
realize |
|
1042 |
super realize. |
|
38 | 1043 |
|
0 | 1044 |
"since scrolledview may have done something to its contents |
1045 |
during init-time we had no chance yet to catch contents- |
|
1046 |
changes; do it now |
|
1047 |
" |
|
38 | 1048 |
scrolledView notNil ifTrue:[ |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1049 |
vScrollBar notNil ifTrue:[ |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1050 |
vScrollBar setThumbFor:scrolledView |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1051 |
]. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1052 |
hScrollBar notNil ifTrue:[ |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1053 |
hScrollBar setThumbFor:scrolledView |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1054 |
]. |
38 | 1055 |
] |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1056 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1057 |
"Modified: 6.3.1997 / 17:03:22 / cg" |
1111 | 1058 |
"Created: 6.3.1997 / 18:06:23 / cg" |
1059 |
! |
|
1060 |
||
1061 |
releaseHorizontalScrollBar |
|
1062 |
"destroy any horizontal scrollBar" |
|
1063 |
||
1064 |
hScrollBar notNil ifTrue:[ |
|
1065 |
hScrollBar destroy. |
|
1066 |
hScrollBar := nil |
|
1067 |
]. |
|
1068 |
||
1069 |
"Modified: 6.3.1997 / 17:43:20 / cg" |
|
1070 |
"Created: 6.3.1997 / 18:06:23 / cg" |
|
1071 |
! |
|
1072 |
||
1073 |
releaseVerticalScrollBar |
|
1074 |
"destroy any vertical scrollBar" |
|
1075 |
||
1076 |
vScrollBar notNil ifTrue:[ |
|
1077 |
vScrollBar destroy. |
|
1078 |
vScrollBar := nil |
|
1079 |
]. |
|
1080 |
||
1081 |
"Created: 6.3.1997 / 18:06:23 / cg" |
|
1097 | 1082 |
! |
7 | 1083 |
|
1084 |
setScrollActions |
|
1085 |
"lock prevents repositioning the scroller to the |
|
1086 |
actual (often rounded) position while scrolling, |
|
1087 |
and keeps it instead at the pointer position. |
|
1088 |
||
1089 |
(this avoids run-away scroller when scrolling |
|
1090 |
textviews, when the text is aligned line-wise). |
|
38 | 1091 |
Consider this as a kludge." |
7 | 1092 |
|
65 | 1093 |
lockUpdates := false. |
7 | 1094 |
|
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1095 |
vScrollBar notNil ifTrue:[ |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1096 |
vScrollBar scrollAction:[:position | |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1097 |
lockUpdates := true. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1098 |
scrolledView scrollVerticalToPercent:position. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1099 |
lockUpdates := false |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1100 |
]. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1101 |
vScrollBar scrollUpAction:[scrolledView scrollUp]. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1102 |
vScrollBar scrollDownAction:[scrolledView scrollDown]. |
7 | 1103 |
]. |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1104 |
hScrollBar notNil ifTrue:[ |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1105 |
hScrollBar scrollAction:[:position | |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1106 |
lockUpdates := true. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1107 |
scrolledView scrollHorizontalToPercent:position. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1108 |
lockUpdates := false |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1109 |
]. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1110 |
hScrollBar scrollUpAction:[scrolledView scrollLeft]. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1111 |
hScrollBar scrollDownAction:[scrolledView scrollRight]. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1112 |
]. |
7 | 1113 |
|
65 | 1114 |
scrolledView addDependent:self. |
814 | 1115 |
|
1116 |
" |
|
1117 |
pass my keyboard input (and other subviews input) |
|
1118 |
to the scrolled view ... |
|
1119 |
" |
|
1120 |
self delegate:(KeyboardForwarder toView:scrolledView). |
|
1121 |
||
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1122 |
"Modified: 6.3.1997 / 17:03:43 / cg" |
1111 | 1123 |
"Created: 6.3.1997 / 18:06:23 / cg" |
1124 |
! |
|
1125 |
||
1126 |
setupDimensions |
|
1113 | 1127 |
|scrolledViewMargin scrollBarSpacing |
1111 | 1128 |
scrolledViewLayout hScrollBarLayout vScrollBarLayout |
1129 |
vBd "{ Class: SmallInteger }" |
|
1130 |
hBd "{ Class: SmallInteger }" |
|
1131 |
sBd "{ Class: SmallInteger }" |
|
1132 |
wVScroll "{ Class: SmallInteger }" |
|
1133 |
hHScroll "{ Class: SmallInteger }" |
|
1134 |
hLeftOffs "{ Class: SmallInteger }" |
|
1135 |
hRightOffs "{ Class: SmallInteger }" |
|
1136 |
hTopOffs "{ Class: SmallInteger }" |
|
1137 |
hBottomOffs "{ Class: SmallInteger }" |
|
1138 |
sLeftOffs "{ Class: SmallInteger }" |
|
1139 |
sRightOffs "{ Class: SmallInteger }" |
|
1140 |
sTopOffs "{ Class: SmallInteger }" |
|
1141 |
sBottomOffs "{ Class: SmallInteger }" |
|
1142 |
vLeftOffs "{ Class: SmallInteger }" |
|
1143 |
vRightOffs "{ Class: SmallInteger }" |
|
1144 |
vTopOffs "{ Class: SmallInteger }" |
|
1145 |
vBottomOffs "{ Class: SmallInteger }" |
|
1146 |
addMargin "{ Class: SmallInteger }"| |
|
1147 |
||
1148 |
DefaultLevel notNil ifTrue:[self level:DefaultLevel]. |
|
1149 |
||
1150 |
sBd := 0. |
|
1151 |
DefaultScrolledViewBorderWidth notNil ifTrue:[ |
|
1152 |
sBd := DefaultScrolledViewBorderWidth. |
|
1153 |
scrolledView notNil ifTrue:[ |
|
1154 |
scrolledView borderWidth:DefaultScrolledViewBorderWidth. |
|
1155 |
] |
|
1156 |
] ifFalse:[ |
|
1157 |
scrolledView notNil ifTrue:[ |
|
1158 |
sBd := scrolledView borderWidth |
|
1159 |
] |
|
1160 |
]. |
|
1161 |
||
1162 |
vScrollBar notNil ifTrue:[ |
|
1163 |
vBd := vScrollBar borderWidth. |
|
1164 |
wVScroll := vScrollBar widthIncludingBorder. |
|
1165 |
||
1166 |
] ifFalse:[ |
|
1167 |
vBd := wVScroll := 0. |
|
1168 |
]. |
|
1169 |
||
1170 |
hScrollBar notNil ifTrue:[ |
|
1171 |
hBd := hScrollBar borderWidth. |
|
1172 |
hHScroll := hScrollBar heightIncludingBorder. |
|
1173 |
] ifFalse:[ |
|
1174 |
hBd := hHScroll := 0. |
|
1175 |
]. |
|
1176 |
||
1177 |
"/ the raw layout ... |
|
1178 |
||
1179 |
scrolledViewLayout := ((0.0 @ 0.0) corner:(1.0@1.0)) asLayout. |
|
1180 |
hScrollBarLayout := ((0.0 @ 1.0) corner:(1.0@1.0)) asLayout. |
|
1181 |
||
1182 |
"/ the painful details; mostly complicated for 2D styles, |
|
1183 |
"/ where the positions are setUp to overlay borders ... |
|
1184 |
"/ (well, with 3D styles, a single pixel error will not be noticed; |
|
1185 |
"/ but 2D styles are very sensitive to those; |
|
1186 |
"/ the code below may not work correctly with different borderWidths). |
|
1187 |
||
1188 |
scrolledViewMargin := DefaultScrolledViewMargin. |
|
1189 |
scrollBarSpacing := DefaultScrollBarSpacing. |
|
1190 |
||
1191 |
vTopOffs := 0 - vBd + scrolledViewMargin + margin. |
|
1192 |
scrolledViewMargin == 0 ifTrue:[ |
|
1193 |
vBottomOffs := 0 + vBd - scrolledViewMargin - sBd. |
|
1194 |
] ifFalse:[ |
|
1195 |
vBottomOffs := 0 + vBd - scrolledViewMargin + sBd. |
|
1196 |
]. |
|
1197 |
||
1198 |
hLeftOffs := 0 - hBd + scrolledViewMargin + margin. |
|
1199 |
hRightOffs := 0 + hBd - scrolledViewMargin - sBd. |
|
1200 |
||
1201 |
sLeftOffs := 0 - hBd + scrolledViewMargin + margin. |
|
1202 |
sRightOffs := 0 + hBd - scrolledViewMargin - sBd - sBd - sBd. |
|
1203 |
||
1204 |
scrolledViewMargin == 0 ifTrue:[ |
|
1205 |
sTopOffs := 0 - sBd + margin. |
|
1206 |
sBottomOffs := 0 + sBd - sBd. |
|
1207 |
] ifFalse:[ |
|
1208 |
sTopOffs := 0 + scrolledViewMargin + margin. |
|
1209 |
sBottomOffs := 0 + sBd - scrolledViewMargin - sBd - sBd - sBd. |
|
1210 |
]. |
|
1211 |
||
1212 |
addMargin := 0. |
|
1213 |
"/ DefaultScrollBarLevel == DefaultScrolledViewLevel |
|
1214 |
"/ addMargin := 1. |
|
1215 |
"/ ]. |
|
1216 |
||
1217 |
vScrollBar notNil ifTrue:[ |
|
1218 |
scrollBarPosition == #right ifTrue:[ |
|
1219 |
"/ right/bottom |
|
1220 |
vScrollBarLayout := ((1.0 @ 0.0) corner:(1.0@1.0)) asLayout. |
|
1221 |
||
1222 |
vRightOffs := 0 - scrolledViewMargin + margin "???". |
|
1223 |
vLeftOffs := vRightOffs - wVScroll. |
|
1224 |
||
1225 |
sRightOffs := sRightOffs - scrollBarSpacing - wVScroll + sBd. |
|
1226 |
||
1227 |
hRightOffs := hRightOffs - wVScroll - scrollBarSpacing - sBd. |
|
1228 |
||
1229 |
sRightOffs := sRightOffs - addMargin |
|
1230 |
||
1231 |
] ifFalse:[ |
|
1232 |
"/ left/bottom |
|
1233 |
vScrollBarLayout := ((0.0 @ 0.0) corner:(0.0@1.0)) asLayout. |
|
1234 |
||
1235 |
vLeftOffs := 0 - vBd + scrolledViewMargin + margin. |
|
1236 |
vRightOffs := vLeftOffs + wVScroll + margin. |
|
1237 |
||
1238 |
sLeftOffs := wVScroll + scrolledViewMargin + scrollBarSpacing + margin. |
|
1239 |
sRightOffs := 0 - scrolledViewMargin - margin. |
|
1240 |
hLeftOffs := hLeftOffs + wVScroll + vBd + scrollBarSpacing. |
|
1241 |
||
1242 |
sLeftOffs := sLeftOffs + addMargin |
|
1243 |
]. |
|
1244 |
]. |
|
1245 |
||
1246 |
hScrollBar notNil ifTrue:[ |
|
1247 |
hBottomOffs := 0 - scrolledViewMargin - hBd + margin "???". |
|
1248 |
hTopOffs := hBottomOffs - hHScroll. |
|
1249 |
scrolledViewMargin == 0 ifTrue:[ |
|
1250 |
hTopOffs := hTopOffs + sBd + sBd |
|
1251 |
]. |
|
1252 |
sBottomOffs := sBottomOffs - scrollBarSpacing - hHScroll. |
|
1253 |
vScrollBar notNil ifTrue:[ |
|
1254 |
vBottomOffs := vBottomOffs - scrollBarSpacing - hHScroll. |
|
1255 |
]. |
|
1256 |
||
1257 |
sBottomOffs := sBottomOffs - addMargin. |
|
1258 |
hRightOffs := hRightOffs - addMargin. |
|
1259 |
]. |
|
1260 |
||
1261 |
scrolledView notNil ifTrue:[ |
|
1262 |
scrolledViewLayout leftOffset:sLeftOffs. |
|
1263 |
scrolledViewLayout rightOffset:sRightOffs. |
|
1264 |
scrolledViewLayout topOffset:sTopOffs. |
|
1265 |
scrolledViewLayout bottomOffset:sBottomOffs. |
|
1266 |
||
1267 |
scrolledView level:DefaultScrolledViewLevel. |
|
1268 |
scrolledView layout:scrolledViewLayout. |
|
1269 |
]. |
|
1270 |
hScrollBar notNil ifTrue:[ |
|
1271 |
hScrollBarLayout leftOffset:hLeftOffs. |
|
1272 |
hScrollBarLayout rightOffset:hRightOffs. |
|
1273 |
hScrollBarLayout topOffset:hTopOffs. |
|
1274 |
hScrollBarLayout bottomOffset:hBottomOffs. |
|
1275 |
||
1276 |
hScrollBar level:DefaultScrollBarLevel. |
|
1277 |
hScrollBar layout:hScrollBarLayout |
|
1278 |
]. |
|
1279 |
vScrollBar notNil ifTrue:[ |
|
1280 |
vScrollBarLayout leftOffset:vLeftOffs. |
|
1281 |
vScrollBarLayout rightOffset:vRightOffs. |
|
1282 |
vScrollBarLayout topOffset:vTopOffs. |
|
1283 |
vScrollBarLayout bottomOffset:vBottomOffs. |
|
1284 |
||
1285 |
vScrollBar level:DefaultScrollBarLevel. |
|
1286 |
vScrollBar layout:vScrollBarLayout |
|
1287 |
]. |
|
1288 |
||
1289 |
"Created: 6.3.1997 / 18:06:23 / cg" |
|
1290 |
"Modified: 7.3.1997 / 15:11:13 / cg" |
|
1291 |
! |
|
1292 |
||
1293 |
setupVertical:isVertical mini:miniV horizontal:isHorizontal mini:miniH |
|
1294 |
"setup scrollbars as specified in the arguments" |
|
1295 |
||
1113 | 1296 |
|noMiniScrollers cls| |
1111 | 1297 |
|
1298 |
noMiniScrollers := styleSheet at:'scrollBarNeverMini' default:false. |
|
1299 |
||
1300 |
isVertical ifTrue:[ |
|
1301 |
cls := ScrollBar. |
|
1302 |
miniV ifTrue:[ |
|
1303 |
noMiniScrollers ifFalse:[ |
|
1304 |
cls := MiniScroller |
|
1305 |
] |
|
1306 |
]. |
|
1307 |
(vScrollBar notNil |
|
1308 |
and:[vScrollBar class ~~ cls]) ifTrue:[ |
|
1309 |
self releaseVerticalScrollBar |
|
1310 |
]. |
|
1311 |
vScrollBar isNil ifTrue:[ |
|
1312 |
vScrollBar := cls in:self. |
|
1313 |
]. |
|
1314 |
vScrollBar thumbOrigin:0 thumbHeight:100. |
|
1315 |
] ifFalse:[ |
|
1316 |
vScrollBar notNil ifTrue:[ |
|
1317 |
self releaseVerticalScrollBar |
|
1318 |
] |
|
1319 |
]. |
|
1320 |
||
1321 |
isHorizontal ifTrue:[ |
|
1322 |
cls := HorizontalScrollBar. |
|
1323 |
miniH ifTrue:[ |
|
1324 |
noMiniScrollers ifFalse:[ |
|
1325 |
cls := HorizontalMiniScroller |
|
1326 |
] |
|
1327 |
]. |
|
1328 |
(hScrollBar notNil |
|
1329 |
and:[hScrollBar class ~~ cls]) ifTrue:[ |
|
1330 |
self releaseHorizontalScrollBar |
|
1331 |
]. |
|
1332 |
hScrollBar isNil ifTrue:[ |
|
1333 |
hScrollBar := cls in:self. |
|
1334 |
]. |
|
1335 |
hScrollBar thumbOrigin:0 thumbHeight:100. |
|
1336 |
] ifFalse:[ |
|
1337 |
hScrollBar notNil ifTrue:[ |
|
1338 |
self releaseHorizontalScrollBar |
|
1339 |
] |
|
1340 |
]. |
|
1341 |
||
1342 |
scrolledView notNil ifTrue:[ |
|
1343 |
self setScrollActions. |
|
1344 |
] |
|
1345 |
||
1346 |
"Created: 6.3.1997 / 18:06:23 / cg" |
|
1347 |
"Modified: 6.3.1997 / 23:17:48 / cg" |
|
7 | 1348 |
! ! |
1349 |
||
217 | 1350 |
!ScrollableView methodsFor:'queries'! |
38 | 1351 |
|
819
32ac89843fa8
Send only one scroll message for horizontal and vertical scroll
Stefan Vogel <sv@exept.de>
parents:
814
diff
changeset
|
1352 |
isHorizontalScrollable |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1353 |
"return true if I am horizontally scrollable" |
819
32ac89843fa8
Send only one scroll message for horizontal and vertical scroll
Stefan Vogel <sv@exept.de>
parents:
814
diff
changeset
|
1354 |
|
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1355 |
^ hScrollBar notNil |
819
32ac89843fa8
Send only one scroll message for horizontal and vertical scroll
Stefan Vogel <sv@exept.de>
parents:
814
diff
changeset
|
1356 |
|
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1357 |
"Modified: 6.3.1997 / 17:03:49 / cg" |
1111 | 1358 |
"Created: 6.3.1997 / 18:06:23 / cg" |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1359 |
! |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1360 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1361 |
isVerticalScrollable |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1362 |
"return true if I am vertically scrollable" |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1363 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1364 |
^ vScrollBar notNil |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1365 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1366 |
"Modified: 6.3.1997 / 17:03:52 / cg" |
1111 | 1367 |
"Created: 6.3.1997 / 18:06:23 / cg" |
819
32ac89843fa8
Send only one scroll message for horizontal and vertical scroll
Stefan Vogel <sv@exept.de>
parents:
814
diff
changeset
|
1368 |
! |
32ac89843fa8
Send only one scroll message for horizontal and vertical scroll
Stefan Vogel <sv@exept.de>
parents:
814
diff
changeset
|
1369 |
|
217 | 1370 |
preferredExtent |
572 | 1371 |
"return my preferredExtent from the scrolledViews prefExtent |
1372 |
plus the size of the scrollBar" |
|
1373 |
||
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1374 |
|slavesPref prefX prefY| |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1375 |
|
799 | 1376 |
"/ If I have an explicit preferredExtent .. |
1377 |
||
713
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
703
diff
changeset
|
1378 |
preferredExtent notNil ifTrue:[ |
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
703
diff
changeset
|
1379 |
^ preferredExtent |
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
703
diff
changeset
|
1380 |
]. |
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
703
diff
changeset
|
1381 |
|
217 | 1382 |
scrolledView notNil ifTrue:[ |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1383 |
slavesPref := scrolledView preferredExtent. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1384 |
prefX := slavesPref x. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1385 |
prefY := slavesPref y. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1386 |
vScrollBar notNil ifTrue:[ |
1111 | 1387 |
prefX := prefX + vScrollBar width + (DefaultScrolledViewMargin * 2) + DefaultScrollBarSpacing. |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1388 |
]. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1389 |
hScrollBar notNil ifTrue:[ |
1111 | 1390 |
prefY := prefY + hScrollBar height + (DefaultScrolledViewMargin * 2) + DefaultScrollBarSpacing. |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1391 |
]. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1392 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1393 |
^ prefX @ prefY. |
0 | 1394 |
]. |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1395 |
|
217 | 1396 |
^ super preferredExtent. |
572 | 1397 |
|
1111 | 1398 |
"Created: 6.3.1997 / 18:06:24 / cg" |
1399 |
"Modified: 6.3.1997 / 22:34:09 / cg" |
|
678
c1967a46b2c1
added query for lines/cols - prefExt
Claus Gittinger <cg@exept.de>
parents:
608
diff
changeset
|
1400 |
! |
c1967a46b2c1
added query for lines/cols - prefExt
Claus Gittinger <cg@exept.de>
parents:
608
diff
changeset
|
1401 |
|
c1967a46b2c1
added query for lines/cols - prefExt
Claus Gittinger <cg@exept.de>
parents:
608
diff
changeset
|
1402 |
preferredExtentForLines:numLines cols:numCols |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1403 |
"return my preferredExtent from the scrolledViews prefExtent |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1404 |
plus the size of the scrollBar" |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1405 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1406 |
|slavesPref prefX prefY| |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1407 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1408 |
"/ If I have an explicit preferredExtent .. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1409 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1410 |
preferredExtent notNil ifTrue:[ |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1411 |
^ preferredExtent |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1412 |
]. |
678
c1967a46b2c1
added query for lines/cols - prefExt
Claus Gittinger <cg@exept.de>
parents:
608
diff
changeset
|
1413 |
|
c1967a46b2c1
added query for lines/cols - prefExt
Claus Gittinger <cg@exept.de>
parents:
608
diff
changeset
|
1414 |
scrolledView notNil ifTrue:[ |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1415 |
slavesPref := scrolledView preferredExtentForLines:numLines cols:numCols. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1416 |
prefX := slavesPref x. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1417 |
prefY := slavesPref y. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1418 |
vScrollBar notNil ifTrue:[ |
1111 | 1419 |
prefX := prefX + vScrollBar width + (DefaultScrolledViewMargin * 2) + DefaultScrollBarSpacing. |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1420 |
]. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1421 |
hScrollBar notNil ifTrue:[ |
1111 | 1422 |
prefY := prefY + hScrollBar height + (DefaultScrolledViewMargin * 2) + DefaultScrollBarSpacing. |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1423 |
]. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1424 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1425 |
^ prefX @ prefY. |
678
c1967a46b2c1
added query for lines/cols - prefExt
Claus Gittinger <cg@exept.de>
parents:
608
diff
changeset
|
1426 |
]. |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1427 |
|
678
c1967a46b2c1
added query for lines/cols - prefExt
Claus Gittinger <cg@exept.de>
parents:
608
diff
changeset
|
1428 |
^ super preferredExtent. |
c1967a46b2c1
added query for lines/cols - prefExt
Claus Gittinger <cg@exept.de>
parents:
608
diff
changeset
|
1429 |
|
1111 | 1430 |
"Created: 6.3.1997 / 18:06:24 / cg" |
1431 |
"Modified: 6.3.1997 / 22:34:30 / cg" |
|
0 | 1432 |
! ! |
1433 |
||
1434 |
!ScrollableView methodsFor:'slave-view messages'! |
|
1435 |
||
1024 | 1436 |
clear |
1073 | 1437 |
scrolledView notNil ifTrue:[scrolledView clear] |
1024 | 1438 |
|
1111 | 1439 |
"Created: 6.3.1997 / 18:06:24 / cg" |
1024 | 1440 |
! |
1441 |
||
217 | 1442 |
doesNotUnderstand:aMessage |
1443 |
"this is funny: all message we do not understand, are passed |
|
1444 |
on to the scrolledView - so we do not have to care for all |
|
1445 |
possible messages ...(thanks to the Message class)" |
|
1446 |
||
1447 |
scrolledView isNil ifFalse:[ |
|
1111 | 1448 |
^ scrolledView perform:(aMessage selector) |
1449 |
withArguments:(aMessage arguments) |
|
1450 |
]. |
|
1451 |
^ super doesNotUnderstand:aMessage |
|
1452 |
||
1453 |
"Created: 6.3.1997 / 18:06:24 / cg" |
|
1454 |
"Modified: 6.3.1997 / 18:38:54 / cg" |
|
217 | 1455 |
! |
1456 |
||
0 | 1457 |
leftButtonMenu |
38 | 1458 |
"return scrolledViews leftbuttonmenu" |
1459 |
||
1460 |
scrolledView isNil ifTrue:[^ nil]. |
|
0 | 1461 |
^ scrolledView leftButtonMenu |
1111 | 1462 |
|
1463 |
"Created: 6.3.1997 / 18:06:24 / cg" |
|
0 | 1464 |
! |
1465 |
||
1466 |
leftButtonMenu:aMenu |
|
1467 |
"pass on leftbuttonmenu to scrolledView" |
|
1468 |
||
1469 |
scrolledView leftButtonMenu:aMenu |
|
1111 | 1470 |
|
1471 |
"Created: 6.3.1997 / 18:06:24 / cg" |
|
0 | 1472 |
! |
1473 |
||
1474 |
middleButtonMenu |
|
38 | 1475 |
"return scrolledViews middlebuttonmenu" |
1476 |
||
1477 |
scrolledView isNil ifTrue:[^ nil]. |
|
0 | 1478 |
^ scrolledView middleButtonMenu |
1111 | 1479 |
|
1480 |
"Created: 6.3.1997 / 18:06:24 / cg" |
|
0 | 1481 |
! |
1482 |
||
1483 |
middleButtonMenu:aMenu |
|
1484 |
"pass on middlebuttonmenu to scrolledView" |
|
1485 |
||
1486 |
scrolledView middleButtonMenu:aMenu |
|
1111 | 1487 |
|
1488 |
"Created: 6.3.1997 / 18:06:24 / cg" |
|
0 | 1489 |
! |
1490 |
||
562 | 1491 |
model |
754 | 1492 |
"return my scrolledViews model" |
1493 |
||
1085 | 1494 |
scrolledView isNil ifTrue:[^ nil]. |
562 | 1495 |
^ scrolledView model |
1496 |
||
1085 | 1497 |
"Modified: 1.3.1997 / 01:38:07 / cg" |
1111 | 1498 |
"Created: 6.3.1997 / 18:06:24 / cg" |
562 | 1499 |
! |
1500 |
||
1501 |
model:aModel |
|
754 | 1502 |
"forward model change to my scrolledViews" |
1503 |
||
562 | 1504 |
^ scrolledView model:aModel |
1505 |
||
754 | 1506 |
"Modified: 5.6.1996 / 17:09:50 / cg" |
1111 | 1507 |
"Created: 6.3.1997 / 18:06:24 / cg" |
562 | 1508 |
! |
1509 |
||
0 | 1510 |
rightButtonMenu |
38 | 1511 |
"return scrolledViews rightbuttonmenu" |
1512 |
||
1513 |
scrolledView isNil ifTrue:[^ nil]. |
|
0 | 1514 |
^ scrolledView rightButtonMenu |
1111 | 1515 |
|
1516 |
"Created: 6.3.1997 / 18:06:24 / cg" |
|
0 | 1517 |
! |
1518 |
||
1519 |
rightButtonMenu:aMenu |
|
1520 |
"pass on rightbuttonmenu to scrolledView" |
|
1521 |
||
1522 |
scrolledView rightButtonMenu:aMenu |
|
1111 | 1523 |
|
1524 |
"Created: 6.3.1997 / 18:06:24 / cg" |
|
38 | 1525 |
! ! |
1526 |
||
852 | 1527 |
!ScrollableView class methodsFor:'documentation'! |
0 | 1528 |
|
217 | 1529 |
version |
1113 | 1530 |
^ '$Header: /cvs/stx/stx/libwidg/ScrollableView.st,v 1.50 1997-03-07 14:25:27 cg Exp $' |
0 | 1531 |
! ! |