author | Claus Gittinger <cg@exept.de> |
Fri, 19 Jul 1996 20:49:29 +0200 | |
changeset 222 | 11fce0339069 |
parent 212 | b63b8bf60d88 |
child 402 | db4b13aff9c9 |
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 |
||
222 | 60 |
"/ If I have an explicit preferredExtent .. |
61 |
||
192
e060e80f8e24
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
155
diff
changeset
|
62 |
preferredExtent notNil ifTrue:[ |
e060e80f8e24
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
155
diff
changeset
|
63 |
^ preferredExtent |
e060e80f8e24
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
155
diff
changeset
|
64 |
]. |
e060e80f8e24
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
155
diff
changeset
|
65 |
|
65 | 66 |
w := self class defaultExtent x. |
67 |
h := (device verticalPixelPerMillimeter asFloat * 6) rounded. |
|
153 | 68 |
|
212
b63b8bf60d88
remember and do not recompute the preferredExtent;
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
69 |
preferredExtent := w @ h. |
b63b8bf60d88
remember and do not recompute the preferredExtent;
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
70 |
^ preferredExtent. |
b63b8bf60d88
remember and do not recompute the preferredExtent;
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
71 |
|
222 | 72 |
"Modified: 19.7.1996 / 20:44:30 / cg" |
65 | 73 |
! ! |
100 | 74 |
|
212
b63b8bf60d88
remember and do not recompute the preferredExtent;
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
75 |
!HorizontalSlider class methodsFor:'documentation'! |
100 | 76 |
|
77 |
version |
|
222 | 78 |
^ '$Header: /cvs/stx/stx/libwidg2/HorizontalSlider.st,v 1.13 1996-07-19 18:49:29 cg Exp $' |
100 | 79 |
! ! |