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
|
585
|
14 |
instanceVariableNames:''
|
|
15 |
classVariableNames:''
|
|
16 |
poolDictionaries:''
|
|
17 |
category:'Views-Interactors'
|
0
|
18 |
!
|
|
19 |
|
38
|
20 |
!RadioButton class methodsFor:'documentation'!
|
|
21 |
|
|
22 |
copyright
|
|
23 |
"
|
|
24 |
COPYRIGHT (c) 1991 by Claus Gittinger
|
|
25 |
All Rights Reserved
|
0
|
26 |
|
38
|
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 |
like a Toggle, but do not turn off when pressed again, instead only
|
|
39 |
turn off when another RadioButton is pressed (see RadioButtonGroup).
|
|
40 |
|
|
41 |
written fall 91 by claus
|
585
|
42 |
|
|
43 |
[author:]
|
|
44 |
Claus Gittinger
|
38
|
45 |
"
|
86
|
46 |
!
|
|
47 |
|
|
48 |
examples
|
|
49 |
"
|
119
|
50 |
See more examples in RadioButtonGroup class>>examples
|
|
51 |
|
|
52 |
example1: one on behavior (using RadioButtons)
|
593
|
53 |
[exBegin]
|
86
|
54 |
|top panel b group|
|
|
55 |
|
|
56 |
top := StandardSystemView new.
|
|
57 |
top extent:200@200.
|
|
58 |
|
|
59 |
panel := HorizontalPanelView
|
593
|
60 |
origin:0.0@0.0
|
|
61 |
corner:1.0@1.0
|
|
62 |
in:top.
|
86
|
63 |
|
|
64 |
group := RadioButtonGroup new.
|
|
65 |
|
|
66 |
b := RadioButton label:'am' in:panel.
|
|
67 |
group add:b.
|
|
68 |
|
|
69 |
b := RadioButton label:'fm' in:panel.
|
|
70 |
group add:b.
|
|
71 |
|
|
72 |
b := RadioButton label:'off' in:panel.
|
|
73 |
group add:b.
|
|
74 |
|
|
75 |
top open
|
593
|
76 |
[exEnd]
|
105
|
77 |
|
|
78 |
|
119
|
79 |
example2: zero or one on behavior (using Toggles)
|
593
|
80 |
[exBegin]
|
105
|
81 |
|top panel b group|
|
|
82 |
|
|
83 |
top := StandardSystemView new.
|
|
84 |
top extent:200@200.
|
|
85 |
|
|
86 |
panel := HorizontalPanelView
|
593
|
87 |
origin:0.0@0.0
|
|
88 |
corner:1.0@1.0
|
|
89 |
in:top.
|
105
|
90 |
|
|
91 |
group := RadioButtonGroup new.
|
|
92 |
|
|
93 |
b := Toggle label:'am' in:panel.
|
|
94 |
group add:b.
|
|
95 |
|
|
96 |
b := Toggle label:'fm' in:panel.
|
|
97 |
group add:b.
|
|
98 |
|
|
99 |
b := Toggle label:'off' in:panel.
|
|
100 |
group add:b.
|
|
101 |
|
|
102 |
top open
|
593
|
103 |
[exEnd]
|
86
|
104 |
"
|
38
|
105 |
! !
|
0
|
106 |
|
105
|
107 |
!RadioButton methodsFor:'initialization'!
|
0
|
108 |
|
105
|
109 |
defaultControllerClass
|
|
110 |
^ RadioButtonController
|
0
|
111 |
! !
|
|
112 |
|
205
|
113 |
!RadioButton class methodsFor:'documentation'!
|
|
114 |
|
|
115 |
version
|
593
|
116 |
^ '$Header: /cvs/stx/stx/libwidg/RadioButton.st,v 1.13 1996-04-27 18:18:14 cg Exp $'
|
205
|
117 |
! !
|