author | Stefan Vogel <sv@exept.de> |
Sun, 26 Oct 2008 21:14:50 +0100 | |
changeset 3579 | f28e1643b8d1 |
parent 2819 | 04c8432b57c8 |
child 5353 | 272d814ba358 |
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 |
" |
|
2819 | 12 |
"{ Package: 'stx:libwidg2' }" |
13 |
||
49 | 14 |
Slider subclass:#HorizontalSlider |
153 | 15 |
instanceVariableNames:'' |
16 |
classVariableNames:'' |
|
17 |
poolDictionaries:'' |
|
18 |
category:'Views-Interactors' |
|
17 | 19 |
! |
20 |
||
402
db4b13aff9c9
more code moved to superclass
Claus Gittinger <cg@exept.de>
parents:
222
diff
changeset
|
21 |
!HorizontalSlider class methodsFor:'documentation'! |
17 | 22 |
|
23 |
copyright |
|
24 |
" |
|
25 |
COPYRIGHT (c) 1992 by Claus Gittinger |
|
24 | 26 |
All Rights Reserved |
17 | 27 |
|
28 |
This software is furnished under a license and may be used |
|
29 |
only in accordance with the terms of that license and with the |
|
30 |
inclusion of the above copyright notice. This software may not |
|
31 |
be provided or otherwise made available to, or used by, any |
|
32 |
other person. No title to or ownership of the software is |
|
33 |
hereby transferred. |
|
34 |
" |
|
35 |
! |
|
36 |
||
37 |
documentation |
|
38 |
" |
|
39 |
this class implements horizontal sliders. |
|
155 | 40 |
|
41 |
[author:] |
|
42 |
Claus Gittinger |
|
17 | 43 |
" |
44 |
! ! |
|
45 |
||
46 |
!HorizontalSlider methodsFor:'initialization'! |
|
47 |
||
48 |
initialize |
|
1230 | 49 |
orientation := #horizontal. |
17 | 50 |
super initialize. |
49 | 51 |
sliderHeight := (self horizontalPixelPerMillimeter:10) rounded. |
1230 | 52 |
|
53 |
"Modified: / 7.3.1999 / 00:00:47 / cg" |
|
17 | 54 |
! ! |
55 |
||
65 | 56 |
!HorizontalSlider methodsFor:'queries'! |
57 |
||
58 |
preferredExtent |
|
153 | 59 |
"return the views preferredExtent." |
60 |
||
65 | 61 |
|w h| |
62 |
||
3579
f28e1643b8d1
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
2819
diff
changeset
|
63 |
"/ If I have an explicit preferredExtent.. |
f28e1643b8d1
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
2819
diff
changeset
|
64 |
explicitExtent notNil ifTrue:[ |
f28e1643b8d1
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
2819
diff
changeset
|
65 |
^ explicitExtent |
f28e1643b8d1
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
2819
diff
changeset
|
66 |
]. |
222 | 67 |
|
3579
f28e1643b8d1
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
2819
diff
changeset
|
68 |
"/ If I have a cached preferredExtent value.. |
192
e060e80f8e24
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
155
diff
changeset
|
69 |
preferredExtent notNil ifTrue:[ |
e060e80f8e24
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
155
diff
changeset
|
70 |
^ preferredExtent |
e060e80f8e24
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
155
diff
changeset
|
71 |
]. |
e060e80f8e24
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
155
diff
changeset
|
72 |
|
65 | 73 |
w := self class defaultExtent x. |
2819 | 74 |
h := (self verticalPixelPerMillimeter:6) rounded. |
153 | 75 |
|
212
b63b8bf60d88
remember and do not recompute the preferredExtent;
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
76 |
preferredExtent := w @ h. |
b63b8bf60d88
remember and do not recompute the preferredExtent;
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
77 |
^ preferredExtent. |
b63b8bf60d88
remember and do not recompute the preferredExtent;
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
78 |
|
222 | 79 |
"Modified: 19.7.1996 / 20:44:30 / cg" |
65 | 80 |
! ! |
100 | 81 |
|
402
db4b13aff9c9
more code moved to superclass
Claus Gittinger <cg@exept.de>
parents:
222
diff
changeset
|
82 |
!HorizontalSlider class methodsFor:'documentation'! |
100 | 83 |
|
84 |
version |
|
3579
f28e1643b8d1
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
2819
diff
changeset
|
85 |
^ '$Header: /cvs/stx/stx/libwidg2/HorizontalSlider.st,v 1.17 2008-10-26 20:14:50 stefan Exp $' |
100 | 86 |
! ! |