343
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1997 by eXept Software AG
|
|
3 |
All Rights Reserved
|
|
4 |
|
|
5 |
This software is furnished under a license and may be used
|
|
6 |
only in accordance with the terms of that license and with the
|
|
7 |
inclusion of the above copyright notice. This software may not
|
|
8 |
be provided or otherwise made available to, or used by, any
|
|
9 |
other person. No title to or ownership of the software is
|
|
10 |
hereby transferred.
|
|
11 |
"
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
Object subclass:#TabWidget
|
697
|
16 |
instanceVariableNames:'model tabView label disabledLabel printableLabel anchor extent
|
|
17 |
lineNr fgColor labelType'
|
343
|
18 |
classVariableNames:''
|
|
19 |
poolDictionaries:''
|
|
20 |
category:'Views-Interactors'
|
|
21 |
!
|
|
22 |
|
549
|
23 |
TabWidget subclass:#Mac
|
343
|
24 |
instanceVariableNames:''
|
|
25 |
classVariableNames:''
|
|
26 |
poolDictionaries:''
|
|
27 |
privateIn:TabWidget
|
|
28 |
!
|
|
29 |
|
549
|
30 |
TabWidget subclass:#Window
|
343
|
31 |
instanceVariableNames:''
|
|
32 |
classVariableNames:''
|
|
33 |
poolDictionaries:''
|
|
34 |
privateIn:TabWidget
|
|
35 |
!
|
|
36 |
|
|
37 |
!TabWidget class methodsFor:'documentation'!
|
|
38 |
|
|
39 |
copyright
|
|
40 |
"
|
|
41 |
COPYRIGHT (c) 1997 by eXept Software AG
|
|
42 |
All Rights Reserved
|
|
43 |
|
|
44 |
This software is furnished under a license and may be used
|
|
45 |
only in accordance with the terms of that license and with the
|
|
46 |
inclusion of the above copyright notice. This software may not
|
|
47 |
be provided or otherwise made available to, or used by, any
|
|
48 |
other person. No title to or ownership of the software is
|
|
49 |
hereby transferred.
|
|
50 |
"
|
|
51 |
|
|
52 |
|
|
53 |
!
|
|
54 |
|
|
55 |
documentation
|
|
56 |
"
|
|
57 |
instances represent (& draw) the tabs of a tabWidget.
|
|
58 |
|
|
59 |
[author:]
|
|
60 |
Claus Atzkern
|
|
61 |
|
|
62 |
[see also:]
|
|
63 |
TabView
|
|
64 |
"
|
|
65 |
! !
|
|
66 |
|
|
67 |
!TabWidget class methodsFor:'instance creation'!
|
|
68 |
|
367
|
69 |
labels:aList for:aTabView
|
|
70 |
"create tabs based on labels for a tabview
|
343
|
71 |
"
|
367
|
72 |
|list maxX maxY lftIns topIns level style|
|
|
73 |
|
|
74 |
maxX := 0.
|
|
75 |
maxY := 0.
|
|
76 |
style := aTabView style.
|
|
77 |
lftIns := style at:#labelLeftInset.
|
|
78 |
topIns := style at:#lableTopInset.
|
|
79 |
level := style at:#tabLevel.
|
|
80 |
|
409
|
81 |
aTabView device isNil ifTrue:[
|
|
82 |
self halt
|
|
83 |
].
|
697
|
84 |
|
|
85 |
list := aList collect:[:anEntry||y x tab lbl|
|
|
86 |
tab := self new label:anEntry for:aTabView.
|
|
87 |
lbl := tab printableLabel.
|
|
88 |
|
|
89 |
(y := lbl heightOn:aTabView) > maxY ifTrue:[maxY := y].
|
|
90 |
(x := lbl widthOn:aTabView) > maxX ifTrue:[maxX := x].
|
|
91 |
|
|
92 |
tab
|
367
|
93 |
].
|
|
94 |
|
|
95 |
style at:#labelMaxX put:maxX.
|
|
96 |
style at:#labelMaxY put:maxY.
|
|
97 |
|
|
98 |
maxY := maxY + topIns
|
|
99 |
+ (style at:#labelBottomInset)
|
|
100 |
+ (2 * level).
|
|
101 |
|
|
102 |
maxX := maxX + lftIns + (style at:#labelRightInset).
|
|
103 |
|
|
104 |
style at:#maxX put:maxX.
|
|
105 |
style at:#maxY put:maxY.
|
|
106 |
style at:#labelAnchor put:( lftIns @ (topIns +level) ).
|
|
107 |
|
|
108 |
self validateDimensions:style.
|
369
|
109 |
maxY := style at:#maxY.
|
|
110 |
maxX := style at:#maxX.
|
|
111 |
|
|
112 |
"/ caused by vertical layout for images
|
|
113 |
maxX < maxY ifTrue:[style at:#maxX put:maxY].
|
367
|
114 |
^ list
|
|
115 |
!
|
|
116 |
|
|
117 |
validateDimensions:aStyle
|
|
118 |
"validate dimensions for a style; could be redifined
|
|
119 |
"
|
343
|
120 |
! !
|
|
121 |
|
|
122 |
!TabWidget class methodsFor:'accessing'!
|
|
123 |
|
419
|
124 |
computeColorsOn:aView style:aStyle
|
|
125 |
"set colors dependent on selection color
|
|
126 |
"
|
|
127 |
|unselectedColor selectedColor|
|
|
128 |
|
|
129 |
selectedColor := aView viewBackground.
|
|
130 |
unselectedColor := selectedColor lightened.
|
|
131 |
|
|
132 |
aStyle at:#shadowColorSelected
|
|
133 |
put:((selectedColor averageColorIn:(0@0 corner:7@7)) darkened on:aView device).
|
|
134 |
|
|
135 |
aStyle at:#lightColorSelected
|
|
136 |
put:((selectedColor averageColorIn:(0@0 corner:7@7)) lightened on:aView device).
|
|
137 |
|
|
138 |
aStyle at:#shadowColorUnselected
|
|
139 |
put:((unselectedColor averageColorIn:(0@0 corner:7@7)) darkened on:aView device).
|
|
140 |
|
|
141 |
aStyle at:#lightColorUnselected
|
|
142 |
put:((unselectedColor averageColorIn:(0@0 corner:7@7)) lightened on:aView device).
|
|
143 |
|
|
144 |
aStyle at:#unselectedColor put:unselectedColor.
|
|
145 |
aStyle at:#selectedColor put:selectedColor.
|
|
146 |
aStyle at:#labelColor put:Color black.
|
|
147 |
!
|
|
148 |
|
|
149 |
computeColorsOn:aView style:aStyle selectionColor:aSelectedColor
|
|
150 |
"set colors dependent on selection color
|
|
151 |
"
|
|
152 |
|unselectedColor selectedColor|
|
|
153 |
|
|
154 |
unselectedColor := aView viewBackground.
|
|
155 |
selectedColor := unselectedColor lightened.
|
|
156 |
|
|
157 |
aStyle at:#shadowColorSelected
|
|
158 |
put:((selectedColor averageColorIn:(0@0 corner:7@7)) darkened on:aView device).
|
|
159 |
|
|
160 |
aStyle at:#lightColorSelected
|
|
161 |
put:((selectedColor averageColorIn:(0@0 corner:7@7)) lightened on:aView device).
|
|
162 |
|
|
163 |
aStyle at:#shadowColorUnselected
|
|
164 |
put:((unselectedColor averageColorIn:(0@0 corner:7@7)) darkened on:aView device).
|
|
165 |
|
|
166 |
aStyle at:#lightColorUnselected
|
|
167 |
put:((unselectedColor averageColorIn:(0@0 corner:7@7)) lightened on:aView device).
|
|
168 |
|
|
169 |
aStyle at:#unselectedColor put:unselectedColor.
|
|
170 |
aStyle at:#selectedColor put:selectedColor.
|
|
171 |
aStyle at:#labelColor put:Color black.
|
|
172 |
!
|
|
173 |
|
343
|
174 |
tabStyleOn:aView
|
|
175 |
"returns default tab style
|
|
176 |
"
|
419
|
177 |
|style|
|
343
|
178 |
|
419
|
179 |
style := IdentityDictionary new.
|
343
|
180 |
|
|
181 |
style at:#widget put:self.
|
419
|
182 |
self computeColorsOn:aView style:style.
|
343
|
183 |
|
367
|
184 |
style at:#expandSelection put:0@0. "/ expand selection extent x y when raised
|
|
185 |
style at:#tabLevel put:0. "/ level
|
351
|
186 |
style at:#lableTopInset put:4. "/ additional top label inset
|
|
187 |
style at:#labelBottomInset put:4. "/ additional bottom inset
|
367
|
188 |
style at:#labelLeftInset put:4. "/ label left inset
|
|
189 |
style at:#labelRightInset put:4. "/ label right inset
|
|
190 |
style at:#rightCovered put:0. "/ covers right tab for n pixels
|
343
|
191 |
|
|
192 |
^ style
|
|
193 |
!
|
|
194 |
|
|
195 |
widgetClass:aWidget
|
367
|
196 |
|wdgt name|
|
343
|
197 |
|
367
|
198 |
name := aWidget asString.
|
|
199 |
wdgt := Smalltalk classNamed:( self name asString, '::', name ).
|
343
|
200 |
|
367
|
201 |
wdgt notNil ifTrue:[
|
|
202 |
^ wdgt
|
343
|
203 |
].
|
367
|
204 |
^ Smalltalk classNamed:name
|
343
|
205 |
! !
|
|
206 |
|
367
|
207 |
!TabWidget methodsFor:'accessing'!
|
|
208 |
|
|
209 |
label
|
|
210 |
^ label
|
|
211 |
!
|
|
212 |
|
|
213 |
lineNr
|
|
214 |
"returns line number
|
|
215 |
"
|
|
216 |
^ lineNr
|
|
217 |
!
|
|
218 |
|
|
219 |
lineNr:aLineNr
|
|
220 |
"change line number
|
|
221 |
"
|
|
222 |
lineNr := aLineNr
|
697
|
223 |
!
|
|
224 |
|
|
225 |
printableLabel
|
|
226 |
|
|
227 |
|lbl dev|
|
|
228 |
|
|
229 |
printableLabel notNil ifTrue:[
|
|
230 |
^ printableLabel
|
|
231 |
].
|
|
232 |
|
|
233 |
model isNil ifTrue:[
|
|
234 |
lbl := label
|
|
235 |
] ifFalse:[
|
|
236 |
lbl := model rawLabel
|
|
237 |
].
|
|
238 |
|
|
239 |
dev := tabView device.
|
|
240 |
|
|
241 |
lbl isImage ifTrue:[
|
|
242 |
labelType := #image.
|
|
243 |
printableLabel := lbl onDevice:dev.
|
|
244 |
disabledLabel := printableLabel lightened onDevice:dev.
|
|
245 |
] ifFalse:[
|
|
246 |
labelType := #string.
|
|
247 |
|
|
248 |
printableLabel := lbl ? ''.
|
|
249 |
disabledLabel := printableLabel copy.
|
|
250 |
|
|
251 |
lbl class == LabelAndIcon ifTrue:[
|
|
252 |
lbl := printableLabel icon onDevice:dev.
|
|
253 |
printableLabel icon:lbl.
|
|
254 |
disabledLabel icon:(lbl lightened onDevice:dev).
|
|
255 |
]
|
|
256 |
].
|
|
257 |
^ printableLabel
|
367
|
258 |
! !
|
|
259 |
|
|
260 |
!TabWidget methodsFor:'accessing dimensions'!
|
343
|
261 |
|
367
|
262 |
anchor
|
|
263 |
"returns the tab origin
|
|
264 |
"
|
|
265 |
^ anchor
|
|
266 |
|
|
267 |
!
|
|
268 |
|
|
269 |
anchor:anAnchor
|
|
270 |
"change the tab anchor; no redraw
|
|
271 |
"
|
|
272 |
anchor := anAnchor
|
|
273 |
|
|
274 |
!
|
|
275 |
|
|
276 |
anchor:anAnchor extent:anExtent
|
|
277 |
"change anchor and extent; no redraw
|
|
278 |
"
|
|
279 |
anchor := anAnchor.
|
|
280 |
extent := anExtent.
|
343
|
281 |
|
|
282 |
|
|
283 |
!
|
|
284 |
|
|
285 |
extent
|
|
286 |
"return the tab extent
|
|
287 |
"
|
|
288 |
^ extent
|
|
289 |
!
|
|
290 |
|
|
291 |
extent:anExtent
|
|
292 |
"change the tab extent; no redraw
|
|
293 |
"
|
|
294 |
extent := anExtent
|
|
295 |
!
|
|
296 |
|
367
|
297 |
preferredExtentX
|
|
298 |
"returns my preferred extent x
|
343
|
299 |
"
|
367
|
300 |
^ (tabView styleAt:#maxX)
|
|
301 |
- (tabView styleAt:#labelMaxX)
|
697
|
302 |
+ (self printableLabel widthOn:tabView).
|
350
|
303 |
!
|
|
304 |
|
367
|
305 |
preferredExtentY
|
|
306 |
"returns my preferred extent y
|
343
|
307 |
"
|
367
|
308 |
^ (tabView styleAt:#maxY)
|
|
309 |
- (tabView styleAt:#labelMaxY)
|
697
|
310 |
+ (self printableLabel heightOn:tabView).
|
367
|
311 |
! !
|
343
|
312 |
|
367
|
313 |
!TabWidget methodsFor:'basic drawing'!
|
343
|
314 |
|
367
|
315 |
redrawAtBottom:isSelected
|
|
316 |
"redraw tab at bottom of view
|
343
|
317 |
"
|
367
|
318 |
^ self subclassResponsibility
|
343
|
319 |
!
|
|
320 |
|
367
|
321 |
redrawAtLeft:isSelected
|
|
322 |
"redraw tab at left of view
|
343
|
323 |
"
|
367
|
324 |
^ self subclassResponsibility
|
343
|
325 |
!
|
|
326 |
|
367
|
327 |
redrawAtRight:isSelected
|
|
328 |
"redraw tab at right of view
|
343
|
329 |
"
|
367
|
330 |
^ self subclassResponsibility
|
|
331 |
!
|
343
|
332 |
|
367
|
333 |
redrawAtTop:isSelected
|
|
334 |
"redraw tab at top of view
|
|
335 |
"
|
|
336 |
^ self subclassResponsibility
|
343
|
337 |
! !
|
|
338 |
|
697
|
339 |
!TabWidget methodsFor:'change & update'!
|
|
340 |
|
|
341 |
labelChanged
|
|
342 |
printableLabel := nil
|
|
343 |
! !
|
|
344 |
|
343
|
345 |
!TabWidget methodsFor:'drawing'!
|
|
346 |
|
369
|
347 |
redraw:isSelected
|
|
348 |
"redraw tab
|
|
349 |
"
|
697
|
350 |
|direction|
|
369
|
351 |
|
|
352 |
direction := tabView direction.
|
|
353 |
|
697
|
354 |
direction == #top ifTrue:[
|
|
355 |
self redrawAtTop:isSelected
|
369
|
356 |
] ifFalse:[
|
697
|
357 |
direction == #bottom ifTrue:[
|
|
358 |
self redrawAtBottom:isSelected
|
369
|
359 |
] ifFalse:[
|
697
|
360 |
direction == #right ifTrue:[ self redrawAtRight:isSelected ]
|
|
361 |
ifFalse:[ self redrawAtLeft:isSelected ]
|
|
362 |
]
|
369
|
363 |
].
|
697
|
364 |
self redrawLabel
|
392
|
365 |
!
|
|
366 |
|
419
|
367 |
redrawLabel
|
|
368 |
"redraw label only
|
|
369 |
"
|
697
|
370 |
|fg direction origin anchor x y label |
|
419
|
371 |
|
697
|
372 |
label := self printableLabel.
|
419
|
373 |
direction := tabView direction.
|
|
374 |
anchor := tabView styleAt:#labelAnchor.
|
|
375 |
origin := self computeOrigin.
|
|
376 |
|
697
|
377 |
"/ set label color
|
|
378 |
|
|
379 |
self printableLabel.
|
|
380 |
|
|
381 |
self isEnabled ifTrue:[
|
|
382 |
label := printableLabel.
|
|
383 |
(model notNil and:[(fg := model foregroundColor) notNil]) ifTrue:[
|
|
384 |
fgColor = fg ifFalse:[
|
|
385 |
fgColor := fg on:(tabView device)
|
|
386 |
].
|
|
387 |
tabView paint:fgColor
|
|
388 |
] ifFalse:[
|
|
389 |
tabView paintColor:#labelColor
|
|
390 |
]
|
|
391 |
] ifFalse:[
|
|
392 |
label := disabledLabel.
|
|
393 |
tabView paintColor:#shadowColorUnselected.
|
|
394 |
].
|
419
|
395 |
|
|
396 |
(direction == #top or:[direction == #bottom]) ifTrue:[
|
|
397 |
y := origin y.
|
|
398 |
x := origin x + anchor x.
|
|
399 |
|
|
400 |
direction == #top ifTrue:[
|
|
401 |
y := y + anchor y.
|
|
402 |
] ifFalse:[
|
|
403 |
y := y - anchor y - (label heightOn:tabView).
|
|
404 |
].
|
697
|
405 |
labelType == #string ifTrue:[
|
|
406 |
y := y + tabView fontAscent
|
|
407 |
].
|
419
|
408 |
] ifFalse:[
|
|
409 |
direction == #right ifTrue:[
|
|
410 |
x := origin x - anchor y - (label heightOn:tabView).
|
|
411 |
] ifFalse:[
|
|
412 |
x := origin x + anchor y.
|
|
413 |
].
|
|
414 |
y := origin y + anchor x.
|
|
415 |
|
697
|
416 |
labelType == #string ifTrue:[
|
|
417 |
x := x + tabView fontDescent.
|
419
|
418 |
tabView displayString:label x:x y:y angle:90.
|
|
419 |
^ self.
|
|
420 |
].
|
|
421 |
].
|
|
422 |
label displayOn:tabView x:x y:y.
|
369
|
423 |
! !
|
|
424 |
|
|
425 |
!TabWidget methodsFor:'initialization'!
|
|
426 |
|
|
427 |
label:aLabel for:aTabView
|
|
428 |
"initialize attributes
|
|
429 |
"
|
|
430 |
tabView := aTabView.
|
|
431 |
label := aLabel.
|
697
|
432 |
model := (label isKindOf:TabItem) ifTrue:[label] ifFalse:[nil]
|
|
433 |
|
369
|
434 |
! !
|
|
435 |
|
|
436 |
!TabWidget methodsFor:'private'!
|
|
437 |
|
367
|
438 |
computeCorner
|
|
439 |
"compute corner
|
|
440 |
"
|
|
441 |
|d c|
|
|
442 |
|
|
443 |
c := anchor + extent.
|
|
444 |
d := tabView direction.
|
|
445 |
|
|
446 |
d == #top ifTrue:[^ ( c x @ (tabView extent y) )].
|
|
447 |
d == #left ifTrue:[^ ( (tabView extent x) @ c y ) ].
|
|
448 |
d == #right ifTrue:[^ ( 0 @ c y )].
|
|
449 |
d == #bottom ifTrue:[^ ( c x @ 0 )].
|
|
450 |
|
|
451 |
self error.
|
|
452 |
!
|
|
453 |
|
|
454 |
computeOrigin
|
|
455 |
"compute origin
|
|
456 |
"
|
|
457 |
|d|
|
|
458 |
|
|
459 |
d := tabView direction.
|
|
460 |
|
|
461 |
d == #top ifTrue:[ ^ anchor x @ ((tabView extent y) - anchor y) ].
|
|
462 |
d == #left ifTrue:[ ^ ((tabView extent x) - anchor x) @ anchor y ].
|
|
463 |
d == #right ifTrue:[ ^ anchor ].
|
|
464 |
d == #bottom ifTrue:[ ^ anchor ].
|
|
465 |
|
|
466 |
self error
|
343
|
467 |
! !
|
|
468 |
|
|
469 |
!TabWidget methodsFor:'queries'!
|
|
470 |
|
|
471 |
containsPoint:aPoint
|
367
|
472 |
"return true, if a point is contained in the tab
|
343
|
473 |
"
|
474
|
474 |
|d x y origin|
|
343
|
475 |
|
367
|
476 |
d := tabView direction.
|
343
|
477 |
x := aPoint x.
|
367
|
478 |
y := aPoint y.
|
343
|
479 |
|
367
|
480 |
origin := self computeOrigin.
|
|
481 |
|
|
482 |
(d == #top or:[d == #bottom]) ifTrue:[
|
|
483 |
((x >= origin x) and:[x <= (origin x + extent x)]) ifTrue:[
|
|
484 |
d == #top ifTrue:[
|
|
485 |
^ ((y >= origin y) and:[y <= (origin y + extent y)])
|
|
486 |
].
|
|
487 |
^ ((y <= origin y) and:[y >= (origin y - extent y)])
|
|
488 |
]
|
|
489 |
] ifFalse:[
|
|
490 |
((y >= origin y) and:[y <= (origin y + extent y)]) ifTrue:[
|
|
491 |
d == #right ifTrue:[
|
|
492 |
^ ((x <= origin x) and:[x >= (origin x - extent x)])
|
|
493 |
].
|
|
494 |
^ ((x >= origin x) and:[x <= (origin x + extent x)])
|
|
495 |
]
|
343
|
496 |
].
|
367
|
497 |
^ false
|
549
|
498 |
!
|
|
499 |
|
|
500 |
intersects:aRectangle
|
|
501 |
"return true, if the intersection between the tab widget and
|
|
502 |
the argument, aRectangle is not empty
|
|
503 |
"
|
551
|
504 |
|origin corner direction irect|
|
549
|
505 |
|
|
506 |
origin := self computeOrigin.
|
|
507 |
corner := self computeCorner.
|
|
508 |
|
|
509 |
direction := tabView direction.
|
|
510 |
|
|
511 |
direction == #top ifTrue:[
|
551
|
512 |
irect := (Rectangle origin:origin corner:corner)
|
|
513 |
] ifFalse:[
|
|
514 |
direction == #bottom ifTrue:[
|
|
515 |
irect := (Rectangle origin:(origin x @ corner y) corner:(corner x @ origin y))
|
|
516 |
] ifFalse:[
|
|
517 |
direction == #right ifTrue:[
|
|
518 |
irect := (Rectangle origin:(corner x @ origin y) corner:(origin x @ corner y))
|
|
519 |
] ifFalse:[
|
|
520 |
irect := (Rectangle origin:origin corner:corner)
|
|
521 |
]
|
|
522 |
]
|
549
|
523 |
].
|
|
524 |
|
551
|
525 |
^ aRectangle intersects:irect
|
697
|
526 |
!
|
|
527 |
|
|
528 |
isEnabled
|
|
529 |
|
|
530 |
^ (tabView isEnabled and:[(model isNil or:[model isEnabled])])
|
|
531 |
|
|
532 |
!
|
|
533 |
|
|
534 |
model
|
|
535 |
^ model
|
|
536 |
|
549
|
537 |
! !
|
|
538 |
|
|
539 |
!TabWidget::Mac class methodsFor:'accessing'!
|
|
540 |
|
|
541 |
tabStyleOn:aView
|
|
542 |
|style|
|
|
543 |
|
|
544 |
style := super tabStyleOn:aView.
|
|
545 |
style at:#tabLevel put:2.
|
|
546 |
^ style.
|
|
547 |
! !
|
|
548 |
|
|
549 |
!TabWidget::Mac class methodsFor:'calculate dimensions'!
|
|
550 |
|
|
551 |
validateDimensions:aStyle
|
|
552 |
"validate dimensions for a style; could be redifined
|
|
553 |
"
|
|
554 |
|maxY maxX anchor lftIns|
|
|
555 |
|
|
556 |
maxY := aStyle at:#maxY.
|
|
557 |
maxX := (aStyle at:#maxX) - (aStyle at:#labelLeftInset).
|
|
558 |
anchor := aStyle at:#labelAnchor.
|
|
559 |
lftIns := maxY // 2.
|
|
560 |
|
|
561 |
anchor x:lftIns.
|
|
562 |
|
|
563 |
aStyle at:#maxX put:(maxX + lftIns + maxY).
|
|
564 |
aStyle at:#rightCovered put:(maxY // 2).
|
|
565 |
! !
|
|
566 |
|
|
567 |
!TabWidget::Mac methodsFor:'drawing'!
|
|
568 |
|
|
569 |
redrawAtBottom:isSelected
|
|
570 |
"redraw tab at bottom of view
|
|
571 |
"
|
|
572 |
|origin corner level polygon x y x1 eX eY shadowColor lightColor|
|
|
573 |
|
|
574 |
isSelected ifFalse:[
|
|
575 |
lightColor := tabView styleAt:#lightColorUnselected.
|
|
576 |
shadowColor := tabView styleAt:#shadowColorUnselected.
|
|
577 |
tabView paint:(tabView styleAt:#unselectedColor).
|
|
578 |
] ifTrue:[
|
|
579 |
lightColor := tabView styleAt:#lightColorSelected.
|
|
580 |
shadowColor := tabView styleAt:#shadowColorSelected.
|
|
581 |
tabView paint:(tabView styleAt:#selectedColor).
|
|
582 |
].
|
|
583 |
polygon := Array new:5.
|
|
584 |
origin := self computeOrigin.
|
|
585 |
corner := self computeCorner.
|
|
586 |
level := tabView styleAt:#tabLevel.
|
|
587 |
|
|
588 |
x := origin x.
|
|
589 |
y := origin y.
|
|
590 |
eX := corner x.
|
|
591 |
eY := corner y.
|
|
592 |
x1 := eX - (tabView styleAt:#maxY).
|
|
593 |
|
|
594 |
polygon at:1 put:(Point x:x y:eY).
|
|
595 |
polygon at:2 put:(Point x:x y:y).
|
|
596 |
polygon at:3 put:(Point x:x1 y:y).
|
|
597 |
polygon at:4 put:(Point x:eX y:(y-extent y)).
|
|
598 |
polygon at:5 put:(Point x:eX y:eY).
|
|
599 |
|
|
600 |
tabView fillPolygon:polygon.
|
|
601 |
tabView paint:lightColor.
|
|
602 |
|
|
603 |
1 to:level do:[:i|
|
|
604 |
tabView displayLineFromX:x+1 y:y-i toX:x1+i y:y-i.
|
|
605 |
tabView displayLineFromX:x+i y:y-1 toX:x+i y:1.
|
|
606 |
].
|
|
607 |
tabView paint:shadowColor.
|
|
608 |
tabView displayPolygon:polygon.
|
|
609 |
|
|
610 |
isSelected ifFalse:[
|
|
611 |
tabView displayLineFromX:x y:eY toX:eX y:eY.
|
|
612 |
]
|
|
613 |
!
|
|
614 |
|
|
615 |
redrawAtLeft:isSelected
|
|
616 |
"redraw tab at left of view
|
|
617 |
"
|
|
618 |
|origin corner polygon level x y y1 eX eY shadowColor lightColor|
|
|
619 |
|
|
620 |
isSelected ifFalse:[
|
|
621 |
lightColor := tabView styleAt:#lightColorUnselected.
|
|
622 |
shadowColor := tabView styleAt:#shadowColorUnselected.
|
|
623 |
tabView paint:(tabView styleAt:#unselectedColor).
|
|
624 |
] ifTrue:[
|
|
625 |
lightColor := tabView styleAt:#lightColorSelected.
|
|
626 |
shadowColor := tabView styleAt:#shadowColorSelected.
|
|
627 |
tabView paint:(tabView styleAt:#selectedColor).
|
|
628 |
].
|
|
629 |
polygon := Array new:5.
|
|
630 |
origin := self computeOrigin.
|
|
631 |
corner := self computeCorner.
|
|
632 |
level := tabView styleAt:#tabLevel.
|
|
633 |
|
|
634 |
x := origin x.
|
|
635 |
y := origin y.
|
|
636 |
eX := corner x.
|
|
637 |
eY := corner y.
|
|
638 |
y1 := eY - (tabView styleAt:#maxY).
|
|
639 |
|
|
640 |
polygon at:1 put:(Point x:eX y:y).
|
|
641 |
polygon at:2 put:(Point x:x y:y).
|
|
642 |
polygon at:3 put:(Point x:x y:y1).
|
|
643 |
polygon at:4 put:(Point x:(x+extent x) y:eY).
|
|
644 |
polygon at:5 put:(Point x:eX y:eY).
|
|
645 |
|
|
646 |
tabView fillPolygon:polygon.
|
|
647 |
tabView paint:lightColor.
|
|
648 |
|
|
649 |
1 to:level do:[:i|
|
|
650 |
tabView displayLineFromX:eX y:y+i toX:x+2 y:y+i.
|
|
651 |
tabView displayLineFromX:x+i y:y+1 toX:x+i y:y1+i.
|
|
652 |
].
|
|
653 |
tabView paint:shadowColor.
|
|
654 |
tabView displayPolygon:polygon.
|
|
655 |
|
|
656 |
isSelected ifFalse:[
|
|
657 |
tabView displayLineFromX:eX-1 y:y toX:eX-1 y:eY.
|
|
658 |
]
|
|
659 |
!
|
|
660 |
|
|
661 |
redrawAtRight:isSelected
|
|
662 |
"redraw tab at right of view
|
|
663 |
"
|
|
664 |
|origin corner level polygon x y y1 eY shadowColor lightColor|
|
|
665 |
|
|
666 |
isSelected ifFalse:[
|
|
667 |
lightColor := tabView styleAt:#lightColorUnselected.
|
|
668 |
shadowColor := tabView styleAt:#shadowColorUnselected.
|
|
669 |
tabView paint:(tabView styleAt:#unselectedColor).
|
|
670 |
] ifTrue:[
|
|
671 |
lightColor := tabView styleAt:#lightColorSelected.
|
|
672 |
shadowColor := tabView styleAt:#shadowColorSelected.
|
|
673 |
tabView paint:(tabView styleAt:#selectedColor).
|
|
674 |
].
|
|
675 |
polygon := Array new:5.
|
|
676 |
origin := self computeOrigin.
|
|
677 |
corner := self computeCorner.
|
|
678 |
level := tabView styleAt:#tabLevel.
|
|
679 |
|
|
680 |
x := origin x.
|
|
681 |
y := origin y.
|
|
682 |
eY := corner y.
|
|
683 |
y1 := eY - (tabView styleAt:#maxY).
|
|
684 |
|
|
685 |
polygon at:1 put:(Point x:0 y:y).
|
|
686 |
polygon at:2 put:(Point x:x y:y).
|
|
687 |
polygon at:3 put:(Point x:x y:y1).
|
|
688 |
polygon at:4 put:(Point x:(x-extent x) y:eY).
|
|
689 |
polygon at:5 put:(Point x:0 y:eY).
|
|
690 |
|
|
691 |
tabView fillPolygon:polygon.
|
|
692 |
tabView paint:lightColor.
|
|
693 |
|
|
694 |
1 to:level do:[:i|
|
|
695 |
tabView displayLineFromX:0 y:y+i toX:x-1 y:y+i.
|
|
696 |
tabView displayLineFromX:x-i y:y+1 toX:x-i y:y1+i.
|
|
697 |
].
|
|
698 |
tabView paint:shadowColor.
|
|
699 |
tabView displayPolygon:polygon.
|
|
700 |
|
|
701 |
isSelected ifFalse:[
|
|
702 |
tabView displayLineFromX:0 y:y toX:0 y:eY.
|
|
703 |
]
|
|
704 |
|
|
705 |
!
|
|
706 |
|
|
707 |
redrawAtTop:isSelected
|
|
708 |
"redraw tab at top of view
|
|
709 |
"
|
|
710 |
|origin corner level polygon x y x1 eX eY shadowColor lightColor|
|
|
711 |
|
|
712 |
isSelected ifFalse:[
|
|
713 |
lightColor := tabView styleAt:#lightColorUnselected.
|
|
714 |
shadowColor := tabView styleAt:#shadowColorUnselected.
|
|
715 |
tabView paint:(tabView styleAt:#unselectedColor).
|
|
716 |
] ifTrue:[
|
|
717 |
lightColor := tabView styleAt:#lightColorSelected.
|
|
718 |
shadowColor := tabView styleAt:#shadowColorSelected.
|
|
719 |
tabView paint:(tabView styleAt:#selectedColor).
|
|
720 |
].
|
|
721 |
polygon := Array new:5.
|
|
722 |
origin := self computeOrigin.
|
|
723 |
corner := self computeCorner.
|
|
724 |
level := tabView styleAt:#tabLevel.
|
|
725 |
|
|
726 |
x := origin x.
|
|
727 |
y := origin y.
|
|
728 |
eX := corner x - 1.
|
|
729 |
eY := corner y.
|
|
730 |
x1 := eX - (tabView styleAt:#maxY).
|
|
731 |
|
|
732 |
polygon at:1 put:(Point x:x y:eY).
|
|
733 |
polygon at:2 put:(Point x:x y:y).
|
|
734 |
polygon at:3 put:(Point x:x1 y:y).
|
|
735 |
polygon at:4 put:(Point x:eX y:(y+extent y)).
|
|
736 |
polygon at:5 put:(Point x:eX y:eY).
|
|
737 |
|
|
738 |
tabView fillPolygon:polygon.
|
|
739 |
tabView paint:lightColor.
|
|
740 |
|
|
741 |
1 to:level do:[:i|
|
|
742 |
tabView displayLineFromX:x+i y:eY toX:x+i y:y+1.
|
|
743 |
tabView displayLineFromX:x+1 y:y+i toX:x1+i y:y+i.
|
|
744 |
].
|
|
745 |
tabView paint:shadowColor.
|
|
746 |
tabView displayPolygon:polygon.
|
|
747 |
|
|
748 |
isSelected ifFalse:[
|
|
749 |
tabView displayLineFromX:x y:eY-1 toX:eX y:eY-1.
|
|
750 |
]
|
|
751 |
|
|
752 |
|
343
|
753 |
! !
|
|
754 |
|
367
|
755 |
!TabWidget::Window class methodsFor:'accessing'!
|
350
|
756 |
|
|
757 |
tabStyleOn:aView
|
474
|
758 |
|style|
|
350
|
759 |
|
|
760 |
style := super tabStyleOn:aView.
|
|
761 |
|
367
|
762 |
style at:#expandSelection put:4@4.
|
|
763 |
style at:#tabLevel put:2.
|
|
764 |
style at:#lableTopInset put:2.
|
|
765 |
style at:#labelBottomInset put:2.
|
|
766 |
style at:#roundedEdges put:true.
|
|
767 |
^ style
|
350
|
768 |
|
|
769 |
|
|
770 |
|
|
771 |
! !
|
|
772 |
|
367
|
773 |
!TabWidget::Window class methodsFor:'calculate dimensions'!
|
|
774 |
|
|
775 |
validateDimensions:aStyle
|
|
776 |
"validate dimensions for a style; could be redifined
|
|
777 |
"
|
|
778 |
|maxY anchor|
|
350
|
779 |
|
367
|
780 |
(aStyle at:#roundedEdges) ifTrue:[
|
|
781 |
maxY := aStyle at:#maxY.
|
|
782 |
aStyle at:#maxY put:(maxY + 3).
|
|
783 |
anchor := aStyle at:#labelAnchor.
|
|
784 |
anchor y:(anchor y + 1).
|
|
785 |
aStyle at:#labelAnchor put:anchor.
|
|
786 |
]
|
|
787 |
|
|
788 |
|
|
789 |
|
350
|
790 |
|
|
791 |
|
|
792 |
! !
|
|
793 |
|
367
|
794 |
!TabWidget::Window methodsFor:'drawing'!
|
|
795 |
|
|
796 |
redrawAtBottom:isSelected
|
|
797 |
"redraw tab at bottom of view
|
|
798 |
"
|
474
|
799 |
|origin corner y x xR yB tabLevel roundedEdges shadowColor lightColor|
|
367
|
800 |
|
|
801 |
origin := self computeOrigin.
|
|
802 |
corner := self computeCorner.
|
|
803 |
x := origin x.
|
|
804 |
y := origin y.
|
|
805 |
xR := corner x - 1.
|
|
806 |
yB := 0.
|
|
807 |
|
|
808 |
roundedEdges := tabView styleAt:#roundedEdges.
|
|
809 |
tabLevel := (tabView styleAt:#tabLevel) - 1.
|
|
810 |
|
|
811 |
isSelected ifFalse:[
|
|
812 |
tabView paint:(tabView styleAt:#unselectedColor).
|
|
813 |
shadowColor := tabView styleAt:#shadowColorUnselected.
|
|
814 |
lightColor := tabView styleAt:#lightColorUnselected.
|
|
815 |
] ifTrue:[
|
|
816 |
tabView paint:(tabView styleAt:#selectedColor).
|
|
817 |
shadowColor := tabView styleAt:#shadowColorSelected.
|
|
818 |
lightColor := tabView styleAt:#lightColorSelected.
|
|
819 |
].
|
|
820 |
|
|
821 |
roundedEdges ifTrue:[y := y - 2].
|
|
822 |
tabView fillRectangle:(Rectangle left:x top:yB extent:(extent x @ y)).
|
350
|
823 |
|
367
|
824 |
roundedEdges ifTrue:[
|
|
825 |
tabView displayLineFromX:x-1 y:y toX:xR y:y.
|
|
826 |
y := y - 1.
|
|
827 |
|
|
828 |
tabView paint:lightColor.
|
|
829 |
tabView displayPointX:x y:y+1.
|
|
830 |
tabView displayPointX:x+1 y:y+1.
|
|
831 |
tabView displayLineFromX:x+1 y:y+2 toX:xR-1 y:y+2.
|
|
832 |
tabView displayLineFromX:x+2 y:y+3 toX:xR-2 y:y+3.
|
|
833 |
|
|
834 |
tabView paint:shadowColor.
|
350
|
835 |
|
367
|
836 |
0 to:tabLevel do:[:i |
|
|
837 |
tabView displayPointX:xR-i y:y.
|
|
838 |
tabView displayPointX:xR-i y:y+1.
|
|
839 |
tabView displayPointX:xR-1-i y:y+2.
|
|
840 |
].
|
|
841 |
tabView displayPointX:xR-2 y:y+3.
|
|
842 |
tabView displayPointX:xR-3 y:y+3.
|
|
843 |
].
|
|
844 |
|
|
845 |
tabView paint:lightColor.
|
|
846 |
|
|
847 |
0 to:tabLevel do:[:i |
|
|
848 |
roundedEdges ifFalse:[
|
|
849 |
tabView displayLineFromX:x y:y-i toX:xR y:y-i "/ upper edge
|
|
850 |
].
|
|
851 |
tabView displayLineFromX:x+i y:y+1 toX:x+i y:yB. "/ left edge
|
|
852 |
].
|
|
853 |
y := y + 1.
|
|
854 |
tabView paint:shadowColor.
|
|
855 |
|
|
856 |
0 to:tabLevel do:[:i |
|
|
857 |
tabView displayLineFromX:xR-i y:y-i toX:xR-i y:yB. "/ right edge
|
|
858 |
].
|
350
|
859 |
|
|
860 |
!
|
|
861 |
|
367
|
862 |
redrawAtLeft:isSelected
|
|
863 |
"redraw tab at left of view
|
350
|
864 |
"
|
474
|
865 |
|origin corner y x xR yB tabLevel roundedEdges shadowColor lightColor|
|
367
|
866 |
|
|
867 |
origin := self computeOrigin.
|
|
868 |
corner := self computeCorner.
|
|
869 |
x := origin x.
|
|
870 |
y := origin y.
|
|
871 |
xR := corner x.
|
|
872 |
yB := corner y.
|
|
873 |
|
|
874 |
roundedEdges := tabView styleAt:#roundedEdges.
|
|
875 |
tabLevel := (tabView styleAt:#tabLevel) - 1.
|
|
876 |
|
|
877 |
isSelected ifFalse:[
|
|
878 |
tabView paint:(tabView styleAt:#unselectedColor).
|
|
879 |
shadowColor := tabView styleAt:#shadowColorUnselected.
|
|
880 |
lightColor := tabView styleAt:#lightColorUnselected.
|
|
881 |
] ifTrue:[
|
|
882 |
tabView paint:(tabView styleAt:#selectedColor).
|
|
883 |
shadowColor := tabView styleAt:#shadowColorSelected.
|
|
884 |
lightColor := tabView styleAt:#lightColorSelected.
|
|
885 |
].
|
|
886 |
tabView fillRectangle:(Rectangle left:x top:y extent:(xR @ extent y)).
|
|
887 |
|
|
888 |
roundedEdges ifTrue:[
|
|
889 |
tabView displayLineFromX:x y:y toX:x y:yB.
|
|
890 |
|
|
891 |
tabView paint:lightColor.
|
|
892 |
tabView displayPointX:x y:y+1.
|
|
893 |
tabView displayPointX:x y:y+2.
|
|
894 |
tabView displayLineFromX:x-1 y:y+2 toX:x-1 y:yB-1.
|
|
895 |
tabView displayLineFromX:x-2 y:y+3 toX:x-2 y:yB-1.
|
|
896 |
|
|
897 |
tabView paint:shadowColor.
|
350
|
898 |
|
367
|
899 |
0 to:tabLevel do:[:i |
|
|
900 |
tabView displayPointX:x y:yB-i.
|
|
901 |
tabView displayPointX:x-1 y:yB-i-1.
|
|
902 |
tabView displayPointX:x-2 y:yB-i-2.
|
|
903 |
].
|
|
904 |
].
|
|
905 |
tabView paint:lightColor.
|
|
906 |
|
|
907 |
0 to:tabLevel do:[:i |
|
|
908 |
roundedEdges ifFalse:[
|
|
909 |
tabView displayLineFromX:x+i y:y+i toX:x+i y:yB. "/ upper edge
|
|
910 |
].
|
|
911 |
tabView displayLineFromX:x y:y+i toX:xR y:y+i. "/ left edge
|
|
912 |
].
|
|
913 |
tabView paint:shadowColor.
|
350
|
914 |
|
367
|
915 |
0 to:tabLevel do:[:i |
|
|
916 |
tabView displayLineFromX:x+i y:yB-i toX:xR y:yB-i.
|
|
917 |
].
|
|
918 |
|
|
919 |
!
|
|
920 |
|
|
921 |
redrawAtRight:isSelected
|
|
922 |
"redraw tab at right of view
|
|
923 |
"
|
474
|
924 |
|origin corner y x xR yB tabLevel roundedEdges shadowColor lightColor|
|
367
|
925 |
|
|
926 |
origin := self computeOrigin.
|
|
927 |
corner := self computeCorner.
|
|
928 |
x := origin x.
|
|
929 |
y := origin y.
|
|
930 |
xR := corner x - 1.
|
|
931 |
yB := corner y.
|
|
932 |
|
|
933 |
roundedEdges := tabView styleAt:#roundedEdges.
|
|
934 |
tabLevel := (tabView styleAt:#tabLevel) - 1.
|
350
|
935 |
|
|
936 |
isSelected ifFalse:[
|
367
|
937 |
tabView paint:(tabView styleAt:#unselectedColor).
|
350
|
938 |
shadowColor := tabView styleAt:#shadowColorUnselected.
|
367
|
939 |
lightColor := tabView styleAt:#lightColorUnselected.
|
350
|
940 |
] ifTrue:[
|
367
|
941 |
tabView paint:(tabView styleAt:#selectedColor).
|
350
|
942 |
shadowColor := tabView styleAt:#shadowColorSelected.
|
367
|
943 |
lightColor := tabView styleAt:#lightColorSelected.
|
350
|
944 |
].
|
367
|
945 |
tabView fillRectangle:(Rectangle left:0 top:y extent:(x @ extent y)).
|
|
946 |
|
|
947 |
roundedEdges ifTrue:[
|
|
948 |
tabView displayLineFromX:x y:y toX:x y:yB.
|
350
|
949 |
|
367
|
950 |
tabView paint:lightColor.
|
|
951 |
tabView displayPointX:x y:y+1.
|
|
952 |
tabView displayPointX:x y:y+2.
|
|
953 |
tabView displayLineFromX:x+1 y:y+2 toX:x+1 y:yB-1.
|
|
954 |
tabView displayLineFromX:x+2 y:y+3 toX:x+2 y:yB-1.
|
|
955 |
|
|
956 |
tabView paint:shadowColor.
|
|
957 |
|
|
958 |
0 to:tabLevel do:[:i |
|
|
959 |
tabView displayPointX:x y:yB-i.
|
|
960 |
tabView displayPointX:x+1 y:yB-i-1.
|
|
961 |
tabView displayPointX:x+2 y:yB-i-2.
|
|
962 |
].
|
|
963 |
].
|
350
|
964 |
tabView paint:lightColor.
|
|
965 |
|
367
|
966 |
0 to:tabLevel do:[:i |
|
|
967 |
roundedEdges ifFalse:[
|
|
968 |
tabView displayLineFromX:x-i y:y+i toX:x-i y:yB. "/ upper edge
|
|
969 |
].
|
|
970 |
tabView displayLineFromX:x y:y+i+1 toX:0 y:y+i+1. "/ left edge
|
|
971 |
].
|
|
972 |
tabView paint:shadowColor.
|
|
973 |
|
|
974 |
0 to:tabLevel do:[:i |
|
|
975 |
tabView displayLineFromX:x-i+1 y:yB-i toX:1 y:yB-i.
|
|
976 |
].
|
|
977 |
!
|
|
978 |
|
|
979 |
redrawAtTop:isSelected
|
|
980 |
"redraw tab at top of view
|
|
981 |
"
|
474
|
982 |
|origin corner y x xR yB tabLevel roundedEdges shadowColor lightColor|
|
367
|
983 |
|
|
984 |
origin := self computeOrigin.
|
|
985 |
corner := self computeCorner.
|
|
986 |
x := origin x.
|
|
987 |
y := origin y.
|
|
988 |
xR := corner x - 1.
|
|
989 |
yB := corner y.
|
|
990 |
|
|
991 |
roundedEdges := tabView styleAt:#roundedEdges.
|
|
992 |
tabLevel := (tabView styleAt:#tabLevel) - 1.
|
|
993 |
|
|
994 |
isSelected ifFalse:[
|
|
995 |
tabView paint:(tabView styleAt:#unselectedColor).
|
|
996 |
shadowColor := tabView styleAt:#shadowColorUnselected.
|
|
997 |
lightColor := tabView styleAt:#lightColorUnselected.
|
|
998 |
] ifTrue:[
|
|
999 |
tabView paint:(tabView styleAt:#selectedColor).
|
|
1000 |
shadowColor := tabView styleAt:#shadowColorSelected.
|
|
1001 |
lightColor := tabView styleAt:#lightColorSelected.
|
350
|
1002 |
].
|
|
1003 |
|
367
|
1004 |
roundedEdges ifTrue:[ y := y + 2].
|
|
1005 |
tabView fillRectangle:(Rectangle left:x top:y extent:((extent x) @ yB)).
|
|
1006 |
|
|
1007 |
roundedEdges ifTrue:[
|
|
1008 |
y := y + 1.
|
|
1009 |
tabView displayLineFromX:x y:y-1 toX:xR y:y-1.
|
|
1010 |
tabView displayLineFromX:x+1 y:y-2 toX:xR-1 y:y-2.
|
|
1011 |
tabView displayLineFromX:x+2 y:y-3 toX:xR-2 y:y-3.
|
|
1012 |
|
|
1013 |
tabView paint:lightColor.
|
|
1014 |
|
|
1015 |
0 to:tabLevel do:[:i |
|
|
1016 |
tabView displayPointX:x+i y:y-1.
|
|
1017 |
tabView displayPointX:x+1+i y:y-1-1.
|
|
1018 |
tabView displayLineFromX:x+2+i y:y-3-i toX:xR-1-i y:y-3-i. "/ top
|
|
1019 |
].
|
|
1020 |
|
|
1021 |
tabView paint:shadowColor.
|
|
1022 |
0 to:tabLevel do:[:i |
|
|
1023 |
tabView displayPointX:xR-i y:y.
|
|
1024 |
tabView displayPointX:xR-i y:y-1.
|
|
1025 |
tabView displayPointX:xR-1-i y:y-1-1.
|
|
1026 |
].
|
|
1027 |
tabView displayPointX:xR-2 y:y-1-1-1.
|
|
1028 |
tabView displayPointX:xR-3 y:y-1-1-1.
|
350
|
1029 |
].
|
|
1030 |
|
367
|
1031 |
tabView paint:lightColor.
|
|
1032 |
0 to:tabLevel do:[:i |
|
|
1033 |
roundedEdges ifFalse:[
|
|
1034 |
tabView displayLineFromX:x y:y+i toX:xR y:y+i. "/ upper edge
|
|
1035 |
].
|
|
1036 |
tabView displayLineFromX:x+i y:y toX:x+i y:yB. "/ left edge
|
|
1037 |
].
|
|
1038 |
tabView paint:shadowColor.
|
|
1039 |
0 to:tabLevel do:[:i |
|
|
1040 |
tabView displayLineFromX:xR-i y:y+i toX:xR-i y:yB. "/ right edge
|
|
1041 |
].
|
350
|
1042 |
! !
|
|
1043 |
|
343
|
1044 |
!TabWidget class methodsFor:'documentation'!
|
|
1045 |
|
|
1046 |
version
|
697
|
1047 |
^ '$Header: /cvs/stx/stx/libwidg2/TabWidget.st,v 1.14 1998-01-28 14:09:48 ca Exp $'
|
343
|
1048 |
! !
|