author | Claus Gittinger <cg@exept.de> |
Sat, 11 Nov 1995 17:23:54 +0100 | |
changeset 174 | d80a6cc3f9b2 |
parent 130 | 338e856bddc9 |
child 205 | 6814c0bf8df8 |
permissions | -rw-r--r-- |
37 | 1 |
" |
2 |
COPYRIGHT (c) 1994 by Claus Gittinger |
|
64 | 3 |
All Rights Reserved |
37 | 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 |
Scroller subclass:#MiniScroller |
|
64 | 14 |
instanceVariableNames:'' |
15 |
classVariableNames:'' |
|
16 |
poolDictionaries:'' |
|
17 |
category:'Views-Interactors' |
|
37 | 18 |
! |
19 |
||
20 |
!MiniScroller class methodsFor:'documentation'! |
|
21 |
||
22 |
copyright |
|
23 |
" |
|
24 |
COPYRIGHT (c) 1994 by Claus Gittinger |
|
64 | 25 |
All Rights Reserved |
37 | 26 |
|
27 |
This software is furnished under a license and may be used |
|
28 |
only in accordance with the terms of that license and with the |
|
29 |
inclusion of the above copyright notice. This software may not |
|
30 |
be provided or otherwise made available to, or used by, any |
|
31 |
other person. No title to or ownership of the software is |
|
32 |
hereby transferred. |
|
33 |
" |
|
34 |
! |
|
35 |
||
36 |
version |
|
174
d80a6cc3f9b2
uff - version methods changed to return stings
Claus Gittinger <cg@exept.de>
parents:
130
diff
changeset
|
37 |
^ '$Header: /cvs/stx/stx/libwidg/MiniScroller.st,v 1.5 1995-11-11 16:21:38 cg Exp $' |
37 | 38 |
! |
39 |
||
40 |
documentation |
|
41 |
" |
|
42 |
like a scroller, but taking less screen space |
|
43 |
" |
|
44 |
! ! |
|
45 |
||
130 | 46 |
!MiniScroller methodsFor:'queries'! |
47 |
preferredExtent |
|
37 | 48 |
"make my width very small" |
49 |
||
50 |
|w h mm| |
|
51 |
||
52 |
h := self class defaultExtent y. |
|
53 |
mm := (thumbLevel ~~ 0) ifTrue:[2.5] ifFalse:[2.0]. |
|
54 |
w := (device horizontalPixelPerMillimeter asFloat * mm) rounded. |
|
130 | 55 |
^ w @ h. |
56 |
! ! |
|
57 |
||
58 |
!MiniScroller methodsFor:'initialization'! |
|
37 | 59 |
|
60 |
initStyle |
|
119 | 61 |
|style lvl| |
62 |
||
37 | 63 |
super initStyle. |
119 | 64 |
style := StyleSheet name. |
37 | 65 |
style == #iris ifTrue:[ |
64 | 66 |
tallyLevel := 0. |
67 |
tallyMarks := 0. |
|
68 |
thumbEdgeStyle := nil. |
|
69 |
thumbLevel := 2. |
|
37 | 70 |
]. |
71 |
((style ~~ #normal) and:[style ~~ #mswindows]) ifTrue:[ |
|
64 | 72 |
style == #st80 ifTrue:[ |
119 | 73 |
lvl := 1. |
64 | 74 |
] ifFalse:[ |
119 | 75 |
lvl := -1. |
64 | 76 |
]. |
119 | 77 |
self level:lvl. |
64 | 78 |
self borderWidth:0 |
37 | 79 |
]. |
80 |
shadowForm := lightForm := nil. |
|
81 |
fixThumbHeight := false |
|
82 |
! ! |