author | Claus Gittinger <cg@exept.de> |
Wed, 24 Feb 1999 17:56:06 +0100 | |
changeset 1753 | d0b1ba76acdb |
parent 1719 | 3d4adf98c079 |
child 1827 | bfbf33580947 |
permissions | -rw-r--r-- |
0 | 1 |
" |
5 | 2 |
COPYRIGHT (c) 1989 by Claus Gittinger |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
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 |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
14 |
instanceVariableNames:'scrolledView vScrollBar hScrollBar scrollBarPosition lockUpdates |
1556
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
15 |
hideVScrollBar hideHScrollBar hasHorizontalScrollBar |
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
16 |
hasVerticalScrollBar horizontalMini verticalMini vScrollBarHidden |
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
17 |
hScrollBarHidden vScrollBarVisible hScrollBarVisible' |
1111 | 18 |
classVariableNames:'DefaultScrolledViewLevel DefaultScrolledViewMargin |
19 |
DefaultScrollBarSpacing DefaultScrolledViewBorderWidth |
|
20 |
DefaultLevel DefaultScrollBarLevel MyDefaultViewBackgroundColor' |
|
444
ef26eba8c854
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
300
diff
changeset
|
21 |
poolDictionaries:'' |
ef26eba8c854
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
300
diff
changeset
|
22 |
category:'Views-Basic' |
0 | 23 |
! |
24 |
||
852 | 25 |
!ScrollableView class methodsFor:'documentation'! |
38 | 26 |
|
27 |
copyright |
|
28 |
" |
|
29 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
30 |
All Rights Reserved |
38 | 31 |
|
32 |
This software is furnished under a license and may be used |
|
33 |
only in accordance with the terms of that license and with the |
|
34 |
inclusion of the above copyright notice. This software may not |
|
35 |
be provided or otherwise made available to, or used by, any |
|
36 |
other person. No title to or ownership of the software is |
|
37 |
hereby transferred. |
|
38 |
" |
|
39 |
! |
|
40 |
||
41 |
documentation |
|
42 |
" |
|
43 |
a view containing a scrollbar and some other (slave-)view. |
|
130 | 44 |
This view wraps scrollbar(s) around the view to be scrolled. |
65 | 45 |
The scrollbars are setup to send scrollUp/scrollDown/scrollVerticalTo |
46 |
and scrollLeft/scrollRight/scrollHorizontalTo- messages whenever moved. |
|
130 | 47 |
The view itself has to implement these (there is a default implementation |
1459 | 48 |
in the common View class for this - so your widgets usually dont have to |
49 |
care for this). |
|
65 | 50 |
|
51 |
For the scrollbars to know about the full (maximum) size, the view |
|
1459 | 52 |
MUST implement #heightOfContents and/or #widthOfContents. |
53 |
The values returned by those methods are used to compute the fraction |
|
130 | 54 |
which is visible (i.e. the scrollers thumb heights). |
65 | 55 |
|
1459 | 56 |
There are three ways to setup a scrollableView: |
38 | 57 |
if the type of the view to be scrolled is known in advance, |
58 |
use: |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
59 |
v := ScrollableView for:<ViewClass> |
130 | 60 |
or: |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
61 |
v := ScrollableView for:<ViewClass> in:someSuperView |
65 | 62 |
|
1459 | 63 |
|
64 |
otherwise, create an empty scrollableView with: |
|
130 | 65 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
66 |
v := ScrollableView new |
130 | 67 |
or: |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
68 |
v := ScrollableView in:someSuperView |
130 | 69 |
|
65 | 70 |
and define the view later with: |
130 | 71 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
72 |
v scrolledView:aViewToBeScrolled |
65 | 73 |
|
1459 | 74 |
|
130 | 75 |
Finally, if the view to be scrolled has been already created, |
76 |
use: |
|
77 |
||
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
78 |
v := ScrollableView forView:aViewToBeScrolled |
130 | 79 |
or: |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
80 |
v := ScrollableView forView:aViewToBeScrolled in:someSuperView |
65 | 81 |
|
130 | 82 |
It is also possible to change the scrolledView later (even multiple times). |
83 |
This may be useful, if different views are needed to display different types |
|
84 |
of data (see example2) and at creation time, it is not known what type |
|
1459 | 85 |
of view is required (multidocument format applications). |
130 | 86 |
|
1459 | 87 |
If you want to scroll a bucnh of other views (instead of a views contents), |
88 |
you need a companion class (ViewScroller). See the documentation there. |
|
65 | 89 |
|
90 |
If you need horizontal scrolling too, use an instance of HVScrollableView. |
|
113 | 91 |
|
92 |
By default, scrollbars are full size scrollbars - for horizontal scrolling |
|
93 |
(which is less often used), scrollableViews can optionally be created with |
|
94 |
miniscrollers which take up less screen space. |
|
130 | 95 |
|
96 |
TODO: |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
97 |
this is pretty old and needs a rewrite. There are quite some |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
98 |
historic leftovers found here and things can be done better |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
99 |
(especially in initializeFor...) |
584 | 100 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
101 |
Also, it should be rewritten into one class which supports both |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
102 |
Vertical-only, Horizontal-only and HV scrolling. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
103 |
Currently, horizontal-only scrolling is not available. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
104 |
(you have to write your own class ...) |
130 | 105 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
106 |
Finally, some means to hide scrollbars should be added - this would |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
107 |
give more screenspace to the view when all is visible |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
108 |
(and therefore, the scrollbars are not needed, anyway) |
584 | 109 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
110 |
Expect the above things to be fixed in an upcoming version. |
130 | 111 |
|
1459 | 112 |
Recent changes: |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
113 |
Originally, there where two classes, for vertical-only and |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
114 |
horizontal+vertical scrollability. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
115 |
These have now been merged into the common ScrollableView class, |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
116 |
and each scrollability can be controlled individually. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
117 |
The original HVScrollableView class is almost empty, but remains |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
118 |
for backward compatibility (it simply initializes the scrollability |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
119 |
flags for H+V scrollability). |
1459 | 120 |
|
584 | 121 |
[author:] |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
122 |
Claus Gittinger |
130 | 123 |
|
584 | 124 |
[see also:] |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
125 |
ScrollBar Scroller |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
126 |
HVScrollableView |
63 | 127 |
" |
128 |
! |
|
38 | 129 |
|
63 | 130 |
examples |
131 |
" |
|
1138 | 132 |
simple scrolled text: |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
133 |
[exBegin] |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
134 |
|top scr txt| |
0 | 135 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
136 |
top := StandardSystemView label:'scroll example1'. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
137 |
top extent:200@100. |
113 | 138 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
139 |
scr := ScrollableView for:EditTextView in:top. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
140 |
scr origin:0.0@0.0 corner:1.0@1.0. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
141 |
txt := scr scrolledView. |
38 | 142 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
143 |
txt list:#('line1' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
144 |
'line2' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
145 |
'line3' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
146 |
'line4' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
147 |
'line5' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
148 |
'line7' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
149 |
'line8' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
150 |
'line9' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
151 |
'line10' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
152 |
). |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
153 |
top open |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
154 |
[exEnd] |
38 | 155 |
|
65 | 156 |
|
1138 | 157 |
changing the scrolledView later: |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
158 |
[exBegin] |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
159 |
|top scr txtView1 txtView2 browserView| |
38 | 160 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
161 |
top := StandardSystemView label:'scroll example2'. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
162 |
top extent:300@100. |
113 | 163 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
164 |
scr := ScrollableView in:top. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
165 |
scr origin:0.0@0.0 corner:1.0@1.0. |
113 | 166 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
167 |
top open. |
0 | 168 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
169 |
(Delay forSeconds:5) wait. |
38 | 170 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
171 |
txtView1 := EditTextView new. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
172 |
txtView1 list:#( |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
173 |
'wait 5 seconds to see the other text' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
174 |
'line2' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
175 |
'line3' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
176 |
'line4' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
177 |
'line5' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
178 |
'line7' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
179 |
'line8' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
180 |
'line9' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
181 |
'line10' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
182 |
). |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
183 |
scr scrolledView:txtView1. |
38 | 184 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
185 |
(Delay forSeconds:5) wait. |
38 | 186 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
187 |
txtView2 := EditTextView new. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
188 |
txtView2 list:#('this is the other views text' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
189 |
'alternative line2' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
190 |
'alternative line3' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
191 |
'alternative line4' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
192 |
'alternative line5' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
193 |
'alternative line6'). |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
194 |
scr scrolledView:txtView2. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
195 |
[exEnd] |
113 | 196 |
|
197 |
||
198 |
||
199 |
||
1138 | 200 |
using a miniscroller: |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
201 |
[exBegin] |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
202 |
|top scr txt| |
113 | 203 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
204 |
top := StandardSystemView label:'scroll example3'. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
205 |
top extent:200@100. |
113 | 206 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
207 |
scr := ScrollableView for:EditTextView miniScroller:true in:top. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
208 |
scr origin:0.0@0.0 corner:1.0@1.0. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
209 |
txt := scr scrolledView. |
113 | 210 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
211 |
txt list:#('line1' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
212 |
'line2' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
213 |
'line3' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
214 |
'line4' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
215 |
'line5' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
216 |
'line7' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
217 |
'line8' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
218 |
'line9' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
219 |
'line10' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
220 |
). |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
221 |
top open |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
222 |
[exEnd] |
113 | 223 |
|
224 |
||
225 |
||
1138 | 226 |
scrolling in both directions: |
227 |
Notice: HVScrollableView remains existent for backward compatibility; |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
228 |
scrollability can now be controlled in both directions at any |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
229 |
time (see examples below). |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
230 |
[exBegin] |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
231 |
|top scr txt| |
113 | 232 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
233 |
top := StandardSystemView label:'scroll example4'. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
234 |
top extent:200@100. |
113 | 235 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
236 |
scr := HVScrollableView for:EditTextView in:top. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
237 |
scr origin:0.0@0.0 corner:1.0@1.0. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
238 |
txt := scr scrolledView. |
113 | 239 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
240 |
txt list:#('line1' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
241 |
'line2' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
242 |
'line3' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
243 |
'line4' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
244 |
'line5' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
245 |
'line7' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
246 |
'line8' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
247 |
'line9' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
248 |
'line10' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
249 |
). |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
250 |
top open |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
251 |
[exEnd] |
113 | 252 |
|
253 |
||
254 |
||
1138 | 255 |
using a full scroller vertically, miniscroller horizontally: |
256 |
Notice: HVScrollableView remains existent for backward compatibility; |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
257 |
scrollability can now be controlled in both directions at any |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
258 |
time (see examples below). |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
259 |
[exBegin] |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
260 |
|top scr txt| |
113 | 261 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
262 |
top := StandardSystemView label:'scroll example5'. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
263 |
top extent:200@100. |
113 | 264 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
265 |
scr := HVScrollableView for:EditTextView miniScrollerH:true in:top. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
266 |
scr origin:0.0@0.0 corner:1.0@1.0. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
267 |
txt := scr scrolledView. |
113 | 268 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
269 |
txt list:#('line1' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
270 |
'line2' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
271 |
'line3' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
272 |
'line4' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
273 |
'line5' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
274 |
'line7' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
275 |
'line8' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
276 |
'line9' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
277 |
'line10' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
278 |
). |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
279 |
top open |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
280 |
[exEnd] |
113 | 281 |
|
282 |
||
283 |
||
1138 | 284 |
using miniscrollers for both directions: |
285 |
Notice: HVScrollableView remains existent for backward compatibility; |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
286 |
scrollability can now be controlled in both directions at any |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
287 |
time (see examples below). |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
288 |
[exBegin] |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
289 |
|top scr txt| |
113 | 290 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
291 |
top := StandardSystemView label:'scroll example6'. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
292 |
top extent:200@100. |
113 | 293 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
294 |
scr := HVScrollableView for:EditTextView miniScroller:true in:top. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
295 |
scr origin:0.0@0.0 corner:1.0@1.0. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
296 |
txt := scr scrolledView. |
113 | 297 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
298 |
txt list:#('line1' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
299 |
'line2' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
300 |
'line3' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
301 |
'line4' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
302 |
'line5' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
303 |
'line7' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
304 |
'line8' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
305 |
'line9' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
306 |
'line10' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
307 |
). |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
308 |
top open |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
309 |
[exEnd] |
1138 | 310 |
controlling scrollability: |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
311 |
[exBegin] |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
312 |
|top scr txt| |
1138 | 313 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
314 |
top := StandardSystemView label:'scroll example6'. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
315 |
top extent:200@100. |
1138 | 316 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
317 |
txt := EditTextView new. |
1138 | 318 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
319 |
scr := ScrollableView forView:txt in:top. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
320 |
scr origin:0.0@0.0 corner:1.0@1.0. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
321 |
scr horizontalScrollable:true. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
322 |
scr verticalScrollable:false. |
1138 | 323 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
324 |
txt list:#('line1' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
325 |
'line2' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
326 |
'line3' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
327 |
'line4' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
328 |
'line5' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
329 |
'line7' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
330 |
'line8' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
331 |
'line9' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
332 |
'line10' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
333 |
). |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
334 |
top open |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
335 |
[exEnd] |
1138 | 336 |
controlling scrollability and miniScroller: |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
337 |
[exBegin] |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
338 |
|top scr txt| |
1138 | 339 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
340 |
top := StandardSystemView label:'scroll example6'. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
341 |
top extent:200@100. |
1138 | 342 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
343 |
txt := EditTextView new. |
1138 | 344 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
345 |
scr := ScrollableView forView:txt in:top. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
346 |
scr origin:0.0@0.0 corner:1.0@1.0. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
347 |
scr horizontalScrollable:true; horizontalMini:false. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
348 |
scr verticalScrollable:true; verticalMini:true. |
1138 | 349 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
350 |
txt list:#('line1' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
351 |
'line2' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
352 |
'line3' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
353 |
'line4' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
354 |
'line5' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
355 |
'line7' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
356 |
'line8' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
357 |
'line9' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
358 |
'line10' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
359 |
). |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
360 |
top open |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
361 |
[exEnd] |
1459 | 362 |
autohiding scrollbars (edit the text to make scrollbars visible/invisible) |
363 |
(NOTICE: |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
364 |
this is controlled by the styleSheet and |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
365 |
should normally NOT be done by the program): |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
366 |
[exBegin] |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
367 |
|top scr txt| |
1459 | 368 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
369 |
top := StandardSystemView label:'scroll example6'. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
370 |
top extent:200@100. |
1459 | 371 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
372 |
txt := EditTextView new. |
1459 | 373 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
374 |
scr := ScrollableView forView:txt in:top. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
375 |
scr origin:0.0@0.0 corner:1.0@1.0. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
376 |
scr horizontalScrollable:true; horizontalMini:false. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
377 |
scr verticalScrollable:true; verticalMini:true. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
378 |
scr autoHideScrollBars:true. |
1459 | 379 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
380 |
txt list:#('line1' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
381 |
'line2' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
382 |
'line3' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
383 |
'line4' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
384 |
'line5' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
385 |
'line7' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
386 |
'line8' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
387 |
'line9' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
388 |
'line10' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
389 |
). |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
390 |
top open |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
391 |
[exEnd] |
38 | 392 |
" |
393 |
! ! |
|
0 | 394 |
|
852 | 395 |
!ScrollableView class methodsFor:'instance creation'! |
217 | 396 |
|
397 |
for:aViewClass |
|
398 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
399 |
The subview is created here. |
|
400 |
The view will have full scrollbars." |
|
401 |
||
1111 | 402 |
^ self |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
403 |
for:aViewClass |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
404 |
hasHorizontalScrollBar:(self == HVScrollableView) |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
405 |
hasVerticalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
406 |
miniScrollerH:false |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
407 |
miniScrollerV:false |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
408 |
origin:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
409 |
corner:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
410 |
in:nil |
1111 | 411 |
|
412 |
"Created: 6.3.1997 / 18:06:22 / cg" |
|
413 |
"Modified: 6.3.1997 / 23:18:32 / cg" |
|
414 |
! |
|
415 |
||
1183 | 416 |
for:aViewClass hasHorizontalScrollBar:hasH hasVerticalScrollBar:hasV miniScrollerH:miniH miniScrollerV:miniV |
417 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
418 |
The subview is created here. |
|
419 |
The view will have full scrollbars if the corresponding miniH/miniV |
|
420 |
is false, miniscrollers if true." |
|
421 |
||
422 |
|newView| |
|
423 |
||
424 |
aViewClass notNil ifTrue:[ |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
425 |
newView := aViewClass new. |
1183 | 426 |
]. |
427 |
^ self |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
428 |
forView:newView |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
429 |
hasHorizontalScrollBar:hasH |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
430 |
hasVerticalScrollBar:hasV |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
431 |
miniScrollerH:miniH |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
432 |
miniScrollerV:miniV |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
433 |
origin:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
434 |
corner:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
435 |
in:nil |
1183 | 436 |
|
437 |
"Created: 7.4.1997 / 19:00:14 / cg" |
|
438 |
! |
|
439 |
||
1111 | 440 |
for:aViewClass hasHorizontalScrollBar:hasH hasVerticalScrollBar:hasV miniScrollerH:miniH miniScrollerV:miniV origin:org corner:corn in:aView |
441 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
442 |
The subview is created here. |
|
443 |
The view will have full scrollbars if the corresponding miniH/miniV |
|
444 |
is false, miniscrollers if true." |
|
445 |
||
446 |
|newView| |
|
447 |
||
448 |
aViewClass notNil ifTrue:[ |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
449 |
newView := aViewClass new. |
1111 | 450 |
]. |
451 |
^ self |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
452 |
forView:newView |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
453 |
hasHorizontalScrollBar:hasH |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
454 |
hasVerticalScrollBar:hasV |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
455 |
miniScrollerH:miniH |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
456 |
miniScrollerV:miniV |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
457 |
origin:org |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
458 |
corner:corn |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
459 |
in:aView |
1111 | 460 |
|
461 |
" |
|
462 |
|top scr| |
|
463 |
||
464 |
top := StandardSystemView extent:200@200. |
|
465 |
scr := NewScrollableView for:nil |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
466 |
hasHorizontalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
467 |
hasVerticalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
468 |
miniScrollerH:false |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
469 |
miniScrollerV:false |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
470 |
origin:0.0@0.0 |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
471 |
corner:1.0@1.0 |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
472 |
in:top. |
1111 | 473 |
top open |
474 |
" |
|
475 |
||
476 |
"Modified: 6.3.1997 / 18:36:01 / cg" |
|
217 | 477 |
! |
478 |
||
479 |
for:aViewClass in:aView |
|
480 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
481 |
The subview is created here. |
|
482 |
The view will have full scrollbars." |
|
483 |
||
1111 | 484 |
^ self |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
485 |
for:aViewClass |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
486 |
hasHorizontalScrollBar:(self == HVScrollableView) |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
487 |
hasVerticalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
488 |
miniScrollerH:false |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
489 |
miniScrollerV:false |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
490 |
origin:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
491 |
corner:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
492 |
in:aView |
1111 | 493 |
|
494 |
"Modified: 6.3.1997 / 23:18:41 / cg" |
|
217 | 495 |
! |
496 |
||
497 |
for:aViewClass miniScroller:mini |
|
498 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
499 |
The subview is created here. |
|
500 |
The view will have full scrollbars if mini is false, miniscrollers |
|
501 |
if true." |
|
502 |
||
1111 | 503 |
^ self |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
504 |
for:aViewClass |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
505 |
hasHorizontalScrollBar:(self == HVScrollableView) |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
506 |
hasVerticalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
507 |
miniScrollerH:mini |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
508 |
miniScrollerV:mini |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
509 |
origin:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
510 |
corner:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
511 |
in:nil |
1111 | 512 |
|
513 |
"Modified: 6.3.1997 / 23:18:45 / cg" |
|
217 | 514 |
! |
515 |
||
516 |
for:aViewClass miniScroller:mini in:aView |
|
517 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
518 |
The subview is created here. |
|
519 |
The view will have full scrollbars if mini is false, miniscrollers |
|
520 |
if true." |
|
521 |
||
1111 | 522 |
^ self |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
523 |
for:aViewClass |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
524 |
hasHorizontalScrollBar:(self == HVScrollableView) |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
525 |
hasVerticalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
526 |
miniScrollerH:mini |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
527 |
miniScrollerV:mini |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
528 |
origin:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
529 |
corner:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
530 |
in:aView |
1111 | 531 |
|
532 |
"Modified: 6.3.1997 / 23:18:50 / cg" |
|
217 | 533 |
! |
153 | 534 |
|
546
b643875bda30
more inst creation variations
Claus Gittinger <cg@exept.de>
parents:
492
diff
changeset
|
535 |
for:aViewClass miniScroller:mini origin:org corner:corn in:aView |
b643875bda30
more inst creation variations
Claus Gittinger <cg@exept.de>
parents:
492
diff
changeset
|
536 |
"return a new scrolling view scrolling an instance of aViewClass. |
b643875bda30
more inst creation variations
Claus Gittinger <cg@exept.de>
parents:
492
diff
changeset
|
537 |
The subview is created here. |
b643875bda30
more inst creation variations
Claus Gittinger <cg@exept.de>
parents:
492
diff
changeset
|
538 |
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
|
539 |
if true." |
b643875bda30
more inst creation variations
Claus Gittinger <cg@exept.de>
parents:
492
diff
changeset
|
540 |
|
1111 | 541 |
^ self |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
542 |
for:aViewClass |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
543 |
hasHorizontalScrollBar:(self == HVScrollableView) |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
544 |
hasVerticalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
545 |
miniScrollerH:mini |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
546 |
miniScrollerV:mini |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
547 |
origin:org |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
548 |
corner:corn |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
549 |
in:aView |
546
b643875bda30
more inst creation variations
Claus Gittinger <cg@exept.de>
parents:
492
diff
changeset
|
550 |
|
1111 | 551 |
"Modified: 6.3.1997 / 23:18:53 / cg" |
546
b643875bda30
more inst creation variations
Claus Gittinger <cg@exept.de>
parents:
492
diff
changeset
|
552 |
! |
b643875bda30
more inst creation variations
Claus Gittinger <cg@exept.de>
parents:
492
diff
changeset
|
553 |
|
217 | 554 |
for:aViewClass miniScrollerH:miniH |
555 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
556 |
The subview is created here. |
|
557 |
The view will have full scrollbars if miniH is false, |
|
558 |
and a horizontal miniscroller if true." |
|
559 |
||
1111 | 560 |
^ self |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
561 |
for:aViewClass |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
562 |
hasHorizontalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
563 |
hasVerticalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
564 |
miniScrollerH:miniH |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
565 |
miniScrollerV:false |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
566 |
origin:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
567 |
corner:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
568 |
in:nil |
1111 | 569 |
|
570 |
"Modified: 6.3.1997 / 18:30:15 / cg" |
|
217 | 571 |
! |
572 |
||
573 |
for:aViewClass miniScrollerH:miniH in:aView |
|
574 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
575 |
The subview is created here. |
|
546
b643875bda30
more inst creation variations
Claus Gittinger <cg@exept.de>
parents:
492
diff
changeset
|
576 |
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
|
577 |
is false, miniscrollers if true." |
217 | 578 |
|
1111 | 579 |
^ self |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
580 |
for:aViewClass |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
581 |
hasHorizontalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
582 |
hasVerticalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
583 |
miniScrollerH:miniH |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
584 |
miniScrollerV:false |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
585 |
origin:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
586 |
corner:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
587 |
in:aView |
546
b643875bda30
more inst creation variations
Claus Gittinger <cg@exept.de>
parents:
492
diff
changeset
|
588 |
|
1111 | 589 |
"Modified: 6.3.1997 / 18:30:31 / cg" |
217 | 590 |
! |
153 | 591 |
|
217 | 592 |
for:aViewClass miniScrollerH:miniH miniScrollerV:miniV |
593 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
594 |
The subview is created here. |
|
595 |
The view will have full scrollbars if the corresponding miniH/miniV |
|
596 |
is false, miniscrollers if true." |
|
597 |
||
1111 | 598 |
^ self |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
599 |
for:aViewClass |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
600 |
hasHorizontalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
601 |
hasVerticalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
602 |
miniScrollerH:miniH |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
603 |
miniScrollerV:miniV |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
604 |
origin:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
605 |
corner:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
606 |
in:nil |
1111 | 607 |
|
608 |
"Modified: 6.3.1997 / 18:30:47 / cg" |
|
217 | 609 |
! |
610 |
||
611 |
for:aViewClass miniScrollerH:miniH miniScrollerV:miniV in:aView |
|
612 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
613 |
The subview is created here. |
|
614 |
The view will have full scrollbars if the corresponding miniH/miniV |
|
615 |
is false, miniscrollers if true." |
|
616 |
||
1111 | 617 |
^ self |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
618 |
for:aViewClass |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
619 |
hasHorizontalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
620 |
hasVerticalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
621 |
miniScrollerH:miniH |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
622 |
miniScrollerV:miniV |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
623 |
origin:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
624 |
corner:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
625 |
in:aView |
1111 | 626 |
|
627 |
"Modified: 6.3.1997 / 18:31:02 / cg" |
|
628 |
! |
|
629 |
||
630 |
for:aViewClass miniScrollerH:miniH miniScrollerV:miniV origin:org corner:corn in:aView |
|
631 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
632 |
The subview is created here. |
|
633 |
The view will have full scrollbars if the corresponding miniH/miniV |
|
634 |
is false, miniscrollers if true." |
|
635 |
||
636 |
^ self |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
637 |
for:aViewClass |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
638 |
hasHorizontalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
639 |
hasVerticalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
640 |
miniScrollerH:miniH |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
641 |
miniScrollerV:miniV |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
642 |
origin:org |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
643 |
corner:corn |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
644 |
in:aView |
1111 | 645 |
|
646 |
"Modified: 6.3.1997 / 18:31:17 / cg" |
|
647 |
! |
|
648 |
||
649 |
for:aViewClass miniScrollerH:miniH origin:org corner:corn in:aView |
|
650 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
651 |
The subview is created here. |
|
652 |
The view will have a full horizontal scrollbar if miniH is false, |
|
653 |
a miniscroller if true." |
|
654 |
||
655 |
^ self |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
656 |
for:aViewClass |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
657 |
hasHorizontalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
658 |
hasVerticalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
659 |
miniScrollerH:miniH |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
660 |
miniScrollerV:false |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
661 |
origin:org |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
662 |
corner:corn |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
663 |
in:aView |
1111 | 664 |
|
665 |
"Modified: 6.3.1997 / 18:31:28 / cg" |
|
666 |
! |
|
667 |
||
668 |
for:aViewClass miniScrollerV:miniV origin:org corner:corn in:aView |
|
669 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
670 |
The subview is created here. |
|
671 |
The view will have a full vertical scrollbar if miniV is false, |
|
672 |
a miniscroller if true." |
|
673 |
||
674 |
^ self |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
675 |
for:aViewClass |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
676 |
hasHorizontalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
677 |
hasVerticalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
678 |
miniScrollerH:false |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
679 |
miniScrollerV:miniV |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
680 |
origin:org |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
681 |
corner:corn |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
682 |
in:aView |
1111 | 683 |
|
684 |
"Modified: 6.3.1997 / 18:31:41 / cg" |
|
685 |
! |
|
686 |
||
687 |
for:aViewClass origin:org corner:corner in:aView |
|
688 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
689 |
The subview is created here. |
|
690 |
The view will have full scrollbars." |
|
691 |
||
692 |
^ self |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
693 |
for:aViewClass |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
694 |
hasHorizontalScrollBar:(self == HVScrollableView) |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
695 |
hasVerticalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
696 |
miniScrollerH:false |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
697 |
miniScrollerV:false |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
698 |
origin:org |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
699 |
corner:corner |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
700 |
in:aView |
1111 | 701 |
|
702 |
"Modified: 6.3.1997 / 23:19:05 / cg" |
|
703 |
! |
|
704 |
||
705 |
forView:aView |
|
706 |
"return a new scrolling view scrolling aView. |
|
707 |
The view will have full scrollbars." |
|
708 |
||
709 |
^ self |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
710 |
forView:aView |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
711 |
hasHorizontalScrollBar:(self == HVScrollableView) |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
712 |
hasVerticalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
713 |
miniScrollerH:false |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
714 |
miniScrollerV:false |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
715 |
origin:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
716 |
corner:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
717 |
in:nil |
1111 | 718 |
|
719 |
"Modified: 6.3.1997 / 23:19:08 / cg" |
|
720 |
! |
|
721 |
||
722 |
forView:aScrolledView hasHorizontalScrollBar:hasH hasVerticalScrollBar:hasV miniScrollerH:miniH miniScrollerV:miniV origin:org corner:corn in:aView |
|
723 |
"return a new scrolling view scrolling an instance of aViewClass. |
|
724 |
The subview is created here. |
|
725 |
The view will have full scrollbars if the corresponding miniH/miniV |
|
726 |
is false, miniscrollers if true." |
|
727 |
||
300 | 728 |
|newView dev| |
217 | 729 |
|
730 |
aView notNil ifTrue:[ |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
731 |
dev := aView graphicsDevice |
300 | 732 |
] ifFalse:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
733 |
dev := Screen current |
300 | 734 |
]. |
735 |
newView := self basicNew device:dev. |
|
1111 | 736 |
newView initialize. |
737 |
newView setupVertical:hasV mini:miniV horizontal:hasH mini:miniH. |
|
738 |
||
739 |
aScrolledView notNil ifTrue:[ |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
740 |
newView scrolledView:aScrolledView. |
1111 | 741 |
]. |
742 |
||
743 |
org notNil ifTrue:[ |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
744 |
newView origin:org |
1111 | 745 |
]. |
746 |
corn notNil ifTrue:[ |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
747 |
newView corner:corn |
1111 | 748 |
]. |
749 |
||
300 | 750 |
aView notNil ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
751 |
aView addSubView:newView |
153 | 752 |
]. |
217 | 753 |
^ newView |
703 | 754 |
|
1111 | 755 |
" |
756 |
|top scr| |
|
546
b643875bda30
more inst creation variations
Claus Gittinger <cg@exept.de>
parents:
492
diff
changeset
|
757 |
|
1111 | 758 |
top := StandardSystemView extent:200@200. |
759 |
scr := NewScrollableView |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
760 |
forView:(TextView new) |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
761 |
hasHorizontalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
762 |
hasVerticalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
763 |
miniScrollerH:false |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
764 |
miniScrollerV:false |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
765 |
origin:0.0@0.0 |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
766 |
corner:1.0@1.0 |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
767 |
in:top. |
1111 | 768 |
top open |
769 |
" |
|
546
b643875bda30
more inst creation variations
Claus Gittinger <cg@exept.de>
parents:
492
diff
changeset
|
770 |
|
1135
acdeed6efc13
Fix prev fix from cg. Send setupDimensions only if scrolledView
Stefan Vogel <sv@exept.de>
parents:
1134
diff
changeset
|
771 |
"Modified: 6.3.1997 / 18:42:40 / cg" |
acdeed6efc13
Fix prev fix from cg. Send setupDimensions only if scrolledView
Stefan Vogel <sv@exept.de>
parents:
1134
diff
changeset
|
772 |
"Modified: 19.3.1997 / 15:32:51 / stefan" |
217 | 773 |
! |
774 |
||
852 | 775 |
forView:aView in:aSuperView |
776 |
"return a new scrolling view scrolling aView. |
|
777 |
The view will have full scrollbars." |
|
778 |
||
1111 | 779 |
^ self |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
780 |
forView:aView |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
781 |
hasHorizontalScrollBar:(self == HVScrollableView) |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
782 |
hasVerticalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
783 |
miniScrollerH:false |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
784 |
miniScrollerV:false |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
785 |
origin:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
786 |
corner:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
787 |
in:aSuperView |
852 | 788 |
|
1111 | 789 |
"Modified: 6.3.1997 / 23:19:12 / cg" |
852 | 790 |
! |
791 |
||
248 | 792 |
forView:aView miniScrollerH:mini |
793 |
"return a new scrolling view scrolling aView. |
|
794 |
The view will have a full vertical scrollbar and a horizontal |
|
795 |
miniScroller if mini is true." |
|
796 |
||
1111 | 797 |
^ self |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
798 |
forView:aView |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
799 |
hasHorizontalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
800 |
hasVerticalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
801 |
miniScrollerH:mini |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
802 |
miniScrollerV:false |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
803 |
origin:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
804 |
corner:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
805 |
in:nil |
248 | 806 |
|
1111 | 807 |
"Modified: 6.3.1997 / 18:32:58 / cg" |
248 | 808 |
! |
809 |
||
217 | 810 |
forView:scrolledView miniScrollerH:miniH miniScrollerV:miniV in:aView |
811 |
"return a new scrolling view, scrolling aView. |
|
812 |
The view will have full scrollbars if the corresponding miniH/miniV |
|
813 |
is false, miniscrollers if true." |
|
153 | 814 |
|
1111 | 815 |
^ self |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
816 |
forView:scrolledView |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
817 |
hasHorizontalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
818 |
hasVerticalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
819 |
miniScrollerH:miniH |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
820 |
miniScrollerV:miniV |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
821 |
origin:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
822 |
corner:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
823 |
in:aView |
217 | 824 |
|
1111 | 825 |
"Modified: 6.3.1997 / 18:33:20 / cg" |
217 | 826 |
! |
153 | 827 |
|
217 | 828 |
in:aView |
829 |
"return a new scrolling view to be contained in aView. |
|
830 |
There is no slave view now - this has to be set later via |
|
831 |
the scrolledView: method. |
|
832 |
The view will have full scrollbars." |
|
833 |
||
1111 | 834 |
^ self |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
835 |
forView:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
836 |
hasHorizontalScrollBar:(self == HVScrollableView) |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
837 |
hasVerticalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
838 |
miniScrollerH:false |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
839 |
miniScrollerV:false |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
840 |
origin:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
841 |
corner:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
842 |
in:aView |
1111 | 843 |
|
844 |
"Modified: 6.3.1997 / 23:19:19 / cg" |
|
217 | 845 |
! |
0 | 846 |
|
93 | 847 |
miniScroller:mini |
848 |
"return a new scrolling view. The subview will be created later. |
|
849 |
The view will have full scrollbars if mini is false, |
|
850 |
miniscrollers if true." |
|
851 |
||
1111 | 852 |
^ self |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
853 |
forView:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
854 |
hasHorizontalScrollBar:(self == HVScrollableView) |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
855 |
hasVerticalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
856 |
miniScrollerH:mini |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
857 |
miniScrollerV:mini |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
858 |
origin:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
859 |
corner:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
860 |
in:nil |
1111 | 861 |
|
862 |
"Modified: 6.3.1997 / 23:19:21 / cg" |
|
93 | 863 |
! |
864 |
||
113 | 865 |
miniScrollerH:miniH |
866 |
"return a new scrolling view. The subview will be created later. |
|
867 |
The view will have full scrollbars if miniH is false, |
|
868 |
and a horizontal miniscroller if true." |
|
869 |
||
1111 | 870 |
^ self |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
871 |
forView:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
872 |
hasHorizontalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
873 |
hasVerticalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
874 |
miniScrollerH:miniH |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
875 |
miniScrollerV:false |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
876 |
origin:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
877 |
corner:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
878 |
in:nil |
1111 | 879 |
|
880 |
"Modified: 6.3.1997 / 18:34:06 / cg" |
|
113 | 881 |
! |
882 |
||
93 | 883 |
miniScrollerH:miniH miniScrollerV:miniV |
884 |
"return a new scrolling view. The subview will be created later. |
|
885 |
The view will have full scrollbars if the corresponding miniH/miniV |
|
113 | 886 |
is false, miniscrollers if true." |
93 | 887 |
|
1111 | 888 |
^ self |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
889 |
forView:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
890 |
hasHorizontalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
891 |
hasVerticalScrollBar:true |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
892 |
miniScrollerH:miniH |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
893 |
miniScrollerV:miniV |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
894 |
origin:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
895 |
corner:nil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
896 |
in:nil |
1111 | 897 |
|
898 |
"Modified: 6.3.1997 / 18:34:16 / cg" |
|
1719
3d4adf98c079
added #new; gives a scrollableView with full scrollbars.
Claus Gittinger <cg@exept.de>
parents:
1695
diff
changeset
|
899 |
! |
3d4adf98c079
added #new; gives a scrollableView with full scrollbars.
Claus Gittinger <cg@exept.de>
parents:
1695
diff
changeset
|
900 |
|
3d4adf98c079
added #new; gives a scrollableView with full scrollbars.
Claus Gittinger <cg@exept.de>
parents:
1695
diff
changeset
|
901 |
new |
3d4adf98c079
added #new; gives a scrollableView with full scrollbars.
Claus Gittinger <cg@exept.de>
parents:
1695
diff
changeset
|
902 |
"return a new scrolling view. |
3d4adf98c079
added #new; gives a scrollableView with full scrollbars.
Claus Gittinger <cg@exept.de>
parents:
1695
diff
changeset
|
903 |
There is no slave view now - this has to be set later via |
3d4adf98c079
added #new; gives a scrollableView with full scrollbars.
Claus Gittinger <cg@exept.de>
parents:
1695
diff
changeset
|
904 |
the scrolledView: method. |
3d4adf98c079
added #new; gives a scrollableView with full scrollbars.
Claus Gittinger <cg@exept.de>
parents:
1695
diff
changeset
|
905 |
The view will have full scrollbars." |
3d4adf98c079
added #new; gives a scrollableView with full scrollbars.
Claus Gittinger <cg@exept.de>
parents:
1695
diff
changeset
|
906 |
|
3d4adf98c079
added #new; gives a scrollableView with full scrollbars.
Claus Gittinger <cg@exept.de>
parents:
1695
diff
changeset
|
907 |
^ self in:nil |
3d4adf98c079
added #new; gives a scrollableView with full scrollbars.
Claus Gittinger <cg@exept.de>
parents:
1695
diff
changeset
|
908 |
|
3d4adf98c079
added #new; gives a scrollableView with full scrollbars.
Claus Gittinger <cg@exept.de>
parents:
1695
diff
changeset
|
909 |
"Modified: / 12.11.1998 / 14:55:54 / cg" |
217 | 910 |
! ! |
93 | 911 |
|
852 | 912 |
!ScrollableView class methodsFor:'defaults'! |
217 | 913 |
|
1378 | 914 |
defaultScrollBarPosition |
915 |
"return the default position of the scrollBar. |
|
916 |
(max be of interest to panels, to make the handlePosition alike)" |
|
917 |
||
918 |
<resource: #style (#'scrollBar.position')> |
|
919 |
||
920 |
^ StyleSheet at:'scrollBar.position' default:#left. |
|
921 |
||
922 |
" |
|
923 |
self defaultScrollBarPosition |
|
924 |
" |
|
925 |
||
926 |
"Modified: / 31.10.1997 / 12:58:15 / cg" |
|
927 |
! |
|
928 |
||
217 | 929 |
updateStyleCache |
444
ef26eba8c854
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
300
diff
changeset
|
930 |
"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
|
931 |
|
1354 | 932 |
<resource: #style (#'scrolledView.level' #'scrolledView.margin' |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
933 |
#'scrolledView.borderWidth' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
934 |
#'scrollBar.spacing' #'scrollBar.level' |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
935 |
#'scrollableView.level' #'scrollableView.backgroundColor' )> |
1111 | 936 |
|
937 |
|defLevel defMargin defSpacing| |
|
444
ef26eba8c854
added style resource directive
Claus Gittinger <cg@exept.de>
parents:
300
diff
changeset
|
938 |
|
1111 | 939 |
StyleSheet is3D ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
940 |
defLevel := -1. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
941 |
defMargin := ViewSpacing // 2. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
942 |
defSpacing := defMargin. |
217 | 943 |
] ifFalse:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
944 |
defLevel := 0. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
945 |
defMargin := 0. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
946 |
defSpacing := 0 |
217 | 947 |
]. |
1354 | 948 |
DefaultScrolledViewLevel := StyleSheet at:'scrolledView.level' default:defLevel. |
949 |
DefaultScrolledViewBorderWidth := StyleSheet at:'scrolledView.borderWidth' default:nil. |
|
950 |
DefaultScrolledViewMargin := StyleSheet at:'scrolledView.margin' default:defMargin. |
|
1378 | 951 |
DefaultScrollBarSpacing := StyleSheet at:'scrollBar.spacing' default:defSpacing. |
952 |
DefaultLevel := StyleSheet at:'scrollableView.level' default:nil. |
|
953 |
DefaultScrollBarLevel := StyleSheet at:'scrollBar.level' default:nil. |
|
954 |
MyDefaultViewBackgroundColor := StyleSheet at:'scrollableView.backgroundColor' default:DefaultViewBackgroundColor. |
|
0 | 955 |
|
1111 | 956 |
" |
957 |
self updateStyleCache |
|
958 |
" |
|
959 |
||
1378 | 960 |
"Modified: / 31.10.1997 / 20:57:10 / cg" |
217 | 961 |
! ! |
962 |
||
1140 | 963 |
!ScrollableView methodsFor:'accessing-behavior'! |
964 |
||
1556
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
965 |
autoHideHorizontalScrollBar:aBoolean |
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
966 |
"set/clear the flag which controls if the horizontal scrollBar should |
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
967 |
be made invisible dynamically, if there is nothing to scroll |
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
968 |
(and shown if there is). |
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
969 |
This flags setting is normally controlled by the styleSheet." |
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
970 |
|
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
971 |
hideHScrollBar := aBoolean. |
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
972 |
|
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
973 |
"Modified: 19.3.1997 / 16:28:42 / cg" |
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
974 |
"Created: 19.3.1997 / 17:24:39 / cg" |
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
975 |
! |
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
976 |
|
1140 | 977 |
autoHideScrollBars:aBoolean |
978 |
"set/clear the flag which controls if scrollBars should |
|
979 |
be made invisible dynamically, if there is nothing to scroll |
|
980 |
(and shown if there is). |
|
981 |
This flags setting is normally controlled by the styleSheet." |
|
982 |
||
1556
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
983 |
hideVScrollBar := hideHScrollBar := aBoolean. |
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
984 |
|
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
985 |
"Modified: 19.3.1997 / 16:28:42 / cg" |
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
986 |
"Created: 19.3.1997 / 17:24:39 / cg" |
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
987 |
! |
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
988 |
|
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
989 |
autoHideVertivalScrollBar:aBoolean |
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
990 |
"set/clear the flag which controls if the vertical scrollBar should |
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
991 |
be made invisible dynamically, if there is nothing to scroll |
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
992 |
(and shown if there is). |
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
993 |
This flags setting is normally controlled by the styleSheet." |
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
994 |
|
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
995 |
hideVScrollBar := aBoolean. |
1140 | 996 |
|
997 |
"Modified: 19.3.1997 / 16:28:42 / cg" |
|
998 |
"Created: 19.3.1997 / 17:24:39 / cg" |
|
999 |
! ! |
|
1000 |
||
1138 | 1001 |
!ScrollableView methodsFor:'accessing-components'! |
119 | 1002 |
|
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1003 |
horizontalScrollBar |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1004 |
"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
|
1005 |
|
1549
b64b2dd7d5df
create scrollbars, when accessed
Claus Gittinger <cg@exept.de>
parents:
1536
diff
changeset
|
1006 |
hScrollBar isNil ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1007 |
self horizontalScrollable:true. |
1549
b64b2dd7d5df
create scrollbars, when accessed
Claus Gittinger <cg@exept.de>
parents:
1536
diff
changeset
|
1008 |
]. |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1009 |
^ hScrollBar |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1010 |
|
1549
b64b2dd7d5df
create scrollbars, when accessed
Claus Gittinger <cg@exept.de>
parents:
1536
diff
changeset
|
1011 |
"Created: / 6.3.1997 / 18:06:23 / cg" |
b64b2dd7d5df
create scrollbars, when accessed
Claus Gittinger <cg@exept.de>
parents:
1536
diff
changeset
|
1012 |
"Modified: / 25.5.1998 / 12:53:58 / cg" |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1013 |
! |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1014 |
|
217 | 1015 |
scrollBar |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1016 |
"return the vertical scrollbar (or nil, if there is none)" |
217 | 1017 |
|
1549
b64b2dd7d5df
create scrollbars, when accessed
Claus Gittinger <cg@exept.de>
parents:
1536
diff
changeset
|
1018 |
vScrollBar isNil ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1019 |
self verticalScrollable:true. |
1549
b64b2dd7d5df
create scrollbars, when accessed
Claus Gittinger <cg@exept.de>
parents:
1536
diff
changeset
|
1020 |
]. |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1021 |
^ vScrollBar |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1022 |
|
1549
b64b2dd7d5df
create scrollbars, when accessed
Claus Gittinger <cg@exept.de>
parents:
1536
diff
changeset
|
1023 |
"Created: / 6.3.1997 / 18:06:23 / cg" |
b64b2dd7d5df
create scrollbars, when accessed
Claus Gittinger <cg@exept.de>
parents:
1536
diff
changeset
|
1024 |
"Modified: / 25.5.1998 / 12:54:06 / cg" |
119 | 1025 |
! |
1026 |
||
217 | 1027 |
scrolledView |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1028 |
"return the scrolled view (or nil, if there is none)" |
38 | 1029 |
|
217 | 1030 |
^ scrolledView |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1031 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1032 |
"Modified: 6.3.1997 / 16:48:09 / cg" |
1111 | 1033 |
"Created: 6.3.1997 / 18:06:23 / cg" |
113 | 1034 |
! |
1035 |
||
217 | 1036 |
scrolledView:aView |
1037 |
"set the view to scroll" |
|
1038 |
||
1039 |
scrolledView notNil ifTrue:[ |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1040 |
scrolledView removeDependent:self. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1041 |
scrolledView destroy. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1042 |
scrolledView := nil. |
217 | 1043 |
]. |
982 | 1044 |
|
217 | 1045 |
scrolledView := aView. |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1046 |
|
1111 | 1047 |
super addSubViewFirst:aView. |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1048 |
scrolledView notNil ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1049 |
self setScrollActions. |
217 | 1050 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1051 |
realized ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1052 |
self setupDimensionsConfigureScrolledView:true. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1053 |
self sizeChanged:nil. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1054 |
scrolledView realize |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1055 |
]. |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1056 |
] |
217 | 1057 |
|
1535
b769ae01e418
preserve the scrolledViews level
Claus Gittinger <cg@exept.de>
parents:
1502
diff
changeset
|
1058 |
"Modified: / 19.3.1997 / 15:32:37 / stefan" |
1536
b8ddd185281a
preserve the scrolledViews level
Claus Gittinger <cg@exept.de>
parents:
1535
diff
changeset
|
1059 |
"Modified: / 21.5.1998 / 00:48:57 / cg" |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1060 |
! |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1061 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1062 |
verticalScrollBar |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1063 |
"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
|
1064 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1065 |
^ vScrollBar |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1066 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1067 |
"Modified: 6.3.1997 / 16:59:24 / cg" |
1111 | 1068 |
"Created: 6.3.1997 / 18:06:23 / cg" |
1253 | 1069 |
! |
1070 |
||
1071 |
widget |
|
1072 |
"for ST80 compatibility (where a wrapper returns its wrapped |
|
1073 |
widget), return the scrolledView here" |
|
1074 |
||
1075 |
^ scrolledView |
|
1076 |
||
1077 |
"Created: 20.6.1997 / 14:45:16 / cg" |
|
217 | 1078 |
! ! |
1079 |
||
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1080 |
!ScrollableView methodsFor:'accessing-look'! |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1081 |
|
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1082 |
horizontalMini:aBoolean |
1138 | 1083 |
"control the horizontal scrollBar to be either a miniScroller, |
1084 |
or a full scrollBar." |
|
1085 |
||
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1086 |
horizontalMini ~~ aBoolean ifTrue:[ |
1753
d0b1ba76acdb
honor the neverMini styleSheet setting.
Claus Gittinger <cg@exept.de>
parents:
1719
diff
changeset
|
1087 |
horizontalMini := aBoolean. |
d0b1ba76acdb
honor the neverMini styleSheet setting.
Claus Gittinger <cg@exept.de>
parents:
1719
diff
changeset
|
1088 |
(styleSheet at:'scrollBar.neverMini' default:false) == true ifTrue:[ |
d0b1ba76acdb
honor the neverMini styleSheet setting.
Claus Gittinger <cg@exept.de>
parents:
1719
diff
changeset
|
1089 |
horizontalMini := false. |
d0b1ba76acdb
honor the neverMini styleSheet setting.
Claus Gittinger <cg@exept.de>
parents:
1719
diff
changeset
|
1090 |
]. |
d0b1ba76acdb
honor the neverMini styleSheet setting.
Claus Gittinger <cg@exept.de>
parents:
1719
diff
changeset
|
1091 |
self setupViews. |
d0b1ba76acdb
honor the neverMini styleSheet setting.
Claus Gittinger <cg@exept.de>
parents:
1719
diff
changeset
|
1092 |
shown ifTrue:[ |
d0b1ba76acdb
honor the neverMini styleSheet setting.
Claus Gittinger <cg@exept.de>
parents:
1719
diff
changeset
|
1093 |
self setupDimensionsConfigureScrolledView:false. |
d0b1ba76acdb
honor the neverMini styleSheet setting.
Claus Gittinger <cg@exept.de>
parents:
1719
diff
changeset
|
1094 |
] |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1095 |
]. |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1096 |
|
1498 | 1097 |
"Created: / 7.3.1997 / 21:57:02 / cg" |
1502 | 1098 |
"Modified: / 22.4.1998 / 22:42:25 / ca" |
1536
b8ddd185281a
preserve the scrolledViews level
Claus Gittinger <cg@exept.de>
parents:
1535
diff
changeset
|
1099 |
"Modified: / 21.5.1998 / 00:48:25 / cg" |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1100 |
! |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1101 |
|
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1102 |
horizontalScrollable:aBoolean |
1138 | 1103 |
"enable/disable horizontal scrollability. |
1104 |
If disabled, the horizontal scrollBar is made invisible." |
|
1105 |
||
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1106 |
hasHorizontalScrollBar ~~ aBoolean ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1107 |
hasHorizontalScrollBar := aBoolean. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1108 |
hScrollBarHidden := false. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1109 |
self setupViews. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1110 |
shown ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1111 |
self setupDimensionsConfigureScrolledView:false. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1112 |
] |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1113 |
]. |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1114 |
|
1498 | 1115 |
"Created: / 7.3.1997 / 21:56:28 / cg" |
1536
b8ddd185281a
preserve the scrolledViews level
Claus Gittinger <cg@exept.de>
parents:
1535
diff
changeset
|
1116 |
"Modified: / 21.5.1998 / 00:48:44 / cg" |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1117 |
! |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1118 |
|
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1119 |
verticalMini:aBoolean |
1138 | 1120 |
"control the vertical scrollBar to be either a miniScroller, |
1121 |
or a full scrollBar." |
|
1122 |
||
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1123 |
verticalMini ~~ aBoolean ifTrue:[ |
1753
d0b1ba76acdb
honor the neverMini styleSheet setting.
Claus Gittinger <cg@exept.de>
parents:
1719
diff
changeset
|
1124 |
verticalMini := aBoolean. |
d0b1ba76acdb
honor the neverMini styleSheet setting.
Claus Gittinger <cg@exept.de>
parents:
1719
diff
changeset
|
1125 |
(styleSheet at:'scrollBar.neverMini' default:false) == true ifTrue:[ |
d0b1ba76acdb
honor the neverMini styleSheet setting.
Claus Gittinger <cg@exept.de>
parents:
1719
diff
changeset
|
1126 |
verticalMini := false. |
d0b1ba76acdb
honor the neverMini styleSheet setting.
Claus Gittinger <cg@exept.de>
parents:
1719
diff
changeset
|
1127 |
]. |
d0b1ba76acdb
honor the neverMini styleSheet setting.
Claus Gittinger <cg@exept.de>
parents:
1719
diff
changeset
|
1128 |
self setupViews. |
d0b1ba76acdb
honor the neverMini styleSheet setting.
Claus Gittinger <cg@exept.de>
parents:
1719
diff
changeset
|
1129 |
shown ifTrue:[ |
d0b1ba76acdb
honor the neverMini styleSheet setting.
Claus Gittinger <cg@exept.de>
parents:
1719
diff
changeset
|
1130 |
self setupDimensionsConfigureScrolledView:false. |
d0b1ba76acdb
honor the neverMini styleSheet setting.
Claus Gittinger <cg@exept.de>
parents:
1719
diff
changeset
|
1131 |
] |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1132 |
] |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1133 |
|
1498 | 1134 |
"Created: / 7.3.1997 / 21:56:57 / cg" |
1502 | 1135 |
"Modified: / 22.4.1998 / 22:42:32 / ca" |
1536
b8ddd185281a
preserve the scrolledViews level
Claus Gittinger <cg@exept.de>
parents:
1535
diff
changeset
|
1136 |
"Modified: / 21.5.1998 / 00:49:10 / cg" |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1137 |
! |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1138 |
|
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1139 |
verticalScrollable:aBoolean |
1138 | 1140 |
"enable/disable vertical scrollability. |
1141 |
If disabled, the vertical scrollBar is made invisible." |
|
1142 |
||
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1143 |
hasVerticalScrollBar ~~ aBoolean ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1144 |
hasVerticalScrollBar := aBoolean. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1145 |
vScrollBarHidden := false. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1146 |
self setupViews. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1147 |
shown ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1148 |
self setupDimensionsConfigureScrolledView:false. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1149 |
] |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1150 |
] |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1151 |
|
1498 | 1152 |
"Created: / 7.3.1997 / 21:56:39 / cg" |
1536
b8ddd185281a
preserve the scrolledViews level
Claus Gittinger <cg@exept.de>
parents:
1535
diff
changeset
|
1153 |
"Modified: / 21.5.1998 / 00:49:16 / cg" |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1154 |
! ! |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1155 |
|
217 | 1156 |
!ScrollableView methodsFor:'changes '! |
1157 |
||
1158 |
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
|
1159 |
"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
|
1160 |
be updated as well" |
132 | 1161 |
|
217 | 1162 |
changedObject == scrolledView ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1163 |
something == #sizeOfContents ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1164 |
vScrollBar notNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1165 |
vScrollBar setThumbFor:scrolledView. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1166 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1167 |
hScrollBar notNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1168 |
hScrollBar setThumbFor:scrolledView. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1169 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1170 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1171 |
something == #originOfContents ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1172 |
lockUpdates ifFalse:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1173 |
vScrollBar notNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1174 |
vScrollBar setThumbOriginFor:scrolledView. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1175 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1176 |
hScrollBar notNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1177 |
hScrollBar setThumbOriginFor:scrolledView. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1178 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1179 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1180 |
]. |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1181 |
|
1231 | 1182 |
self updateScrollBarVisibility |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1183 |
]. |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1184 |
|
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1185 |
! |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1186 |
|
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1187 |
updateScrollBarVisibility |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1188 |
"check if any scrollbar needs to be hidden or shown" |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1189 |
|
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1190 |
|anyChange| |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1191 |
|
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1192 |
anyChange := false. |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1193 |
|
1556
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
1194 |
hideVScrollBar ~~ false ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1195 |
vScrollBar notNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1196 |
vScrollBar thumbHeight >= 100 ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1197 |
vScrollBarHidden ifFalse:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1198 |
vScrollBarHidden := true. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1199 |
vScrollBar beInvisible. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1200 |
anyChange := true. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1201 |
] |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1202 |
] ifFalse:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1203 |
vScrollBarHidden ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1204 |
vScrollBarHidden := false. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1205 |
vScrollBar beVisible. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1206 |
anyChange := true. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1207 |
] |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1208 |
] |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1209 |
]. |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1210 |
]. |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1211 |
|
1556
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
1212 |
hideHScrollBar ~~ false ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1213 |
hScrollBar notNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1214 |
hScrollBar thumbHeight >= 100 ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1215 |
hScrollBarHidden ifFalse:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1216 |
hScrollBarHidden := true. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1217 |
hScrollBar beInvisible. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1218 |
anyChange := true. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1219 |
] |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1220 |
] ifFalse:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1221 |
hScrollBarHidden ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1222 |
hScrollBarHidden := false. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1223 |
hScrollBar beVisible. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1224 |
anyChange := true. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1225 |
] |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1226 |
] |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1227 |
]. |
217 | 1228 |
]. |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1229 |
|
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1230 |
anyChange ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1231 |
self setupDimensionsConfigureScrolledView:false. |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1232 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1233 |
"/ force him to recompute its dimension ... |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1234 |
scrolledView notNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1235 |
vScrollBar notNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1236 |
vScrollBar setThumbFor:scrolledView. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1237 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1238 |
hScrollBar notNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1239 |
hScrollBar setThumbFor:scrolledView. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1240 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1241 |
]. |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1242 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1243 |
"/ stupid - showing one may need the other ... |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1244 |
"/ and vice versa; do it again. |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1245 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1246 |
anyChange := false. |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1247 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1248 |
vScrollBar notNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1249 |
vScrollBar thumbHeight >= 100 ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1250 |
vScrollBarHidden ifFalse:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1251 |
vScrollBarHidden := true. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1252 |
vScrollBar beInvisible. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1253 |
anyChange := true. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1254 |
] |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1255 |
] ifFalse:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1256 |
vScrollBarHidden ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1257 |
vScrollBarHidden := false. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1258 |
vScrollBar beVisible. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1259 |
anyChange := true. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1260 |
] |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1261 |
] |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1262 |
]. |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1263 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1264 |
hScrollBar notNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1265 |
hScrollBar thumbHeight >= 100 ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1266 |
hScrollBarHidden ifFalse:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1267 |
hScrollBarHidden := true. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1268 |
hScrollBar beInvisible. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1269 |
anyChange := true. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1270 |
] |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1271 |
] ifFalse:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1272 |
hScrollBarHidden ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1273 |
hScrollBarHidden := false. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1274 |
hScrollBar beVisible. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1275 |
anyChange := true. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1276 |
] |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1277 |
] |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1278 |
]. |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1279 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1280 |
anyChange ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1281 |
self setupDimensionsConfigureScrolledView:false. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1282 |
]. |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1283 |
]. |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1284 |
|
1535
b769ae01e418
preserve the scrolledViews level
Claus Gittinger <cg@exept.de>
parents:
1502
diff
changeset
|
1285 |
"Modified: / 19.3.1997 / 15:33:36 / stefan" |
1536
b8ddd185281a
preserve the scrolledViews level
Claus Gittinger <cg@exept.de>
parents:
1535
diff
changeset
|
1286 |
"Modified: / 21.5.1998 / 00:49:05 / cg" |
217 | 1287 |
! ! |
38 | 1288 |
|
217 | 1289 |
!ScrollableView methodsFor:'event processing'! |
1290 |
||
1291 |
keyPress:key x:x y:y |
|
1292 |
"a key was pressed - handle page-keys here" |
|
1293 |
||
1294 |
<resource: #keyboard ( #Prior #Next ) > |
|
1295 |
||
1296 |
(key == #Prior) ifTrue: [^ self pageUp]. |
|
1297 |
(key == #Next) ifTrue: [^ self pageDown]. |
|
1298 |
||
1299 |
super keyPress:key x:x y:y |
|
1111 | 1300 |
|
1301 |
"Created: 6.3.1997 / 18:06:23 / cg" |
|
38 | 1302 |
! |
1303 |
||
217 | 1304 |
sizeChanged:how |
1138 | 1305 |
"handle size changes - this may change any scrollBars visibility" |
1306 |
||
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1307 |
|orgX orgY scroll| |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1308 |
|
1111 | 1309 |
"/ resize components manually, in an order which is optimal |
1310 |
||
1311 |
how == #smaller ifTrue:[ |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1312 |
"/ first resize the horizontalScrollBar, |
1111 | 1313 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1314 |
scrolledView notNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1315 |
scrolledView containerChangedSize |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1316 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1317 |
hScrollBar notNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1318 |
hScrollBar containerChangedSize |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1319 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1320 |
vScrollBar notNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1321 |
vScrollBar containerChangedSize |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1322 |
]. |
1111 | 1323 |
] ifFalse:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1324 |
hScrollBar notNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1325 |
hScrollBar containerChangedSize |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1326 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1327 |
vScrollBar notNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1328 |
vScrollBar containerChangedSize |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1329 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1330 |
scrolledView notNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1331 |
scrolledView containerChangedSize |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1332 |
]. |
1111 | 1333 |
]. |
819
32ac89843fa8
Send only one scroll message for horizontal and vertical scroll
Stefan Vogel <sv@exept.de>
parents:
814
diff
changeset
|
1334 |
|
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1335 |
scrolledView isNil ifTrue:[^ self]. |
1111 | 1336 |
(hScrollBar isNil and:[vScrollBar isNil]) ifTrue:[^ self]. |
1337 |
||
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1338 |
vScrollBar notNil ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1339 |
vScrollBar setThumbFor:scrolledView. |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1340 |
]. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1341 |
hScrollBar notNil ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1342 |
hScrollBar setThumbFor:scrolledView. |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1343 |
]. |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1344 |
|
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1345 |
"/ splitted, since there are optimized scrollProcedures for each case ... |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1346 |
|
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1347 |
hScrollBar isNil ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1348 |
"/ only care for vertical ... |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1349 |
vScrollBar thumbOrigin + vScrollBar thumbHeight >= 100 ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1350 |
vScrollBar thumbOrigin:(100 - vScrollBar thumbHeight). |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1351 |
scrolledView scrollVerticalToPercent:vScrollBar thumbOrigin. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1352 |
]. |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1353 |
] ifFalse:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1354 |
vScrollBar isNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1355 |
"/ only care for horizontal ... |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1356 |
hScrollBar thumbOrigin + hScrollBar thumbHeight >= 100 ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1357 |
hScrollBar thumbOrigin:(100 - hScrollBar thumbHeight). |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1358 |
scrolledView scrollVerticalToPercent:hScrollBar thumbOrigin. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1359 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1360 |
] ifFalse:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1361 |
"/ care for both ... |
113 | 1362 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1363 |
orgY := vScrollBar thumbOrigin. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1364 |
orgX := hScrollBar thumbOrigin. |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1365 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1366 |
scroll := false. |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1367 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1368 |
orgY + vScrollBar thumbHeight >= 100 ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1369 |
vScrollBar thumbOrigin:(100 - vScrollBar thumbHeight). |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1370 |
orgY := vScrollBar thumbOrigin. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1371 |
scroll := true. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1372 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1373 |
orgX + hScrollBar thumbHeight >= 100 ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1374 |
hScrollBar thumbOrigin:(100 - hScrollBar thumbHeight). |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1375 |
orgX := hScrollBar thumbOrigin. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1376 |
scroll := true. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1377 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1378 |
scroll ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1379 |
scrolledView scrollToPercent:(orgX@orgY). |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1380 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1381 |
] |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1382 |
]. |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1383 |
self updateScrollBarVisibility. |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1384 |
|
1160
f3204cabcce8
must update scrollBarVisibility in realize
Claus Gittinger <cg@exept.de>
parents:
1152
diff
changeset
|
1385 |
"Modified: 28.3.1997 / 17:25:38 / cg" |
217 | 1386 |
! ! |
1387 |
||
1388 |
!ScrollableView methodsFor:'forced scroll'! |
|
1389 |
||
1390 |
pageDown |
|
1138 | 1391 |
"page down - but only if there is a vertical scrollbar" |
217 | 1392 |
|
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1393 |
vScrollBar notNil ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1394 |
vScrollBar pageDown |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1395 |
] |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1396 |
|
1111 | 1397 |
"Created: 6.3.1997 / 18:06:23 / cg" |
1138 | 1398 |
"Modified: 19.3.1997 / 16:32:34 / cg" |
1399 |
! |
|
1400 |
||
1401 |
pageLeft |
|
1402 |
"page left - but only if there is a horizontal scrollbar" |
|
1403 |
||
1404 |
hScrollBar notNil ifTrue:[ |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1405 |
hScrollBar pageDown |
1138 | 1406 |
] |
1407 |
||
1408 |
"Created: 19.3.1997 / 16:32:14 / cg" |
|
1409 |
"Modified: 19.3.1997 / 16:32:44 / cg" |
|
1410 |
! |
|
1411 |
||
1412 |
pageRight |
|
1413 |
"page right - but only if there is a horizontal scrollbar" |
|
1414 |
||
1415 |
hScrollBar notNil ifTrue:[ |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1416 |
hScrollBar pageUp |
1138 | 1417 |
] |
1418 |
||
1419 |
"Created: 19.3.1997 / 16:32:22 / cg" |
|
1420 |
"Modified: 19.3.1997 / 16:32:48 / cg" |
|
113 | 1421 |
! |
1422 |
||
217 | 1423 |
pageUp |
1138 | 1424 |
"page up - but only if there is a vertical scrollbar" |
0 | 1425 |
|
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1426 |
vScrollBar notNil ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1427 |
vScrollBar pageUp |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1428 |
] |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1429 |
|
1111 | 1430 |
"Created: 6.3.1997 / 18:06:23 / cg" |
1138 | 1431 |
"Modified: 19.3.1997 / 16:32:38 / cg" |
0 | 1432 |
! ! |
1433 |
||
1434 |
!ScrollableView methodsFor:'initialization'! |
|
1435 |
||
217 | 1436 |
initStyle |
958 | 1437 |
"initialize style specifics" |
1438 |
||
1362 | 1439 |
<resource: #style (#'scrollBar.position' #'scrollBar.hiding')> |
608 | 1440 |
|
217 | 1441 |
super initStyle. |
1442 |
||
1111 | 1443 |
viewBackground := MyDefaultViewBackgroundColor. |
1362 | 1444 |
scrollBarPosition := styleSheet at:'scrollBar.position' default:#left. |
1556
c4c7839aced4
allow autoHiding of scrollBars to be specified individually.
Claus Gittinger <cg@exept.de>
parents:
1549
diff
changeset
|
1445 |
hideHScrollBar := hideVScrollBar := styleSheet at:'scrollBar.hiding' default:false. |
1536
b8ddd185281a
preserve the scrolledViews level
Claus Gittinger <cg@exept.de>
parents:
1535
diff
changeset
|
1446 |
DefaultLevel notNil ifTrue:[self level:DefaultLevel]. |
608 | 1447 |
|
1362 | 1448 |
"Created: / 6.3.1997 / 18:06:23 / cg" |
1536
b8ddd185281a
preserve the scrolledViews level
Claus Gittinger <cg@exept.de>
parents:
1535
diff
changeset
|
1449 |
"Modified: / 21.5.1998 / 00:52:26 / cg" |
0 | 1450 |
! |
1451 |
||
1247 | 1452 |
initialize |
1453 |
"setup some default" |
|
1454 |
||
1455 |
verticalMini := horizontalMini := false. |
|
1456 |
hasVerticalScrollBar := hasHorizontalScrollBar := false. |
|
1457 |
super initialize. |
|
1458 |
! |
|
1459 |
||
0 | 1460 |
realize |
1161
5142fbafeb92
must set dimensions in updateScrollBarVisibility
Claus Gittinger <cg@exept.de>
parents:
1160
diff
changeset
|
1461 |
"realize (i.e. make me visible). |
5142fbafeb92
must set dimensions in updateScrollBarVisibility
Claus Gittinger <cg@exept.de>
parents:
1160
diff
changeset
|
1462 |
Since scrolledView may have done something to its contents |
0 | 1463 |
during init-time we had no chance yet to catch contents- |
1161
5142fbafeb92
must set dimensions in updateScrollBarVisibility
Claus Gittinger <cg@exept.de>
parents:
1160
diff
changeset
|
1464 |
changes; do it now" |
1160
f3204cabcce8
must update scrollBarVisibility in realize
Claus Gittinger <cg@exept.de>
parents:
1152
diff
changeset
|
1465 |
|
1536
b8ddd185281a
preserve the scrolledViews level
Claus Gittinger <cg@exept.de>
parents:
1535
diff
changeset
|
1466 |
self setupDimensionsConfigureScrolledView:true. |
1176
29d0a646cbdf
must realize before setting scroller values
Claus Gittinger <cg@exept.de>
parents:
1161
diff
changeset
|
1467 |
super realize. |
1201
e7f1cf0180ca
must updateScrollBarVisibility in realize
Claus Gittinger <cg@exept.de>
parents:
1184
diff
changeset
|
1468 |
|
38 | 1469 |
scrolledView notNil ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1470 |
vScrollBar notNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1471 |
vScrollBar setThumbFor:scrolledView |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1472 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1473 |
hScrollBar notNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1474 |
hScrollBar setThumbFor:scrolledView |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1475 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1476 |
self updateScrollBarVisibility. |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1477 |
]. |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1478 |
|
1536
b8ddd185281a
preserve the scrolledViews level
Claus Gittinger <cg@exept.de>
parents:
1535
diff
changeset
|
1479 |
"Modified: / 21.5.1998 / 00:52:18 / cg" |
1111 | 1480 |
! |
1481 |
||
1482 |
releaseHorizontalScrollBar |
|
1483 |
"destroy any horizontal scrollBar" |
|
1484 |
||
1485 |
hScrollBar notNil ifTrue:[ |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1486 |
hScrollBar destroy. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1487 |
hScrollBar := nil |
1111 | 1488 |
]. |
1489 |
||
1490 |
"Modified: 6.3.1997 / 17:43:20 / cg" |
|
1491 |
"Created: 6.3.1997 / 18:06:23 / cg" |
|
1492 |
! |
|
1493 |
||
1494 |
releaseVerticalScrollBar |
|
1495 |
"destroy any vertical scrollBar" |
|
1496 |
||
1497 |
vScrollBar notNil ifTrue:[ |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1498 |
vScrollBar destroy. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1499 |
vScrollBar := nil |
1111 | 1500 |
]. |
1501 |
||
1502 |
"Created: 6.3.1997 / 18:06:23 / cg" |
|
1097 | 1503 |
! |
7 | 1504 |
|
1505 |
setScrollActions |
|
1506 |
"lock prevents repositioning the scroller to the |
|
1507 |
actual (often rounded) position while scrolling, |
|
1508 |
and keeps it instead at the pointer position. |
|
1509 |
||
1510 |
(this avoids run-away scroller when scrolling |
|
1511 |
textviews, when the text is aligned line-wise). |
|
38 | 1512 |
Consider this as a kludge." |
7 | 1513 |
|
65 | 1514 |
lockUpdates := false. |
7 | 1515 |
|
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1516 |
vScrollBar notNil ifTrue:[ |
1695
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1517 |
vScrollBar scrollAction:[:position | |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1518 |
lockUpdates := true. |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1519 |
scrolledView scrollVerticalToPercent:position. |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1520 |
lockUpdates := false |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1521 |
]. |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1522 |
vScrollBar |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1523 |
scrollUpAction:[|sensor| |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1524 |
((sensor := self sensor) notNil |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1525 |
and:[sensor shiftDown or:[sensor ctrlDown]]) ifTrue:[ |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1526 |
scrolledView scrollToTop |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1527 |
] ifFalse:[ |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1528 |
scrolledView scrollUp |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1529 |
] |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1530 |
]. |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1531 |
vScrollBar |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1532 |
scrollDownAction:[|sensor| |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1533 |
((sensor := self sensor) notNil |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1534 |
and:[sensor shiftDown or:[sensor ctrlDown]]) ifTrue:[ |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1535 |
scrolledView scrollToBottom |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1536 |
] ifFalse:[ |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1537 |
scrolledView scrollDown |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1538 |
] |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1539 |
]. |
7 | 1540 |
]. |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1541 |
hScrollBar notNil ifTrue:[ |
1695
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1542 |
hScrollBar scrollAction:[:position | |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1543 |
lockUpdates := true. |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1544 |
scrolledView scrollHorizontalToPercent:position. |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1545 |
lockUpdates := false |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1546 |
]. |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1547 |
hScrollBar |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1548 |
scrollUpAction:[|sensor| |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1549 |
((sensor := self sensor) notNil |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1550 |
and:[sensor shiftDown or:[sensor ctrlDown]]) ifTrue:[ |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1551 |
scrolledView scrollToLeft |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1552 |
] ifFalse:[ |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1553 |
scrolledView scrollLeft |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1554 |
] |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1555 |
]. |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1556 |
hScrollBar |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1557 |
scrollDownAction:[|sensor| |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1558 |
((sensor := self sensor) notNil |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1559 |
and:[sensor shiftDown or:[sensor ctrlDown]]) ifTrue:[ |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1560 |
scrolledView scrollToRight |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1561 |
] ifFalse:[ |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1562 |
scrolledView scrollRight |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1563 |
] |
c289e9656d9d
shift-click or ctrl-click on scrollBars arrow buttons will
Claus Gittinger <cg@exept.de>
parents:
1694
diff
changeset
|
1564 |
]. |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1565 |
]. |
7 | 1566 |
|
65 | 1567 |
scrolledView addDependent:self. |
814 | 1568 |
|
1569 |
" |
|
1570 |
pass my keyboard input (and other subviews input) |
|
1571 |
to the scrolled view ... |
|
1572 |
" |
|
1573 |
self delegate:(KeyboardForwarder toView:scrolledView). |
|
1574 |
||
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1575 |
"Modified: 6.3.1997 / 17:03:43 / cg" |
1111 | 1576 |
"Created: 6.3.1997 / 18:06:23 / cg" |
1577 |
! |
|
1578 |
||
1536
b8ddd185281a
preserve the scrolledViews level
Claus Gittinger <cg@exept.de>
parents:
1535
diff
changeset
|
1579 |
setupDimensionsConfigureScrolledView:configureScrolledView |
1138 | 1580 |
"set the components dimensions (i.e. layouts) according to |
1536
b8ddd185281a
preserve the scrolledViews level
Claus Gittinger <cg@exept.de>
parents:
1535
diff
changeset
|
1581 |
the scrollability and hidden settings. |
b8ddd185281a
preserve the scrolledViews level
Claus Gittinger <cg@exept.de>
parents:
1535
diff
changeset
|
1582 |
This may heavily move around the parts ..." |
1138 | 1583 |
|
1486 | 1584 |
|scrolledViewMargin scrollBarSpacing hasV hasH |
1111 | 1585 |
scrolledViewLayout hScrollBarLayout vScrollBarLayout |
1586 |
vBd "{ Class: SmallInteger }" |
|
1587 |
hBd "{ Class: SmallInteger }" |
|
1588 |
sBd "{ Class: SmallInteger }" |
|
1589 |
wVScroll "{ Class: SmallInteger }" |
|
1590 |
hHScroll "{ Class: SmallInteger }" |
|
1591 |
hLeftOffs "{ Class: SmallInteger }" |
|
1592 |
hRightOffs "{ Class: SmallInteger }" |
|
1593 |
hTopOffs "{ Class: SmallInteger }" |
|
1594 |
hBottomOffs "{ Class: SmallInteger }" |
|
1595 |
sLeftOffs "{ Class: SmallInteger }" |
|
1596 |
sRightOffs "{ Class: SmallInteger }" |
|
1597 |
sTopOffs "{ Class: SmallInteger }" |
|
1598 |
sBottomOffs "{ Class: SmallInteger }" |
|
1599 |
vLeftOffs "{ Class: SmallInteger }" |
|
1600 |
vRightOffs "{ Class: SmallInteger }" |
|
1601 |
vTopOffs "{ Class: SmallInteger }" |
|
1602 |
vBottomOffs "{ Class: SmallInteger }" |
|
1603 |
addMargin "{ Class: SmallInteger }"| |
|
1604 |
||
1605 |
sBd := 0. |
|
1606 |
DefaultScrolledViewBorderWidth notNil ifTrue:[ |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1607 |
sBd := DefaultScrolledViewBorderWidth. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1608 |
scrolledView notNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1609 |
scrolledView borderWidth:DefaultScrolledViewBorderWidth. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1610 |
] |
1111 | 1611 |
] ifFalse:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1612 |
scrolledView notNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1613 |
sBd := scrolledView borderWidth |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1614 |
] |
1111 | 1615 |
]. |
1616 |
||
1486 | 1617 |
(hasV := (vScrollBar notNil and:[vScrollBarHidden not])) ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1618 |
vBd := vScrollBar borderWidth. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1619 |
wVScroll := vScrollBar widthIncludingBorder. |
1111 | 1620 |
] ifFalse:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1621 |
vBd := wVScroll := 0. |
1111 | 1622 |
]. |
1623 |
||
1486 | 1624 |
(hasH := (hScrollBar notNil and:[hScrollBarHidden not])) ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1625 |
hBd := hScrollBar borderWidth. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1626 |
hHScroll := hScrollBar heightIncludingBorder. |
1111 | 1627 |
] ifFalse:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1628 |
hBd := hHScroll := 0. |
1111 | 1629 |
]. |
1630 |
||
1631 |
"/ the raw layout ... |
|
1632 |
||
1633 |
scrolledViewLayout := ((0.0 @ 0.0) corner:(1.0@1.0)) asLayout. |
|
1634 |
hScrollBarLayout := ((0.0 @ 1.0) corner:(1.0@1.0)) asLayout. |
|
1635 |
||
1636 |
"/ the painful details; mostly complicated for 2D styles, |
|
1637 |
"/ where the positions are setUp to overlay borders ... |
|
1638 |
"/ (well, with 3D styles, a single pixel error will not be noticed; |
|
1639 |
"/ but 2D styles are very sensitive to those; |
|
1640 |
"/ the code below may not work correctly with different borderWidths). |
|
1641 |
||
1642 |
scrolledViewMargin := DefaultScrolledViewMargin. |
|
1643 |
scrollBarSpacing := DefaultScrollBarSpacing. |
|
1644 |
||
1645 |
vTopOffs := 0 - vBd + scrolledViewMargin + margin. |
|
1668
2b2a006faedd
tight fitt into outer view with win95 style.
Claus Gittinger <cg@exept.de>
parents:
1593
diff
changeset
|
1646 |
|
1111 | 1647 |
scrolledViewMargin == 0 ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1648 |
vBottomOffs := vBd - scrolledViewMargin - sBd. |
1111 | 1649 |
] ifFalse:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1650 |
vBottomOffs := vBd - scrolledViewMargin + sBd. |
1111 | 1651 |
]. |
1652 |
||
1653 |
hLeftOffs := 0 - hBd + scrolledViewMargin + margin. |
|
1286 | 1654 |
hRightOffs := hBd - scrolledViewMargin - sBd. |
1111 | 1655 |
|
1656 |
sLeftOffs := 0 - hBd + scrolledViewMargin + margin. |
|
1286 | 1657 |
sRightOffs := hBd - scrolledViewMargin - sBd - sBd - sBd. |
1111 | 1658 |
|
1659 |
scrolledViewMargin == 0 ifTrue:[ |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1660 |
sTopOffs := 0 - sBd + margin. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1661 |
sBottomOffs := sBd - sBd. |
1111 | 1662 |
] ifFalse:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1663 |
sTopOffs := 0 + scrolledViewMargin + margin. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1664 |
sBottomOffs := sBd - scrolledViewMargin - sBd - sBd - sBd. |
1111 | 1665 |
]. |
1666 |
||
1668
2b2a006faedd
tight fitt into outer view with win95 style.
Claus Gittinger <cg@exept.de>
parents:
1593
diff
changeset
|
1667 |
"/ kludge - for now |
2b2a006faedd
tight fitt into outer view with win95 style.
Claus Gittinger <cg@exept.de>
parents:
1593
diff
changeset
|
1668 |
styleSheet name == #win95 ifTrue:[ |
2b2a006faedd
tight fitt into outer view with win95 style.
Claus Gittinger <cg@exept.de>
parents:
1593
diff
changeset
|
1669 |
vTopOffs := 0. |
2b2a006faedd
tight fitt into outer view with win95 style.
Claus Gittinger <cg@exept.de>
parents:
1593
diff
changeset
|
1670 |
hLeftOffs := 0. |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1671 |
sLeftOffs := 0. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1672 |
sTopOffs := 0. |
1668
2b2a006faedd
tight fitt into outer view with win95 style.
Claus Gittinger <cg@exept.de>
parents:
1593
diff
changeset
|
1673 |
]. |
2b2a006faedd
tight fitt into outer view with win95 style.
Claus Gittinger <cg@exept.de>
parents:
1593
diff
changeset
|
1674 |
|
1111 | 1675 |
addMargin := 0. |
1676 |
"/ DefaultScrollBarLevel == DefaultScrolledViewLevel |
|
1677 |
"/ addMargin := 1. |
|
1678 |
"/ ]. |
|
1679 |
||
1486 | 1680 |
hasV ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1681 |
scrollBarPosition == #right ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1682 |
"/ right/bottom |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1683 |
vScrollBarLayout := ((1.0 @ 0.0) corner:(1.0@1.0)) asLayout. |
1111 | 1684 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1685 |
vRightOffs := 0 - scrolledViewMargin + margin "???". |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1686 |
vLeftOffs := vRightOffs - wVScroll. |
1111 | 1687 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1688 |
sRightOffs := sRightOffs - scrollBarSpacing - wVScroll + sBd. |
1111 | 1689 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1690 |
hRightOffs := hRightOffs - wVScroll - scrollBarSpacing - sBd. |
1111 | 1691 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1692 |
sRightOffs := sRightOffs - addMargin |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1693 |
] ifFalse:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1694 |
"/ left/bottom |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1695 |
vScrollBarLayout := ((0.0 @ 0.0) corner:(0.0@1.0)) asLayout. |
1111 | 1696 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1697 |
vLeftOffs := 0 - vBd + scrolledViewMargin + margin. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1698 |
vRightOffs := vLeftOffs + wVScroll + margin. |
1111 | 1699 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1700 |
sLeftOffs := wVScroll + scrolledViewMargin + scrollBarSpacing + margin. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1701 |
sRightOffs := 0 - scrolledViewMargin - margin. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1702 |
hLeftOffs := hLeftOffs + wVScroll + vBd + scrollBarSpacing. |
1111 | 1703 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1704 |
sLeftOffs := sLeftOffs + addMargin |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1705 |
]. |
1111 | 1706 |
]. |
1707 |
||
1486 | 1708 |
hasH ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1709 |
hBottomOffs := 0 - scrolledViewMargin - hBd + margin "???". |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1710 |
hTopOffs := hBottomOffs - hHScroll. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1711 |
scrolledViewMargin == 0 ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1712 |
hTopOffs := hTopOffs + sBd + sBd |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1713 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1714 |
sBottomOffs := sBottomOffs - scrollBarSpacing - hHScroll. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1715 |
(vScrollBar notNil and:[vScrollBarHidden not]) ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1716 |
vBottomOffs := vBottomOffs - scrollBarSpacing - hHScroll. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1717 |
]. |
1111 | 1718 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1719 |
sBottomOffs := sBottomOffs - addMargin. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1720 |
hRightOffs := hRightOffs - addMargin. |
1111 | 1721 |
]. |
1722 |
||
1357 | 1723 |
(hScrollBar notNil |
1724 |
and:[ hScrollBar borderWidth == 0 |
|
1725 |
and:[sBd ~~ 0 |
|
1726 |
and:[scrollBarPosition == #right]]]) ifTrue:[ |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1727 |
hRightOffs := hRightOffs + sBd + sBd. |
1357 | 1728 |
]. |
1729 |
||
1111 | 1730 |
scrolledView notNil ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1731 |
scrolledViewLayout leftOffset:sLeftOffs. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1732 |
scrolledViewLayout rightOffset:sRightOffs. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1733 |
scrolledViewLayout topOffset:sTopOffs. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1734 |
scrolledViewLayout bottomOffset:sBottomOffs. |
1111 | 1735 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1736 |
configureScrolledView ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1737 |
((hideVScrollBar or:[hideHScrollBar]) not |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1738 |
and:[(hScrollBar isNil or:[hScrollBarHidden]) |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1739 |
and:[(vScrollBar isNil or:[vScrollBarHidden])]]) ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1740 |
scrolledView level:0 |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1741 |
] ifFalse:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1742 |
scrolledView level:DefaultScrolledViewLevel. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1743 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1744 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1745 |
scrolledView layout:scrolledViewLayout. |
1111 | 1746 |
]. |
1486 | 1747 |
hasH ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1748 |
hScrollBarLayout leftOffset:hLeftOffs. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1749 |
hScrollBarLayout rightOffset:hRightOffs. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1750 |
hScrollBarLayout topOffset:hTopOffs. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1751 |
hScrollBarLayout bottomOffset:hBottomOffs. |
1111 | 1752 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1753 |
hScrollBar level:DefaultScrollBarLevel. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1754 |
hScrollBar layout:hScrollBarLayout |
1111 | 1755 |
]. |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1756 |
(vScrollBar notNil and:[vScrollBarHidden not]) ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1757 |
vScrollBarLayout leftOffset:vLeftOffs. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1758 |
vScrollBarLayout rightOffset:vRightOffs. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1759 |
vScrollBarLayout topOffset:vTopOffs. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1760 |
vScrollBarLayout bottomOffset:vBottomOffs. |
1111 | 1761 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1762 |
vScrollBar level:DefaultScrollBarLevel. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1763 |
vScrollBar layout:vScrollBarLayout |
1111 | 1764 |
]. |
1765 |
||
1536
b8ddd185281a
preserve the scrolledViews level
Claus Gittinger <cg@exept.de>
parents:
1535
diff
changeset
|
1766 |
"Created: / 21.5.1998 / 00:48:35 / cg" |
1668
2b2a006faedd
tight fitt into outer view with win95 style.
Claus Gittinger <cg@exept.de>
parents:
1593
diff
changeset
|
1767 |
"Modified: / 9.9.1998 / 18:57:35 / cg" |
1111 | 1768 |
! |
1769 |
||
1770 |
setupVertical:isVertical mini:miniV horizontal:isHorizontal mini:miniH |
|
1771 |
"setup scrollbars as specified in the arguments" |
|
1772 |
||
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1773 |
|noMiniScrollers| |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1774 |
|
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1775 |
vScrollBarHidden := hScrollBarHidden := false. |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1776 |
|
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1777 |
hasVerticalScrollBar := isVertical. |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1778 |
hasHorizontalScrollBar := isHorizontal. |
1111 | 1779 |
|
1753
d0b1ba76acdb
honor the neverMini styleSheet setting.
Claus Gittinger <cg@exept.de>
parents:
1719
diff
changeset
|
1780 |
noMiniScrollers := styleSheet at:'scrollBar.neverMini' default:false. |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1781 |
verticalMini := miniV. |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1782 |
horizontalMini := miniH. |
1753
d0b1ba76acdb
honor the neverMini styleSheet setting.
Claus Gittinger <cg@exept.de>
parents:
1719
diff
changeset
|
1783 |
|
d0b1ba76acdb
honor the neverMini styleSheet setting.
Claus Gittinger <cg@exept.de>
parents:
1719
diff
changeset
|
1784 |
noMiniScrollers == true ifTrue:[ |
d0b1ba76acdb
honor the neverMini styleSheet setting.
Claus Gittinger <cg@exept.de>
parents:
1719
diff
changeset
|
1785 |
verticalMini := false. |
d0b1ba76acdb
honor the neverMini styleSheet setting.
Claus Gittinger <cg@exept.de>
parents:
1719
diff
changeset
|
1786 |
horizontalMini := false. |
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1787 |
]. |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1788 |
|
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1789 |
self setupViews. |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1790 |
|
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1791 |
"Modified: 7.3.1997 / 22:09:12 / cg" |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1792 |
! |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1793 |
|
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1794 |
setupViews |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1795 |
"setup scrollbars as specified in the arguments" |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1796 |
|
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1797 |
|cls| |
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1798 |
|
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1799 |
hasVerticalScrollBar ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1800 |
cls := ScrollBar. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1801 |
verticalMini ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1802 |
cls := MiniScroller |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1803 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1804 |
(vScrollBar notNil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1805 |
and:[vScrollBar class ~~ cls]) ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1806 |
self releaseVerticalScrollBar |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1807 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1808 |
vScrollBar isNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1809 |
vScrollBar := cls in:self. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1810 |
realized ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1811 |
vScrollBar realize |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1812 |
] |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1813 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1814 |
vScrollBar thumbOrigin:0 thumbHeight:100. |
1111 | 1815 |
] ifFalse:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1816 |
vScrollBar notNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1817 |
self releaseVerticalScrollBar |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1818 |
] |
1111 | 1819 |
]. |
1820 |
||
1126
2c698745c81f
added support for automatic scrollBar hiding.
Claus Gittinger <cg@exept.de>
parents:
1125
diff
changeset
|
1821 |
hasHorizontalScrollBar ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1822 |
cls := HorizontalScrollBar. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1823 |
horizontalMini ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1824 |
cls := HorizontalMiniScroller |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1825 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1826 |
(hScrollBar notNil |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1827 |
and:[hScrollBar class ~~ cls]) ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1828 |
self releaseHorizontalScrollBar |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1829 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1830 |
hScrollBar isNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1831 |
hScrollBar := cls in:self. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1832 |
realized ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1833 |
hScrollBar realize |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1834 |
] |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1835 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1836 |
hScrollBar thumbOrigin:0 thumbHeight:100. |
1111 | 1837 |
] ifFalse:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1838 |
hScrollBar notNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1839 |
self releaseHorizontalScrollBar |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1840 |
] |
1111 | 1841 |
]. |
1842 |
||
1843 |
scrolledView notNil ifTrue:[ |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1844 |
self setScrollActions. |
1111 | 1845 |
] |
1846 |
||
1847 |
"Created: 6.3.1997 / 18:06:23 / cg" |
|
1184
733373c4f445
dont forget to set dimensions and realize
Claus Gittinger <cg@exept.de>
parents:
1183
diff
changeset
|
1848 |
"Modified: 8.4.1997 / 00:44:33 / cg" |
7 | 1849 |
! ! |
1850 |
||
217 | 1851 |
!ScrollableView methodsFor:'queries'! |
38 | 1852 |
|
819
32ac89843fa8
Send only one scroll message for horizontal and vertical scroll
Stefan Vogel <sv@exept.de>
parents:
814
diff
changeset
|
1853 |
isHorizontalScrollable |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1854 |
"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
|
1855 |
|
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1856 |
^ hScrollBar notNil |
819
32ac89843fa8
Send only one scroll message for horizontal and vertical scroll
Stefan Vogel <sv@exept.de>
parents:
814
diff
changeset
|
1857 |
|
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1858 |
"Modified: 6.3.1997 / 17:03:49 / cg" |
1111 | 1859 |
"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
|
1860 |
! |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1861 |
|
1593
a77a10ecde65
added #isScrollWrapper query.
Claus Gittinger <cg@exept.de>
parents:
1556
diff
changeset
|
1862 |
isScrollWrapper |
a77a10ecde65
added #isScrollWrapper query.
Claus Gittinger <cg@exept.de>
parents:
1556
diff
changeset
|
1863 |
^ true |
a77a10ecde65
added #isScrollWrapper query.
Claus Gittinger <cg@exept.de>
parents:
1556
diff
changeset
|
1864 |
|
a77a10ecde65
added #isScrollWrapper query.
Claus Gittinger <cg@exept.de>
parents:
1556
diff
changeset
|
1865 |
"Created: / 20.6.1998 / 14:15:42 / cg" |
a77a10ecde65
added #isScrollWrapper query.
Claus Gittinger <cg@exept.de>
parents:
1556
diff
changeset
|
1866 |
! |
a77a10ecde65
added #isScrollWrapper query.
Claus Gittinger <cg@exept.de>
parents:
1556
diff
changeset
|
1867 |
|
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1868 |
isVerticalScrollable |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1869 |
"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
|
1870 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1871 |
^ vScrollBar notNil |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1872 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1873 |
"Modified: 6.3.1997 / 17:03:52 / cg" |
1111 | 1874 |
"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
|
1875 |
! |
32ac89843fa8
Send only one scroll message for horizontal and vertical scroll
Stefan Vogel <sv@exept.de>
parents:
814
diff
changeset
|
1876 |
|
217 | 1877 |
preferredExtent |
572 | 1878 |
"return my preferredExtent from the scrolledViews prefExtent |
1879 |
plus the size of the scrollBar" |
|
1880 |
||
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1881 |
|slavesPref prefX prefY| |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1882 |
|
799 | 1883 |
"/ If I have an explicit preferredExtent .. |
1884 |
||
713
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
703
diff
changeset
|
1885 |
preferredExtent notNil ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1886 |
^ preferredExtent |
713
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
703
diff
changeset
|
1887 |
]. |
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
703
diff
changeset
|
1888 |
|
217 | 1889 |
scrolledView notNil ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1890 |
slavesPref := scrolledView preferredExtent. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1891 |
prefX := slavesPref x. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1892 |
prefY := slavesPref y. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1893 |
vScrollBar notNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1894 |
prefX := prefX + vScrollBar width + (DefaultScrolledViewMargin * 2) + DefaultScrollBarSpacing. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1895 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1896 |
hScrollBar notNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1897 |
prefY := prefY + hScrollBar height + (DefaultScrolledViewMargin * 2) + DefaultScrollBarSpacing. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1898 |
]. |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1899 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1900 |
^ prefX @ prefY. |
0 | 1901 |
]. |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1902 |
|
217 | 1903 |
^ super preferredExtent. |
572 | 1904 |
|
1111 | 1905 |
"Created: 6.3.1997 / 18:06:24 / cg" |
1906 |
"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
|
1907 |
! |
c1967a46b2c1
added query for lines/cols - prefExt
Claus Gittinger <cg@exept.de>
parents:
608
diff
changeset
|
1908 |
|
c1967a46b2c1
added query for lines/cols - prefExt
Claus Gittinger <cg@exept.de>
parents:
608
diff
changeset
|
1909 |
preferredExtentForLines:numLines cols:numCols |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1910 |
"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
|
1911 |
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
|
1912 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1913 |
|slavesPref prefX prefY| |
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1914 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1915 |
"/ 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
|
1916 |
|
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1917 |
preferredExtent notNil ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1918 |
^ preferredExtent |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1919 |
]. |
678
c1967a46b2c1
added query for lines/cols - prefExt
Claus Gittinger <cg@exept.de>
parents:
608
diff
changeset
|
1920 |
|
c1967a46b2c1
added query for lines/cols - prefExt
Claus Gittinger <cg@exept.de>
parents:
608
diff
changeset
|
1921 |
scrolledView notNil ifTrue:[ |
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1922 |
slavesPref := scrolledView preferredExtentForLines:numLines cols:numCols. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1923 |
prefX := slavesPref x. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1924 |
prefY := slavesPref y. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1925 |
vScrollBar notNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1926 |
prefX := prefX + vScrollBar width + (DefaultScrolledViewMargin * 2) + DefaultScrollBarSpacing. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1927 |
]. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1928 |
hScrollBar notNil ifTrue:[ |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1929 |
prefY := prefY + hScrollBar height + (DefaultScrolledViewMargin * 2) + DefaultScrollBarSpacing. |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1930 |
]. |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1931 |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1932 |
^ prefX @ prefY. |
678
c1967a46b2c1
added query for lines/cols - prefExt
Claus Gittinger <cg@exept.de>
parents:
608
diff
changeset
|
1933 |
]. |
1104
88b80680773e
about to merge V & HV scrollableView into a single
Claus Gittinger <cg@exept.de>
parents:
1097
diff
changeset
|
1934 |
|
678
c1967a46b2c1
added query for lines/cols - prefExt
Claus Gittinger <cg@exept.de>
parents:
608
diff
changeset
|
1935 |
^ super preferredExtent. |
c1967a46b2c1
added query for lines/cols - prefExt
Claus Gittinger <cg@exept.de>
parents:
608
diff
changeset
|
1936 |
|
1111 | 1937 |
"Created: 6.3.1997 / 18:06:24 / cg" |
1938 |
"Modified: 6.3.1997 / 22:34:30 / cg" |
|
1231 | 1939 |
! |
1940 |
||
1941 |
specClass |
|
1378 | 1942 |
"redefined, since my subclasses also want ScrollableViewSpecs" |
1943 |
||
1231 | 1944 |
^ ScrollableViewSpec |
1945 |
||
1378 | 1946 |
"Modified: / 31.10.1997 / 19:48:48 / cg" |
0 | 1947 |
! ! |
1948 |
||
1949 |
!ScrollableView methodsFor:'slave-view messages'! |
|
1950 |
||
1024 | 1951 |
clear |
1138 | 1952 |
"convenient method: forward this to the scrolledView" |
1953 |
||
1073 | 1954 |
scrolledView notNil ifTrue:[scrolledView clear] |
1024 | 1955 |
|
1111 | 1956 |
"Created: 6.3.1997 / 18:06:24 / cg" |
1138 | 1957 |
"Modified: 19.3.1997 / 16:34:19 / cg" |
1024 | 1958 |
! |
1959 |
||
217 | 1960 |
doesNotUnderstand:aMessage |
1961 |
"this is funny: all message we do not understand, are passed |
|
1962 |
on to the scrolledView - so we do not have to care for all |
|
1963 |
possible messages ...(thanks to the Message class)" |
|
1964 |
||
1965 |
scrolledView isNil ifFalse:[ |
|
1694
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1966 |
^ scrolledView perform:(aMessage selector) |
61bcd88d3721
geometry beautified for win32 style
Claus Gittinger <cg@exept.de>
parents:
1668
diff
changeset
|
1967 |
withArguments:(aMessage arguments) |
1111 | 1968 |
]. |
1969 |
^ super doesNotUnderstand:aMessage |
|
1970 |
||
1971 |
"Created: 6.3.1997 / 18:06:24 / cg" |
|
1972 |
"Modified: 6.3.1997 / 18:38:54 / cg" |
|
217 | 1973 |
! |
1974 |
||
0 | 1975 |
leftButtonMenu |
38 | 1976 |
"return scrolledViews leftbuttonmenu" |
1977 |
||
1978 |
scrolledView isNil ifTrue:[^ nil]. |
|
0 | 1979 |
^ scrolledView leftButtonMenu |
1111 | 1980 |
|
1981 |
"Created: 6.3.1997 / 18:06:24 / cg" |
|
0 | 1982 |
! |
1983 |
||
1984 |
leftButtonMenu:aMenu |
|
1985 |
"pass on leftbuttonmenu to scrolledView" |
|
1986 |
||
1987 |
scrolledView leftButtonMenu:aMenu |
|
1111 | 1988 |
|
1989 |
"Created: 6.3.1997 / 18:06:24 / cg" |
|
0 | 1990 |
! |
1991 |
||
1992 |
middleButtonMenu |
|
38 | 1993 |
"return scrolledViews middlebuttonmenu" |
1994 |
||
1995 |
scrolledView isNil ifTrue:[^ nil]. |
|
0 | 1996 |
^ scrolledView middleButtonMenu |
1111 | 1997 |
|
1998 |
"Created: 6.3.1997 / 18:06:24 / cg" |
|
0 | 1999 |
! |
2000 |
||
2001 |
middleButtonMenu:aMenu |
|
2002 |
"pass on middlebuttonmenu to scrolledView" |
|
2003 |
||
2004 |
scrolledView middleButtonMenu:aMenu |
|
1111 | 2005 |
|
2006 |
"Created: 6.3.1997 / 18:06:24 / cg" |
|
0 | 2007 |
! |
2008 |
||
562 | 2009 |
model |
754 | 2010 |
"return my scrolledViews model" |
2011 |
||
1085 | 2012 |
scrolledView isNil ifTrue:[^ nil]. |
562 | 2013 |
^ scrolledView model |
2014 |
||
1085 | 2015 |
"Modified: 1.3.1997 / 01:38:07 / cg" |
1111 | 2016 |
"Created: 6.3.1997 / 18:06:24 / cg" |
562 | 2017 |
! |
2018 |
||
2019 |
model:aModel |
|
754 | 2020 |
"forward model change to my scrolledViews" |
2021 |
||
562 | 2022 |
^ scrolledView model:aModel |
2023 |
||
754 | 2024 |
"Modified: 5.6.1996 / 17:09:50 / cg" |
1111 | 2025 |
"Created: 6.3.1997 / 18:06:24 / cg" |
562 | 2026 |
! |
2027 |
||
0 | 2028 |
rightButtonMenu |
38 | 2029 |
"return scrolledViews rightbuttonmenu" |
2030 |
||
2031 |
scrolledView isNil ifTrue:[^ nil]. |
|
0 | 2032 |
^ scrolledView rightButtonMenu |
1111 | 2033 |
|
2034 |
"Created: 6.3.1997 / 18:06:24 / cg" |
|
0 | 2035 |
! |
2036 |
||
2037 |
rightButtonMenu:aMenu |
|
2038 |
"pass on rightbuttonmenu to scrolledView" |
|
2039 |
||
2040 |
scrolledView rightButtonMenu:aMenu |
|
1111 | 2041 |
|
2042 |
"Created: 6.3.1997 / 18:06:24 / cg" |
|
38 | 2043 |
! ! |
2044 |
||
852 | 2045 |
!ScrollableView class methodsFor:'documentation'! |
0 | 2046 |
|
217 | 2047 |
version |
1753
d0b1ba76acdb
honor the neverMini styleSheet setting.
Claus Gittinger <cg@exept.de>
parents:
1719
diff
changeset
|
2048 |
^ '$Header: /cvs/stx/stx/libwidg/ScrollableView.st,v 1.91 1999-02-24 16:56:06 cg Exp $' |
0 | 2049 |
! ! |