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