author | Claus Gittinger <cg@exept.de> |
Fri, 28 Jun 2019 09:21:50 +0200 | |
changeset 6078 | 08c9e2a47dc5 |
parent 5955 | 01736fd997e6 |
permissions | -rw-r--r-- |
5955 | 1 |
"{ Encoding: utf8 }" |
2 |
||
17 | 3 |
" |
4 |
COPYRIGHT (c) 1992 by Claus Gittinger |
|
24 | 5 |
All Rights Reserved |
17 | 6 |
|
7 |
This software is furnished under a license and may be used |
|
8 |
only in accordance with the terms of that license and with the |
|
9 |
inclusion of the above copyright notice. This software may not |
|
10 |
be provided or otherwise made available to, or used by, any |
|
11 |
other person. No title to or ownership of the software is |
|
12 |
hereby transferred. |
|
13 |
" |
|
2819 | 14 |
"{ Package: 'stx:libwidg2' }" |
15 |
||
5353 | 16 |
"{ NameSpace: Smalltalk }" |
17 |
||
49 | 18 |
Slider subclass:#HorizontalSlider |
153 | 19 |
instanceVariableNames:'' |
20 |
classVariableNames:'' |
|
21 |
poolDictionaries:'' |
|
22 |
category:'Views-Interactors' |
|
17 | 23 |
! |
24 |
||
402
db4b13aff9c9
more code moved to superclass
Claus Gittinger <cg@exept.de>
parents:
222
diff
changeset
|
25 |
!HorizontalSlider class methodsFor:'documentation'! |
17 | 26 |
|
27 |
copyright |
|
28 |
" |
|
29 |
COPYRIGHT (c) 1992 by Claus Gittinger |
|
24 | 30 |
All Rights Reserved |
17 | 31 |
|
32 |
This software is furnished under a license and may be used |
|
33 |
only in accordance with the terms of that license and with the |
|
34 |
inclusion of the above copyright notice. This software may not |
|
35 |
be provided or otherwise made available to, or used by, any |
|
36 |
other person. No title to or ownership of the software is |
|
37 |
hereby transferred. |
|
38 |
" |
|
39 |
! |
|
40 |
||
41 |
documentation |
|
42 |
" |
|
43 |
this class implements horizontal sliders. |
|
155 | 44 |
|
45 |
[author:] |
|
46 |
Claus Gittinger |
|
17 | 47 |
" |
48 |
! ! |
|
49 |
||
50 |
!HorizontalSlider methodsFor:'initialization'! |
|
51 |
||
52 |
initialize |
|
1230 | 53 |
orientation := #horizontal. |
17 | 54 |
super initialize. |
49 | 55 |
sliderHeight := (self horizontalPixelPerMillimeter:10) rounded. |
1230 | 56 |
|
57 |
"Modified: / 7.3.1999 / 00:00:47 / cg" |
|
17 | 58 |
! ! |
59 |
||
65 | 60 |
!HorizontalSlider methodsFor:'queries'! |
61 |
||
5955 | 62 |
computePreferredExtent |
5353 | 63 |
"return the view's preferredExtent." |
153 | 64 |
|
65 | 65 |
|w h| |
66 |
||
67 |
w := self class defaultExtent x. |
|
2819 | 68 |
h := (self verticalPixelPerMillimeter:6) rounded. |
153 | 69 |
|
212
b63b8bf60d88
remember and do not recompute the preferredExtent;
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
70 |
preferredExtent := w @ h. |
b63b8bf60d88
remember and do not recompute the preferredExtent;
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
71 |
^ preferredExtent. |
b63b8bf60d88
remember and do not recompute the preferredExtent;
Claus Gittinger <cg@exept.de>
parents:
192
diff
changeset
|
72 |
|
5955 | 73 |
"Created: / 09-11-2018 / 19:55:19 / Claus Gittinger" |
65 | 74 |
! ! |
100 | 75 |
|
402
db4b13aff9c9
more code moved to superclass
Claus Gittinger <cg@exept.de>
parents:
222
diff
changeset
|
76 |
!HorizontalSlider class methodsFor:'documentation'! |
100 | 77 |
|
78 |
version |
|
5353 | 79 |
^ '$Header$' |
100 | 80 |
! ! |
5353 | 81 |