author | Stefan Vogel <sv@exept.de> |
Sat, 01 Nov 2008 19:18:08 +0100 | |
changeset 3583 | 4072f1a89291 |
parent 3572 | 5d45b98c9c38 |
child 3648 | 23f1b38dbe62 |
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 |
" |
|
1844 | 12 |
"{ Package: 'stx:libwidg2' }" |
13 |
||
824 | 14 |
SimpleView subclass:#DSVLabelView |
2146 | 15 |
instanceVariableNames:'dataSet lineDrag columns selection enabled preferredHeight |
16 |
handleCursor tabSpacing opaqueColumnResize verticalLabelSpacing' |
|
542 | 17 |
classVariableNames:'' |
18 |
poolDictionaries:'' |
|
19 |
category:'Views-DataSet' |
|
20 |
! |
|
21 |
||
1494
096845be5d75
draw tabulatorLine on the tootView; do not use a SimpleView
Claus Gittinger <cg@exept.de>
parents:
1491
diff
changeset
|
22 |
Object subclass:#LineDrag |
3537 | 23 |
instanceVariableNames:'topX topY botY column minX startX transX topView color' |
1491 | 24 |
classVariableNames:'' |
25 |
poolDictionaries:'' |
|
26 |
privateIn:DSVLabelView |
|
27 |
! |
|
28 |
||
542 | 29 |
!DSVLabelView class methodsFor:'documentation'! |
30 |
||
31 |
copyright |
|
32 |
" |
|
33 |
COPYRIGHT (c) 1997 by Claus Gittinger / eXept Software AG |
|
34 |
All Rights Reserved |
|
35 |
||
36 |
This software is furnished under a license and may be used |
|
37 |
only in accordance with the terms of that license and with the |
|
38 |
inclusion of the above copyright notice. This software may not |
|
39 |
be provided or otherwise made available to, or used by, any |
|
40 |
other person. No title to or ownership of the software is |
|
41 |
hereby transferred. |
|
42 |
" |
|
43 |
||
44 |
||
45 |
||
46 |
||
47 |
! |
|
48 |
||
49 |
documentation |
|
50 |
" |
|
2789 | 51 |
shows the labels assigned to the column descriptions. |
52 |
Used as the title-part of a DataSetView. |
|
542 | 53 |
|
54 |
[Instance variables:] |
|
55 |
||
1487 | 56 |
dataSet <DSVColumnView> column view which shows the columns |
824 | 57 |
|
1487 | 58 |
selection <Integer or nil> current selected index or nil. |
824 | 59 |
|
1086 | 60 |
enabled <Boolean> if a press action exists on a column |
61 |
entry, this action could be enabled or |
|
62 |
disabled. |
|
63 |
||
1487 | 64 |
preferredHeight <Integer> the preferred height of the labelView |
1086 | 65 |
|
542 | 66 |
|
67 |
[author:] |
|
68 |
Claus Atzkern |
|
69 |
||
70 |
[see also:] |
|
71 |
DSVColumnView |
|
72 |
DataSetColumnSpec |
|
73 |
DataSetColumn |
|
74 |
DataSetView |
|
75 |
" |
|
76 |
! ! |
|
77 |
||
1940 | 78 |
!DSVLabelView class methodsFor:'accessing'! |
79 |
||
80 |
tabSpacing |
|
81 |
"returns the tab spacing |
|
82 |
" |
|
83 |
^ 2 |
|
84 |
! ! |
|
85 |
||
1844 | 86 |
!DSVLabelView class methodsFor:'defaults'! |
87 |
||
88 |
defaultFont |
|
89 |
^ DSVColumnView defaultFont |
|
90 |
! ! |
|
91 |
||
1487 | 92 |
!DSVLabelView methodsFor:'accessing'! |
824 | 93 |
|
1487 | 94 |
columns:aListOfColumns |
3489
f2f5a8273044
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3467
diff
changeset
|
95 |
"the list of columns changed" |
f2f5a8273044
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3467
diff
changeset
|
96 |
|
2152
6c52408279f9
halts and unused methods removed
Claus Gittinger <cg@exept.de>
parents:
2151
diff
changeset
|
97 |
aListOfColumns = columns ifTrue:[^ self]. |
2150 | 98 |
|
1487 | 99 |
columns := aListOfColumns. |
100 |
preferredHeight := nil. |
|
101 |
selection := nil. |
|
102 |
||
2146 | 103 |
self changed:#columnLayout. |
1525
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
104 |
! |
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
105 |
|
3583 | 106 |
dataSet |
107 |
^ dataSet |
|
108 |
! |
|
109 |
||
1931 | 110 |
opaqueColumnResize |
111 |
^ opaqueColumnResize |
|
112 |
! |
|
113 |
||
114 |
opaqueColumnResize:aBoolean |
|
115 |
opaqueColumnResize := aBoolean |
|
884 | 116 |
! ! |
117 |
||
824 | 118 |
!DSVLabelView methodsFor:'drawing'! |
119 |
||
1487 | 120 |
invalidate |
2146 | 121 |
(shown) ifTrue:[ |
1487 | 122 |
super invalidate |
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1269
diff
changeset
|
123 |
] |
824 | 124 |
! |
125 |
||
1487 | 126 |
invalidateItemAt:anIndex |
127 |
"invalidate rectangle assigned to an item at an index |
|
824 | 128 |
" |
1487 | 129 |
|cL xL xR hg| |
130 |
||
2146 | 131 |
(shown) ifTrue:[ |
1487 | 132 |
cL := columns at:anIndex ifAbsent:[^ nil]. |
2146 | 133 |
xL := self xVisibleOfColNr:anIndex. |
1487 | 134 |
xR := xL + cL width. |
135 |
||
136 |
(xL < width and:[xR > 0]) ifTrue:[ |
|
137 |
xL := xL max:0. |
|
138 |
xR := xR min:width. |
|
139 |
hg := height - margin - margin. |
|
140 |
||
141 |
self invalidate:(Rectangle left:xL top:margin width:(xR - xL) height:hg) |
|
142 |
] |
|
143 |
] |
|
1408
1cda0a4fb566
use invalidate... insteat of redraw...
Claus Gittinger <cg@exept.de>
parents:
1269
diff
changeset
|
144 |
! |
562 | 145 |
|
2146 | 146 |
redrawColumnsInX:x y:y width:w height:h |
824 | 147 |
"redraw a rectangle |
637 | 148 |
" |
1605 | 149 |
|savClip bg fg fgColor bgColor |
1487 | 150 |
inset "{ Class:SmallInteger }" |
151 |
maxX "{ Class:SmallInteger }" |
|
1524
b7f986aa45f4
visibility of label; show as button (yes/no)
Claus Gittinger <cg@exept.de>
parents:
1494
diff
changeset
|
152 |
lblH "{ Class:SmallInteger }" |
1487 | 153 |
wt "{ Class:SmallInteger }" |
154 |
x1 "{ Class:SmallInteger }" |
|
155 |
x0 "{ Class:SmallInteger }" |
|
156 |
| |
|
2146 | 157 |
(shown) ifFalse:[^ self]. |
824 | 158 |
|
1487 | 159 |
bgColor := dataSet backgroundColor. |
824 | 160 |
self paint:bgColor. |
161 |
self fillRectangleX:x y:y width:w height:h. |
|
162 |
||
1487 | 163 |
columns isEmpty ifTrue:[^ self]. |
164 |
||
165 |
fgColor := dataSet foregroundColor. |
|
166 |
inset := dataSet horizontalSpacing + 1. |
|
167 |
maxX := (x + w) min:(width - margin). |
|
1524
b7f986aa45f4
visibility of label; show as button (yes/no)
Claus Gittinger <cg@exept.de>
parents:
1494
diff
changeset
|
168 |
lblH := height - margin - margin. |
824 | 169 |
savClip := clipRect. |
859 | 170 |
|
2146 | 171 |
x1 := self xVisibleOfColNr:1. |
824 | 172 |
|
1487 | 173 |
columns keysAndValuesDo:[:aKey :aCol| |anItem| |
174 |
anItem := aCol label. |
|
175 |
wt := aCol width. |
|
176 |
x0 := x1. |
|
177 |
x1 := x1 + wt. |
|
824 | 178 |
|
1487 | 179 |
(x1 > x and:[x0 < maxX]) ifTrue:[ |
1940 | 180 |
|left right rect| |
181 |
||
182 |
left := x0 max:x. |
|
183 |
right := x1 min:maxX. |
|
184 |
rect := Rectangle left:left top:y width:(right - left) height:h. |
|
185 |
||
186 |
clipRect := nil. |
|
187 |
self clippingRectangle:rect. |
|
188 |
||
1487 | 189 |
fg := (anItem foregroundColor) ? fgColor. |
190 |
||
907 | 191 |
(bg := anItem backgroundColor) notNil ifTrue:[ |
192 |
bg ~= bgColor ifTrue:[ |
|
193 |
self paint:bg. |
|
1524
b7f986aa45f4
visibility of label; show as button (yes/no)
Claus Gittinger <cg@exept.de>
parents:
1494
diff
changeset
|
194 |
self fillRectangleX:x0 y:margin width:wt height:lblH. |
907 | 195 |
] |
196 |
] ifFalse:[ |
|
197 |
bg := bgColor |
|
198 |
]. |
|
824 | 199 |
|
2146 | 200 |
self paint:fg on:bg. |
1487 | 201 |
anItem redrawX:x0 w:wt h:height inset:inset on:self. |
1524
b7f986aa45f4
visibility of label; show as button (yes/no)
Claus Gittinger <cg@exept.de>
parents:
1494
diff
changeset
|
202 |
] |
824 | 203 |
]. |
2146 | 204 |
! |
205 |
||
206 |
redrawEdgesX:x y:yTop width:aWidth height:aHeight |
|
207 |
"redraw the edges in the range |
|
208 |
" |
|
3467 | 209 |
|desc startOfTabX endOfTabX lastColumn has3Dseparators separatorOneDColor |
2146 | 210 |
maxX "{ Class:SmallInteger }" |
211 |
h "{ Class:SmallInteger }" |
|
212 |
x1 "{ Class:SmallInteger }" |
|
213 |
x0 "{ Class:SmallInteger }" |
|
214 |
y0 "{ Class:SmallInteger }" |
|
215 |
absLabelLevel |
|
216 |
| |
|
217 |
||
3464 | 218 |
|
2146 | 219 |
maxX := (x + aWidth) min:(width - margin). |
220 |
absLabelLevel := 1. |
|
221 |
x1 := self xVisibleOfColNr:1. |
|
222 |
||
223 |
y0 := margin. |
|
224 |
h := height - margin - margin. |
|
3464 | 225 |
|
3467 | 226 |
has3Dseparators := dataSet has3Dseparators. |
227 |
separatorOneDColor := dataSet separatorOneDColor. |
|
228 |
lastColumn := columns last. |
|
3464 | 229 |
|
2146 | 230 |
columns keysAndValuesDo:[:aKey :aCol| |
231 |
desc := aCol description. |
|
232 |
x0 := x1. |
|
233 |
x1 := x1 + aCol width. |
|
234 |
||
3464 | 235 |
endOfTabX := nil. |
236 |
||
2146 | 237 |
aKey == selection ifTrue:[ |
3464 | 238 |
startOfTabX notNil ifTrue:[ endOfTabX := x0 ]. |
239 |
||
2146 | 240 |
(x1 > x and:[x0 < maxX]) ifTrue:[ |
3464 | 241 |
dataSet drawEdgesAtX:x0 y:y0 width:(x1 - x0) height:h level:-1 on:self. |
2146 | 242 |
]. |
3464 | 243 |
|
2146 | 244 |
] ifFalse:[ |
3464 | 245 |
desc labelHasButtonLayout ifTrue:[ |
3466 | 246 |
startOfTabX isNil ifTrue:[ startOfTabX := x0 ]. |
247 |
||
3464 | 248 |
(desc== lastColumn or:[desc labelIsPartOfGroup not]) ifTrue:[ |
249 |
endOfTabX := x1. |
|
250 |
] |
|
251 |
] ifFalse:[ |
|
252 |
startOfTabX notNil ifTrue:[ |
|
253 |
endOfTabX := x0. |
|
254 |
]. |
|
255 |
]. |
|
2146 | 256 |
]. |
3464 | 257 |
endOfTabX notNil ifTrue:[ |
258 |
startOfTabX isNil ifTrue:[ startOfTabX := x0 ]. |
|
259 |
||
260 |
startOfTabX < endOfTabX ifTrue:[ |
|
261 |
(endOfTabX > x and:[startOfTabX < maxX]) ifTrue:[ |
|
262 |
has3Dseparators ifTrue:[ |
|
263 |
dataSet drawEdgesAtX:startOfTabX y:y0 width:(endOfTabX - startOfTabX) height:h level:absLabelLevel on:self. |
|
264 |
] ifFalse:[ |
|
3467 | 265 |
self paint:separatorOneDColor. |
3464 | 266 |
self displayLineFromX:endOfTabX-1 y:0 toX:endOfTabX-1 y:h. |
267 |
]. |
|
268 |
]. |
|
2146 | 269 |
]. |
3464 | 270 |
startOfTabX := nil. |
271 |
]. |
|
2146 | 272 |
]. |
273 |
||
3464 | 274 |
has3Dseparators ifTrue:[ |
275 |
x1 < (maxX - absLabelLevel - absLabelLevel - 3) ifTrue:[ |
|
276 |
dataSet |
|
277 |
drawEdgesAtX:x1 y:y0 |
|
278 |
width:(width"-margin"-x1"-absLabelLevel") height:h |
|
279 |
level:absLabelLevel on:self |
|
280 |
]. |
|
3467 | 281 |
] ifFalse:[ |
282 |
h := h - 1. |
|
283 |
self paint:separatorOneDColor. |
|
284 |
self displayLineFromX:x y:h toX:(x + aWidth) y:h. |
|
2146 | 285 |
]. |
286 |
! |
|
287 |
||
288 |
redrawX:x y:y width:wArg height:h |
|
289 |
|savClip w| |
|
290 |
||
291 |
(shown) ifFalse:[^ self]. |
|
292 |
||
293 |
w := wArg. |
|
294 |
self redrawColumnsInX:x y:y width:w height:h. |
|
295 |
||
296 |
super redrawX:x y:y width:w height:h. |
|
297 |
||
298 |
"/ (x + w) >= (width-margin) ifTrue:[ |
|
299 |
"/ w := (width-margin) - 1 - x. |
|
300 |
"/ ]. |
|
3324
bdd503be73d1
redraw when there are no columns
Claus Gittinger <cg@exept.de>
parents:
3216
diff
changeset
|
301 |
columns notEmpty ifTrue:[ |
bdd503be73d1
redraw when there are no columns
Claus Gittinger <cg@exept.de>
parents:
3216
diff
changeset
|
302 |
savClip := clipRect. |
bdd503be73d1
redraw when there are no columns
Claus Gittinger <cg@exept.de>
parents:
3216
diff
changeset
|
303 |
self clippingRectangle:(Rectangle left:x top:margin width:w height:height-margin-margin). |
bdd503be73d1
redraw when there are no columns
Claus Gittinger <cg@exept.de>
parents:
3216
diff
changeset
|
304 |
self redrawEdgesX:x y:y width:w height:h. |
bdd503be73d1
redraw when there are no columns
Claus Gittinger <cg@exept.de>
parents:
3216
diff
changeset
|
305 |
self clippingRectangle:savClip. |
bdd503be73d1
redraw when there are no columns
Claus Gittinger <cg@exept.de>
parents:
3216
diff
changeset
|
306 |
] |
637 | 307 |
! ! |
308 |
||
2820 | 309 |
!DSVLabelView methodsFor:'enumerating columns'! |
310 |
||
311 |
columnsDo:aOneArgBlock |
|
312 |
"evaluate the argument, aOneArgBlock for every column" |
|
313 |
||
314 |
columns do:aOneArgBlock |
|
315 |
! ! |
|
316 |
||
637 | 317 |
!DSVLabelView methodsFor:'event handling'! |
542 | 318 |
|
1491 | 319 |
buttonMotion:state x:x y:y |
1585
b4f60b1a025b
fixed handle-fetch detection (handle is now easier to catch)
Claus Gittinger <cg@exept.de>
parents:
1525
diff
changeset
|
320 |
"mouse-button was moved; |
1491 | 321 |
redraw thumb at its new position and, if scroll-mode is asynchronous, |
322 |
the scroll action is performed |
|
323 |
" |
|
3216
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
324 |
|colNr x1 col| |
1525
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
325 |
|
1958 | 326 |
state = 0 ifTrue:[ |
327 |
lineDrag := nil. |
|
328 |
]. |
|
329 |
||
1525
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
330 |
lineDrag notNil ifTrue:[ |
1932 | 331 |
(opaqueColumnResize ? (UserPreferences current opaqueTableColumnResizing == true)) ifTrue:[ |
1939 | 332 |
lineDrag moveToX:x. |
333 |
dataSet changeWidthOfColumn:lineDrag column deltaX:lineDrag deltaX. |
|
334 |
lineDrag resetDeltaX. |
|
335 |
] ifFalse:[ |
|
3537 | 336 |
lineDrag invertLinesMovingToX:x. |
1931 | 337 |
]. |
338 |
^ self. |
|
1525
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
339 |
]. |
1491 | 340 |
|
1585
b4f60b1a025b
fixed handle-fetch detection (handle is now easier to catch)
Claus Gittinger <cg@exept.de>
parents:
1525
diff
changeset
|
341 |
"/ in the resize area ? |
3216
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
342 |
colNr := self xVisibleToColNr:(x-tabSpacing). |
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
343 |
colNr notNil ifTrue:[ |
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
344 |
col := columns at:colNr. |
1937 | 345 |
|
3216
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
346 |
(col notNil and:[col isResizeable]) ifTrue:[ |
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
347 |
x1 := self xVisibleOfColNr:(colNr + 1). |
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
348 |
(x between:(x1-tabSpacing) and:(x1+tabSpacing)) |
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
349 |
"/ x + tabSpacing > x1 |
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
350 |
ifTrue:[ |
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
351 |
self cursor:handleCursor. |
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
352 |
^ self |
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
353 |
]. |
1585
b4f60b1a025b
fixed handle-fetch detection (handle is now easier to catch)
Claus Gittinger <cg@exept.de>
parents:
1525
diff
changeset
|
354 |
]. |
1525
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
355 |
]. |
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
356 |
self cursor:(Cursor normal) |
3212 | 357 |
|
3216
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
358 |
"Modified: / 26-03-2007 / 15:20:27 / cg" |
1491 | 359 |
! |
360 |
||
637 | 361 |
buttonPress:button x:x y:y |
824 | 362 |
"handle a button press event; checks whether the item under the mouse |
363 |
is selectable. If true, the selection is set to the item. |
|
637 | 364 |
" |
3216
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
365 |
|x1 colNr col| |
1491 | 366 |
|
2146 | 367 |
(enabled and:[shown]) ifFalse:[ |
1491 | 368 |
^ self |
369 |
]. |
|
370 |
||
1585
b4f60b1a025b
fixed handle-fetch detection (handle is now easier to catch)
Claus Gittinger <cg@exept.de>
parents:
1525
diff
changeset
|
371 |
"/ in the resize area ? |
3216
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
372 |
colNr := self xVisibleToColNr:(x-tabSpacing). |
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
373 |
colNr notNil ifTrue:[ |
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
374 |
col := columns at:colNr. |
1937 | 375 |
col isResizeable ifTrue:[ |
3216
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
376 |
x1 := self xVisibleOfColNr:(colNr + 1). |
3212 | 377 |
(x between:(x1-tabSpacing) and:(x1+tabSpacing)) ifTrue:[ |
3216
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
378 |
col := columns at:colNr ifAbsent:nil. |
1937 | 379 |
self cursor:handleCursor. |
380 |
||
381 |
lineDrag := LineDrag new. |
|
382 |
lineDrag column:col |
|
383 |
x:x |
|
384 |
y:margin |
|
385 |
h:(self height + dataSet height) |
|
386 |
minX:(x1 - col width + col minimumRequiredWidth) |
|
387 |
on:self. |
|
1939 | 388 |
(opaqueColumnResize ? (UserPreferences current opaqueTableColumnResizing == true)) ifFalse:[ |
389 |
lineDrag invertLine. |
|
390 |
]. |
|
3212 | 391 |
^ self |
1937 | 392 |
] |
1525
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
393 |
] |
1491 | 394 |
]. |
1585
b4f60b1a025b
fixed handle-fetch detection (handle is now easier to catch)
Claus Gittinger <cg@exept.de>
parents:
1525
diff
changeset
|
395 |
|
3216
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
396 |
colNr := self xVisibleToColNr:x. |
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
397 |
colNr notNil ifTrue:[ |
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
398 |
col := columns at:colNr. |
1585
b4f60b1a025b
fixed handle-fetch detection (handle is now easier to catch)
Claus Gittinger <cg@exept.de>
parents:
1525
diff
changeset
|
399 |
col label isSelectable ifTrue:[ |
3216
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
400 |
self invalidateItemAt:(selection := colNr) |
3212 | 401 |
]. |
1585
b4f60b1a025b
fixed handle-fetch detection (handle is now easier to catch)
Claus Gittinger <cg@exept.de>
parents:
1525
diff
changeset
|
402 |
]. |
1525
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
403 |
self cursor:(Cursor normal). |
3212 | 404 |
|
3216
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
405 |
"Modified: / 26-03-2007 / 15:21:00 / cg" |
542 | 406 |
! |
407 |
||
637 | 408 |
buttonRelease:button x:x y:y |
824 | 409 |
"handle a button press event; checks whether the item under the mouse |
410 |
is the selected item. If true, the application is informed. |
|
411 |
" |
|
1491 | 412 |
|selected index column deltaX| |
824 | 413 |
|
1525
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
414 |
self cursor:(Cursor normal). |
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
415 |
|
1487 | 416 |
selection isNil ifTrue:[ |
1933 | 417 |
lineDrag notNil ifTrue:[ |
1939 | 418 |
(opaqueColumnResize ? (UserPreferences current opaqueTableColumnResizing == true)) ifFalse:[ |
2150 | 419 |
lineDrag invertLine. |
1932 | 420 |
column := lineDrag column. |
421 |
deltaX := lineDrag deltaX. |
|
1491 | 422 |
|
1932 | 423 |
deltaX abs > 0 "2" ifTrue:[ |
424 |
dataSet changeWidthOfColumn:column deltaX:deltaX |
|
425 |
] |
|
426 |
]. |
|
1933 | 427 |
lineDrag := nil. |
1491 | 428 |
]. |
1085 | 429 |
^ self |
430 |
]. |
|
1487 | 431 |
index := self xVisibleToSelectionIndex:x. |
432 |
selected := index == selection. |
|
1491 | 433 |
index := selection. |
1487 | 434 |
selection := nil. |
1085 | 435 |
|
1487 | 436 |
self invalidateItemAt:index. |
437 |
||
438 |
selected ifTrue:[ |
|
439 |
(columns at:index) label sendClickMsgTo:(self application) |
|
1085 | 440 |
] |
1525
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
441 |
! |
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
442 |
|
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
443 |
pointerLeave:state |
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
444 |
"mouse left view - restore cursor. |
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
445 |
" |
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
446 |
self sensor anyButtonPressed ifFalse:[ |
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
447 |
self cursor:(Cursor normal) |
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
448 |
]. |
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
449 |
|
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
450 |
|
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
451 |
|
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
452 |
! |
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
453 |
|
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
454 |
xVisibleToColNr:x |
3212 | 455 |
"returns the column number for a physical x position. |
456 |
Returns nil if x is behond the last column." |
|
457 |
||
1525
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
458 |
|x0 x1| |
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
459 |
|
2146 | 460 |
x1 := self xVisibleOfColNr:1. |
1525
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
461 |
|
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
462 |
columns keysAndValuesDo:[:index :aCol| |
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
463 |
x0 := x1. |
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
464 |
x1 := x0 + aCol width. |
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
465 |
|
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
466 |
(x1 > x and:[x0 < x]) ifTrue:[ |
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
467 |
^ index |
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
468 |
] |
1ab7703b29a9
change cursor if lineDrag is enabled
Claus Gittinger <cg@exept.de>
parents:
1524
diff
changeset
|
469 |
]. |
3216
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
470 |
^ nil |
3212 | 471 |
|
3216
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
472 |
"Modified: / 26-03-2007 / 15:21:37 / cg" |
824 | 473 |
! ! |
474 |
||
3188 | 475 |
!DSVLabelView methodsFor:'focus handling'! |
476 |
||
477 |
canTab |
|
478 |
^ false |
|
479 |
! |
|
480 |
||
481 |
wantsFocusWithButtonPress |
|
482 |
"never wants the focus - view which keeps the labels |
|
483 |
" |
|
484 |
^ false |
|
485 |
! ! |
|
486 |
||
3214 | 487 |
!DSVLabelView methodsFor:'help'! |
488 |
||
489 |
flyByHelpTextAt:aPoint |
|
490 |
"return the helpText for aPoint (i.e. when mouse-pointer is moved over an item)." |
|
491 |
||
492 |
|colNr col| |
|
493 |
||
494 |
columns isEmpty ifTrue:[^ nil]. |
|
495 |
colNr := self xVisibleToColNr:aPoint x. |
|
3216
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
496 |
colNr notNil ifTrue:[ |
3214 | 497 |
col := columns at:colNr. |
3523
26c2bafdd0fb
separate activeHelp for labels
Claus Gittinger <cg@exept.de>
parents:
3489
diff
changeset
|
498 |
^ col activeHelpTextForLabel. |
3214 | 499 |
]. |
500 |
^ nil |
|
501 |
||
502 |
"Created: / 26-03-2007 / 13:43:20 / cg" |
|
3216
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
503 |
"Modified: / 26-03-2007 / 15:21:07 / cg" |
3214 | 504 |
! ! |
505 |
||
2146 | 506 |
!DSVLabelView methodsFor:'initialization'! |
507 |
||
508 |
initStyle |
|
2924 | 509 |
<resource: #style (#'dataSet.labelView.level' |
510 |
#'dataSet.labelView.verticalSpace' |
|
511 |
)> |
|
512 |
||
2146 | 513 |
super initStyle. |
514 |
||
515 |
handleCursor := (VariablePanel cursorForOrientation:#horizontal onDevice:device) onDevice:device. |
|
2685 | 516 |
font := (self class defaultFont) onDevice:device. |
2146 | 517 |
"/ self level:0. |
2924 | 518 |
self level:(styleSheet at:#'dataSet.labelView.level' default:-1). |
519 |
verticalLabelSpacing := (styleSheet at:#'dataSet.labelView.verticalSpace' default:2). |
|
2146 | 520 |
! |
521 |
||
522 |
initialize |
|
523 |
super initialize. |
|
524 |
"/ super level:(self defaultLevel). |
|
525 |
||
526 |
enabled := true. |
|
527 |
columns := #(). |
|
528 |
tabSpacing := self class tabSpacing. |
|
529 |
||
530 |
self enableMotionEvents. |
|
531 |
! ! |
|
532 |
||
824 | 533 |
!DSVLabelView methodsFor:'instance creation'! |
534 |
||
535 |
for:aColumnView |
|
536 |
"initialization |
|
537 |
" |
|
1491 | 538 |
dataSet := aColumnView. |
2146 | 539 |
"/ self level:(dataSet level). |
540 |
"/ self borderWidth:(dataSet borderWidth). |
|
1085 | 541 |
! |
542 |
||
1487 | 543 |
realize |
544 |
"recompute contents and fit columns to view |
|
545 |
" |
|
546 |
self bitGravity:#NorthWest. |
|
547 |
super realize. |
|
824 | 548 |
! ! |
549 |
||
1487 | 550 |
!DSVLabelView methodsFor:'queries'! |
824 | 551 |
|
1487 | 552 |
enabled |
553 |
"true, if widget is enabled |
|
554 |
" |
|
555 |
^ enabled |
|
556 |
! |
|
557 |
||
558 |
enabled:aState |
|
559 |
"true, if widget is enabled |
|
542 | 560 |
" |
1487 | 561 |
enabled := aState. |
562 |
! |
|
563 |
||
3489
f2f5a8273044
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3467
diff
changeset
|
564 |
preferredExtent |
f2f5a8273044
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3467
diff
changeset
|
565 |
|
3572
5d45b98c9c38
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
3537
diff
changeset
|
566 |
"/ If I have an explicit preferredExtent.. |
5d45b98c9c38
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
3537
diff
changeset
|
567 |
explicitExtent notNil ifTrue:[ |
5d45b98c9c38
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
3537
diff
changeset
|
568 |
^ explicitExtent |
5d45b98c9c38
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
3537
diff
changeset
|
569 |
]. |
5d45b98c9c38
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
3537
diff
changeset
|
570 |
|
5d45b98c9c38
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
3537
diff
changeset
|
571 |
"/ If I have a cached preferredExtent value.. |
3489
f2f5a8273044
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3467
diff
changeset
|
572 |
preferredExtent notNil ifTrue:[ |
f2f5a8273044
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3467
diff
changeset
|
573 |
^ preferredExtent |
f2f5a8273044
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3467
diff
changeset
|
574 |
]. |
f2f5a8273044
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3467
diff
changeset
|
575 |
|
f2f5a8273044
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3467
diff
changeset
|
576 |
^ 100 @ self preferredHeight |
f2f5a8273044
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3467
diff
changeset
|
577 |
! |
f2f5a8273044
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3467
diff
changeset
|
578 |
|
2146 | 579 |
preferredHeight |
3489
f2f5a8273044
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3467
diff
changeset
|
580 |
|maxLabelHeight| |
2146 | 581 |
|
582 |
preferredHeight notNil ifTrue:[ |
|
583 |
^ preferredHeight |
|
584 |
]. |
|
1487 | 585 |
|
3489
f2f5a8273044
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3467
diff
changeset
|
586 |
maxLabelHeight := |
f2f5a8273044
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3467
diff
changeset
|
587 |
columns inject:0 into:[:maxSoFar :col | (col label preferredHeight) max:maxSoFar ]. |
f2f5a8273044
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3467
diff
changeset
|
588 |
|
f2f5a8273044
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3467
diff
changeset
|
589 |
^ self margin + |
f2f5a8273044
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3467
diff
changeset
|
590 |
verticalLabelSpacing |
f2f5a8273044
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3467
diff
changeset
|
591 |
+ maxLabelHeight |
f2f5a8273044
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3467
diff
changeset
|
592 |
+ verticalLabelSpacing |
f2f5a8273044
preferredExtent changes & fixes (ubs)
Claus Gittinger <cg@exept.de>
parents:
3467
diff
changeset
|
593 |
+ self margin. |
2146 | 594 |
! |
595 |
||
596 |
xVisibleOfColNr:colNr |
|
597 |
"/ must adjust, because dataset includes its own margin, which might be different from ours |
|
598 |
||
599 |
^ (dataSet xVisibleOfColNr:colNr) - dataSet margin + margin |
|
824 | 600 |
! |
601 |
||
1487 | 602 |
xVisibleToSelectionIndex:x |
603 |
"returns the column number assigned to a physical x or nil. If |
|
604 |
the column exists but is not selectable nil is returned. |
|
824 | 605 |
" |
3216
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
606 |
|
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
607 |
|colNr column| |
824 | 608 |
|
2146 | 609 |
(shown and:[enabled]) ifTrue:[ |
3216
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
610 |
((colNr := dataSet xVisibleToColNr:x) notNil |
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
611 |
and:[(column := columns at:colNr) notNil |
1487 | 612 |
and:[column label isSelectable]] |
613 |
) ifTrue:[ |
|
3216
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
614 |
^ colNr |
1487 | 615 |
] |
824 | 616 |
]. |
1487 | 617 |
^ nil |
3216
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
618 |
|
18f104700621
xVisibleToSelectionIndex:x different return value confusion
Claus Gittinger <cg@exept.de>
parents:
3214
diff
changeset
|
619 |
"Modified: / 26-03-2007 / 15:21:27 / cg" |
824 | 620 |
! ! |
621 |
||
1487 | 622 |
!DSVLabelView methodsFor:'scrolling'! |
824 | 623 |
|
1487 | 624 |
copyFromX:x0 y:y0 toX:x1 y:y1 width:w invalidateX:leftX |
824 | 625 |
|
2146 | 626 |
(shown) ifFalse:[^ self]. |
824 | 627 |
|
1487 | 628 |
(self sensor hasDamageFor:self) ifTrue:[ |
629 |
self invalidate |
|
630 |
] ifFalse:[ |
|
631 |
self copyFrom:self x:x0 y:y0 toX:x1 y:y1 width:w height:height async:false. |
|
632 |
self invalidate:(Rectangle left:leftX top:0 width:(width - w) height:height) |
|
633 |
repairNow:true |
|
634 |
] |
|
824 | 635 |
! ! |
636 |
||
1494
096845be5d75
draw tabulatorLine on the tootView; do not use a SimpleView
Claus Gittinger <cg@exept.de>
parents:
1491
diff
changeset
|
637 |
!DSVLabelView::LineDrag methodsFor:'accessing'! |
1491 | 638 |
|
639 |
column |
|
640 |
"return the value of the instance variable 'column' (automatically generated)" |
|
641 |
||
1931 | 642 |
^ column |
643 |
! |
|
1491 | 644 |
|
645 |
deltaX |
|
646 |
"returns the distance x between the start and end action |
|
647 |
" |
|
1494
096845be5d75
draw tabulatorLine on the tootView; do not use a SimpleView
Claus Gittinger <cg@exept.de>
parents:
1491
diff
changeset
|
648 |
^ topX - startX |
1931 | 649 |
! |
650 |
||
651 |
resetDeltaX |
|
652 |
startX := topX |
|
1491 | 653 |
! ! |
654 |
||
1494
096845be5d75
draw tabulatorLine on the tootView; do not use a SimpleView
Claus Gittinger <cg@exept.de>
parents:
1491
diff
changeset
|
655 |
!DSVLabelView::LineDrag methodsFor:'dragging'! |
1491 | 656 |
|
1494
096845be5d75
draw tabulatorLine on the tootView; do not use a SimpleView
Claus Gittinger <cg@exept.de>
parents:
1491
diff
changeset
|
657 |
invertLine |
3537 | 658 |
"invert current line |
1494
096845be5d75
draw tabulatorLine on the tootView; do not use a SimpleView
Claus Gittinger <cg@exept.de>
parents:
1491
diff
changeset
|
659 |
" |
3537 | 660 |
self invertLinesMovingToX:nil. |
661 |
! |
|
2027
e61da28e7ffc
use new #translatePoint:fromView:toView:
Claus Gittinger <cg@exept.de>
parents:
1959
diff
changeset
|
662 |
|
3537 | 663 |
invertLinesMovingToX:viewX |
664 |
"invert current line |
|
665 |
if x notNil than change x position and invert new line" |
|
1939 | 666 |
|
3537 | 667 |
topView clippedByChildren:false. |
1491 | 668 |
|
3537 | 669 |
topView xoring:[ |
670 |
topView paint:color. |
|
671 |
topView lineWidth:2. |
|
672 |
topView displayLineFromX:topX y:topY toX:topX y:botY. |
|
2027
e61da28e7ffc
use new #translatePoint:fromView:toView:
Claus Gittinger <cg@exept.de>
parents:
1959
diff
changeset
|
673 |
|
3537 | 674 |
viewX notNil ifTrue:[ |
675 |
self moveToX:viewX. |
|
676 |
topView displayLineFromX:topX y:topY toX:topX y:botY. |
|
677 |
]. |
|
678 |
topView flush |
|
679 |
]. |
|
680 |
topView clippedByChildren:true. |
|
1491 | 681 |
! |
682 |
||
1494
096845be5d75
draw tabulatorLine on the tootView; do not use a SimpleView
Claus Gittinger <cg@exept.de>
parents:
1491
diff
changeset
|
683 |
moveToX:viewX |
1939 | 684 |
topX := (minX max:viewX) + transX. |
1491 | 685 |
! ! |
686 |
||
1494
096845be5d75
draw tabulatorLine on the tootView; do not use a SimpleView
Claus Gittinger <cg@exept.de>
parents:
1491
diff
changeset
|
687 |
!DSVLabelView::LineDrag methodsFor:'setup'! |
1491 | 688 |
|
1494
096845be5d75
draw tabulatorLine on the tootView; do not use a SimpleView
Claus Gittinger <cg@exept.de>
parents:
1491
diff
changeset
|
689 |
column:aColumn x:x y:y h:h minX:aMinX on:aView |
096845be5d75
draw tabulatorLine on the tootView; do not use a SimpleView
Claus Gittinger <cg@exept.de>
parents:
1491
diff
changeset
|
690 |
|device point| |
1491 | 691 |
|
3537 | 692 |
column := aColumn. |
693 |
topView := aView topView. |
|
694 |
device := topView device. |
|
695 |
color := Color colorId:(device blackpixel bitXor:device whitepixel). |
|
696 |
point := device translatePoint:(x@y) fromView:aView toView:topView. |
|
697 |
||
1494
096845be5d75
draw tabulatorLine on the tootView; do not use a SimpleView
Claus Gittinger <cg@exept.de>
parents:
1491
diff
changeset
|
698 |
topX := point x. |
096845be5d75
draw tabulatorLine on the tootView; do not use a SimpleView
Claus Gittinger <cg@exept.de>
parents:
1491
diff
changeset
|
699 |
topY := point y. |
096845be5d75
draw tabulatorLine on the tootView; do not use a SimpleView
Claus Gittinger <cg@exept.de>
parents:
1491
diff
changeset
|
700 |
botY := topY + h. |
096845be5d75
draw tabulatorLine on the tootView; do not use a SimpleView
Claus Gittinger <cg@exept.de>
parents:
1491
diff
changeset
|
701 |
minX := aMinX. |
096845be5d75
draw tabulatorLine on the tootView; do not use a SimpleView
Claus Gittinger <cg@exept.de>
parents:
1491
diff
changeset
|
702 |
startX := topX. |
096845be5d75
draw tabulatorLine on the tootView; do not use a SimpleView
Claus Gittinger <cg@exept.de>
parents:
1491
diff
changeset
|
703 |
transX := topX - x. |
1491 | 704 |
! ! |
705 |
||
542 | 706 |
!DSVLabelView class methodsFor:'documentation'! |
707 |
||
708 |
version |
|
3583 | 709 |
^ '$Header: /cvs/stx/stx/libwidg2/DSVLabelView.st,v 1.64 2008-11-01 18:18:08 stefan Exp $' |
542 | 710 |
! ! |