author | Claus Gittinger <cg@exept.de> |
Mon, 15 Jul 1996 12:09:08 +0200 | |
changeset 212 | b63b8bf60d88 |
parent 192 | e060e80f8e24 |
child 222 | 11fce0339069 |
permissions | -rw-r--r-- |
17 | 1 |
" |
2 |
COPYRIGHT (c) 1992 by Claus Gittinger |
|
24 | 3 |
All Rights Reserved |
17 | 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 |
||
49 | 13 |
Slider subclass:#HorizontalSlider |
153 | 14 |
instanceVariableNames:'' |
15 |
classVariableNames:'' |
|
16 |
poolDictionaries:'' |
|
17 |
category:'Views-Interactors' |
|
17 | 18 |
! |
19 |
||
212
b63b8bf60d88
remember and do not recompute the preferredExtent;
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
20 |
!HorizontalSlider class methodsFor:'documentation'! |
17 | 21 |
|
22 |
copyright |
|
23 |
" |
|
24 |
COPYRIGHT (c) 1992 by Claus Gittinger |
|
24 | 25 |
All Rights Reserved |
17 | 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 |
documentation |
|
37 |
" |
|
38 |
this class implements horizontal sliders. |
|
155 | 39 |
|
40 |
[author:] |
|
41 |
Claus Gittinger |
|
17 | 42 |
" |
43 |
! ! |
|
44 |
||
45 |
!HorizontalSlider methodsFor:'initialization'! |
|
46 |
||
47 |
initialize |
|
48 |
super initialize. |
|
49 | 49 |
sliderHeight := (self horizontalPixelPerMillimeter:10) rounded. |
50 |
orientation := #horizontal |
|
17 | 51 |
! ! |
52 |
||
65 | 53 |
!HorizontalSlider methodsFor:'queries'! |
54 |
||
55 |
preferredExtent |
|
153 | 56 |
"return the views preferredExtent." |
57 |
||
65 | 58 |
|w h| |
59 |
||
192
e060e80f8e24
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
155
diff
changeset
|
60 |
preferredExtent notNil ifTrue:[ |
e060e80f8e24
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
155
diff
changeset
|
61 |
^ preferredExtent |
e060e80f8e24
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
155
diff
changeset
|
62 |
]. |
e060e80f8e24
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
155
diff
changeset
|
63 |
|
65 | 64 |
w := self class defaultExtent x. |
65 |
h := (device verticalPixelPerMillimeter asFloat * 6) rounded. |
|
153 | 66 |
|
212
b63b8bf60d88
remember and do not recompute the preferredExtent;
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
67 |
preferredExtent := w @ h. |
b63b8bf60d88
remember and do not recompute the preferredExtent;
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
68 |
^ preferredExtent. |
b63b8bf60d88
remember and do not recompute the preferredExtent;
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
69 |
|
b63b8bf60d88
remember and do not recompute the preferredExtent;
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
70 |
"Modified: 15.7.1996 / 09:56:39 / cg" |
65 | 71 |
! ! |
100 | 72 |
|
212
b63b8bf60d88
remember and do not recompute the preferredExtent;
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
73 |
!HorizontalSlider class methodsFor:'documentation'! |
100 | 74 |
|
75 |
version |
|
212
b63b8bf60d88
remember and do not recompute the preferredExtent;
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
76 |
^ '$Header: /cvs/stx/stx/libwidg2/HorizontalSlider.st,v 1.12 1996-07-15 10:09:08 cg Exp $' |
100 | 77 |
! ! |