0
|
1 |
"
|
5
|
2 |
COPYRIGHT (c) 1991 by Claus Gittinger
|
0
|
3 |
All Rights Reserved
|
|
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 |
|
|
13 |
Toggle subclass:#RadioButton
|
|
14 |
instanceVariableNames:''
|
|
15 |
classVariableNames:''
|
|
16 |
poolDictionaries:''
|
|
17 |
category:'Views-Interactors'
|
|
18 |
!
|
|
19 |
|
|
20 |
RadioButton comment:'
|
5
|
21 |
COPYRIGHT (c) 1991 by Claus Gittinger
|
0
|
22 |
All Rights Reserved
|
|
23 |
|
38
|
24 |
$Header: /cvs/stx/stx/libwidg/RadioButton.st,v 1.4 1994-08-07 13:23:14 claus Exp $
|
|
25 |
'!
|
|
26 |
|
|
27 |
!RadioButton class methodsFor:'documentation'!
|
|
28 |
|
|
29 |
copyright
|
|
30 |
"
|
|
31 |
COPYRIGHT (c) 1991 by Claus Gittinger
|
|
32 |
All Rights Reserved
|
0
|
33 |
|
38
|
34 |
This software is furnished under a license and may be used
|
|
35 |
only in accordance with the terms of that license and with the
|
|
36 |
inclusion of the above copyright notice. This software may not
|
|
37 |
be provided or otherwise made available to, or used by, any
|
|
38 |
other person. No title to or ownership of the software is
|
|
39 |
hereby transferred.
|
|
40 |
"
|
|
41 |
!
|
|
42 |
|
|
43 |
version
|
|
44 |
"
|
|
45 |
$Header: /cvs/stx/stx/libwidg/RadioButton.st,v 1.4 1994-08-07 13:23:14 claus Exp $
|
|
46 |
"
|
|
47 |
!
|
|
48 |
|
|
49 |
documentation
|
|
50 |
"
|
|
51 |
like a Toggle, but do not turn off when pressed again, instead only
|
|
52 |
turn off when another RadioButton is pressed (see RadioButtonGroup).
|
|
53 |
|
|
54 |
written fall 91 by claus
|
|
55 |
"
|
|
56 |
! !
|
0
|
57 |
|
|
58 |
!RadioButton methodsFor:'destroying'!
|
|
59 |
|
|
60 |
destroy
|
|
61 |
self release.
|
|
62 |
super destroy
|
|
63 |
! !
|
|
64 |
|
|
65 |
!RadioButton methodsFor:'changing state'!
|
|
66 |
|
|
67 |
toggle
|
|
68 |
"in addition to toggling, notify RadioButtonGroup"
|
|
69 |
|
|
70 |
enabled ifTrue:[
|
|
71 |
super toggle.
|
|
72 |
pressed ifTrue:[
|
|
73 |
self changed
|
|
74 |
]
|
|
75 |
]
|
|
76 |
! !
|
|
77 |
|
|
78 |
!RadioButton methodsFor:'events'!
|
|
79 |
|
|
80 |
buttonPress:button x:x y:y
|
|
81 |
"radiobuttons change only off-to-on; turning off is done by other
|
|
82 |
buttons"
|
|
83 |
|
|
84 |
pressed ifFalse:[
|
|
85 |
self toggle
|
|
86 |
]
|
|
87 |
! !
|