author | Claus Gittinger <cg@exept.de> |
Sat, 19 Jun 1999 12:23:36 +0200 | |
changeset 1416 | 505ef8832a06 |
parent 1408 | 1cda0a4fb566 |
child 1448 | b389b8c76479 |
permissions | -rw-r--r-- |
542 | 1 |
" |
2 |
COPYRIGHT (c) 1997 by Claus Gittinger / eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
||
14 |
||
15 |
||
16 |
View subclass:#DSVColumnView |
|
607 | 17 |
instanceVariableNames:'editValue editView multipleSelectOk selectedColIndex |
1112 | 18 |
selectedRowIndex selectRowOnNoneSelectableCell selectRowOk |
19 |
selectRowOnDefault rowHeight columnDescriptors viewOrigin |
|
20 |
colorMap rowFontAscent lockRowIndex rowIfAbsentBlock columnHolder |
|
1087 | 21 |
registererImages list fgColor canFit separatorSize |
22 |
catchChangeEvents beDependentOfRows bgColor hgLgFgColor |
|
23 |
hgLgBgColor actionBlock builder doubleClickActionBlock |
|
24 |
verticalSpacing horizontalSpacing rowSelectorForm |
|
25 |
buttonLightColor buttonShadowColor buttonHalfLightColor |
|
26 |
buttonHalfShadowColor checkToggleExtent checkToggleForm |
|
1100 | 27 |
checkToggleActiveImage checkTogglePassiveImage checkToggleLevel |
28 |
comboButtonExtent comboButtonForm comboButtonLevel clickPosition |
|
29 |
dragAccessPoint dragIsActive dropTarget dropSource columnAdaptor |
|
1416 | 30 |
dataSetView tabAtEndAction tabAtStartAction' |
542 | 31 |
classVariableNames:'DefaultForegroundColor DefaultBackgroundColor |
32 |
DefaultHilightForegroundColor DefaultHilightBackgroundColor |
|
809 | 33 |
RowSelector ButtonLightColor ButtonShadowColor |
1100 | 34 |
CheckToggleActiveImage CheckTogglePassiveImage |
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
35 |
ButtonHalfLightColor ButtonHalfShadowColor ButtonEdgeStyle |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
36 |
CheckToggleForm CheckToggleLevel CheckToggleExtent |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
37 |
ComboButtonForm ComboButtonLevel ComboButtonExtent' |
542 | 38 |
poolDictionaries:'' |
39 |
category:'Views-DataSet' |
|
40 |
! |
|
41 |
||
42 |
!DSVColumnView class methodsFor:'documentation'! |
|
43 |
||
44 |
copyright |
|
45 |
" |
|
46 |
COPYRIGHT (c) 1997 by Claus Gittinger / eXept Software AG |
|
47 |
All Rights Reserved |
|
48 |
||
49 |
This software is furnished under a license and may be used |
|
50 |
only in accordance with the terms of that license and with the |
|
51 |
inclusion of the above copyright notice. This software may not |
|
52 |
be provided or otherwise made available to, or used by, any |
|
53 |
other person. No title to or ownership of the software is |
|
54 |
hereby transferred. |
|
55 |
" |
|
56 |
||
57 |
||
58 |
||
59 |
! |
|
60 |
||
61 |
documentation |
|
62 |
" |
|
63 |
implements a scrollable selection view based on rows and columns |
|
64 |
||
65 |
[Instance variables:] |
|
66 |
||
1087 | 67 |
dataSetView <DataSetView> parent view |
68 |
||
542 | 69 |
editValue <Model> current editing model |
70 |
editView <View> current editing component |
|
1087 | 71 |
|
72 |
multipleSelectOk <Boolean> multiple selection enabled/disabled |
|
73 |
||
542 | 74 |
selectedColIndex <Integer> selected column index or 0 |
1087 | 75 |
selectedRowIndex <Integer> selected row index or 0 |
76 |
||
542 | 77 |
rowHeight <Integer> maximum height of any row |
1087 | 78 |
|
542 | 79 |
columnDescriptors <SequancableCollection> list of column descriptors |
1087 | 80 |
|
81 |
viewOrigin <Point> current view origin |
|
82 |
||
83 |
colorMap <Dictionary> store and register used colors on device |
|
84 |
||
85 |
rowFontAscent <SmallInteger> inset of a printable text in a row |
|
86 |
including separator and font ascent. |
|
87 |
||
88 |
lockRowIndex <SmallInteger> internal used to indicate a row which has |
|
89 |
changed its contents but no redraw should be |
|
90 |
done( at:put: ). |
|
91 |
||
92 |
columnHolder <ValueHolder> holder which keeps the list of column descriptors. |
|
93 |
||
94 |
registererImages <IdentityDictionary> list of images registered on the device |
|
95 |
||
542 | 96 |
list <SequancableCollection> list of rows |
1087 | 97 |
|
98 |
canFit <Boolean> boolean set to true if colums can be fit to view |
|
99 |
||
100 |
||
101 |
catchChangeEvents <Boolean> internal used to discard change notifications |
|
102 |
||
103 |
beDependentOfRows <Boolean> keep rows dependent; on default is disabled. |
|
567 | 104 |
in case of enabled a row can raise a change |
105 |
notification whithout a parameter which |
|
106 |
will force a redraw of the row or the |
|
107 |
readSelector of the column which will |
|
108 |
redraw the cell in the row only. |
|
542 | 109 |
|
1087 | 110 |
fgColor <Color> foreground color |
111 |
bgColor <Color> background color |
|
112 |
hgLgFgColor <Color> highlight foreground color (selected) |
|
113 |
hgLgBgColor <Color> highlight background color (selected) |
|
114 |
||
115 |
buttonLightColor <Color> LightColor ( drawing the edge of a button ) |
|
116 |
buttonShadowColor <Color> ShadowColor ( drawing the edge of a button ) |
|
117 |
buttonHalfLightColor <Color> HalfLightColor ( drawing the edge of a button ) |
|
118 |
buttonHalfShadowColor <Color> HalfShadowColor ( drawing the edge of a button ) |
|
119 |
||
120 |
actionBlock <a OneArgBlock> action block performed on select |
|
121 |
doubleClickActionBlock <a OneArgBlock> action block performed on double click |
|
122 |
rowIfAbsentBlock <a OneArgBlock> this block is performed on an emty list entry |
|
123 |
to retrive the item from the application. The |
|
124 |
argument to the block is the index into the list. |
|
125 |
The block should return the row instance which |
|
126 |
is put to the list under the index. |
|
127 |
||
128 |
builder <UIBuilder> builder set by application |
|
129 |
||
130 |
verticalSpacing <SmallInteger> vertical row spacing( top & bottom ) |
|
131 |
horizontalSpacing <SmallInteger> horizontal row spacing( left & right ) |
|
132 |
separatorSize <SmallInteger> line width of a vertical or horizontal separator |
|
133 |
||
134 |
rowSelectorForm <Form> form used by a row selector |
|
135 |
||
136 |
checkToggleForm <Form> form used by a checkToggle |
|
137 |
checkToggleExtent <Point> extent of a checkToggle |
|
138 |
checkToggleLevel <SmallInteger> level used to draw a check toggle |
|
139 |
||
140 |
comboButtonForm <Form> form used by a comboList or -Box |
|
141 |
comboButtonExtent <Point> extent of a comboList or -Box |
|
142 |
comboButtonLevel <SmallInteger> level used to draw a comboList or -Box |
|
143 |
||
144 |
clickPosition <Point> click position of the mouse |
|
145 |
||
146 |
dragAccessPoint <Point> point where the drag operation starts |
|
147 |
dragIsActive <Boolean> true if a drag operation is active |
|
148 |
dropTarget <DropTarget> drag & drop target |
|
149 |
dropSource <DropSource> drag & drop source |
|
150 |
||
542 | 151 |
[author:] |
152 |
Claus Atzkern |
|
153 |
||
154 |
[see also:] |
|
155 |
DataSetColumnSpec |
|
156 |
DataSetColumn |
|
157 |
DataSetView |
|
158 |
" |
|
159 |
||
160 |
! ! |
|
161 |
||
647 | 162 |
!DSVColumnView class methodsFor:'accessing forms'! |
163 |
||
164 |
rowSelector |
|
989 | 165 |
"This resource specification was automatically generated |
166 |
by the ImageEditor of ST/X." |
|
167 |
||
168 |
"Do not manually edit this!! If it is corrupted, |
|
169 |
the ImageEditor may not be able to read the specification." |
|
170 |
||
171 |
" |
|
172 |
self rowSelector inspect |
|
173 |
ImageEditor openOnClass:self andSelector:#rowSelector |
|
174 |
" |
|
175 |
||
176 |
<resource: #image> |
|
177 |
||
178 |
^Icon |
|
179 |
constantNamed:#'DSVColumnView rowSelector' |
|
1129 | 180 |
ifAbsentPut:[(Depth2Image new) width: 11; height: 11; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@A@@@AP@@A4@EW=@G?? O?:@@C(@@B @@B@@@@@@') ; colorMapFromArray:#[0 0 0 255 255 255 127 127 127 170 170 170]; mask:((Depth1Image new) width: 11; height: 11; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C@@N@@<@?8C?0O? ?<C? @<@C @L@@@a') ; yourself); yourself] |
181 |
||
182 |
||
183 |
! ! |
|
647 | 184 |
|
185 |
!DSVColumnView class methodsFor:'defaults'! |
|
607 | 186 |
|
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
187 |
claus |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
188 |
" |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
189 |
|
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
190 |
total execution time: 803 ms (40 probes ; error >= 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
191 |
|
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
192 |
MessageTally execute (total 100.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
193 |
UIGalleryView::Canvas specification: (total 100.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
194 |
FullSpec buildViewFor:in: (total 10.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
195 |
SpecCollection buildViewWithLayoutFor:in: (total 10.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
196 |
SpecCollection buildSubViewsFor:in: (total 10.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
197 |
Array>>SequenceableCollection collect: (total 10.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
198 |
[] in SpecCollection buildSubViewsFor:in: (total 10.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
199 |
SequenceViewSpec>>UISpecification buildViewWithLayoutFor:in: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
200 |
SequenceViewSpec>>UISpecification createViewFor:in: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
201 |
SequenceView class>>ScrollableView class in: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
202 |
SequenceView class>>ScrollableView class forView:hasHorizontalScrollBar:hasVerticalScrollBar:miniScrollerH:miniScrollerV:origin:corner:in: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
203 |
SequenceView>>ScrollableView setupVertical:mini:horizontal:mini: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
204 |
SequenceView>>ScrollableView setupViews (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
205 |
SequenceView>>ScrollableView releaseHorizontalScrollBar (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
206 |
HorizontalScrollBar>>SimpleView destroy (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
207 |
HorizontalScrollBar>>SimpleView destroySubViews (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
208 |
OrderedCollection do: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
209 |
Array from:to:do: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
210 |
[] in UndefinedObject optimized (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
211 |
ArrowButton>>Label destroy (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
212 |
ArrowButton>>View destroy (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
213 |
ArrowButton>>SimpleView destroy (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
214 |
ArrowButton>>DisplaySurface destroy (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
215 |
Registry unregister: (here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
216 |
SelectionInTreeViewSpec>>UISpecification buildViewWithLayoutFor:in: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
217 |
SelectionInTreeViewSpec createViewFor:in: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
218 |
ScrollableView class for:hasHorizontalScrollBar:hasVerticalScrollBar:miniScrollerH:miniScrollerV: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
219 |
ScrollableView class forView:hasHorizontalScrollBar:hasVerticalScrollBar:miniScrollerH:miniScrollerV:origin:corner:in: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
220 |
ScrollableView setupVertical:mini:horizontal:mini: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
221 |
ScrollableView setupViews (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
222 |
HorizontalScrollBar class>>SimpleView class in: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
223 |
HorizontalScrollBar>>ScrollBar initialize (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
224 |
HorizontalScrollBar>>ScrollBar createElements (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
225 |
ArrowButton class rightIn: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
226 |
ArrowButton class>>SimpleView class in: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
227 |
ArrowButton initialize (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
228 |
ArrowButton>>Button initialize (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
229 |
ArrowButton>>Label initialize (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
230 |
ArrowButton>>View initialize (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
231 |
ArrowButton>>SimpleView initialize (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
232 |
ButtonController class>>Controller class new (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
233 |
ButtonController initialize (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
234 |
ValueHolder>>Object onChangeSend:to: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
235 |
ValueHolder>>Object addInterest: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
236 |
ValueHolder>>Model addNonWeakDependent: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
237 |
ValueHolder>>Model addDependent: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
238 |
Block valueNowOrOnUnwindDo: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
239 |
[] in ValueHolder>>Model addDependent: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
240 |
UnixOperatingSystem class>>AbstractOperatingSystem class unblockInterrupts (here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
241 |
DataSetSpec>>UISpecification buildViewWithLayoutFor:in: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
242 |
DataSetSpec setAttributesIn:with: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
243 |
DataSetSpec>>ViewWithScrollerSpec setAttributesIn:with: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
244 |
DataSetView horizontalMini: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
245 |
HVScrollableView>>ScrollableView horizontalMini: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
246 |
HVScrollableView>>ScrollableView setupViews (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
247 |
HVScrollableView>>ScrollableView releaseHorizontalScrollBar (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
248 |
HorizontalMiniScroller>>View destroy (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
249 |
HorizontalMiniScroller>>SimpleView destroy (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
250 |
HorizontalMiniScroller>>DisplaySurface destroy (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
251 |
Registry unregister: (here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
252 |
FileSelectionTreeSpec>>UISpecification buildViewWithLayoutFor:in: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
253 |
FileSelectionTreeSpec setAttributesIn:with: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
254 |
ScrollableView root: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
255 |
ScrollableView doesNotUnderstand: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
256 |
FileSelectionTree>>Object perform:withArguments: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
257 |
FileSelectionTree>>SelectionInTreeView root: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
258 |
SelectionInTree root: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
259 |
SelectionInTree recomputeList (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
260 |
SelectionInTree listFromRoot (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
261 |
FileSelectionItem>>TreeItem addVisibleChildrenTo: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
262 |
FileSelectionItem children (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
263 |
FileSelectionItem readInChildren (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
264 |
Cursor showWhile: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
265 |
WindowGroup withCursor:do: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
266 |
[] in WindowGroup withCursor:do: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
267 |
Block valueNowOrOnUnwindDo: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
268 |
[] in FileSelectionItem readInChildren (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
269 |
DirectoryContents class directoryNamed: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
270 |
UnixFilename>>Filename asFilename (here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
271 |
UIGalleryView::Canvas>>SimpleView realizeAllSubViews (total 90.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
272 |
OrderedCollection do: (total 90.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
273 |
Array from:to:do: (total 90.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
274 |
[] in UndefinedObject optimized (total 90.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
275 |
SequenceView>>ScrollableView realize (total 7.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
276 |
SequenceView>>SimpleView realize (total 7.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
277 |
SequenceView>>SimpleView realizeKeepingGroup:at:iconified: (total 7.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
278 |
SequenceView>>SimpleView create (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
279 |
SequenceView>>SimpleView physicalCreate (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
280 |
GLXWorkstation>>XWorkstation createWindowFor:type:origin:extent:minExtent:maxExtent:borderWidth:subViewOf:style:inputOnly:label:owner:icon:iconMask:iconView: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
281 |
GLXWorkstation>>DeviceWorkstation addKnownView:withId: (here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
282 |
SequenceView>>SimpleView realizeAllSubViews (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
283 |
OrderedCollection do: (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
284 |
Array from:to:do: (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
285 |
[] in UndefinedObject optimized (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
286 |
ScrollBar realize (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
287 |
ScrollBar>>SimpleView realize (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
288 |
ScrollBar>>SimpleView realizeKeepingGroup:at:iconified: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
289 |
ScrollBar>>SimpleView realizeAllSubViews (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
290 |
OrderedCollection do: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
291 |
Array from:to:do: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
292 |
[] in UndefinedObject optimized (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
293 |
ArrowButton>>SimpleView realize (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
294 |
ArrowButton>>SimpleView realizeKeepingGroup:at:iconified: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
295 |
ArrowButton>>SimpleView create (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
296 |
ArrowButton>>SimpleView physicalCreate (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
297 |
Registry registerChange: (here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
298 |
HorizontalScrollBar>>ScrollBar realize (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
299 |
HorizontalScrollBar>>SimpleView realize (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
300 |
HorizontalScrollBar>>SimpleView realizeKeepingGroup:at:iconified: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
301 |
HorizontalScrollBar>>SimpleView realizeAllSubViews (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
302 |
OrderedCollection do: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
303 |
Array from:to:do: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
304 |
[] in UndefinedObject optimized (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
305 |
ArrowButton>>SimpleView realize (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
306 |
ArrowButton>>SimpleView realizeKeepingGroup:at:iconified: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
307 |
ArrowButton>>SimpleView create (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
308 |
ArrowButton>>SimpleView physicalCreate (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
309 |
Registry registerChange: (here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
310 |
ScrollableView realize (total 62.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
311 |
ScrollableView setupDimensionsConfigureScrolledView: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
312 |
SelectionInTreeView>>SimpleView borderWidth (here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
313 |
ScrollableView>>SimpleView realize (total 60.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
314 |
ScrollableView>>SimpleView realizeKeepingGroup:at:iconified: (total 60.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
315 |
ScrollableView>>SimpleView realizeAllSubViews (total 57.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
316 |
OrderedCollection do: (total 57.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
317 |
Array from:to:do: (total 57.5%)(here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
318 |
[] in UndefinedObject optimized (total 55.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
319 |
SelectionInTreeView realize (total 10.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
320 |
SelectionInTreeView refetchDeviceResources (total 10.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
321 |
SelectionInTreeView fetchImageResources (total 10.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
322 |
SelectionInTreeView imageOnDevice: (total 10.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
323 |
Depth8Image>>Image on: (total 10.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
324 |
Depth8Image>>Image asFormOn: (total 10.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
325 |
Depth8Image>>Image paletteImageAsFormOn: (total 7.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
326 |
Depth8Image paletteImageAsTrueColorFormOn: (total 7.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
327 |
Depth8Image anyImageAsTrueColorFormOn: (total 7.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
328 |
Form class width:height:depth:on: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
329 |
Form width:height:depth: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
330 |
Registry registerChange: (here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
331 |
Depth8Image>>Image rgbColormapFor: (total 5.0%)(here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
332 |
Float * (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
333 |
Fraction productFromFloat: (here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
334 |
ImageMask>>Image on: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
335 |
Registry register: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
336 |
Registry register:as: (here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
337 |
ScrollBar realize (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
338 |
ScrollBar>>SimpleView realize (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
339 |
ScrollBar>>SimpleView realizeKeepingGroup:at:iconified: (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
340 |
ScrollBar>>SimpleView realizeAllSubViews (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
341 |
OrderedCollection do: (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
342 |
Array from:to:do: (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
343 |
[] in UndefinedObject optimized (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
344 |
ArrowButton>>SimpleView realize (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
345 |
ArrowButton>>SimpleView realizeKeepingGroup:at:iconified: (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
346 |
ArrowButton>>SimpleView create (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
347 |
ArrowButton>>SimpleView physicalCreate (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
348 |
Registry registerChange: (here 5.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
349 |
HorizontalScrollBar>>ScrollBar realize (total 7.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
350 |
HorizontalScrollBar>>SimpleView realize (total 7.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
351 |
HorizontalScrollBar>>SimpleView realizeKeepingGroup:at:iconified: (total 7.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
352 |
HorizontalScrollBar>>SimpleView create (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
353 |
HorizontalScrollBar>>SimpleView physicalCreate (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
354 |
Registry registerChange: (here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
355 |
HorizontalScrollBar>>SimpleView realizeAllSubViews (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
356 |
OrderedCollection do: (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
357 |
Array from:to:do: (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
358 |
[] in UndefinedObject optimized (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
359 |
ArrowButton>>SimpleView realize (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
360 |
ArrowButton>>SimpleView realizeKeepingGroup:at:iconified: (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
361 |
ArrowButton>>SimpleView create (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
362 |
ArrowButton>>SimpleView physicalCreate (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
363 |
Registry registerChange: (here 5.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
364 |
FileSelectionTree>>SelectionInTreeView realize (total 32.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
365 |
FileSelectionTree>>SelectionInTreeView refetchDeviceResources (total 32.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
366 |
FileSelectionTree>>SelectionInTreeView fetchImageResources (total 32.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
367 |
FileSelectionTree>>SelectionInTreeView imageOnDevice: (total 7.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
368 |
Depth8Image>>Image on: (total 7.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
369 |
Depth8Image>>Image asFormOn: (total 7.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
370 |
Depth8Image>>Image paletteImageAsFormOn: (total 7.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
371 |
Depth8Image paletteImageAsTrueColorFormOn: (total 7.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
372 |
Depth8Image anyImageAsTrueColorFormOn: (total 7.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
373 |
Depth8Image>>Image rgbColormapFor: (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
374 |
Color blue (here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
375 |
Float * (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
376 |
Fraction productFromFloat: (here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
377 |
Form class width:height:depth:on: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
378 |
Form width:height:depth: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
379 |
Registry registerChange: (here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
380 |
FileSelectionTree>>SelectionInTreeView fetchDefaultImages (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
381 |
FileSelectionItem class keysAndIcons (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
382 |
Array do: (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
383 |
[] in FileSelectionItem class keysAndIcons (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
384 |
Image class fromFile: (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
385 |
QuerySignal>>Signal handle:do: (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
386 |
[] in Image class fromFile: (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
387 |
XPMReader class>>ImageReader class fromFile: (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
388 |
XPMReader class>>ImageReader class readFile: (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
389 |
XPMReader fromStream: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
390 |
Colormap class redVector:greenVector:blueVector: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
391 |
Colormap class>>Behavior new (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
392 |
Colormap class>>Behavior basicNew (here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
393 |
FileStream>>ExternalStream close (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
394 |
Registry unregister: (here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
395 |
IdentityDictionary>>Dictionary keysAndValuesDo: (total 20.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
396 |
[] in FileSelectionTree>>SelectionInTreeView fetchImageResources (total 20.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
397 |
FileSelectionTree>>SelectionInTreeView imageOnDevice: (total 20.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
398 |
Depth8Image>>Image on: (total 20.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
399 |
Depth8Image>>Image asFormOn: (total 20.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
400 |
Depth8Image>>Image paletteImageAsFormOn: (total 17.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
401 |
Depth8Image paletteImageAsTrueColorFormOn: (total 17.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
402 |
Depth8Image anyImageAsTrueColorFormOn: (total 17.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
403 |
Form class width:height:depth:on: (total 7.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
404 |
Form width:height:depth: (total 7.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
405 |
Registry registerChange: (here 7.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
406 |
Form>>DeviceGraphicsContext copyBitsFrom:bitsPerPixel:depth:padding:width:height:x:y:toX:y: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
407 |
GLXWorkstation>>XWorkstation drawBits:bitsPerPixel:depth:padding:width:height:x:y:into:x:y:width:height:with: (here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
408 |
Depth8Image>>Image rgbColormapFor: (total 7.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
409 |
Float * (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
410 |
Fraction productFromFloat: (here 5.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
411 |
Color blue (here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
412 |
ImageMask>>Image on: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
413 |
ImageMask>>Depth1Image asFormOn: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
414 |
Form class width:height:fromArray:on: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
415 |
Form width:height:fromArray: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
416 |
Registry registerChange: (here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
417 |
ScrollableView>>SimpleView setInnerClip (here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
418 |
Label>>SimpleView realize (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
419 |
Label>>SimpleView realizeKeepingGroup:at:iconified: (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
420 |
Label>>SimpleView create (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
421 |
Label>>SimpleView physicalCreate (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
422 |
Registry registerChange: (here 5.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
423 |
DataSetView realize (total 15.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
424 |
DataSetView>>SimpleView realize (total 12.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
425 |
DataSetView>>SimpleView realizeKeepingGroup:at:iconified: (total 12.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
426 |
DataSetView>>SimpleView realizeAllSubViews (total 12.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
427 |
OrderedCollection do: (total 12.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
428 |
Array from:to:do: (total 12.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
429 |
[] in UndefinedObject optimized (total 12.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
430 |
HVScrollableView>>ScrollableView realize (total 10.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
431 |
HVScrollableView>>SimpleView realize (total 10.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
432 |
HVScrollableView>>SimpleView realizeKeepingGroup:at:iconified: (total 10.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
433 |
HVScrollableView>>SimpleView realizeAllSubViews (total 10.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
434 |
OrderedCollection do: (total 10.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
435 |
Array from:to:do: (total 10.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
436 |
[] in UndefinedObject optimized (total 10.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
437 |
DSVColumnView realize (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
438 |
DSVColumnView>>SimpleView realize (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
439 |
DSVColumnView>>SimpleView realizeKeepingGroup:at:iconified: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
440 |
DSVColumnView create (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
441 |
DSVColumnView>>SimpleView create (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
442 |
DSVColumnView>>SimpleView physicalCreate (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
443 |
GLXWorkstation>>XWorkstation createWindowFor:type:origin:extent:minExtent:maxExtent:borderWidth:subViewOf:style:inputOnly:label:owner:icon:iconMask:iconView: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
444 |
GLXWorkstation>>DeviceWorkstation addKnownView:withId: (here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
445 |
ScrollBar realize (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
446 |
ScrollBar>>SimpleView realize (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
447 |
ScrollBar>>SimpleView realizeKeepingGroup:at:iconified: (total 5.0%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
448 |
ScrollBar>>SimpleView create (here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
449 |
ScrollBar>>SimpleView realizeAllSubViews (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
450 |
OrderedCollection do: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
451 |
Array from:to:do: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
452 |
[] in UndefinedObject optimized (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
453 |
Scroller realize (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
454 |
Scroller>>SimpleView realize (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
455 |
Scroller>>SimpleView realizeKeepingGroup:at:iconified: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
456 |
Scroller>>SimpleView create (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
457 |
Scroller>>SimpleView physicalCreate (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
458 |
Registry registerChange: (here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
459 |
HorizontalScrollBar>>ScrollBar realize (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
460 |
HorizontalScrollBar>>SimpleView realize (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
461 |
HorizontalScrollBar>>SimpleView realizeKeepingGroup:at:iconified: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
462 |
HorizontalScrollBar>>SimpleView realizeAllSubViews (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
463 |
OrderedCollection do: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
464 |
Array from:to:do: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
465 |
[] in UndefinedObject optimized (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
466 |
ArrowButton>>SimpleView realize (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
467 |
ArrowButton>>SimpleView realizeKeepingGroup:at:iconified: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
468 |
ArrowButton>>SimpleView create (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
469 |
ArrowButton>>SimpleView physicalCreate (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
470 |
Registry registerChange: (here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
471 |
DSVLabelView>>SimpleView realize (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
472 |
DSVLabelView>>SimpleView realizeKeepingGroup:at:iconified: (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
473 |
DSVLabelView>>SimpleView create (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
474 |
DSVLabelView>>SimpleView physicalCreate (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
475 |
Registry registerChange: (here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
476 |
DataSetView columnsSizeChanged (total 2.5%)(here 0.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
477 |
GLXWorkstation>>XWorkstation translatePoint:from:to: (here 2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
478 |
|
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
479 |
|
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
480 |
leafs of calling tree (by receiver & implementing method): |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
481 |
|
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
482 |
ScrollableView>>SimpleView setInnerClip (2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
483 |
ScrollBar>>SimpleView create (2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
484 |
UnixOperatingSystem class>>AbstractOperatingSystem class unblockInterrupts (2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
485 |
Registry register:as: (2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
486 |
Colormap class>>Behavior basicNew (2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
487 |
GLXWorkstation>>XWorkstation drawBits:bitsPerPixel:depth:padding:width:height:x:y:into:x:y:width:height:with: (2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
488 |
Array from:to:do: (2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
489 |
Depth8Image>>Image rgbColormapFor: (2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
490 |
GLXWorkstation>>XWorkstation translatePoint:from:to: (2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
491 |
SelectionInTreeView>>SimpleView borderWidth (2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
492 |
UnixFilename>>Filename asFilename (2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
493 |
GLXWorkstation>>DeviceWorkstation addKnownView:withId: (5.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
494 |
Color blue (5.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
495 |
Registry unregister: (7.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
496 |
Fraction productFromFloat: (10.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
497 |
Registry registerChange: (45.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
498 |
|
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
499 |
|
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
500 |
method leafs of calling tree (by implementing method only): |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
501 |
|
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
502 |
XWorkstation drawBits:bitsPerPixel:depth:padding:width:height:x:y:into:x:y:width:height:with: (2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
503 |
SimpleView setInnerClip (2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
504 |
XWorkstation translatePoint:from:to: (2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
505 |
Filename asFilename (2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
506 |
Registry register:as: (2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
507 |
Image rgbColormapFor: (2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
508 |
SimpleView borderWidth (2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
509 |
Array from:to:do: (2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
510 |
AbstractOperatingSystem class unblockInterrupts (2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
511 |
Behavior basicNew (2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
512 |
SimpleView create (2.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
513 |
DeviceWorkstation addKnownView:withId: (5.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
514 |
Color blue (5.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
515 |
Registry unregister: (7.5%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
516 |
Fraction productFromFloat: (10.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
517 |
Registry registerChange: (45.0%) |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
518 |
|
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
519 |
|
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
520 |
|
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
521 |
|
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
522 |
" |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
523 |
! |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
524 |
|
563 | 525 |
horizontalSpacing |
1087 | 526 |
"returns the default horizontal space between rows |
527 |
" |
|
563 | 528 |
^ 4 |
529 |
||
530 |
! |
|
531 |
||
542 | 532 |
updateStyleCache |
533 |
"extract values from the styleSheet and cache them in class variables |
|
534 |
" |
|
582 | 535 |
<resource: #style (#textForegroundColor #'scrollableView.backgroundColor' |
536 |
#'selection.hilightForegroundColor' |
|
537 |
#'selection.hilightBackgroundColor' )> |
|
542 | 538 |
|
1333 | 539 |
DefaultForegroundColor := StyleSheet colorAt:#'textForegroundColor' default:(Color black). |
540 |
DefaultBackgroundColor := StyleSheet colorAt:#'scrollableView.backgroundColor' default:DefaultViewBackgroundColor. |
|
541 |
||
542 |
DefaultHilightForegroundColor := StyleSheet colorAt:#'selection.hilightForegroundColor' default:DefaultBackgroundColor. |
|
543 |
DefaultHilightBackgroundColor := StyleSheet colorAt:#'selection.hilightBackgroundColor' default:DefaultForegroundColor. |
|
607 | 544 |
|
647 | 545 |
DefaultHilightForegroundColor = DefaultHilightBackgroundColor ifTrue:[ |
988 | 546 |
DefaultHilightBackgroundColor := Color black |
647 | 547 |
]. |
1333 | 548 |
ButtonLightColor := StyleSheet colorAt:#'button.lightColor'. |
549 |
ButtonShadowColor := StyleSheet colorAt:#'button.shadowColor'. |
|
550 |
ButtonHalfLightColor := StyleSheet colorAt:#'button.halfLightColor'. |
|
551 |
ButtonHalfShadowColor := StyleSheet colorAt:#'button.halfShadowColor'. |
|
552 |
ButtonEdgeStyle := StyleSheet at:#'button.edgeStyle'. |
|
553 |
CheckToggleActiveImage := StyleSheet at:#'checkToggle.activeImage'. |
|
1100 | 554 |
|
555 |
CheckToggleActiveImage isNil ifTrue:[ |
|
556 |
CheckTogglePassiveImage := nil |
|
557 |
] ifFalse:[ |
|
1333 | 558 |
CheckTogglePassiveImage := StyleSheet at:#'checkToggle.passiveImage'. |
1100 | 559 |
|
560 |
CheckTogglePassiveImage isNil ifTrue:[ |
|
561 |
CheckToggleActiveImage := nil |
|
562 |
] |
|
563 |
]. |
|
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
564 |
ComboButtonForm := nil. |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
565 |
ComboButtonLevel := nil. |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
566 |
ComboButtonExtent := nil. |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
567 |
|
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
568 |
CheckToggleForm := nil. |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
569 |
CheckToggleLevel := nil. |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
570 |
CheckToggleExtent := nil. |
647 | 571 |
|
542 | 572 |
" |
573 |
self updateStyleCache. |
|
574 |
" |
|
575 |
||
582 | 576 |
"Modified: / 26.10.1997 / 17:09:07 / cg" |
563 | 577 |
! |
578 |
||
579 |
verticalSpacing |
|
1087 | 580 |
"returns the default vertical space between rows |
581 |
" |
|
563 | 582 |
^ 2 |
583 |
||
542 | 584 |
! ! |
585 |
||
809 | 586 |
!DSVColumnView class methodsFor:'resources'! |
587 |
||
588 |
dragIconMulti |
|
988 | 589 |
"This resource specification was automatically generated |
590 |
by the ImageEditor of ST/X." |
|
591 |
||
592 |
"Do not manually edit this!! If it is corrupted, |
|
593 |
the ImageEditor may not be able to read the specification." |
|
594 |
||
809 | 595 |
" |
988 | 596 |
self dragIconMulti inspect |
597 |
ImageEditor openOnClass:self andSelector:#dragIconMulti |
|
809 | 598 |
" |
599 |
||
600 |
<resource: #image> |
|
601 |
||
602 |
^Icon |
|
603 |
constantNamed:#'DSVColumnView dragIconMulti' |
|
988 | 604 |
ifAbsentPut:[(Depth1Image new) width: 32; height: 32; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O?<0@C??L@@<@@@@O@@@@C3??L@<??3@OO?<<C3??O@<??0@OO?<@C3???0<???<OO???C3???0<???<OO???@C???0@???<@O???@C???0@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((ImageMask new) width: 32; height: 32; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@O??<@C???@@???<@O???@C????@????0O????C????0?????O????3?????????????????????????????????????????????????????@????0O???<C????@????0@@@@@@@@@@@@@@@@@@@@@b') ; yourself); yourself]! |
809 | 605 |
|
606 |
dragIconSingle |
|
988 | 607 |
"This resource specification was automatically generated |
608 |
by the ImageEditor of ST/X." |
|
609 |
||
610 |
"Do not manually edit this!! If it is corrupted, |
|
611 |
the ImageEditor may not be able to read the specification." |
|
612 |
||
809 | 613 |
" |
988 | 614 |
self dragIconSingle inspect |
615 |
ImageEditor openOnClass:self andSelector:#dragIconSingle |
|
809 | 616 |
" |
617 |
||
618 |
<resource: #image> |
|
619 |
||
620 |
^Icon |
|
621 |
constantNamed:#'DSVColumnView dragIconSingle' |
|
988 | 622 |
ifAbsentPut:[(Depth1Image new) width: 32; height: 32; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O?<0@C??L@@??30@O?<<@C??@@@??0@@O???@C???0@???<@O???@C???0@???<@O???@C???0@???<@O???@C???0@???<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((ImageMask new) width: 32; height: 32; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@O??<@C???@@???<@O???@C???<@????@O???<C????@????0O???<C????@????0O???<C????@????0O???<C????@????0O???<C????@????0O???<@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; yourself); yourself]! ! |
809 | 623 |
|
886 | 624 |
!DSVColumnView methodsFor:'accessing'! |
625 |
||
1042 | 626 |
builder |
1087 | 627 |
"get the builder (UIBuilder or nil) |
628 |
" |
|
1042 | 629 |
^ builder |
630 |
! |
|
631 |
||
632 |
builder:aBuilder |
|
1087 | 633 |
"set the builder (UIBuilder or nil) |
634 |
" |
|
1042 | 635 |
builder := aBuilder |
636 |
! |
|
637 |
||
886 | 638 |
columnView |
1087 | 639 |
"returns self |
640 |
" |
|
886 | 641 |
^ self |
1067
c66188014600
keep a reference to my dataSetView.
Claus Gittinger <cg@exept.de>
parents:
1042
diff
changeset
|
642 |
! |
c66188014600
keep a reference to my dataSetView.
Claus Gittinger <cg@exept.de>
parents:
1042
diff
changeset
|
643 |
|
c66188014600
keep a reference to my dataSetView.
Claus Gittinger <cg@exept.de>
parents:
1042
diff
changeset
|
644 |
dataSetView |
c66188014600
keep a reference to my dataSetView.
Claus Gittinger <cg@exept.de>
parents:
1042
diff
changeset
|
645 |
"return the value of the instance variable 'dataSetView' (automatically generated)" |
c66188014600
keep a reference to my dataSetView.
Claus Gittinger <cg@exept.de>
parents:
1042
diff
changeset
|
646 |
|
c66188014600
keep a reference to my dataSetView.
Claus Gittinger <cg@exept.de>
parents:
1042
diff
changeset
|
647 |
^ dataSetView |
c66188014600
keep a reference to my dataSetView.
Claus Gittinger <cg@exept.de>
parents:
1042
diff
changeset
|
648 |
|
c66188014600
keep a reference to my dataSetView.
Claus Gittinger <cg@exept.de>
parents:
1042
diff
changeset
|
649 |
"Created: / 7.8.1998 / 22:13:43 / cg" |
c66188014600
keep a reference to my dataSetView.
Claus Gittinger <cg@exept.de>
parents:
1042
diff
changeset
|
650 |
! |
c66188014600
keep a reference to my dataSetView.
Claus Gittinger <cg@exept.de>
parents:
1042
diff
changeset
|
651 |
|
c66188014600
keep a reference to my dataSetView.
Claus Gittinger <cg@exept.de>
parents:
1042
diff
changeset
|
652 |
dataSetView:something |
c66188014600
keep a reference to my dataSetView.
Claus Gittinger <cg@exept.de>
parents:
1042
diff
changeset
|
653 |
"set the value of the instance variable 'dataSetView' (automatically generated)" |
c66188014600
keep a reference to my dataSetView.
Claus Gittinger <cg@exept.de>
parents:
1042
diff
changeset
|
654 |
|
c66188014600
keep a reference to my dataSetView.
Claus Gittinger <cg@exept.de>
parents:
1042
diff
changeset
|
655 |
dataSetView := something. |
c66188014600
keep a reference to my dataSetView.
Claus Gittinger <cg@exept.de>
parents:
1042
diff
changeset
|
656 |
|
c66188014600
keep a reference to my dataSetView.
Claus Gittinger <cg@exept.de>
parents:
1042
diff
changeset
|
657 |
"Created: / 7.8.1998 / 22:13:43 / cg" |
1087 | 658 |
! |
659 |
||
660 |
rowFontAscent |
|
661 |
"returns the inset of a printable text in a row |
|
662 |
" |
|
663 |
^ rowFontAscent |
|
886 | 664 |
! ! |
665 |
||
809 | 666 |
!DSVColumnView methodsFor:'accessing actions'! |
542 | 667 |
|
668 |
action:aOneArgAction |
|
607 | 669 |
"set the action block to be performed on select |
670 |
" |
|
542 | 671 |
actionBlock := aOneArgAction |
672 |
||
673 |
||
674 |
! |
|
675 |
||
809 | 676 |
doubleClickAction:aOneArgAction |
677 |
"set the action block to be performed on doubleclick |
|
678 |
" |
|
679 |
doubleClickActionBlock := aOneArgAction |
|
680 |
||
681 |
||
682 |
! |
|
683 |
||
684 |
rowIfAbsent:aOneArgAction |
|
685 |
"set the action block to be performed on each 'nil' entry into the |
|
686 |
list. The argument to the block is the index into the list. The |
|
687 |
block returns the row which is put to the list |
|
688 |
" |
|
689 |
rowIfAbsentBlock := aOneArgAction |
|
690 |
||
691 |
||
1416 | 692 |
! |
693 |
||
694 |
tabAtEndAction:aNoneArgAction |
|
695 |
"set the action, called without any argument at end of the list entering |
|
696 |
tab next. |
|
697 |
The default is to give the focus to the view after self in the focusSequence |
|
698 |
" |
|
699 |
tabAtEndAction := aNoneArgAction |
|
700 |
||
701 |
||
702 |
! |
|
703 |
||
704 |
tabAtStartAction:aNoneArgAction |
|
705 |
"set the action, called without any argument at start of the list entering |
|
706 |
tab previous. |
|
707 |
The default is to give the focus to the view before self in the focusSequence |
|
708 |
" |
|
709 |
tabAtStartAction := aNoneArgAction |
|
710 |
||
711 |
||
809 | 712 |
! ! |
713 |
||
714 |
!DSVColumnView methodsFor:'accessing behavior'! |
|
715 |
||
542 | 716 |
beDependentOfRows |
717 |
"make myself dependent of any row; in this case any change notification |
|
718 |
raised by a row is catched and the cell identified by the 'readSelector' |
|
719 |
is redrawn. In case of a nil readSelector, the whole raw is redrawn. |
|
720 |
-> row changed:'what' |
|
721 |
On default the attribute is set to true (enabled). |
|
722 |
" |
|
723 |
^ beDependentOfRows |
|
724 |
! |
|
725 |
||
726 |
beDependentOfRows:aBool |
|
727 |
"make myself dependent of any row; in this case any change notification |
|
728 |
raised by a row is catched and the cell identified by the 'readSelector' |
|
729 |
is redrawn. In case of a nil readSelector, the whole raw is redrawn. |
|
730 |
-> row changed:'what' |
|
731 |
On default the attribute is set to true (enabled). |
|
732 |
" |
|
733 |
aBool ~~ beDependentOfRows ifTrue:[ |
|
618 | 734 |
beDependentOfRows := aBool. |
735 |
||
736 |
self size ~~ 0 ifTrue:[ |
|
737 |
list do:[:aRow| aRow notNil ifTrue:[ |
|
738 |
beDependentOfRows ifTrue:[aRow addDependent:self] |
|
739 |
ifFalse:[aRow removeDependent:self] |
|
740 |
] |
|
741 |
] |
|
542 | 742 |
] |
618 | 743 |
] |
607 | 744 |
! |
745 |
||
746 |
multipleSelectOk |
|
747 |
"allow/disallow multiple row selections; the default is false |
|
748 |
" |
|
749 |
^ multipleSelectOk |
|
750 |
! |
|
751 |
||
752 |
multipleSelectOk:aState |
|
753 |
"allow/disallow multiple row selections; the default is false |
|
754 |
" |
|
755 |
aState == multipleSelectOk ifFalse:[ |
|
756 |
multipleSelectOk := aState. |
|
757 |
self deselect |
|
758 |
] |
|
1112 | 759 |
! |
760 |
||
761 |
selectRowOnDefault |
|
762 |
"in case of selecting a none selectable cell, the row is selected |
|
763 |
" |
|
764 |
^ selectRowOnDefault |
|
765 |
! |
|
766 |
||
767 |
selectRowOnDefault:aBool |
|
768 |
"in case of selecting a none selectable cell, the row is selected |
|
769 |
" |
|
770 |
selectRowOnDefault := aBool |
|
542 | 771 |
! ! |
772 |
||
824 | 773 |
!DSVColumnView methodsFor:'accessing colors'! |
774 |
||
775 |
backgroundColor |
|
776 |
"get the background color of the rows |
|
777 |
" |
|
778 |
^ bgColor |
|
779 |
||
780 |
||
781 |
! |
|
782 |
||
783 |
backgroundColor:aColor |
|
784 |
"set the background color of the rows |
|
785 |
" |
|
786 |
bgColor ~~ aColor ifTrue:[ |
|
787 |
super viewBackground:bgColor. |
|
788 |
||
789 |
self realized ifTrue:[ |
|
790 |
bgColor := aColor on:device. |
|
791 |
self invalidate |
|
792 |
] ifFalse:[ |
|
793 |
bgColor := aColor |
|
794 |
] |
|
795 |
] |
|
796 |
! |
|
797 |
||
798 |
foregroundColor |
|
799 |
"return the foreground color of the rows |
|
800 |
" |
|
801 |
^ fgColor |
|
802 |
||
803 |
! |
|
804 |
||
805 |
foregroundColor:aColor |
|
806 |
"set the foreground color of the rows |
|
807 |
" |
|
808 |
fgColor ~~ aColor ifTrue:[ |
|
809 |
self realized ifTrue:[ |
|
810 |
fgColor := aColor on:device. |
|
811 |
self invalidate |
|
812 |
] ifFalse:[ |
|
813 |
fgColor := aColor |
|
814 |
] |
|
815 |
] |
|
816 |
||
817 |
! |
|
818 |
||
819 |
hgLgBgColor |
|
820 |
"returns the background color of a selected row |
|
821 |
" |
|
822 |
^ hgLgBgColor |
|
823 |
! |
|
824 |
||
825 |
hgLgFgColor |
|
826 |
"returns the foreground color of a selected row |
|
827 |
" |
|
828 |
^ hgLgFgColor |
|
829 |
! |
|
830 |
||
831 |
separatorDarkColor |
|
832 |
"returns the dark color used for drawing a shadowed separator (3D) |
|
833 |
" |
|
834 |
^ shadowColor |
|
835 |
||
836 |
||
837 |
! |
|
838 |
||
839 |
separatorLightColor |
|
840 |
"returns the light color used for drawing a shadowed separator (3D) |
|
841 |
" |
|
842 |
^ lightColor |
|
843 |
||
844 |
||
845 |
! ! |
|
846 |
||
542 | 847 |
!DSVColumnView methodsFor:'accessing columns'! |
848 |
||
849 |
columnAt:anIndex |
|
607 | 850 |
"returns the column at an index |
542 | 851 |
" |
1112 | 852 |
^ columnDescriptors at:anIndex ifAbsent:nil |
542 | 853 |
! |
854 |
||
886 | 855 |
columnDescriptors |
856 |
"returns list of column descriptors |
|
857 |
" |
|
858 |
^ columnDescriptors collect:[:aCol| aCol description ] |
|
859 |
! |
|
860 |
||
861 |
columnDescriptors:aColumnDescriptionList |
|
542 | 862 |
"set the columnDescriptors |
863 |
" |
|
1187 | 864 |
|id sz label labelView delta| |
612 | 865 |
|
886 | 866 |
self deselect. |
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
867 |
|
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
868 |
(viewOrigin x ~~ 0 or:[viewOrigin y ~~ 0]) ifTrue:[ |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
869 |
delta := viewOrigin negated. |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
870 |
viewOrigin := 0@0. |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
871 |
super originChanged:delta |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
872 |
]. |
886 | 873 |
|
874 |
(sz := aColumnDescriptionList size) ~~ 0 ifTrue:[ |
|
607 | 875 |
id := 0. |
1149
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
876 |
labelView := dataSetView labelView. |
607 | 877 |
|
886 | 878 |
columnDescriptors := aColumnDescriptionList collect:[:aCol||column| |
879 |
(column := aCol) isSequenceable ifTrue:[ |
|
880 |
column := DataSetColumnSpec new fromLiteralArrayEncoding:aCol |
|
881 |
]. |
|
1187 | 882 |
id := id + 1. |
883 |
||
884 |
labelView notNil ifTrue:[ |
|
885 |
label := DataSetLabel columnDescription:column |
|
886 |
builder:builder |
|
887 |
on:labelView. |
|
888 |
] ifFalse:[ |
|
889 |
label := nil |
|
890 |
]. |
|
1149
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
891 |
DataSetColumn new on:self description:column |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
892 |
columnNumber:id |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
893 |
label:label. |
542 | 894 |
] |
895 |
] ifFalse:[ |
|
896 |
columnDescriptors := #() |
|
897 |
]. |
|
886 | 898 |
catchChangeEvents := true. |
542 | 899 |
canFit := (columnDescriptors findFirst:[:aCol|aCol canResize]) ~~ 0. |
900 |
preferredExtent := nil. |
|
901 |
||
612 | 902 |
shown ifTrue:[ |
556 | 903 |
self fitColumns ifFalse:[ |
904 |
self invalidate. |
|
905 |
self contentsChanged. |
|
859 | 906 |
] ifTrue:[ |
907 |
self preferredExtentChanged. |
|
556 | 908 |
] |
563 | 909 |
]. |
859 | 910 |
catchChangeEvents := false. |
563 | 911 |
self changed:#sizeOfColumns. |
542 | 912 |
|
913 |
||
914 |
! |
|
915 |
||
916 |
firstColumn |
|
607 | 917 |
"returns the first column |
542 | 918 |
" |
919 |
^ columnDescriptors at:1 |
|
920 |
||
921 |
! |
|
922 |
||
923 |
lastColumn |
|
607 | 924 |
"returns the last column |
542 | 925 |
" |
926 |
^ columnDescriptors last |
|
927 |
||
928 |
! ! |
|
929 |
||
809 | 930 |
!DSVColumnView methodsFor:'accessing interactors'! |
931 |
||
1100 | 932 |
checkToggleActiveImage |
933 |
^ checkToggleActiveImage |
|
934 |
! |
|
935 |
||
809 | 936 |
checkToggleExtent |
1087 | 937 |
"returns the extent of a checkToggle |
938 |
" |
|
809 | 939 |
^ checkToggleExtent |
940 |
! |
|
941 |
||
942 |
checkToggleForm |
|
1087 | 943 |
"returns the form of a checkToggle |
944 |
" |
|
809 | 945 |
^ checkToggleForm |
946 |
! |
|
947 |
||
948 |
checkToggleLevel |
|
1087 | 949 |
"returns the level of a checkToggle button |
950 |
" |
|
809 | 951 |
^ checkToggleLevel |
952 |
! |
|
953 |
||
1100 | 954 |
checkTogglePassiveImage |
955 |
^ checkTogglePassiveImage |
|
956 |
! |
|
957 |
||
809 | 958 |
comboButtonExtent |
1087 | 959 |
"returns the extent of a comboList or -Box |
960 |
" |
|
809 | 961 |
^ comboButtonExtent |
962 |
! |
|
963 |
||
964 |
comboButtonForm |
|
1087 | 965 |
"returns the form of a comboList or -Box |
966 |
" |
|
809 | 967 |
^ comboButtonForm |
968 |
! |
|
969 |
||
970 |
comboButtonLevel |
|
1087 | 971 |
"returns the level of a comboList or -Box button |
972 |
" |
|
809 | 973 |
^ comboButtonLevel |
974 |
! |
|
975 |
||
976 |
rowSelectorExtent |
|
977 |
"returns the bitmap of a selected row |
|
978 |
" |
|
979 |
^ rowSelectorForm extent |
|
980 |
! |
|
981 |
||
982 |
rowSelectorForm |
|
983 |
"returns the bitmap of a selected row |
|
984 |
" |
|
985 |
^ rowSelectorForm |
|
986 |
! ! |
|
987 |
||
612 | 988 |
!DSVColumnView methodsFor:'accessing mvc'! |
989 |
||
1008
7874385db982
changes to support columnAdaptors
Claus Gittinger <cg@exept.de>
parents:
991
diff
changeset
|
990 |
columnAdaptor |
7874385db982
changes to support columnAdaptors
Claus Gittinger <cg@exept.de>
parents:
991
diff
changeset
|
991 |
"return the value of the instance variable 'columnAdaptor' (automatically generated)" |
7874385db982
changes to support columnAdaptors
Claus Gittinger <cg@exept.de>
parents:
991
diff
changeset
|
992 |
|
7874385db982
changes to support columnAdaptors
Claus Gittinger <cg@exept.de>
parents:
991
diff
changeset
|
993 |
^ columnAdaptor! |
7874385db982
changes to support columnAdaptors
Claus Gittinger <cg@exept.de>
parents:
991
diff
changeset
|
994 |
|
7874385db982
changes to support columnAdaptors
Claus Gittinger <cg@exept.de>
parents:
991
diff
changeset
|
995 |
columnAdaptor:something |
7874385db982
changes to support columnAdaptors
Claus Gittinger <cg@exept.de>
parents:
991
diff
changeset
|
996 |
"set the value of the instance variable 'columnAdaptor' (automatically generated)" |
7874385db982
changes to support columnAdaptors
Claus Gittinger <cg@exept.de>
parents:
991
diff
changeset
|
997 |
|
7874385db982
changes to support columnAdaptors
Claus Gittinger <cg@exept.de>
parents:
991
diff
changeset
|
998 |
columnAdaptor := something.! |
7874385db982
changes to support columnAdaptors
Claus Gittinger <cg@exept.de>
parents:
991
diff
changeset
|
999 |
|
612 | 1000 |
columnHolder |
1087 | 1001 |
"get the valueHolder, which keeps the list of column descriptions |
1002 |
" |
|
612 | 1003 |
^ columnHolder |
1004 |
||
1005 |
! |
|
1006 |
||
1007 |
columnHolder:aValueHolder |
|
1087 | 1008 |
"set the valueHolder, which keeps the list of column descriptions |
1009 |
" |
|
612 | 1010 |
|columns| |
1011 |
||
1012 |
columnHolder notNil ifTrue:[ |
|
1013 |
columnHolder removeDependent:self |
|
1014 |
]. |
|
1015 |
||
1016 |
(columnHolder := aValueHolder) notNil ifTrue:[ |
|
1017 |
columnHolder addDependent:self. |
|
1018 |
columns := columnHolder value. |
|
1019 |
||
1020 |
columns notNil ifTrue:[ |
|
1021 |
self columnDescriptors:columns |
|
1022 |
] |
|
1023 |
]. |
|
1024 |
||
1025 |
! ! |
|
1026 |
||
542 | 1027 |
!DSVColumnView methodsFor:'accessing rows'! |
1028 |
||
1029 |
at:aRowNr |
|
1030 |
"return the row at an index, aRowNr |
|
1031 |
" |
|
618 | 1032 |
|row| |
1033 |
||
1034 |
(row := list at:aRowNr) isNil ifTrue:[ |
|
1035 |
lockRowIndex := aRowNr. |
|
1036 |
||
1034
bd02c4cd7582
care for nonexisting rowIfAbsentBlock when a nil-row is encountered.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1037 |
(rowIfAbsentBlock notNil |
bd02c4cd7582
care for nonexisting rowIfAbsentBlock when a nil-row is encountered.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1038 |
and:[(row := rowIfAbsentBlock value:aRowNr) notNil]) ifTrue:[ |
618 | 1039 |
list at:aRowNr put:row. |
1040 |
beDependentOfRows ifTrue:[row addDependent:self]. |
|
1041 |
]. |
|
1042 |
||
1043 |
lockRowIndex := 0 |
|
1044 |
]. |
|
1045 |
^ row |
|
1034
bd02c4cd7582
care for nonexisting rowIfAbsentBlock when a nil-row is encountered.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1046 |
|
bd02c4cd7582
care for nonexisting rowIfAbsentBlock when a nil-row is encountered.
Claus Gittinger <cg@exept.de>
parents:
1023
diff
changeset
|
1047 |
"Modified: / 31.7.1998 / 01:07:46 / cg" |
542 | 1048 |
! |
1049 |
||
1050 |
at:aRowNr ifAbsent:exceptionBlock |
|
607 | 1051 |
"return the row at a aRowNr. If the index is invalid, return the |
542 | 1052 |
result of evaluating the exceptionblock |
1053 |
" |
|
618 | 1054 |
(aRowNr between:1 and:self size) ifTrue:[ |
1055 |
^ self at:aRowNr |
|
1056 |
]. |
|
1057 |
^ exceptionBlock value |
|
542 | 1058 |
! |
1059 |
||
1060 |
at:aRowNr put:aRow |
|
1061 |
"change the row at an index. The added row is returned |
|
1062 |
" |
|
618 | 1063 |
|row| |
1064 |
||
1065 |
lockRowIndex == aRowNr ifTrue:[ |
|
1066 |
^ self |
|
1067 |
]. |
|
1068 |
row := list at:aRowNr. |
|
1069 |
row == aRow ifTrue:[ |
|
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
1070 |
^ self invalidateRowAt:aRowNr |
618 | 1071 |
]. |
1072 |
||
542 | 1073 |
beDependentOfRows ifTrue:[ |
618 | 1074 |
(row := list at:aRowNr) notNil ifTrue:[ |
1075 |
row removeDependent:self |
|
1076 |
] |
|
542 | 1077 |
]. |
618 | 1078 |
|
607 | 1079 |
list at:aRowNr put:aRow. |
618 | 1080 |
|
1081 |
aRow notNil ifTrue:[ "/ free list |
|
1082 |
beDependentOfRows ifTrue:[ |
|
1083 |
aRow addDependent:self |
|
1084 |
]. |
|
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
1085 |
self invalidateRowAt:aRowNr |
618 | 1086 |
]. |
542 | 1087 |
^ aRow. |
1088 |
! |
|
1089 |
||
1090 |
first |
|
1091 |
"return the first row |
|
1092 |
" |
|
618 | 1093 |
^ self at:1 |
1094 |
! |
|
1095 |
||
1096 |
identityIndexOfRow:aRow |
|
1097 |
"returns index of a row or 0 |
|
1098 |
" |
|
1099 |
(list size ~~ 0 and:[aRow notNil]) ifTrue:[ |
|
1100 |
^ list identityIndexOf:aRow |
|
1101 |
]. |
|
1102 |
^ 0 |
|
542 | 1103 |
! |
1104 |
||
1105 |
last |
|
1106 |
"return the last row |
|
1107 |
" |
|
618 | 1108 |
^ self at:(self size) |
542 | 1109 |
! |
1110 |
||
1111 |
list |
|
1112 |
"get the list of rows |
|
1113 |
" |
|
1114 |
^ list |
|
1115 |
||
1116 |
||
1117 |
||
1118 |
! |
|
1119 |
||
1120 |
list:aList |
|
1121 |
"set the list of rows |
|
1122 |
" |
|
1259 | 1123 |
|makeDependent selectionHasChanged| |
656 | 1124 |
|
618 | 1125 |
"/ remove selection without redraw |
622 | 1126 |
|
1259 | 1127 |
selectionHasChanged := self hasSelection. |
1128 |
||
622 | 1129 |
editValue notNil ifTrue:[ |
1130 |
editValue removeDependent:self. |
|
1131 |
editValue := nil |
|
1132 |
]. |
|
1111 | 1133 |
self destroyEditView. |
622 | 1134 |
|
618 | 1135 |
selectedColIndex := 0. |
1136 |
selectedRowIndex := multipleSelectOk ifTrue:[nil] ifFalse:[0]. |
|
542 | 1137 |
|
612 | 1138 |
shown ifFalse:[ |
1139 |
preferredExtent := nil |
|
1140 |
] ifTrue:[ |
|
1141 |
aList size ~~ 0 ifTrue:[ "/ otherwise keep old values |
|
1142 |
self columnsDo:[:aCol| aCol invalidate ]. |
|
1143 |
preferredExtent := nil. |
|
618 | 1144 |
] |
542 | 1145 |
]. |
1146 |
||
656 | 1147 |
(makeDependent := beDependentOfRows) ifTrue:[ |
1148 |
self beDependentOfRows:false. |
|
1149 |
]. |
|
643 | 1150 |
|
1151 |
aList size ~~ 0 ifTrue:[ |
|
1152 |
list := OrderedCollection new:(aList size). |
|
645
53c78cc2ee08
redraw twice in case of expose event during adding a new entry
ca
parents:
643
diff
changeset
|
1153 |
aList do:[:el| list add:el ]. |
542 | 1154 |
] ifFalse:[ |
643 | 1155 |
list := nil |
542 | 1156 |
]. |
656 | 1157 |
self beDependentOfRows:makeDependent. |
542 | 1158 |
|
612 | 1159 |
shown ifTrue:[ |
542 | 1160 |
list size ~~ 0 ifTrue:[ |
1161 |
self fitColumns ifTrue:[^ self ]. |
|
1162 |
]. |
|
713 | 1163 |
self recomputeHeightOfContents. |
637 | 1164 |
self invalidate. |
1165 |
self contentsChanged. |
|
1166 |
]. |
|
1259 | 1167 |
selectionHasChanged ifTrue:[ |
1168 |
self selectionChanged. |
|
1169 |
]. |
|
542 | 1170 |
|
1171 |
||
1172 |
! ! |
|
1173 |
||
1174 |
!DSVColumnView methodsFor:'accessing visibility'! |
|
1175 |
||
1176 |
font:aFont |
|
1177 |
"set the font for all shown rows. |
|
1178 |
" |
|
1179 |
(aFont notNil and:[aFont ~~ font]) ifTrue:[ |
|
1180 |
super font:(aFont on:device). |
|
1181 |
realized ifTrue:[ |
|
1149
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
1182 |
self columnsDo:[:aCol| aCol invalidate ]. |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
1183 |
self preferredExtentChanged. |
542 | 1184 |
self invalidate. |
1185 |
self contentsChanged |
|
643 | 1186 |
] |
542 | 1187 |
] |
1188 |
||
1189 |
! |
|
1190 |
||
607 | 1191 |
has3Dseparators |
1192 |
"returns true if shown in 3D mode |
|
1193 |
" |
|
1194 |
^ separatorSize ~~ 1 |
|
542 | 1195 |
! |
1196 |
||
607 | 1197 |
has3Dseparators:aBool |
1198 |
"enable or disable 3D mode |
|
1199 |
" |
|
1200 |
|newSepSize| |
|
542 | 1201 |
|
637 | 1202 |
newSepSize := aBool ifTrue:[2] ifFalse:[1]. |
607 | 1203 |
|
1204 |
newSepSize ~~ separatorSize ifTrue:[ |
|
1205 |
separatorSize := newSepSize. |
|
1149
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
1206 |
|
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
1207 |
realized ifTrue:[ |
1136 | 1208 |
self columnsDo:[:aCol| aCol invalidate ]. |
1209 |
self preferredExtentChanged. |
|
1149
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
1210 |
self invalidate. |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
1211 |
self contentsChanged |
647 | 1212 |
] |
542 | 1213 |
] |
1214 |
||
1215 |
||
1216 |
! |
|
1217 |
||
1218 |
horizontalSpacing |
|
1219 |
"horizontal spacing used by columns |
|
1220 |
" |
|
563 | 1221 |
^ horizontalSpacing |
1222 |
! |
|
1223 |
||
1224 |
horizontalSpacing:aNumber |
|
1225 |
"horizontal spacing used by columns |
|
1226 |
" |
|
1227 |
horizontalSpacing ~~ aNumber ifTrue:[ |
|
1228 |
horizontalSpacing := aNumber. |
|
1229 |
self preferredExtentChanged. |
|
1230 |
]. |
|
542 | 1231 |
! |
1232 |
||
1233 |
verticalSpacing |
|
1234 |
"vertical spacing used by columns |
|
1235 |
" |
|
563 | 1236 |
^ verticalSpacing |
1237 |
! |
|
1238 |
||
1239 |
verticalSpacing:aNumber |
|
1240 |
"vertical spacing used by columns |
|
1241 |
" |
|
1242 |
verticalSpacing ~~ aNumber ifTrue:[ |
|
1243 |
verticalSpacing := aNumber. |
|
1244 |
self preferredExtentChanged. |
|
1245 |
]. |
|
542 | 1246 |
! ! |
1247 |
||
1248 |
!DSVColumnView methodsFor:'adding & removing rows'! |
|
1249 |
||
1250 |
add:aRow |
|
618 | 1251 |
"insert row at end |
542 | 1252 |
" |
618 | 1253 |
^ self add:aRow beforeIndex:(1 + self size) |
542 | 1254 |
! |
1255 |
||
1256 |
add:aRow afterIndex:aRowNr |
|
1257 |
"add a new row after slot aRowNr and redisplay; returns nil in case |
|
618 | 1258 |
of an invalid index or the row |
542 | 1259 |
" |
1260 |
^ self add:aRow beforeIndex:(aRowNr + 1) |
|
1261 |
! |
|
1262 |
||
1263 |
add:aRow beforeIndex:aRowNr |
|
1264 |
"add a new row before slot aRowNr and redisplay; returns nil in case |
|
618 | 1265 |
of an invalid index or the row |
542 | 1266 |
" |
861 | 1267 |
self addAll:(Array with:aRow) beforeIndex:aRowNr. |
1268 |
^ aRow. |
|
1269 |
! |
|
1270 |
||
1271 |
addAll:aList beforeIndex:start |
|
1272 |
"add a collection of rows before slot start and redisplay |
|
1273 |
" |
|
1274 |
|y0 y1 yD h dH size noSel| |
|
1275 |
||
1276 |
(size := aList size) == 0 ifTrue:[ |
|
1277 |
^ self |
|
1278 |
]. |
|
1279 |
||
1280 |
self size == 0 ifTrue:[ |
|
1281 |
^ self list:aList |
|
618 | 1282 |
]. |
643 | 1283 |
|
618 | 1284 |
beDependentOfRows ifTrue:[ |
861 | 1285 |
aList do:[:aRow| aRow notNil ifTrue:[aRow addDependent:self]] |
542 | 1286 |
]. |
637 | 1287 |
|
861 | 1288 |
noSel := self numberOfSelections. |
1289 |
||
1290 |
noSel ~~ 0 ifTrue:[ |
|
1291 |
multipleSelectOk ifFalse:[ |
|
1292 |
selectedRowIndex >= start ifTrue:[ |
|
1293 |
selectedRowIndex := selectedRowIndex + size |
|
1294 |
] |
|
1295 |
] ifTrue:[ |
|
1296 |
1 to:noSel do:[:i||v| |
|
1297 |
(v := selectedRowIndex at:i) >= start ifTrue:[ |
|
1298 |
selectedRowIndex at:i put:(v + size) |
|
607 | 1299 |
] |
1300 |
] |
|
1301 |
] |
|
542 | 1302 |
]. |
861 | 1303 |
list addAll:aList beforeIndex:start. |
1304 |
self recomputeHeightOfContents. |
|
1305 |
||
1306 |
y0 := (start - 1) * rowHeight. |
|
1307 |
yD := size * rowHeight. |
|
1308 |
y1 := y0 + yD. |
|
542 | 1309 |
|
1310 |
y0 < viewOrigin y ifTrue:[ |
|
1311 |
self originWillChange. |
|
861 | 1312 |
viewOrigin y:(yD + viewOrigin y). |
1313 |
self originChanged:(0 @ yD). |
|
1314 |
]. |
|
1315 |
||
1316 |
(shown not or:[self sensor hasDamageFor:self]) ifTrue:[ |
|
1317 |
^ self contentsChanged. |
|
542 | 1318 |
]. |
645
53c78cc2ee08
redraw twice in case of expose event during adding a new entry
ca
parents:
643
diff
changeset
|
1319 |
|
861 | 1320 |
y0 := self yVisibleOfRowNr:start. |
1258 | 1321 |
h := height - margin. |
1322 |
y1 := y0 + yD min:h. |
|
1323 |
||
1324 |
(y1 > margin and:[y0 < h]) ifTrue:[ |
|
861 | 1325 |
h := h - y1. |
1326 |
y0 := y0 max:margin. |
|
1327 |
dH := y1 - y0. |
|
1328 |
||
1329 |
start == list size ifFalse:[ |
|
1330 |
self catchExpose. |
|
1331 |
||
1332 |
self copyFrom:self x:0 y:y0 |
|
1333 |
toX:0 y:y1 |
|
1334 |
width:width height:h async:true. |
|
1335 |
||
1336 |
self waitForExpose |
|
1337 |
]. |
|
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
1338 |
self invalidateX:margin y:y0 width:width - margin - margin height:dH. |
542 | 1339 |
]. |
1340 |
self contentsChanged. |
|
861 | 1341 |
|
567 | 1342 |
! |
1343 |
||
542 | 1344 |
addFirst:aRow |
618 | 1345 |
"insert a row at start |
542 | 1346 |
" |
1347 |
^ self add:aRow beforeIndex:1 |
|
1348 |
! |
|
1349 |
||
1350 |
removeFirst |
|
1351 |
"remove first row; returns the removed row |
|
1352 |
" |
|
1112 | 1353 |
^ self removeIndex:1 |
542 | 1354 |
! |
1355 |
||
861 | 1356 |
removeFrom:startIndex to:stopIndex |
1357 |
"remove rows from start to stop |
|
542 | 1358 |
" |
861 | 1359 |
|coll noRedraw |
1360 |
noSel "{ Class: SmallInteger }" |
|
1361 |
size "{ Class: SmallInteger }" |
|
1362 |
start "{ Class: SmallInteger }" |
|
1363 |
stop "{ Class: SmallInteger }" |
|
1364 |
y0 "{ Class: SmallInteger }" |
|
1365 |
y1 "{ Class: SmallInteger }" |
|
1366 |
oY "{ Class: SmallInteger }" |
|
1367 |
dY "{ Class: SmallInteger }" |
|
1368 |
yB "{ Class: SmallInteger }" |
|
1369 |
h "{ Class: SmallInteger }" |
|
1370 |
| |
|
1371 |
||
1372 |
( (start := startIndex) < 1 |
|
1373 |
or:[(stop := stopIndex) > list size] |
|
1374 |
) ifTrue:[ |
|
1375 |
^ self subscriptBoundsError:start |
|
618 | 1376 |
]. |
861 | 1377 |
size := stop - start + 1. |
1378 |
||
1379 |
beDependentOfRows ifTrue:[ |
|
1380 |
list from:start to:stop do:[:r| r notNil ifTrue:[r removeDependent:self]]. |
|
1381 |
]. |
|
1382 |
noSel := self numberOfSelections. |
|
1383 |
||
1384 |
noSel ~~ 0 ifTrue:[ |
|
1385 |
noSel == 1 ifTrue:[ |
|
1386 |
noSel := self firstIndexSelected. |
|
1387 |
||
1388 |
noSel < start ifFalse:[ |
|
1389 |
noSel > stop ifTrue:[ |
|
1390 |
noSel := noSel - size. |
|
1391 |
||
1392 |
multipleSelectOk ifFalse:[selectedRowIndex := noSel] |
|
1393 |
ifTrue:[selectedRowIndex at:1 put:noSel] |
|
1394 |
] ifFalse:[ |
|
637 | 1395 |
editValue notNil ifTrue:[ |
1396 |
editValue removeDependent:self. |
|
1397 |
editValue := nil. |
|
1398 |
]. |
|
861 | 1399 |
self deselect. |
637 | 1400 |
] |
607 | 1401 |
] |
1402 |
] ifFalse:[ |
|
861 | 1403 |
coll := OrderedCollection new:noSel. |
1404 |
||
1405 |
selectedRowIndex do:[:i| |
|
1406 |
i < start ifTrue:[ |
|
1407 |
coll add:i |
|
1408 |
] ifFalse:[ |
|
1409 |
i > stop ifTrue:[ |
|
1410 |
coll add:(i - size) |
|
1411 |
] |
|
1412 |
] |
|
1413 |
]. |
|
1414 |
coll size == 0 ifTrue:[ |
|
1415 |
self deselect |
|
1416 |
] ifFalse:[ |
|
1417 |
selectedRowIndex := coll |
|
1418 |
] |
|
542 | 1419 |
] |
1420 |
]. |
|
861 | 1421 |
list removeFrom:start to:stop. |
1422 |
||
1423 |
y0 := start - 1 * rowHeight. |
|
1424 |
dY := size * rowHeight. |
|
1425 |
y1 := dY + y0. |
|
542 | 1426 |
yB := y1 + margin - viewOrigin y. |
1427 |
self recomputeHeightOfContents. |
|
1428 |
||
1429 |
y0 < (oY := viewOrigin y) ifTrue:[ |
|
1430 |
(noRedraw := y1 <= oY) ifFalse:[dY := y0 - oY] |
|
861 | 1431 |
ifTrue:[dY := dY negated]. |
542 | 1432 |
self originWillChange. |
1433 |
viewOrigin y:(dY + oY). |
|
1434 |
self originChanged:(0 @ dY). |
|
1435 |
] ifFalse:[ |
|
1436 |
noRedraw := y0 > (height + viewOrigin y) |
|
1437 |
]. |
|
1438 |
||
1439 |
(noRedraw or:[shown not]) ifFalse:[ |
|
1440 |
y1 := yB. |
|
861 | 1441 |
y0 := self yVisibleOfRowNr:start. |
542 | 1442 |
h := height - margin - yB. |
1443 |
y0 := y0 max:margin. |
|
1444 |
||
561 | 1445 |
h > 0 ifTrue:[ |
1446 |
self catchExpose. |
|
1447 |
self copyFrom:self x:0 y:yB toX:0 y:y0 width:width height:h async:true. |
|
1448 |
self waitForExpose. |
|
1449 |
]. |
|
542 | 1450 |
y0 := y0 + h. |
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
1451 |
self invalidateX:margin y:y0 width:width - margin - margin height:(height - y0). |
542 | 1452 |
]. |
1453 |
self contentsChanged. |
|
861 | 1454 |
|
1455 |
! |
|
1456 |
||
1457 |
removeIndex:aRowNr |
|
1458 |
"remove row at an index; returns the removed row |
|
1459 |
" |
|
1460 |
|row| |
|
1461 |
||
1462 |
row := list at:aRowNr ifAbsent:nil. |
|
1463 |
self removeFrom:aRowNr to:aRowNr. |
|
1464 |
^ row |
|
542 | 1465 |
! |
1466 |
||
1467 |
removeLast |
|
1468 |
"remove last row; the row is returned |
|
1469 |
" |
|
618 | 1470 |
^ self removeIndex:self size |
542 | 1471 |
! ! |
1472 |
||
1473 |
!DSVColumnView methodsFor:'change & update'! |
|
1474 |
||
859 | 1475 |
changed:aParameter with:anArgument |
1476 |
"notify all dependents that the receiver has changed somehow. |
|
1477 |
Each dependent gets a '#update:with:from:'-message, with aParameter |
|
1478 |
and anArgument as arguments." |
|
1479 |
||
1480 |
catchChangeEvents ifTrue:[ |
|
1481 |
( aParameter == #sizeOfColumns |
|
1482 |
or:[aParameter == #columnsLayout] |
|
1483 |
) ifTrue:[ |
|
1484 |
^ self |
|
1485 |
] |
|
1486 |
]. |
|
1487 |
super changed:aParameter with:anArgument |
|
1488 |
||
1489 |
! |
|
1490 |
||
542 | 1491 |
update:something with:aParameter from:changedObject |
1492 |
"one of my rows/cells changed its value |
|
1493 |
" |
|
1227 | 1494 |
|row newValue realValue| |
542 | 1495 |
|
612 | 1496 |
changedObject == columnHolder ifTrue:[ |
1497 |
^ self columnDescriptors:(columnHolder value) |
|
622 | 1498 |
]. |
1499 |
||
1500 |
changedObject == editValue ifTrue:[ |
|
1227 | 1501 |
newValue := editValue value. |
1502 |
self selectedColumn at:(self firstIndexSelected) put:newValue. |
|
1503 |
realValue := self selectedColumn at:(self firstIndexSelected). |
|
1504 |
realValue ~= newValue ifTrue:[ |
|
1505 |
"/ some validation by the row-object; the stored value |
|
1506 |
"/ is different from what I think. |
|
1507 |
"/ update my input fields modelValue |
|
1508 |
editValue value:realValue. |
|
1509 |
]. |
|
1510 |
^ self |
|
622 | 1511 |
]. |
1512 |
||
1513 |
row := (something isNumber) ifTrue:[something] ifFalse:[changedObject]. |
|
809 | 1514 |
self redrawVisibleRow:row readSelector:aParameter. |
1515 |
||
1516 |
! ! |
|
1517 |
||
1518 |
!DSVColumnView methodsFor:'drag & drop'! |
|
1519 |
||
824 | 1520 |
canDrag |
1521 |
"returns true if dragging is enabled |
|
1522 |
" |
|
1523 |
^ dropSource notNil |
|
1524 |
||
1525 |
! |
|
1526 |
||
1527 |
dropSource |
|
1528 |
"returns the dropSource or nil |
|
809 | 1529 |
" |
824 | 1530 |
^ dropSource |
1531 |
||
1532 |
||
1533 |
! |
|
1534 |
||
1535 |
dropSource:aDropSourceOrNil |
|
1536 |
"set the dropSource or nil |
|
1537 |
" |
|
1538 |
dropSource := aDropSourceOrNil. |
|
1539 |
||
809 | 1540 |
|
1541 |
! |
|
1542 |
||
824 | 1543 |
dropTarget |
1544 |
"returns the dropTarget or nil |
|
809 | 1545 |
" |
824 | 1546 |
^ dropTarget |
1547 |
||
1548 |
! |
|
1549 |
||
1550 |
dropTarget:aDropTragetOrNil |
|
1551 |
"set the dropTarget or nil |
|
1552 |
" |
|
1553 |
dropTarget := aDropTragetOrNil. |
|
1554 |
||
1555 |
! |
|
1556 |
||
1557 |
startDragAt:aPoint |
|
1558 |
(dragIsActive not and:[dropSource notNil]) ifTrue:[ |
|
809 | 1559 |
dragIsActive := true. |
824 | 1560 |
dropSource startDragIn:self at:aPoint |
809 | 1561 |
] |
824 | 1562 |
|
542 | 1563 |
! ! |
1564 |
||
637 | 1565 |
!DSVColumnView methodsFor:'drawing'! |
1566 |
||
1567 |
colorOnDevice:aColor |
|
1568 |
"returns color on device |
|
1569 |
" |
|
1570 |
|col| |
|
1571 |
||
641 | 1572 |
aColor = Color noColor ifFalse:[ |
1573 |
col := colorMap at:aColor ifAbsent:nil. |
|
637 | 1574 |
|
641 | 1575 |
col isNil ifTrue:[ |
1576 |
colorMap at:aColor put:(col := aColor on:device) |
|
1577 |
]. |
|
1578 |
^ col |
|
637 | 1579 |
]. |
641 | 1580 |
^ bgColor |
637 | 1581 |
! |
1582 |
||
1583 |
forceRedraw |
|
1584 |
"a redraw forced by any other component |
|
1585 |
" |
|
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
1586 |
shown ifTrue:[ |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
1587 |
self invalidate |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
1588 |
] |
637 | 1589 |
! |
1590 |
||
1591 |
invalidate |
|
1592 |
"recompute extent before repair range |
|
1593 |
" |
|
1594 |
self recomputeHeightOfContents. |
|
1595 |
super invalidate. |
|
1596 |
||
1597 |
||
1598 |
! |
|
1599 |
||
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
1600 |
invalidateRowAt:aRowNr |
637 | 1601 |
"redraw total row at an index |
1602 |
" |
|
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
1603 |
self invalidateRowAt:aRowNr colAt:0 |
637 | 1604 |
! |
1605 |
||
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
1606 |
invalidateRowAt:aRowNr colAt:aColNr |
637 | 1607 |
"redraw visible row in case of aColNr == 0 or the column in a row; |
1608 |
in case that the row/column is hidden no redraw is done |
|
1609 |
" |
|
1610 |
|x y h w| |
|
1611 |
||
886 | 1612 |
aRowNr isNil ifTrue:[ |
1613 |
^ self |
|
1614 |
]. |
|
1615 |
||
637 | 1616 |
(shown and:[aRowNr between:1 and:self size]) ifTrue:[ |
1131 | 1617 |
h := rowHeight. |
637 | 1618 |
|
1619 |
(y := self yVisibleOfRowNr:aRowNr) < margin ifTrue:[ |
|
1620 |
(h := h + y) <= margin ifTrue:[ |
|
1621 |
^ self |
|
1622 |
]. "/ row not visible |
|
1623 |
h := h - margin. |
|
1624 |
y := margin. |
|
1625 |
] ifFalse:[ |
|
1626 |
y >= height ifTrue:[^ self]. |
|
1627 |
]. |
|
1628 |
aColNr ~~ 0 ifTrue:[ "/ redraw column in row |
|
1629 |
w := (self columnAt:aColNr) width. |
|
1630 |
||
1631 |
(x := self xVisibleOfColNr:aColNr) < margin ifTrue:[ |
|
1632 |
(w := w + x) <= margin ifTrue:[ |
|
1633 |
^ self |
|
1634 |
]. "/ column not visible |
|
1635 |
w := w - margin. |
|
1636 |
x := margin. |
|
1637 |
] ifFalse:[ |
|
1638 |
x >= width ifTrue:[^ self]. |
|
1639 |
] |
|
1640 |
] ifFalse:[ "/ redraw whole row |
|
1641 |
x := margin. |
|
1642 |
w := width. |
|
1643 |
]. |
|
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
1644 |
self invalidateX:x y:y width:w height:h |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
1645 |
] |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
1646 |
! |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
1647 |
|
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
1648 |
invalidateX:x y:y width:w height:h |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
1649 |
"invalidate a rectangle |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
1650 |
" |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
1651 |
shown ifTrue:[ |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
1652 |
self invalidate:(Rectangle left:x top:y width:w height:h) |
637 | 1653 |
] |
1654 |
! |
|
1655 |
||
1656 |
redrawVisibleRow:aRow |
|
1657 |
"redraw row if visible |
|
1658 |
" |
|
809 | 1659 |
self redrawVisibleRow:aRow colAt:0 |
1660 |
||
1661 |
! |
|
1662 |
||
1663 |
redrawVisibleRow:aRow colAt:aColNr |
|
1664 |
"redraw row if visible |
|
1665 |
" |
|
637 | 1666 |
|start "{ Class:SmallInteger }" |
1667 |
stop "{ Class:SmallInteger }" |
|
1668 |
| |
|
1669 |
||
1670 |
(start := self indexOfFirstRowShown) ~~ 0 ifTrue:[ |
|
1671 |
stop := (start + (height // rowHeight)) min:(self size). |
|
1672 |
||
1673 |
aRow isNumber ifTrue:[ |
|
1674 |
(aRow between:start and:stop) ifTrue:[ |
|
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
1675 |
self invalidateRowAt:aRow colAt:aColNr |
637 | 1676 |
] |
1677 |
] ifFalse:[ |
|
1678 |
start to:stop do:[:i| |
|
1679 |
(self at:i) == aRow ifTrue:[ |
|
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
1680 |
^ self invalidateRowAt:i colAt:aColNr |
637 | 1681 |
] |
1682 |
] |
|
1683 |
] |
|
1684 |
] |
|
809 | 1685 |
|
1686 |
||
1687 |
! |
|
1688 |
||
1689 |
redrawVisibleRow:aRow readSelector:aSelector |
|
1690 |
"redraw a column identified by its read selector; if no column with |
|
1691 |
the specified read selector is detected, the whole line is drawn. |
|
1692 |
" |
|
1693 |
|row idx| |
|
1694 |
||
1695 |
aSelector isNil ifTrue:[ |
|
1696 |
idx := 0 |
|
1697 |
] ifFalse:[ |
|
1698 |
(row := aRow) isNumber ifTrue:[ |
|
1699 |
(row := self at:aRow) isNil ifTrue:[ ^ self ] |
|
1700 |
]. |
|
1701 |
idx := columnDescriptors findFirst:[:aCol||desc| |
|
1702 |
aCol description readSelector == aSelector |
|
1703 |
] |
|
1704 |
]. |
|
1705 |
self redrawVisibleRow:aRow colAt:idx |
|
1706 |
||
1707 |
||
1708 |
||
1709 |
||
637 | 1710 |
! |
1711 |
||
1712 |
redrawX:x y:y width:w height:h |
|
1713 |
"redraw part of myself immediately, given logical coordinates |
|
1714 |
" |
|
1112 | 1715 |
|c0 savClip rctg |
1149
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
1716 |
start "{ Class:SmallInteger }" |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
1717 |
stop "{ Class:SmallInteger }" |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
1718 |
x0 "{ Class:SmallInteger }" |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
1719 |
x1 "{ Class:SmallInteger }" |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
1720 |
maxX "{ Class:SmallInteger }" |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
1721 |
yTop "{ Class:SmallInteger }" |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
1722 |
yBot "{ Class:SmallInteger }" |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
1723 |
clHg "{ Class:SmallInteger }" |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
1724 |
size "{ Class:SmallInteger }" |
637 | 1725 |
| |
1726 |
||
1727 |
shown ifFalse:[^ self]. |
|
1728 |
self paint:bgColor. |
|
1115 | 1729 |
|
1730 |
columnDescriptors isEmpty ifTrue:[ |
|
1731 |
^ self fillRectangleX:x y:y width:w height:h |
|
1732 |
]. |
|
1131 | 1733 |
size := list size. |
1115 | 1734 |
yTop := margin - viewOrigin y. |
1735 |
c0 := y - yTop max:0. |
|
1736 |
start := (c0 // rowHeight) + 1. |
|
1131 | 1737 |
stop := (c0 + h - 1 // rowHeight + 1) min:size. |
1115 | 1738 |
|
1739 |
stop < start ifTrue:[ |
|
1740 |
^ self fillRectangleX:x y:y width:w height:h |
|
1741 |
]. |
|
1742 |
savClip := clipRect. |
|
1149
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
1743 |
|
1115 | 1744 |
maxX := (x + w) min:(width - margin). |
1745 |
x0 := margin - viewOrigin x. |
|
1746 |
yTop := yTop + ((start - 1) * rowHeight). |
|
1747 |
rctg := Rectangle left:x top:y width:w height:h. |
|
1131 | 1748 |
clHg := (stop - start + 1) * rowHeight. |
1749 |
yBot := yTop + clHg. |
|
1750 |
||
1751 |
columnDescriptors do:[:aCol| |
|
1115 | 1752 |
x1 := x0 + aCol width. |
1753 |
||
1754 |
(x1 > x and:[x0 < maxX]) ifTrue:[ |
|
1755 |
rctg width:((x1 min:maxX) - x). |
|
1756 |
clipRect := nil. |
|
1757 |
self clippingRectangle:rctg. |
|
1131 | 1758 |
aCol redrawX:x0 y:yTop h:clHg from:start to:stop. |
1115 | 1759 |
]. |
1760 |
x0 := x1 |
|
1761 |
]. |
|
1131 | 1762 |
|
1763 |
"/ restore old clipping rectangle |
|
1115 | 1764 |
self clippingRectangle:savClip. |
1131 | 1765 |
|
1766 |
stop == size ifTrue:[ |
|
1115 | 1767 |
yTop := y + h. |
1768 |
yBot < (yTop - margin) ifTrue:[ |
|
1149
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
1769 |
"/ clear to bottom of screen |
1115 | 1770 |
self paint:bgColor. |
1149
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
1771 |
self fillRectangleX:x y:yBot width:w height:(yTop - yBot). |
1112 | 1772 |
] |
1136 | 1773 |
]. |
1774 |
||
1149
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
1775 |
(c0 := w + x- x1) > 0 ifTrue:[ |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
1776 |
"/ clear to right of screen |
1136 | 1777 |
self paint:bgColor. |
1778 |
self fillRectangleX:x1 y:y width:c0 height:h. |
|
1779 |
]. |
|
1149
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
1780 |
|
1112 | 1781 |
! ! |
1782 |
||
1783 |
!DSVColumnView methodsFor:'drawing interactors'! |
|
1784 |
||
1131 | 1785 |
drawCheckToggleAtX:xTop y:yTop w:rowWidth state:aState |
1112 | 1786 |
"draw a check toggle button |
1787 |
" |
|
1788 |
|e form |
|
1789 |
y "{ Class:SmallInteger }" |
|
1790 |
x "{ Class:SmallInteger }" |
|
1791 |
h "{ Class:SmallInteger }" |
|
1792 |
w "{ Class:SmallInteger }" |
|
1793 |
| |
|
1794 |
w := checkToggleExtent x. |
|
1795 |
h := checkToggleExtent y. |
|
1796 |
y := yTop + (rowHeight - h // 2). |
|
1797 |
x := xTop + (rowWidth - w // 2). |
|
1798 |
||
1799 |
(form := checkToggleActiveImage) isNil ifTrue:[ |
|
1131 | 1800 |
self paint:bgColor. |
1801 |
self fillRectangleX:x y:y width:w height:h. |
|
1802 |
self drawEdgesAtX:x y:y width:w height:h level:checkToggleLevel on:self. |
|
1803 |
||
1112 | 1804 |
aState ifFalse:[ |
1805 |
^ self |
|
1806 |
]. |
|
1149
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
1807 |
self paint:fgColor on:bgColor. |
1112 | 1808 |
form := checkToggleForm |
1809 |
] ifFalse:[ |
|
1810 |
aState ifFalse:[form := checkTogglePassiveImage] |
|
859 | 1811 |
]. |
1112 | 1812 |
e := (checkToggleExtent - form extent) // 2. |
1813 |
self displayForm:form x:(x + e x) y:(y + e y). |
|
1814 |
||
1815 |
||
1816 |
||
1817 |
||
1818 |
||
1819 |
! |
|
1820 |
||
1131 | 1821 |
drawComboButtonAtX:xTop y:yTop w:rowWidth |
1112 | 1822 |
"draw a combo button |
1823 |
" |
|
1824 |
|e |
|
1825 |
x "{ Class:SmallInteger }" |
|
1826 |
y "{ Class:SmallInteger }" |
|
1827 |
h "{ Class:SmallInteger }" |
|
1828 |
w "{ Class:SmallInteger }" |
|
1829 |
| |
|
1830 |
w := comboButtonExtent x. |
|
1831 |
h := comboButtonExtent y. |
|
1832 |
y := yTop + (rowHeight - h // 2). |
|
1149
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
1833 |
x := xTop + (rowWidth - w - separatorSize - 1). |
1112 | 1834 |
e := (comboButtonExtent - comboButtonForm extent) // 2. |
1835 |
||
1131 | 1836 |
self paint:bgColor. |
1837 |
self fillRectangleX:x y:y width:w height:h. |
|
1838 |
self drawEdgesAtX:x y:y width:w height:h level:comboButtonLevel on:self. |
|
1136 | 1839 |
self paint:fgColor on:bgColor. |
1112 | 1840 |
self displayForm:comboButtonForm x:(x + e x) y:(y + e y) |
1841 |
||
1842 |
! |
|
1843 |
||
1844 |
drawEdgesAtX:x y:y width:w height:h level:aLevel on:aGC |
|
1845 |
"draw edges for a cell or label |
|
1846 |
" |
|
1847 |
aGC drawEdgesForX:x |
|
1848 |
y:y |
|
1849 |
width:w |
|
1850 |
height:h |
|
1851 |
level:aLevel |
|
1852 |
shadow:buttonShadowColor |
|
1853 |
light:buttonLightColor |
|
1854 |
halfShadow:buttonHalfShadowColor |
|
1855 |
halfLight:buttonHalfLightColor |
|
1856 |
style:ButtonEdgeStyle. |
|
1857 |
||
637 | 1858 |
! ! |
1859 |
||
542 | 1860 |
!DSVColumnView methodsFor:'enumerating columns'! |
1861 |
||
1862 |
columnsDo:aOneArgBlock |
|
1863 |
"evaluate the argument, aOneArgBlock for every column |
|
1864 |
" |
|
1865 |
columnDescriptors do:aOneArgBlock |
|
1866 |
||
1867 |
||
1868 |
! |
|
1869 |
||
1870 |
columnsFrom:start to:stop do:aOneArgBlock |
|
1871 |
"evaluate the argument, aOneArgBlock for the columns with index start to |
|
1872 |
stop in the collection of column descriptors |
|
1873 |
" |
|
1874 |
columnDescriptors from:start to:stop do:aOneArgBlock |
|
1875 |
||
1876 |
||
1877 |
! ! |
|
1878 |
||
1879 |
!DSVColumnView methodsFor:'event handling'! |
|
1880 |
||
607 | 1881 |
buttonMotion:buttonMask x:x y:y |
1882 |
"mouse-move while button was pressed - handle multiple selection changes |
|
1883 |
" |
|
991 | 1884 |
|idx scr p| |
607 | 1885 |
|
809 | 1886 |
dragAccessPoint notNil ifTrue:[ |
1887 |
dragIsActive ifFalse:[ |
|
824 | 1888 |
p := x @ y. |
1889 |
(clickPosition dist:p) > 5.0 ifTrue:[ self startDragAt:p ] |
|
809 | 1890 |
]. |
1891 |
^ self |
|
1892 |
]. |
|
607 | 1893 |
self sensor ctrlDown ifTrue:[^ self ]. |
1894 |
||
1895 |
(multipleSelectOk and:[selectedColIndex == 0 and:[selectedRowIndex notNil]]) ifFalse:[ |
|
1896 |
^ self |
|
1897 |
]. |
|
1898 |
"is it the select or 1-button ?" |
|
1899 |
||
1023
59c1888ca494
use another left-button-down test in #buttonMotion.
Claus Gittinger <cg@exept.de>
parents:
1008
diff
changeset
|
1900 |
self sensor leftButtonPressed ifFalse:[^ self]. |
59c1888ca494
use another left-button-down test in #buttonMotion.
Claus Gittinger <cg@exept.de>
parents:
1008
diff
changeset
|
1901 |
"/ (device buttonMotionMask:buttonMask includesButton:#select) ifFalse:[ |
59c1888ca494
use another left-button-down test in #buttonMotion.
Claus Gittinger <cg@exept.de>
parents:
1008
diff
changeset
|
1902 |
"/ (device buttonMotionMask:buttonMask includesButton:1) ifFalse:[ |
59c1888ca494
use another left-button-down test in #buttonMotion.
Claus Gittinger <cg@exept.de>
parents:
1008
diff
changeset
|
1903 |
"/ ^ self |
59c1888ca494
use another left-button-down test in #buttonMotion.
Claus Gittinger <cg@exept.de>
parents:
1008
diff
changeset
|
1904 |
"/ ]. |
59c1888ca494
use another left-button-down test in #buttonMotion.
Claus Gittinger <cg@exept.de>
parents:
1008
diff
changeset
|
1905 |
"/ ]. |
607 | 1906 |
scr := 0. |
1907 |
||
1908 |
y > height ifTrue:[ |
|
1909 |
scr := rowHeight. |
|
1910 |
idx := self yVisibleToRowNr:(height + rowHeight). |
|
1911 |
] ifFalse:[ |
|
1912 |
y < 0 ifTrue:[ |
|
1913 |
scr := rowHeight negated. |
|
1914 |
idx := self yVisibleToRowNr:scr. |
|
1915 |
] ifFalse:[ |
|
1916 |
idx := self yVisibleToRowNr:y. |
|
1917 |
] |
|
1918 |
]. |
|
643 | 1919 |
(idx isNil or:[idx < 1 or:[self isInSelection:idx]]) ifTrue:[ |
607 | 1920 |
^ self |
1921 |
]. |
|
1922 |
selectedRowIndex := selectedRowIndex asOrderedCollection. |
|
643 | 1923 |
|
1924 |
clickPosition notNil ifTrue:[ |
|
1925 |
(clickPosition - idx) abs > 1 ifTrue:[|s e| |
|
1926 |
clickPosition < idx ifTrue:[ |
|
1927 |
s := clickPosition + 1. |
|
1928 |
e := idx - 1. |
|
1929 |
] ifFalse:[ |
|
1930 |
s := idx + 1. |
|
1931 |
e := clickPosition - 1. |
|
1932 |
]. |
|
1933 |
s to:e do:[:i| |
|
1934 |
(self isInSelection:i) ifFalse:[ |
|
1935 |
selectedRowIndex add:i. |
|
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
1936 |
self invalidateRowAt:i colAt:0. |
643 | 1937 |
] |
1938 |
] |
|
1939 |
] |
|
1940 |
]. |
|
1941 |
selectedRowIndex add:(clickPosition := idx). |
|
607 | 1942 |
|
1943 |
scr == 0 ifTrue:[ |
|
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
1944 |
self invalidateRowAt:idx colAt:0. |
607 | 1945 |
] ifFalse:[ |
1946 |
self scrollTo:(viewOrigin + (0 @ scr)) redraw:true |
|
1947 |
]. |
|
1023
59c1888ca494
use another left-button-down test in #buttonMotion.
Claus Gittinger <cg@exept.de>
parents:
1008
diff
changeset
|
1948 |
|
59c1888ca494
use another left-button-down test in #buttonMotion.
Claus Gittinger <cg@exept.de>
parents:
1008
diff
changeset
|
1949 |
"Modified: / 28.7.1998 / 16:01:11 / cg" |
607 | 1950 |
! |
1951 |
||
542 | 1952 |
buttonMultiPress:button x:x y:y |
1953 |
"a button was pressed twice - handle doubleclick here |
|
1954 |
" |
|
1955 |
((button == 1) or:[button == #select]) ifFalse:[ |
|
1956 |
^ super buttonMultiPress:button x:x y:y |
|
1957 |
]. |
|
607 | 1958 |
self numberOfSelections == 1 ifTrue:[ |
1959 |
self firstIndexSelected == (self yVisibleToRowNr:y) ifTrue:[ |
|
1960 |
( selectedColIndex == 0 |
|
1961 |
or:[selectedColIndex == (self xVisibleToColNr:x)] |
|
1962 |
) ifTrue:[ |
|
1963 |
self doubleClicked |
|
1964 |
] |
|
542 | 1965 |
] |
1966 |
] |
|
1967 |
||
1968 |
||
1969 |
||
1970 |
||
1971 |
! |
|
1972 |
||
1973 |
buttonPress:button x:x y:y |
|
1974 |
"a button was pressed - handle selection here |
|
1975 |
" |
|
991 | 1976 |
|rowNr colNr menu sz| |
542 | 1977 |
|
809 | 1978 |
clickPosition := nil. |
1979 |
dragAccessPoint := nil. |
|
1980 |
dragIsActive := false. |
|
1981 |
||
667 | 1982 |
((button == 2) or:[button == #menu]) ifTrue:[ |
1983 |
(menu := self findMenuForSelection) notNil ifTrue:[ |
|
1984 |
^ menu startUp |
|
1985 |
] |
|
1986 |
] ifFalse:[ |
|
1987 |
( (button == 1 or:[button == #select]) |
|
1988 |
and:[(rowNr := self yVisibleToRowNr:y) notNil |
|
1989 |
and:[(colNr := self xVisibleToColNr:x) notNil]] |
|
1990 |
) ifTrue:[ |
|
1991 |
(multipleSelectOk not or:[self sensor ctrlDown not]) ifFalse:[ |
|
1992 |
selectedColIndex ~~ 0 ifTrue:[ |
|
1993 |
colNr := 0 |
|
1994 |
] ifFalse:[ |
|
1995 |
(sz := self numberOfSelections == 0) ifFalse:[ |
|
1996 |
(self isInSelection:rowNr) ifTrue:[ |
|
1997 |
sz == 1 ifTrue:[ |
|
1998 |
self selectColIndex:0 rowIndex:nil. |
|
1999 |
^ self sensor flushMotionEventsFor:self. |
|
2000 |
]. |
|
2001 |
selectedRowIndex remove:rowNr. |
|
2002 |
] ifFalse:[ |
|
2003 |
selectedRowIndex add:rowNr |
|
2004 |
]. |
|
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2005 |
self invalidateRowAt:rowNr. |
667 | 2006 |
self selectionChanged. |
2007 |
^ self sensor flushMotionEventsFor:self. |
|
607 | 2008 |
] |
667 | 2009 |
] |
2010 |
]. |
|
824 | 2011 |
(self canDrag and:[self isSelected:rowNr inColumn:colNr]) ifTrue:[ |
2012 |
clickPosition := x @ y. |
|
809 | 2013 |
dragAccessPoint := (colNr @ rowNr). |
2014 |
] ifFalse:[ |
|
2015 |
self selectRowAt:rowNr colAt:colNr atPoint:(x @ y) |
|
667 | 2016 |
]. |
2017 |
^ self |
|
542 | 2018 |
] |
2019 |
]. |
|
667 | 2020 |
super buttonPress:button x:x y:y |
2021 |
||
542 | 2022 |
|
2023 |
||
2024 |
! |
|
2025 |
||
643 | 2026 |
buttonRelease:button x:x y:y |
2027 |
||
2028 |
clickPosition notNil ifTrue:[ |
|
809 | 2029 |
dragAccessPoint notNil ifTrue:[ |
2030 |
dragIsActive ifFalse:[ |
|
2031 |
self selectRowAt:(dragAccessPoint y) |
|
2032 |
colAt:(dragAccessPoint x) |
|
2033 |
atPoint:clickPosition |
|
2034 |
]. |
|
2035 |
dragAccessPoint := nil. |
|
824 | 2036 |
dragIsActive := false. |
809 | 2037 |
] ifFalse:[ |
2038 |
self selectionChanged |
|
2039 |
]. |
|
643 | 2040 |
clickPosition := nil. |
2041 |
]. |
|
2042 |
super buttonRelease:button x:x y:y |
|
2043 |
||
2044 |
||
2045 |
! |
|
2046 |
||
809 | 2047 |
characterPress:aChar x:x y:y |
2048 |
"search row in column at x/y starting its printable label with cahracter. |
|
2049 |
" |
|
2050 |
|colNr rowNr lsize found column| |
|
2051 |
||
872
ad92183a6e6b
pass unhandled keys up (for focus control)
Claus Gittinger <cg@exept.de>
parents:
861
diff
changeset
|
2052 |
(rowIfAbsentBlock notNil |
896
aa07612a7c04
care for redirected messages in characterPress:
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
2053 |
or:[x isNil |
aa07612a7c04
care for redirected messages in characterPress:
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
2054 |
or:[(colNr := self xVisibleToColNr:x) isNil]]) ifTrue:[ |
809 | 2055 |
^ self |
2056 |
]. |
|
2057 |
rowNr := self lastIndexSelected. |
|
2058 |
lsize := self size. |
|
2059 |
column := self columnAt:colNr. |
|
2060 |
found := 0. |
|
2061 |
||
2062 |
lsize > rowNr ifTrue:[ |
|
2063 |
"/ search to end |
|
2064 |
found := column findRowNrStartingWithChar:aChar start:(rowNr + 1) stop:lsize. |
|
2065 |
]. |
|
2066 |
||
2067 |
(found == 0 and:[rowNr > 1]) ifTrue:[ |
|
2068 |
"/ search from begin |
|
2069 |
found := column findRowNrStartingWithChar:aChar start:1 stop:(rowNr - 1) |
|
2070 |
]. |
|
2071 |
found ~~ 0 ifTrue:[ |
|
2072 |
self selectColIndex:colNr rowIndex:found. |
|
2073 |
]. |
|
2074 |
||
896
aa07612a7c04
care for redirected messages in characterPress:
Claus Gittinger <cg@exept.de>
parents:
892
diff
changeset
|
2075 |
"Modified: / 21.5.1998 / 03:30:22 / cg" |
809 | 2076 |
! |
2077 |
||
542 | 2078 |
contentsChanged |
2079 |
"contents changed - move origin up if possible |
|
2080 |
" |
|
2081 |
|y| |
|
2082 |
||
2083 |
shown ifTrue:[ |
|
2084 |
self recomputeHeightOfContents. |
|
2085 |
y := self maxViewOriginY. |
|
2086 |
||
2087 |
viewOrigin y > y ifTrue:[ |
|
2088 |
self scrollTo:(viewOrigin x @ y) |
|
2089 |
] ifFalse:[ |
|
2090 |
self updateEditViewOrigin. |
|
2091 |
] |
|
2092 |
]. |
|
2093 |
super contentsChanged |
|
2094 |
||
2095 |
||
2096 |
! |
|
2097 |
||
2098 |
doubleClicked |
|
2099 |
"handle a double click |
|
2100 |
" |
|
637 | 2101 |
|col sel idx| |
2102 |
||
2103 |
self hasSelection ifTrue:[ |
|
2104 |
idx := self firstIndexSelected. |
|
2105 |
col := self selectedColumn. |
|
2106 |
(col notNil and:[(sel := col doubleClickedSelector) notNil]) ifTrue:[ |
|
2107 |
(self at:idx) perform:sel |
|
2108 |
] ifFalse:[ |
|
2109 |
doubleClickActionBlock notNil ifTrue:[ |
|
2110 |
doubleClickActionBlock value:idx |
|
2111 |
] |
|
2112 |
] |
|
2113 |
] |
|
542 | 2114 |
! |
2115 |
||
667 | 2116 |
findMenuForSelection |
2117 |
"find the middle button menu for the current selection; returns the menu or nil |
|
2118 |
" |
|
2119 |
|col row menu| |
|
2120 |
||
2121 |
self numberOfSelections == 1 ifTrue:[ |
|
2122 |
row := self at:(self firstIndexSelected). |
|
2123 |
col := self selectedColumn. |
|
2124 |
||
2125 |
(col notNil and:[(menu := col menuForRow:row) notNil]) ifTrue:[ |
|
2126 |
^ menu |
|
2127 |
]. |
|
2128 |
col := columnDescriptors detect:[:c| c rendererType == #rowSelector] |
|
2129 |
ifNone:[nil]. |
|
2130 |
||
2131 |
col notNil ifTrue:[ |
|
1223
176702811314
kludge: when asking for an itemMenu, pass application to
tm
parents:
1215
diff
changeset
|
2132 |
^ col menuForRow:row inApplication:(self application) |
667 | 2133 |
] |
2134 |
]. |
|
2135 |
^ nil |
|
2136 |
! |
|
2137 |
||
1111 | 2138 |
keyPress:aKey x:x y:y |
542 | 2139 |
"a key was pressed - handle page-keys here |
2140 |
" |
|
2141 |
<resource: #keyboard (#PreviousPage #NextPage #HalfPageUp #HalfPageDown |
|
809 | 2142 |
#BeginOfText #EndOfText #ScrollUp #ScrollDown |
542 | 2143 |
#CursorUp #CursorDown #CursorRight #CursorLeft)> |
2144 |
||
1416 | 2145 |
|sensor n max idx selRowNr key column isTab listSize noSel| |
1111 | 2146 |
|
2147 |
(sensor := self sensor) isNil ifTrue:[ |
|
2148 |
^ self |
|
542 | 2149 |
]. |
1416 | 2150 |
(listSize := list size) == 0 ifTrue:[ |
2151 |
^ super keyPress:aKey x:x y:y |
|
2152 |
]. |
|
1111 | 2153 |
|
2154 |
(aKey == #PreviousPage) ifTrue:[^ self pageUp]. |
|
2155 |
(aKey == #NextPage) ifTrue:[^ self pageDown]. |
|
2156 |
(aKey == #HalfPageUp) ifTrue:[^ self halfPageUp]. |
|
2157 |
(aKey == #HalfPageDown) ifTrue:[^ self halfPageDown]. |
|
2158 |
(aKey == #BeginOfText) ifTrue:[^ self scrollToTop]. |
|
2159 |
(aKey == #EndOfText) ifTrue:[^ self scrollToBottom]. |
|
2160 |
(aKey isCharacter) ifTrue:[^ self characterPress:aKey x:x y:y ]. |
|
2161 |
||
2162 |
(aKey == #ScrollUp or:[aKey == #ScrollDown]) ifTrue:[ |
|
2163 |
n := (1 + (sensor compressKeyPressEventsWithKey:aKey)) * self verticalScrollStep. |
|
1416 | 2164 |
aKey == #ScrollUp ifTrue:[self scrollUp:n] ifFalse:[self scrollDown:n]. |
2165 |
^ self |
|
542 | 2166 |
]. |
1111 | 2167 |
|
2168 |
aKey == #Return ifTrue:[ |
|
1416 | 2169 |
self numberOfSelections == 1 ifTrue:[self doubleClicked]. |
2170 |
^ self |
|
542 | 2171 |
]. |
1111 | 2172 |
|
1416 | 2173 |
selRowNr := self firstIndexSelected. |
2174 |
n := 1 + (sensor compressKeyPressEventsWithKey:aKey). |
|
1111 | 2175 |
(aKey == #CursorUp or:[aKey == #CursorDown]) ifTrue:[ |
1416 | 2176 |
selRowNr == 0 ifTrue:[ |
2177 |
n := aKey == #CursorUp ifTrue:[listSize] ifFalse:[1] |
|
2178 |
] ifFalse:[ |
|
2179 |
n := (n \\ listSize) max:1. |
|
2180 |
||
1111 | 2181 |
aKey == #CursorUp ifTrue:[ |
1416 | 2182 |
(n := selRowNr - n) <= 0 ifTrue:[n := listSize + n] |
1111 | 2183 |
] ifFalse:[ |
1416 | 2184 |
(n := selRowNr + n) > listSize ifTrue:[n := n - listSize] |
2185 |
] |
|
542 | 2186 |
]. |
1416 | 2187 |
^ self selectColIndex:selectedColIndex rowIndex:n |
1111 | 2188 |
]. |
1416 | 2189 |
(isTab := aKey includesString:'Tab') ifTrue:[ |
2190 |
key := (sensor shiftDown or:[aKey includesString:'Left']) ifTrue:[#CursorLeft] |
|
2191 |
ifFalse:[#CursorRight] |
|
1111 | 2192 |
] ifFalse:[ |
1416 | 2193 |
(aKey == #focusPrevious or:[aKey == #focusNext]) ifTrue:[ |
2194 |
isTab := true. |
|
2195 |
key := aKey == #focusPrevious ifTrue:[#CursorLeft] ifFalse:[#CursorRight] |
|
2196 |
] ifFalse:[ |
|
2197 |
(aKey == #CursorRight or:[aKey == #CursorLeft]) ifFalse:[ |
|
2198 |
^ super keyPress:aKey x:x y:y |
|
2199 |
]. |
|
2200 |
key := aKey |
|
2201 |
] |
|
542 | 2202 |
]. |
1416 | 2203 |
max := self numberOfColumns. |
2204 |
selRowNr == 0 ifTrue:[selRowNr := 1]. |
|
2205 |
||
2206 |
(idx := selectedColIndex) == 0 ifTrue:[ |
|
2207 |
idx := key == #CursorRight ifTrue:[0] ifFalse:[max + 1] |
|
612 | 2208 |
]. |
2209 |
||
1111 | 2210 |
key == #CursorLeft ifTrue:[ |
2211 |
[n ~~ 0] whileTrue:[ |
|
2212 |
(idx := idx - 1) == 0 ifTrue:[ |
|
1416 | 2213 |
(isTab and:[(selRowNr := selRowNr - 1) == 0]) ifTrue:[ |
2214 |
tabAtStartAction notNil ifTrue:[ |
|
2215 |
tabAtStartAction value |
|
2216 |
] ifFalse:[ |
|
2217 |
self windowGroup focusPreviousFrom:self |
|
2218 |
]. |
|
2219 |
^ self |
|
1111 | 2220 |
]. |
2221 |
idx := max |
|
2222 |
]. |
|
2223 |
column := self columnAt:idx. |
|
1416 | 2224 |
|
1111 | 2225 |
(column rendererType ~~ #rowSelector and:[column canSelect:selRowNr]) ifTrue:[ |
2226 |
n := n - 1 |
|
542 | 2227 |
] |
1111 | 2228 |
] |
2229 |
] ifFalse:[ |
|
2230 |
[n ~~ 0] whileTrue:[ |
|
2231 |
(idx := idx + 1) > max ifTrue:[ |
|
1416 | 2232 |
(isTab and:[(selRowNr := selRowNr + 1) > listSize]) ifTrue:[ |
2233 |
tabAtEndAction notNil ifTrue:[ |
|
2234 |
tabAtEndAction value |
|
2235 |
] ifFalse:[ |
|
2236 |
self windowGroup focusNextFrom:self |
|
2237 |
]. |
|
2238 |
^ self |
|
1111 | 2239 |
]. |
2240 |
idx := 1 |
|
2241 |
]. |
|
2242 |
column := self columnAt:idx. |
|
1416 | 2243 |
|
1111 | 2244 |
(column rendererType ~~ #rowSelector and:[column canSelect:selRowNr]) ifTrue:[ |
2245 |
n := n - 1 |
|
2246 |
] |
|
2247 |
] |
|
542 | 2248 |
]. |
1111 | 2249 |
self selectColIndex:idx rowIndex:selRowNr. |
2250 |
||
2251 |
||
1416 | 2252 |
|
542 | 2253 |
! |
2254 |
||
2255 |
originChanged:delta |
|
2256 |
"this one is sent, after the origin of my contents has changed - |
|
2257 |
tell dependents (i.e. scrollers) about this |
|
2258 |
" |
|
2259 |
super originChanged:delta. |
|
2260 |
self updateEditViewOrigin. |
|
2261 |
! |
|
2262 |
||
2263 |
sizeChanged:how |
|
2264 |
"size changed - move origin up if possible |
|
2265 |
" |
|
2266 |
super sizeChanged:how. |
|
2267 |
||
2268 |
(shown and:[self numberOfColumns ~~ 0 and:[self fitColumns not]]) ifTrue:[ |
|
2269 |
self scrollTo:viewOrigin. "/ validates viewOrigin |
|
2270 |
self invalidate. |
|
2271 |
self scrollToSelection |
|
2272 |
] |
|
2273 |
||
2274 |
! ! |
|
2275 |
||
2276 |
!DSVColumnView methodsFor:'gc operations'! |
|
2277 |
||
1100 | 2278 |
imageOnDevice:anImage |
2279 |
"associate image to device and clear pixel mask; returns the new image. |
|
2280 |
" |
|
2281 |
|image| |
|
2282 |
||
2283 |
(image := anImage) notNil ifTrue:[ |
|
2284 |
image device ~~ device ifTrue:[ |
|
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2285 |
image := image copy onDevice:device. |
1100 | 2286 |
]. |
2287 |
image isImage ifTrue:[ |
|
2288 |
image := image clearMaskedPixels |
|
2289 |
] |
|
2290 |
]. |
|
2291 |
^ image |
|
2292 |
||
2293 |
! |
|
2294 |
||
542 | 2295 |
registerImage:anImage key:aKey |
2296 |
"any row can register an image with a unique identifier a key symbol |
|
2297 |
" |
|
2298 |
|img| |
|
2299 |
||
2300 |
(img := registererImages at:aKey ifAbsent:nil) notNil ifTrue:[ |
|
2301 |
^ img |
|
2302 |
]. |
|
1112 | 2303 |
img := self imageOnDevice:anImage. |
567 | 2304 |
registererImages at:aKey put:img. |
2305 |
^ img |
|
542 | 2306 |
! |
2307 |
||
2308 |
registeredImageAt:aKey |
|
2309 |
"any row can register an image with a unique identifier |
|
2310 |
" |
|
2311 |
^ registererImages at:aKey ifAbsent:nil |
|
2312 |
! |
|
2313 |
||
2314 |
releaseAllRegisteredImages |
|
2315 |
"release all registered images |
|
2316 |
" |
|
2317 |
registererImages := IdentityDictionary new. |
|
2318 |
! ! |
|
2319 |
||
1326 | 2320 |
!DSVColumnView methodsFor:'initialize / release'! |
542 | 2321 |
|
2322 |
create |
|
607 | 2323 |
"set color on device |
542 | 2324 |
" |
2325 |
super create. |
|
2326 |
fgColor := fgColor on:device. |
|
2327 |
bgColor := bgColor on:device. |
|
2328 |
hgLgFgColor := hgLgFgColor on:device. |
|
2329 |
hgLgBgColor := hgLgBgColor on:device. |
|
809 | 2330 |
|
2331 |
buttonShadowColor := buttonShadowColor on:device. |
|
2332 |
buttonLightColor := buttonLightColor on:device. |
|
2333 |
||
2334 |
buttonHalfShadowColor notNil ifTrue:[ |
|
2335 |
buttonHalfShadowColor := buttonHalfShadowColor on:device |
|
2336 |
]. |
|
2337 |
||
2338 |
buttonHalfLightColor notNil ifTrue:[ |
|
2339 |
buttonHalfLightColor := buttonHalfLightColor on:device |
|
2340 |
]. |
|
1100 | 2341 |
rowSelectorForm := self imageOnDevice:rowSelectorForm. |
2342 |
checkToggleActiveImage := self imageOnDevice:checkToggleActiveImage. |
|
2343 |
checkTogglePassiveImage := self imageOnDevice:checkTogglePassiveImage. |
|
2344 |
comboButtonForm := self imageOnDevice:comboButtonForm. |
|
2345 |
checkToggleForm := self imageOnDevice:checkToggleForm. |
|
2346 |
||
2347 |
||
542 | 2348 |
! |
2349 |
||
2350 |
destroy |
|
2351 |
"remove dependencies |
|
2352 |
" |
|
618 | 2353 |
self columnHolder:nil. |
2354 |
self beDependentOfRows:false. |
|
542 | 2355 |
super destroy |
2356 |
! |
|
2357 |
||
2358 |
initStyle |
|
607 | 2359 |
"setup colors |
2360 |
" |
|
1100 | 2361 |
|button widget| |
809 | 2362 |
|
542 | 2363 |
super initStyle. |
2364 |
||
2365 |
DefaultForegroundColor isNil ifTrue:[ |
|
2366 |
self class updateStyleCache |
|
2367 |
]. |
|
2368 |
fgColor := DefaultForegroundColor. |
|
2369 |
bgColor := DefaultBackgroundColor. |
|
2370 |
hgLgFgColor := DefaultHilightForegroundColor. |
|
2371 |
hgLgBgColor := DefaultHilightBackgroundColor. |
|
809 | 2372 |
|
2373 |
shadowColor isNil ifTrue:[ |
|
2374 |
shadowColor := Color grayPercent:40. |
|
2375 |
]. |
|
2376 |
||
2377 |
lightColor isNil ifTrue:[ |
|
2378 |
lightColor := Color grayPercent:75 |
|
2379 |
]. |
|
2380 |
||
2381 |
buttonLightColor := ButtonLightColor ? lightColor. |
|
2382 |
buttonShadowColor := ButtonShadowColor ? shadowColor. |
|
2383 |
||
2384 |
(ButtonEdgeStyle == #soft) ifTrue:[ |
|
2385 |
buttonHalfShadowColor := ButtonHalfShadowColor. |
|
2386 |
buttonHalfLightColor := ButtonHalfLightColor. |
|
2387 |
||
2388 |
buttonHalfShadowColor isNil ifTrue:[ |
|
2389 |
buttonHalfShadowColor := buttonShadowColor lightened |
|
2390 |
] |
|
2391 |
]. |
|
1100 | 2392 |
rowSelectorForm := self class rowSelector. |
2393 |
checkToggleActiveImage := CheckToggleActiveImage. |
|
2394 |
checkTogglePassiveImage := CheckTogglePassiveImage. |
|
2395 |
||
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2396 |
ComboButtonForm isNil ifTrue:[ |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2397 |
widget := ComboListView new. |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2398 |
button := widget menuButton. |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2399 |
ComboButtonForm := button label. |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2400 |
ComboButtonLevel := button offLevel. |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2401 |
ComboButtonExtent := (button preferredExtent x) @ (widget preferredExtent y). |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2402 |
]. |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2403 |
|
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2404 |
CheckToggleForm isNil ifTrue:[ |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2405 |
widget := CheckToggle new. |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2406 |
CheckToggleForm := widget label. |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2407 |
CheckToggleLevel := widget offLevel. |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2408 |
CheckToggleExtent := widget preferredExtent. |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2409 |
]. |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2410 |
comboButtonForm := ComboButtonForm. |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2411 |
comboButtonLevel := ComboButtonLevel. |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2412 |
comboButtonExtent := ComboButtonExtent. |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2413 |
|
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2414 |
checkToggleForm := CheckToggleForm. |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2415 |
checkToggleLevel := CheckToggleLevel. |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2416 |
checkToggleExtent := CheckToggleExtent. |
542 | 2417 |
! |
2418 |
||
2419 |
initialize |
|
2420 |
"set default attributes |
|
2421 |
" |
|
2422 |
super initialize. |
|
2423 |
||
1112 | 2424 |
viewOrigin := 0@0. |
2425 |
font := font on:device. |
|
2426 |
rowHeight := font height. |
|
2427 |
multipleSelectOk := false. "/ multiselect disabled |
|
2428 |
selectedRowIndex := selectedColIndex := 0. "/ no selection |
|
2429 |
registererImages := IdentityDictionary new. |
|
2430 |
columnDescriptors := #(). |
|
2431 |
beDependentOfRows := false. |
|
2432 |
verticalSpacing := self class verticalSpacing. |
|
2433 |
horizontalSpacing := self class horizontalSpacing. |
|
2434 |
colorMap := Dictionary new. |
|
2435 |
catchChangeEvents := false. |
|
2436 |
dragIsActive := false. |
|
2437 |
rowFontAscent := 1. "/ dummy initialization |
|
2438 |
separatorSize := 1. "/ separators mode 2D |
|
2439 |
selectRowOnDefault := true. |
|
610 | 2440 |
self lineWidth:0. |
542 | 2441 |
! |
2442 |
||
705 | 2443 |
mapped |
2444 |
"set selection if exists after mapping |
|
2445 |
" |
|
2446 |
|idx| |
|
2447 |
||
2448 |
super mapped. |
|
2449 |
||
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2450 |
(idx := self firstIndexSelected) ~~ 0 ifTrue:[ |
705 | 2451 |
self scrollToRowAt:idx colAt:0. |
2452 |
]. |
|
2453 |
! |
|
2454 |
||
542 | 2455 |
realize |
607 | 2456 |
"recompute contents and fit columns to view |
542 | 2457 |
" |
607 | 2458 |
self bitGravity:#NorthWest. |
542 | 2459 |
self recomputeHeightOfContents. |
2460 |
super realize. |
|
607 | 2461 |
self fitColumns. |
2462 |
! ! |
|
2463 |
||
2464 |
!DSVColumnView methodsFor:'obsolete'! |
|
2465 |
||
2466 |
has3Dsepartors |
|
2467 |
"shouldn't be used any more |
|
2468 |
" |
|
2469 |
^ self has3Dseparators |
|
2470 |
! |
|
2471 |
||
2472 |
has3Dsepartors:aBool |
|
2473 |
"shouldn't be used any more |
|
2474 |
" |
|
2475 |
self has3Dseparators:aBool |
|
542 | 2476 |
|
2477 |
! ! |
|
2478 |
||
2479 |
!DSVColumnView methodsFor:'private'! |
|
2480 |
||
1111 | 2481 |
destroyEditView |
2482 |
"destroy the edit view; release KeyboardForwarder |
|
2483 |
" |
|
2484 |
editView notNil ifTrue:[ |
|
2485 |
editView withAllSubViewsDo:[:aView| |
|
2486 |
aView delegate:nil |
|
2487 |
]. |
|
2488 |
editView destroy. |
|
2489 |
editView := nil. |
|
2490 |
self windowGroup focusView:nil. |
|
2491 |
]. |
|
2492 |
||
2493 |
||
2494 |
! |
|
2495 |
||
637 | 2496 |
detectViewAt:aPoint in:aView |
1087 | 2497 |
"returns the view at a point |
2498 |
" |
|
637 | 2499 |
|p| |
2500 |
||
2501 |
(aView notNil and:[aView subViews notNil]) ifTrue:[ |
|
2502 |
aView subViews do:[:sv| |
|
2503 |
p := device translatePoint:aPoint from:(self id) to:(sv id). |
|
2504 |
||
2505 |
(p x >= 0 and:[p y >= 0 and:[p x <= sv width and:[p y <= sv height]]]) ifTrue:[ |
|
2506 |
^ self detectViewAt:aPoint in:sv |
|
2507 |
] |
|
2508 |
] |
|
2509 |
]. |
|
2510 |
^ aView |
|
2511 |
! |
|
2512 |
||
542 | 2513 |
fitColumns |
2514 |
"fit columns to view |
|
2515 |
" |
|
859 | 2516 |
|raiseNotify lastColumn dX sz expand resizables deltaWidth| |
542 | 2517 |
|
2518 |
self canFit ifFalse:[^ false ]. |
|
647 | 2519 |
|
859 | 2520 |
resizables := 0. |
2521 |
deltaWidth := 0. |
|
2522 |
||
2523 |
preferredExtent isNil ifTrue:[ |
|
2524 |
raiseNotify := catchChangeEvents. |
|
2525 |
catchChangeEvents := true. |
|
647 | 2526 |
self preferredExtent. |
859 | 2527 |
catchChangeEvents := raiseNotify. |
2528 |
raiseNotify := raiseNotify not. |
|
2529 |
] ifFalse:[ |
|
2530 |
raiseNotify := false |
|
647 | 2531 |
]. |
542 | 2532 |
|
2533 |
self columnsDo:[:aCol| |
|
2534 |
aCol canResize ifTrue:[ |
|
2535 |
resizables := resizables + 1. |
|
2536 |
deltaWidth := aCol setMinWidth. |
|
2537 |
lastColumn := aCol. |
|
2538 |
] |
|
2539 |
]. |
|
647 | 2540 |
|
2541 |
resizables == 0 ifFalse:[ |
|
2542 |
sz := self widthOfContents. |
|
2543 |
||
2544 |
(expand := sz < width) ifTrue:[ |
|
2545 |
deltaWidth := width - sz + margin + margin |
|
2546 |
] |
|
2547 |
]. |
|
2548 |
||
2549 |
deltaWidth == 0 ifTrue:[ |
|
859 | 2550 |
raiseNotify ifTrue:[ self changed:#columnsLayout ]. |
647 | 2551 |
^ false |
542 | 2552 |
]. |
2553 |
||
2554 |
expand ifTrue:[ |
|
2555 |
(dX := deltaWidth // resizables) ~~ 0 ifTrue:[ |
|
2556 |
self columnsDo:[:aCol|aCol canResize ifTrue:[aCol growWidth:dX]] |
|
2557 |
]. |
|
2558 |
lastColumn growWidth:(deltaWidth - (dX * resizables)). |
|
2559 |
]. |
|
732 | 2560 |
|
542 | 2561 |
self preferredExtentChanged. |
612 | 2562 |
|
2563 |
shown ifTrue:[ |
|
2564 |
self invalidate. |
|
542 | 2565 |
|
612 | 2566 |
self hasSelection ifTrue:[ |
2567 |
editView notNil ifTrue:[ |
|
2568 |
editView width:(self selectedColumn width - separatorSize) |
|
2569 |
]. |
|
2570 |
self scrollToSelection. |
|
542 | 2571 |
]. |
732 | 2572 |
self contentsChanged. |
542 | 2573 |
]. |
647 | 2574 |
|
2575 |
self changed:#columnsLayout. |
|
732 | 2576 |
^ true. |
542 | 2577 |
|
2578 |
||
2579 |
! |
|
2580 |
||
2581 |
maxViewOriginY |
|
2582 |
"returns the maximum possible y of the view origin |
|
2583 |
" |
|
2584 |
|y| |
|
2585 |
||
2586 |
y := self heightOfContents - self innerHeight. |
|
2587 |
^ y max:0 |
|
2588 |
||
2589 |
! |
|
2590 |
||
2591 |
updateEditViewOrigin |
|
2592 |
"update origin of the editView |
|
2593 |
" |
|
2594 |
|x y| |
|
2595 |
||
2596 |
editView notNil ifTrue:[ |
|
607 | 2597 |
y := self yVisibleOfRowNr:(self firstIndexSelected). |
2598 |
x := self xVisibleOfColNr:(self selectedColIndex). |
|
542 | 2599 |
|
1112 | 2600 |
editView origin:(x @ y + separatorSize). |
542 | 2601 |
]. |
2602 |
||
2603 |
! |
|
2604 |
||
2605 |
xVisibleOfColNr:aColNr |
|
2606 |
"returns visible x assigned to a column number |
|
2607 |
" |
|
2608 |
|x| |
|
2609 |
||
2610 |
x := margin - viewOrigin x. |
|
2611 |
self columnsFrom:1 to:(aColNr - 1) do:[:aCol| x := x + aCol width ]. |
|
2612 |
^ x |
|
2613 |
||
2614 |
! |
|
2615 |
||
2616 |
xVisibleToColNr:x |
|
607 | 2617 |
"returns the column number assigned to a physical x or nil |
2618 |
" |
|
542 | 2619 |
|x0 nr| |
2620 |
||
2621 |
x0 := x + viewOrigin x - margin. |
|
2622 |
nr := 1. |
|
2623 |
||
2624 |
self columnsDo:[:aCol| |
|
2625 |
(x0 := x0 - aCol width) <= 0 ifTrue:[^ nr]. |
|
2626 |
nr := nr + 1. |
|
2627 |
]. |
|
2628 |
^ nil. |
|
2629 |
||
2630 |
! |
|
2631 |
||
2632 |
yVisibleOfRowNr:aRowNr |
|
2633 |
"returns visible y assigned to the row number |
|
2634 |
" |
|
2635 |
^ (aRowNr - 1) * rowHeight + margin - viewOrigin y |
|
2636 |
||
2637 |
! |
|
2638 |
||
2639 |
yVisibleToRowNr:y |
|
607 | 2640 |
"returns the row number assigned to a physical y or nil |
542 | 2641 |
" |
2642 |
|y0| |
|
2643 |
||
2644 |
y0 := (y + viewOrigin y - margin) // rowHeight + 1. |
|
618 | 2645 |
^ (y0 <= self size) ifTrue:[y0] ifFalse:[nil] |
542 | 2646 |
|
2647 |
! ! |
|
2648 |
||
2649 |
!DSVColumnView methodsFor:'queries'! |
|
2650 |
||
2651 |
canFit |
|
2652 |
"returns true if columns can be fit to view |
|
2653 |
" |
|
2654 |
^ canFit |
|
2655 |
! |
|
2656 |
||
1149
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
2657 |
hasOpenEditor |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
2658 |
^ editView notNil |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
2659 |
! |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
2660 |
|
563 | 2661 |
indexOfFirstRowShown |
2662 |
"returns index of first row shown |
|
2663 |
" |
|
2664 |
|idx| |
|
2665 |
||
2666 |
idx := (self yOriginOfContents // rowHeight) + 1. |
|
618 | 2667 |
^ (idx <= self size) ifTrue:[idx] ifFalse:[0] |
563 | 2668 |
|
2669 |
! |
|
2670 |
||
542 | 2671 |
numberOfColumns |
2672 |
"returns number of columns |
|
2673 |
" |
|
2674 |
^ columnDescriptors size |
|
2675 |
||
2676 |
! |
|
2677 |
||
2678 |
numberOfRows |
|
2679 |
"returns number of raws |
|
2680 |
" |
|
618 | 2681 |
^ self size |
542 | 2682 |
|
2683 |
! |
|
2684 |
||
2685 |
rowHeight |
|
2686 |
"get the height of the highest row in pixels |
|
2687 |
" |
|
2688 |
^ rowHeight |
|
2689 |
||
2690 |
! |
|
2691 |
||
2692 |
separatorSize |
|
2693 |
"returns vertical/horizontal size of a separator dependent on the |
|
2694 |
3D effect. |
|
2695 |
" |
|
607 | 2696 |
^ separatorSize |
542 | 2697 |
|
2698 |
! |
|
2699 |
||
2700 |
size |
|
2701 |
"returns number of raws |
|
2702 |
" |
|
2703 |
^ list size |
|
2704 |
||
2705 |
! ! |
|
2706 |
||
2707 |
!DSVColumnView methodsFor:'recomputation'! |
|
2708 |
||
647 | 2709 |
hasPreferredExtent |
2710 |
"returns true if preferred extent is accumulated |
|
2711 |
" |
|
2712 |
^ preferredExtent notNil |
|
2713 |
! |
|
2714 |
||
542 | 2715 |
preferredExtent |
647 | 2716 |
"recompute preferred extent; raise notification |
542 | 2717 |
" |
1201 | 2718 |
|x rH| |
542 | 2719 |
|
2720 |
preferredExtent notNil ifTrue:[ |
|
2721 |
^ preferredExtent |
|
2722 |
]. |
|
2723 |
x := 3. |
|
1201 | 2724 |
rH := font height. |
542 | 2725 |
|
2726 |
self columnsDo:[:aCol| |
|
1201 | 2727 |
rH := (aCol heightOfHighestRow) max:rH. |
542 | 2728 |
x := x + (aCol minWidth). |
2729 |
]. |
|
1201 | 2730 |
rowHeight := (rH + separatorSize + verticalSpacing + verticalSpacing + 1) // 2 * 2. |
2731 |
preferredExtent := (x + margin + margin) @ (self size * rH). |
|
2732 |
rowFontAscent := (rH - separatorSize - font height) // 2 + font ascent. |
|
2733 |
rowFontAscent := font ascent. |
|
2734 |
||
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2735 |
shown ifFalse:[ |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2736 |
self changed:#columnsLayout |
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2737 |
]. |
542 | 2738 |
^ preferredExtent |
2739 |
||
2740 |
||
2741 |
! |
|
2742 |
||
2743 |
preferredExtentChanged |
|
1087 | 2744 |
"called if the preffered extent changed |
2745 |
" |
|
542 | 2746 |
|y x| |
2747 |
||
2748 |
y := viewOrigin y. |
|
2749 |
x := viewOrigin x. |
|
2750 |
||
2751 |
(y ~~ 0 or:[x ~~ 0]) ifTrue:[ |
|
2752 |
self originWillChange. |
|
2753 |
viewOrigin := 0 @ 0. |
|
2754 |
preferredExtent := nil. |
|
2755 |
self originChanged:(x negated @ y negated). |
|
2756 |
] |
|
2757 |
! |
|
2758 |
||
2759 |
recomputeHeightOfContents |
|
1087 | 2760 |
"recompute height of contents( scrolling ) |
2761 |
" |
|
542 | 2762 |
preferredExtent notNil ifTrue:[ |
618 | 2763 |
preferredExtent y:(rowHeight * self size) |
542 | 2764 |
] ifFalse:[ |
2765 |
self preferredExtent |
|
2766 |
]. |
|
2767 |
! ! |
|
2768 |
||
2769 |
!DSVColumnView methodsFor:'scroller interface'! |
|
2770 |
||
2771 |
heightOfContents |
|
2772 |
"return the height of the contents in pixels |
|
2773 |
" |
|
2774 |
^ self preferredExtent y |
|
2775 |
||
2776 |
||
2777 |
! |
|
2778 |
||
2779 |
innerHeight |
|
2780 |
"returns the inner height of the contents shown |
|
2781 |
" |
|
2782 |
^ height - margin - margin |
|
2783 |
||
2784 |
! |
|
2785 |
||
2786 |
innerWidth |
|
2787 |
"returns the inner width of the contents shown |
|
2788 |
" |
|
2789 |
^ width - margin - margin |
|
2790 |
||
2791 |
! |
|
2792 |
||
2793 |
verticalScrollStep |
|
2794 |
"return the amount to scroll when stepping up/down. |
|
2795 |
" |
|
2796 |
^ rowHeight |
|
2797 |
||
2798 |
||
2799 |
||
2800 |
! |
|
2801 |
||
2802 |
viewOrigin |
|
2803 |
"return the viewOrigin; thats the coordinate of the contents |
|
2804 |
which is shown topLeft in the view. |
|
2805 |
" |
|
2806 |
^ viewOrigin |
|
2807 |
||
2808 |
! |
|
2809 |
||
2810 |
widthOfContents |
|
2811 |
"return the width of the contents in pixels |
|
2812 |
" |
|
647 | 2813 |
preferredExtent isNil ifTrue:[ |
2814 |
self preferredExtent |
|
2815 |
]. |
|
2816 |
^ preferredExtent x |
|
542 | 2817 |
|
2818 |
! |
|
2819 |
||
2820 |
xOriginOfContents |
|
2821 |
"return the horizontal origin of the contents in pixels |
|
2822 |
" |
|
2823 |
^ viewOrigin x |
|
2824 |
||
2825 |
! |
|
2826 |
||
2827 |
yOriginOfContents |
|
2828 |
"return the vertical origin of the contents in pixels |
|
2829 |
" |
|
2830 |
^ viewOrigin y |
|
2831 |
||
2832 |
! ! |
|
2833 |
||
2834 |
!DSVColumnView methodsFor:'scrolling'! |
|
2835 |
||
2836 |
scrollTo:anOrigin redraw:doRedraw |
|
2837 |
"change origin to have newOrigin be visible at the top-left. |
|
2838 |
" |
|
1123
ea32a2e3d44d
care for sensor becoming nil while handling exposeEvents
Claus Gittinger <cg@exept.de>
parents:
1115
diff
changeset
|
2839 |
|x y dX dY newOrg dltOrg h innerWT innerHG sensor| |
542 | 2840 |
|
2841 |
shown ifFalse:[ |
|
2842 |
^ self |
|
2843 |
]. |
|
612 | 2844 |
|
1123
ea32a2e3d44d
care for sensor becoming nil while handling exposeEvents
Claus Gittinger <cg@exept.de>
parents:
1115
diff
changeset
|
2845 |
sensor := self sensor. |
ea32a2e3d44d
care for sensor becoming nil while handling exposeEvents
Claus Gittinger <cg@exept.de>
parents:
1115
diff
changeset
|
2846 |
[sensor hasExposeEventFor:nil] whileTrue:[ |
542 | 2847 |
self windowGroup processExposeEvents |
2848 |
]. |
|
612 | 2849 |
|
542 | 2850 |
innerWT := self innerWidth. |
2851 |
innerHG := self innerHeight. |
|
2852 |
||
2853 |
h := viewOrigin y. |
|
2854 |
||
2855 |
(y := anOrigin y) > h ifTrue:[ "/ end of contents |
|
2856 |
y > (dY := self maxViewOriginY) ifTrue:[ |
|
2857 |
y := dY max:h |
|
2858 |
] |
|
2859 |
] ifFalse:[ |
|
2860 |
y := y max:0. |
|
2861 |
]. |
|
2862 |
||
2863 |
(x := anOrigin x) > 0 ifTrue:[ |
|
2864 |
x := x min:(self widthOfContents - innerWT). |
|
2865 |
]. |
|
2866 |
x := x max:0. |
|
2867 |
newOrg := (x @ y). |
|
2868 |
dltOrg := newOrg - viewOrigin. |
|
2869 |
dX := dltOrg x. |
|
2870 |
dY := dltOrg y. |
|
2871 |
||
2872 |
(dX == 0 and:[dY == 0]) ifTrue:[ |
|
2873 |
^ self |
|
2874 |
]. |
|
2875 |
self originWillChange. |
|
2876 |
viewOrigin := newOrg. |
|
2877 |
||
2878 |
doRedraw ifFalse:[ |
|
2879 |
^ self originChanged:dltOrg |
|
2880 |
]. |
|
2881 |
||
2882 |
dY ~~ 0 ifTrue:[ "/ SCROLL VERTICAL |
|
2883 |
dY := dY abs. |
|
2884 |
||
2885 |
(dX ~~ 0 or:[innerHG - dY < 20]) ifTrue:[ |
|
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2886 |
self invalidate. |
542 | 2887 |
] ifFalse:[ "/ COPY VERTICAL |
2888 |
|y0 y1| |
|
2889 |
||
2890 |
y0 := y1 := margin + dY. |
|
2891 |
h := innerHG - dY. |
|
2892 |
||
2893 |
dltOrg y < 0 ifTrue:[y0 := margin. y := y0] |
|
2894 |
ifFalse:[y1 := margin. y := y1 + h]. |
|
2895 |
||
2896 |
self catchExpose. |
|
643 | 2897 |
self copyFrom:self x:margin y:y0 toX:margin y:y1 width:innerWT height:h async:true. |
542 | 2898 |
self waitForExpose. |
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2899 |
self invalidateX:margin y:y width:innerWT height:(innerHG - h). |
542 | 2900 |
] |
2901 |
] ifFalse:[ "/ SCROLL HORIZONTAL |
|
2902 |
dX := dX abs. |
|
2903 |
||
2904 |
innerWT - dX < 20 ifTrue:[ |
|
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2905 |
self invalidate. |
542 | 2906 |
] ifFalse:[ "/ COPY HORIZONTAL |
2907 |
|x0 x1 w| |
|
2908 |
||
643 | 2909 |
x0 := x1 := dX + margin. |
542 | 2910 |
w := width - dX - margin. |
2911 |
||
643 | 2912 |
dltOrg x < 0 ifTrue:[x0 := x := margin ] |
2913 |
ifFalse:[x1 := margin. x := w]. |
|
542 | 2914 |
|
2915 |
self catchExpose. |
|
643 | 2916 |
self copyFrom:self x:x0 y:margin toX:x1 y:margin width:w height:innerHG async:true. |
542 | 2917 |
self waitForExpose. |
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
2918 |
self invalidateX:x y:margin width:(width - w) height:innerHG. |
542 | 2919 |
] |
2920 |
]. |
|
2921 |
self originChanged:dltOrg. |
|
1123
ea32a2e3d44d
care for sensor becoming nil while handling exposeEvents
Claus Gittinger <cg@exept.de>
parents:
1115
diff
changeset
|
2922 |
|
ea32a2e3d44d
care for sensor becoming nil while handling exposeEvents
Claus Gittinger <cg@exept.de>
parents:
1115
diff
changeset
|
2923 |
"Modified: / 7.9.1998 / 16:39:49 / cg" |
542 | 2924 |
! |
2925 |
||
2926 |
scrollToRowAt:aRowNr colAt:aColNr |
|
2927 |
"make row at a row number in column at a column number visible |
|
2928 |
" |
|
2929 |
|x y l dY dX| |
|
2930 |
||
618 | 2931 |
( (aRowNr between:1 and:(self size)) |
542 | 2932 |
and:[aColNr between:0 and:(self numberOfColumns)] |
2933 |
) ifFalse:[ |
|
2934 |
^ self |
|
2935 |
]. |
|
2936 |
||
2937 |
dY := dX := 0. |
|
2938 |
y := self yVisibleOfRowNr:aRowNr. |
|
2939 |
||
2940 |
y < margin ifTrue:[ |
|
2941 |
dY := margin - y. |
|
2942 |
] ifFalse:[ |
|
2943 |
y := y + rowHeight. |
|
2944 |
l := height - margin. |
|
2945 |
y > l ifTrue:[dY := l - y] |
|
2946 |
]. |
|
2947 |
||
2948 |
aColNr == 0 ifTrue:[ |
|
2949 |
dY == 0 ifTrue:[^ self]. |
|
2950 |
dX := 0. |
|
2951 |
] ifFalse:[ |
|
2952 |
x := self xVisibleOfColNr:aColNr. |
|
2953 |
||
1163 | 2954 |
x <= margin ifTrue:[ |
542 | 2955 |
dX := margin - x |
2956 |
] ifFalse:[ |
|
2957 |
x := x + (self columnAt:aColNr) width. |
|
2958 |
l := width - margin. |
|
2959 |
x > l ifTrue:[dX := l - x] |
|
2960 |
] |
|
2961 |
]. |
|
2962 |
||
2963 |
(dX == 0 and:[dY == 0]) ifFalse:[ |
|
2964 |
self scrollTo:(viewOrigin - (dX @ dY)). |
|
2965 |
] |
|
2966 |
||
2967 |
||
2968 |
! |
|
2969 |
||
2970 |
scrollToSelection |
|
2971 |
"make selection visible |
|
2972 |
" |
|
607 | 2973 |
|rowNr| |
2974 |
||
2975 |
(rowNr := self firstIndexSelected) ~~ 0 ifTrue:[ |
|
2976 |
self scrollToRowAt:rowNr colAt:(self selectedColIndex) |
|
542 | 2977 |
] |
2978 |
||
2979 |
! ! |
|
2980 |
||
2981 |
!DSVColumnView methodsFor:'selection'! |
|
2982 |
||
607 | 2983 |
deselect |
2984 |
"deselect |
|
2985 |
" |
|
2986 |
self selectColIndex:0 rowIndex:0 |
|
2987 |
! |
|
2988 |
||
2989 |
firstIndexSelected |
|
809 | 2990 |
"returns index of first row selected or 0 |
607 | 2991 |
" |
2992 |
multipleSelectOk ifFalse:[ |
|
2993 |
^ selectedRowIndex |
|
2994 |
]. |
|
2995 |
selectedRowIndex size ~~ 0 ifTrue:[ |
|
2996 |
^ selectedRowIndex at:1 |
|
2997 |
]. |
|
2998 |
^ 0 |
|
2999 |
! |
|
3000 |
||
542 | 3001 |
hasSelection |
607 | 3002 |
"returns true if a selection exists |
542 | 3003 |
" |
607 | 3004 |
^ self numberOfSelections ~~ 0 |
542 | 3005 |
|
3006 |
||
3007 |
! |
|
3008 |
||
607 | 3009 |
isInSelection:aRowNr |
3010 |
"return true, if row, aRowNr is in the selection |
|
542 | 3011 |
" |
607 | 3012 |
aRowNr ~~ 0 ifTrue:[ |
3013 |
multipleSelectOk ifFalse:[ |
|
3014 |
^ aRowNr == selectedRowIndex |
|
3015 |
]. |
|
3016 |
selectedRowIndex size ~~ 0 ifTrue:[ |
|
3017 |
^ selectedRowIndex includes:aRowNr |
|
3018 |
] |
|
3019 |
]. |
|
3020 |
^ false |
|
3021 |
! |
|
3022 |
||
647 | 3023 |
isRowSelected:aRowNr |
3024 |
"return true, if row is in the selection |
|
3025 |
" |
|
3026 |
selectedColIndex == 0 ifTrue:[ |
|
3027 |
^ self isInSelection:aRowNr |
|
3028 |
]. |
|
3029 |
^ false |
|
3030 |
! |
|
3031 |
||
607 | 3032 |
isSelected:aRowNr inColumn:aColNr |
612 | 3033 |
"returns true if cell in a row; a row number, in a column, a column |
3034 |
number is selected. |
|
3035 |
" |
|
1042 | 3036 |
multipleSelectOk ifFalse:[ |
3037 |
aRowNr ~~ selectedRowIndex ifTrue:[ |
|
3038 |
^ false |
|
3039 |
] |
|
3040 |
] ifTrue:[ |
|
3041 |
(selectedRowIndex size ~~ 0 and:[selectedRowIndex includes:aRowNr]) ifFalse:[ |
|
3042 |
^ false |
|
3043 |
] |
|
607 | 3044 |
]. |
1042 | 3045 |
^ (selectedColIndex == 0 or:[selectedColIndex == aColNr]) |
3046 |
||
607 | 3047 |
! |
3048 |
||
809 | 3049 |
lastIndexSelected |
3050 |
"returns index of last row selected or 0 |
|
3051 |
" |
|
3052 |
multipleSelectOk ifFalse:[ |
|
3053 |
^ selectedRowIndex |
|
3054 |
]. |
|
3055 |
selectedRowIndex size ~~ 0 ifTrue:[ |
|
3056 |
^ selectedRowIndex last |
|
3057 |
]. |
|
3058 |
^ 0 |
|
3059 |
! |
|
3060 |
||
607 | 3061 |
numberOfSelections |
3062 |
"return the number of selected rows |
|
3063 |
" |
|
3064 |
multipleSelectOk ifFalse:[ |
|
3065 |
^ selectedRowIndex ~~ 0 ifTrue:[1] ifFalse:[0] |
|
3066 |
]. |
|
3067 |
^ selectedRowIndex size |
|
542 | 3068 |
! |
3069 |
||
3070 |
selectColIndex:aColNr rowIndex:aRowNr |
|
3071 |
"change selection with notification |
|
3072 |
" |
|
3073 |
|oC oR| |
|
3074 |
||
607 | 3075 |
oC := self selectedColIndex. |
3076 |
oR := self selectedRowIndex. |
|
542 | 3077 |
|
3078 |
self setSelectColIndex:aColNr rowIndex:aRowNr. |
|
3079 |
||
607 | 3080 |
(oC ~~ self selectedColIndex or:[oR ~= self selectedRowIndex]) ifTrue:[ |
542 | 3081 |
self selectionChanged |
3082 |
]. |
|
3083 |
! |
|
3084 |
||
607 | 3085 |
selectRow:something |
542 | 3086 |
"select a row |
3087 |
" |
|
607 | 3088 |
^ self selectedRowIndex:something |
542 | 3089 |
! |
3090 |
||
809 | 3091 |
selectRowAt:rowNr colAt:colNr atPoint:aPoint |
3092 |
|v p| |
|
3093 |
||
3094 |
self selectColIndex:colNr rowIndex:rowNr. |
|
3095 |
||
3096 |
(v := self detectViewAt:aPoint in:editView) notNil ifTrue:[ |
|
3097 |
p := device translatePoint:aPoint from:(self id) to:(v id). |
|
3098 |
||
3099 |
self sensor pushEvent:(WindowEvent buttonEvent |
|
3100 |
for:v |
|
3101 |
type:#buttonPress:x:y: |
|
3102 |
arguments:(Array with:#select with:p x with:p y) |
|
3103 |
) |
|
3104 |
]. |
|
3105 |
||
3106 |
||
3107 |
! |
|
3108 |
||
607 | 3109 |
selectRowIndex:something |
3110 |
"set selection of rows |
|
542 | 3111 |
" |
607 | 3112 |
self selectColIndex:selectedColIndex rowIndex:something |
3113 |
||
3114 |
||
542 | 3115 |
! |
3116 |
||
3117 |
selectedColIndex |
|
3118 |
"returns selected column number or 0 |
|
3119 |
" |
|
3120 |
^ selectedColIndex |
|
3121 |
! |
|
3122 |
||
3123 |
selectedColumn |
|
3124 |
"returns selected column or nil |
|
3125 |
" |
|
3126 |
^ columnDescriptors at:selectedColIndex ifAbsent:nil. |
|
3127 |
! |
|
3128 |
||
3129 |
selectedRow |
|
607 | 3130 |
"returns selected row (or collection if multiple selection) or nil |
542 | 3131 |
" |
607 | 3132 |
multipleSelectOk ifFalse:[ |
3133 |
^ self at:selectedRowIndex ifAbsent:nil |
|
3134 |
]. |
|
3135 |
||
3136 |
selectedRowIndex size ~~ 0 ifTrue:[ |
|
3137 |
^ selectedRowIndex collect:[:i| self at:i] |
|
3138 |
]. |
|
3139 |
^ nil |
|
3140 |
! |
|
3141 |
||
3142 |
selectedRow:something |
|
3143 |
"select something |
|
3144 |
" |
|
3145 |
self selectedRowIndex:something |
|
542 | 3146 |
! |
3147 |
||
3148 |
selectedRowIndex |
|
3149 |
"returns selected row number or 0 |
|
3150 |
" |
|
3151 |
^ selectedRowIndex |
|
3152 |
! |
|
3153 |
||
607 | 3154 |
selectedRowIndex:something |
3155 |
"set selection of rows |
|
3156 |
" |
|
3157 |
self selectColIndex:selectedColIndex rowIndex:something |
|
3158 |
||
3159 |
||
542 | 3160 |
! |
3161 |
||
3162 |
selectionChanged |
|
3163 |
"selection has changed |
|
3164 |
" |
|
3165 |
self changed:#selection. |
|
3166 |
||
3167 |
actionBlock notNil ifTrue:[ |
|
607 | 3168 |
actionBlock value:(self selectedRowIndex) |
3169 |
] |
|
3170 |
! |
|
3171 |
||
3172 |
selectionIndicesDo:aOneArgBlock |
|
3173 |
"evaluate block on each row selected; the argument to the row |
|
3174 |
is the index of the selected row |
|
3175 |
" |
|
3176 |
multipleSelectOk ifFalse:[ |
|
3177 |
selectedRowIndex ~~ 0 ifTrue:[ |
|
3178 |
aOneArgBlock value:selectedRowIndex |
|
3179 |
] |
|
3180 |
] ifTrue:[ |
|
3181 |
selectedRowIndex size ~~ 0 ifTrue:[ |
|
3182 |
selectedRowIndex do:[:i| aOneArgBlock value:i ] |
|
3183 |
] |
|
542 | 3184 |
] |
3185 |
! |
|
3186 |
||
3187 |
setSelectColIndex:aColNr rowIndex:aRowNr |
|
3188 |
"change selection without notification |
|
3189 |
" |
|
1149
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
3190 |
|editSpec rowNr colNr newCol oldCol oldRow sensor sglSelRow oldSz |
1269 | 3191 |
keyBrdFwd filter edValue| |
542 | 3192 |
|
607 | 3193 |
rowNr := self validateSelection:aRowNr. |
542 | 3194 |
|
607 | 3195 |
multipleSelectOk ifTrue:[ |
3196 |
colNr := (rowNr size == 1) ifTrue:[aColNr] ifFalse:[0] |
|
3197 |
] ifFalse:[ |
|
3198 |
colNr := rowNr ~~ 0 ifTrue:[aColNr] ifFalse:[0] |
|
542 | 3199 |
]. |
3200 |
||
607 | 3201 |
(colNr := colNr ? 0) ~~ 0 ifTrue:[ |
3202 |
newCol := self columnAt:colNr. |
|
3203 |
newCol rendererType == #rowSelector ifTrue:[ |
|
3204 |
colNr := 0. |
|
3205 |
newCol := nil |
|
3206 |
] ifFalse:[ |
|
3207 |
multipleSelectOk ifTrue:[sglSelRow := rowNr at:1] |
|
3208 |
ifFalse:[sglSelRow := rowNr]. |
|
3209 |
||
3210 |
(newCol canSelect:sglSelRow) ifFalse:[ |
|
3211 |
newCol := nil. |
|
1112 | 3212 |
colNr := 0. |
3213 |
||
3214 |
selectRowOnDefault ifFalse:[ |
|
3215 |
rowNr := multipleSelectOk ifFalse:[0] ifTrue:[nil] |
|
3216 |
] |
|
607 | 3217 |
] |
3218 |
] |
|
3219 |
]. |
|
3220 |
||
3221 |
(rowNr = selectedRowIndex and:[colNr == selectedColIndex]) ifTrue:[ |
|
643 | 3222 |
^ self |
542 | 3223 |
]. |
3224 |
||
3225 |
"/ release old selection |
|
3226 |
||
612 | 3227 |
oldSz := self numberOfSelections. |
542 | 3228 |
oldCol := selectedColIndex. |
3229 |
oldRow := selectedRowIndex. |
|
612 | 3230 |
|
542 | 3231 |
selectedRowIndex := rowNr. |
3232 |
selectedColIndex := colNr. |
|
3233 |
||
612 | 3234 |
oldSz == 1 ifTrue:[ |
3235 |
multipleSelectOk ifTrue:[oldRow := oldRow at:1]. |
|
542 | 3236 |
|
612 | 3237 |
editValue notNil ifTrue:[ |
1215 | 3238 |
editValue removeDependent:self |
3239 |
]. |
|
3240 |
editView notNil ifTrue:[ |
|
3241 |
editView allSubViewsDo:[:aSubView| |
|
3242 |
aSubView perform:#accept ifNotUnderstood:nil. |
|
3243 |
] |
|
3244 |
]. |
|
3245 |
||
3246 |
editValue notNil ifTrue:[ |
|
1149
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
3247 |
edValue := editValue value. |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
3248 |
edValue isSequenceable ifTrue:[ |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
3249 |
edValue size == 0 ifTrue:[ |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
3250 |
edValue := nil |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
3251 |
] ifFalse:[ |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
3252 |
edValue isString not ifTrue:[ |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
3253 |
edValue := edValue select:[:el| el notNil ]. |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
3254 |
edValue size == 0 ifTrue:[ |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
3255 |
edValue := nil |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
3256 |
] |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
3257 |
] |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
3258 |
] |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
3259 |
]. |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
3260 |
(self columnAt:oldCol) at:oldRow put:edValue. |
612 | 3261 |
editValue := nil |
3262 |
]. |
|
1111 | 3263 |
self destroyEditView. |
612 | 3264 |
]. |
3265 |
shown ifFalse:[^ self ]. |
|
542 | 3266 |
|
618 | 3267 |
oldSz > 1 ifTrue:[ "/ redraw old selection |
3268 |
oldRow do:[:aRowNr| "/ unselected if visible |
|
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
3269 |
self invalidateRowAt:aRowNr colAt:0 |
618 | 3270 |
] |
3271 |
] ifFalse:[ |
|
3272 |
oldSz == 1 ifTrue:[ |
|
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
3273 |
self invalidateRowAt:oldRow colAt:oldCol |
618 | 3274 |
] |
3275 |
]. |
|
3276 |
||
542 | 3277 |
"/ show new selection |
3278 |
||
3279 |
newCol notNil ifTrue:[ |
|
607 | 3280 |
self scrollToRowAt:sglSelRow colAt:colNr. |
833 | 3281 |
editSpec := newCol editorAt:sglSelRow. |
3282 |
||
3283 |
editSpec notNil ifTrue:[ |
|
1112 | 3284 |
editView := SimpleView extent:( (newCol width - (2 * separatorSize)) |
3285 |
@ (rowHeight - (2 * separatorSize)) |
|
607 | 3286 |
) |
3287 |
in:self. |
|
542 | 3288 |
self updateEditViewOrigin. |
1112 | 3289 |
|
1134 | 3290 |
(newCol containsText or:[newCol showSelectionHighLighted not]) ifTrue:[ |
3291 |
editView viewBackground:(newCol backgroundColorFor:sglSelRow) |
|
1112 | 3292 |
] ifFalse:[ |
3293 |
editView viewBackground:hgLgBgColor |
|
3294 |
]. |
|
833 | 3295 |
editView add:(editSpec at:1). |
1149
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
3296 |
oldSz := editSpec size. |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
3297 |
|
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
3298 |
oldSz == 3 ifTrue:[ |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
3299 |
filter := [:aKey| #(#Tab #CursorUp #CursorDown) includes:aKey] |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
3300 |
] ifFalse:[ |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
3301 |
filter := [:aKey| aKey == #Tab] |
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
3302 |
]. |
1111 | 3303 |
keyBrdFwd := KeyboardForwarder toView:self |
3304 |
condition:nil |
|
1149
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
3305 |
filter:filter. |
1111 | 3306 |
|
3307 |
editView withAllSubViewsDo:[:aView| |
|
1112 | 3308 |
aView delegate:keyBrdFwd. |
3309 |
aView font:font. |
|
1111 | 3310 |
]. |
3311 |
||
1149
c212f122c8b3
allow collections of string and icons for a cell label
Claus Gittinger <cg@exept.de>
parents:
1136
diff
changeset
|
3312 |
(editValue := editSpec at:2 ifAbsent:nil) notNil ifTrue:[ |
809 | 3313 |
editValue addDependent:self. |
648 | 3314 |
]. |
542 | 3315 |
editView realize. |
1111 | 3316 |
self windowGroup focusView:(editSpec at:1). |
3317 |
||
542 | 3318 |
] ifFalse:[ |
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
3319 |
self invalidateRowAt:sglSelRow colAt:colNr |
612 | 3320 |
]. |
3321 |
] ifFalse:[ |
|
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1333
diff
changeset
|
3322 |
self selectionIndicesDo:[:i| self invalidateRowAt:i colAt:0 ]. |
612 | 3323 |
self scrollToRowAt:(self firstIndexSelected) colAt:0 |
3324 |
]. |
|
3325 |
||
3326 |
sensor := self sensor. "/ catch expose events |
|
3327 |
||
3328 |
[sensor hasExposeEventFor:nil] whileTrue:[ |
|
3329 |
self windowGroup processExposeEvents |
|
3330 |
]. |
|
3331 |
||
542 | 3332 |
|
607 | 3333 |
! |
3334 |
||
3335 |
validateSelection:aSelection |
|
3336 |
|newSel| |
|
3337 |
||
3338 |
newSel := aSelection. |
|
3339 |
||
618 | 3340 |
(self size == 0 or:[newSel isNil or:[newSel == 0]]) ifTrue:[ |
607 | 3341 |
^ multipleSelectOk ifFalse:[0] ifTrue:[nil] |
3342 |
]. |
|
3343 |
||
3344 |
newSel isNumber ifTrue:[ |
|
3345 |
^ multipleSelectOk ifFalse:[newSel] ifTrue:[OrderedCollection with:newSel] |
|
3346 |
]. |
|
3347 |
multipleSelectOk ifFalse:[ |
|
618 | 3348 |
newSel := self identityIndexOfRow:aSelection |
607 | 3349 |
] ifTrue:[ |
3350 |
newSel := nil. |
|
3351 |
||
3352 |
aSelection size ~~ 0 ifTrue:[ |
|
3353 |
aSelection first isNumber ifTrue:[ |
|
3354 |
newSel := aSelection |
|
3355 |
] ifFalse:[ |
|
3356 |
aSelection do:[:el||n| |
|
618 | 3357 |
(n := self identityIndexOfRow:el) ~~ 0 ifTrue:[ |
607 | 3358 |
newSel isNil ifTrue:[newSel := OrderedCollection new]. |
3359 |
newSel add:n |
|
3360 |
] |
|
3361 |
] |
|
3362 |
] |
|
3363 |
] |
|
3364 |
]. |
|
3365 |
^ newSel |
|
542 | 3366 |
! ! |
3367 |
||
3368 |
!DSVColumnView class methodsFor:'documentation'! |
|
3369 |
||
3370 |
version |
|
1416 | 3371 |
^ '$Header: /cvs/stx/stx/libwidg2/DSVColumnView.st,v 1.77 1999-06-19 10:23:36 cg Exp $' |
542 | 3372 |
! ! |