Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / man / man3 / Tk::Radiobutton.3
CommitLineData
86530b38
AT
1.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
2.\"
3.\" Standard preamble:
4.\" ========================================================================
5.de Sh \" Subsection heading
6.br
7.if t .Sp
8.ne 5
9.PP
10\fB\\$1\fR
11.PP
12..
13.de Sp \" Vertical space (when we can't use .PP)
14.if t .sp .5v
15.if n .sp
16..
17.de Vb \" Begin verbatim text
18.ft CW
19.nf
20.ne \\$1
21..
22.de Ve \" End verbatim text
23.ft R
24.fi
25..
26.\" Set up some character translations and predefined strings. \*(-- will
27.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28.\" double quote, and \*(R" will give a right double quote. | will give a
29.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
30.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
31.\" expand to `' in nroff, nothing in troff, for use with C<>.
32.tr \(*W-|\(bv\*(Tr
33.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34.ie n \{\
35. ds -- \(*W-
36. ds PI pi
37. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
39. ds L" ""
40. ds R" ""
41. ds C` ""
42. ds C' ""
43'br\}
44.el\{\
45. ds -- \|\(em\|
46. ds PI \(*p
47. ds L" ``
48. ds R" ''
49'br\}
50.\"
51.\" If the F register is turned on, we'll generate index entries on stderr for
52.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
53.\" entries marked with X<> in POD. Of course, you'll have to process the
54.\" output yourself in some meaningful fashion.
55.if \nF \{\
56. de IX
57. tm Index:\\$1\t\\n%\t"\\$2"
58..
59. nr % 0
60. rr F
61.\}
62.\"
63.\" For nroff, turn off justification. Always turn off hyphenation; it makes
64.\" way too many mistakes in technical documents.
65.hy 0
66.if n .na
67.\"
68.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69.\" Fear. Run. Save yourself. No user-serviceable parts.
70. \" fudge factors for nroff and troff
71.if n \{\
72. ds #H 0
73. ds #V .8m
74. ds #F .3m
75. ds #[ \f1
76. ds #] \fP
77.\}
78.if t \{\
79. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80. ds #V .6m
81. ds #F 0
82. ds #[ \&
83. ds #] \&
84.\}
85. \" simple accents for nroff and troff
86.if n \{\
87. ds ' \&
88. ds ` \&
89. ds ^ \&
90. ds , \&
91. ds ~ ~
92. ds /
93.\}
94.if t \{\
95. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101.\}
102. \" troff and (daisy-wheel) nroff accents
103.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110.ds ae a\h'-(\w'a'u*4/10)'e
111.ds Ae A\h'-(\w'A'u*4/10)'E
112. \" corrections for vroff
113.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115. \" for low resolution devices (crt and lpr)
116.if \n(.H>23 .if \n(.V>19 \
117\{\
118. ds : e
119. ds 8 ss
120. ds o a
121. ds d- d\h'-1'\(ga
122. ds D- D\h'-1'\(hy
123. ds th \o'bp'
124. ds Th \o'LP'
125. ds ae ae
126. ds Ae AE
127.\}
128.rm #[ #] #H #V #F C
129.\" ========================================================================
130.\"
131.IX Title "RADIOBUTTON 1"
132.TH RADIOBUTTON 1 "2000-12-30" "perl v5.8.0" "User Contributed Perl Documentation"
133.SH "NAME"
134Tk::Radiobutton \- Create and manipulate Radiobutton widgets
135.SH "SYNOPSIS"
136.IX Header "SYNOPSIS"
137\&\fI$radiobutton\fR = \fI$parent\fR\->\fBRadiobutton\fR(?\fIoptions\fR?);
138.SH "STANDARD OPTIONS"
139.IX Header "STANDARD OPTIONS"
140\&\fB\-activebackground\fR \fB\-cursor\fR \fB\-highlightthickness\fR \fB\-takefocus\fR
141\&\fB\-activeforeground\fR \fB\-disabledforeground\fR \fB\-image\fR \fB\-text\fR
142\&\fB\-anchor\fR \fB\-font\fR \fB\-justify\fR \fB\-textvariable\fR
143\&\fB\-background\fR \fB\-foreground\fR \fB\-padx\fR \fB\-underline\fR
144\&\fB\-bitmap\fR \fB\-highlightbackground\fR \fB\-pady\fR \fB\-wraplength\fR
145\&\fB\-borderwidth\fR \fB\-highlightcolor\fR \fB\-relief\fR
146.PP
147See Tk::options for details of the standard options.
148.SH "WIDGET-SPECIFIC OPTIONS"
149.IX Header "WIDGET-SPECIFIC OPTIONS"
150.IP "Name: \fBcommand\fR" 4
151.IX Item "Name: command"
152.PD 0
153.IP "Class: \fBCommand\fR" 4
154.IX Item "Class: Command"
155.IP "Switch: \fB\-command\fR" 4
156.IX Item "Switch: -command"
157.PD
158Specifies a perl/Tk callback to associate with the button. This command
159is typically invoked when mouse button 1 is released over the button
160window. The button's global variable (\fB\-variable\fR option) will
161be updated before the command is invoked.
162.IP "Name: \fBheight\fR" 4
163.IX Item "Name: height"
164.PD 0
165.IP "Class: \fBHeight\fR" 4
166.IX Item "Class: Height"
167.IP "Switch: \fB\-height\fR" 4
168.IX Item "Switch: -height"
169.PD
170Specifies a desired height for the button.
171If an image or bitmap is being displayed in the button then the value is in
172screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR);
173for text it is in lines of text.
174If this option isn't specified, the button's desired height is computed
175from the size of the image or bitmap or text being displayed in it.
176.IP "Name: \fBindicatorOn\fR" 4
177.IX Item "Name: indicatorOn"
178.PD 0
179.IP "Class: \fBIndicatorOn\fR" 4
180.IX Item "Class: IndicatorOn"
181.IP "Switch: \fB\-indicatoron\fR" 4
182.IX Item "Switch: -indicatoron"
183.PD
184Specifies whether or not the indicator should be drawn. Must be a
185proper boolean value. If false, the \fBrelief\fR option is
186ignored and the widget's relief is always sunken if the widget is
187selected and raised otherwise.
188.IP "Name: \fBselectColor\fR" 4
189.IX Item "Name: selectColor"
190.PD 0
191.IP "Class: \fBBackground\fR" 4
192.IX Item "Class: Background"
193.IP "Switch: \fB\-selectcolor\fR" 4
194.IX Item "Switch: -selectcolor"
195.PD
196Specifies a background color to use when the button is selected.
197If \fBindicatorOn\fR is true then the color applies to the indicator.
198Under Windows, this color is used as the background for the indicator
199regardless of the select state.
200If \fBindicatorOn\fR is false, this color is used as the background
201for the entire widget, in place of \fBbackground\fR or \fBactiveBackground\fR,
202whenever the widget is selected.
203If specified as an empty string then no special color is used for
204displaying when the widget is selected.
205.IP "Name: \fBselectImage\fR" 4
206.IX Item "Name: selectImage"
207.PD 0
208.IP "Class: \fBSelectImage\fR" 4
209.IX Item "Class: SelectImage"
210.IP "Switch: \fB\-selectimage\fR" 4
211.IX Item "Switch: -selectimage"
212.PD
213Specifies an image to display (in place of the \fBimage\fR option)
214when the radiobutton is selected.
215This option is ignored unless the \fBimage\fR option has been
216specified.
217.IP "Name: \fBstate\fR" 4
218.IX Item "Name: state"
219.PD 0
220.IP "Class: \fBState\fR" 4
221.IX Item "Class: State"
222.IP "Switch: \fB\-state\fR" 4
223.IX Item "Switch: -state"
224.PD
225Specifies one of three states for the radiobutton: \fBnormal\fR, \fBactive\fR,
226or \fBdisabled\fR. In normal state the radiobutton is displayed using the
227\&\fBforeground\fR and \fBbackground\fR options. The active state is
228typically used when the pointer is over the radiobutton. In active state
229the radiobutton is displayed using the \fBactiveForeground\fR and
230\&\fBactiveBackground\fR options. Disabled state means that the radiobutton
231should be insensitive: the default bindings will refuse to activate
232the widget and will ignore mouse button presses.
233In this state the \fBdisabledForeground\fR and
234\&\fBbackground\fR options determine how the radiobutton is displayed.
235.IP "Name: \fBvalue\fR" 4
236.IX Item "Name: value"
237.PD 0
238.IP "Class: \fBValue\fR" 4
239.IX Item "Class: Value"
240.IP "Switch: \fB\-value\fR" 4
241.IX Item "Switch: -value"
242.PD
243Specifies value to store in the button's associated variable whenever
244this button is selected.
245.IP "Name: \fBvariable\fR" 4
246.IX Item "Name: variable"
247.PD 0
248.IP "Class: \fBVariable\fR" 4
249.IX Item "Class: Variable"
250.IP "Switch: \fB\-variable\fR" 4
251.IX Item "Switch: -variable"
252.PD
253Specifies reference to a variable to set whenever this button is
254selected. Changes in this variable also cause the button to select
255or deselect itself. Defaults to the value \f(CW\*(C`\e$Tk::selectedButton\*(C'\fR.
256.IP "Name: \fBwidth\fR" 4
257.IX Item "Name: width"
258.PD 0
259.IP "Class: \fBWidth\fR" 4
260.IX Item "Class: Width"
261.IP "Switch: \fB\-width\fR" 4
262.IX Item "Switch: -width"
263.PD
264Specifies a desired width for the button.
265If an image or bitmap is being displayed in the button, the value is in
266screen units (i.e. any of the forms acceptable to \fBTk_GetPixels\fR);
267for text it is in characters.
268If this option isn't specified, the button's desired width is computed
269from the size of the image or bitmap or text being displayed in it.
270.SH "DESCRIPTION"
271.IX Header "DESCRIPTION"
272The \fBRadiobutton\fR method creates a new window (given by the
273\&\f(CW$widget\fR argument) and makes it into a radiobutton widget.
274Additional
275options, described above, may be specified on the command line
276or in the option database
277to configure aspects of the radiobutton such as its colors, font,
278text, and initial relief. The \fBradiobutton\fR command returns its
279\&\f(CW$widget\fR argument. At the time this command is invoked,
280there must not exist a window named \f(CW$widget\fR, but
281\&\f(CW$widget\fR's parent must exist.
282.PP
283A radiobutton is a widget that displays a textual string, bitmap or image
284and a diamond or circle called an \fIindicator\fR.
285If text is displayed, it must all be in a single font, but it
286can occupy multiple lines on the screen (if it contains newlines
287or if wrapping occurs because of the \fBwrapLength\fR option) and
288one of the characters may optionally be underlined using the
289\&\fBunderline\fR option. A radiobutton has
290all of the behavior of a simple button: it can display itself in either
291of three different ways, according to the \fBstate\fR option;
292it can be made to appear
293raised, sunken, or flat; it can be made to flash; and it invokes
294a perl/Tk callback whenever mouse button 1 is clicked over the
295check button.
296.PP
297In addition, radiobuttons can be \fIselected\fR.
298If a radiobutton is selected, the indicator is normally
299drawn with a selected appearance, and
300a Tcl variable associated with the radiobutton is set to a particular
301value (normally 1).
302Under Unix, the indicator is drawn with a sunken relief and a special
303color. Under Windows, the indicator is drawn with a round mark inside.
304If the radiobutton is not selected, then the indicator is drawn with a
305deselected appearance, and the associated variable is
306set to a different value (typically 0).
307Under Unix, the indicator is drawn with a raised relief and no special
308color. Under Windows, the indicator is drawn without a round mark inside.
309Typically, several radiobuttons share a single variable and the
310value of the variable indicates which radiobutton is to be selected.
311When a radiobutton is selected it sets the value of the variable to
312indicate that fact; each radiobutton also monitors the value of
313the variable and automatically selects and deselects itself when the
314variable's value changes.
315By default the variable \fBselectedButton\fR
316is used; its contents give the name of the button that is
317selected, or the empty string if no button associated with that
318variable is selected.
319The name of the variable for a radiobutton,
320plus the variable to be stored into it, may be modified with options
321on the command line or in the option database.
322Configuration options may also be used to modify the way the
323indicator is displayed (or whether it is displayed at all).
324By default a radiobutton is configured to select itself on button clicks.
325.SH "WIDGET METHODS"
326.IX Header "WIDGET METHODS"
327The \fBRadiobutton\fR method creates a widget object.
328This object supports the \fBconfigure\fR and \fBcget\fR methods
329described in Tk::options which can be used to enquire and
330modify the options described above.
331The widget also inherits all the methods provided by the generic
332Tk::Widget class.
333.PP
334The following additional methods are available for radiobutton widgets:
335.IP "\fI$radiobutton\fR\->\fBdeselect\fR" 4
336.IX Item "$radiobutton->deselect"
337Deselects the radiobutton and sets the associated variable to an
338empty string.
339If this radiobutton was not currently selected, the command has
340no effect.
341.IP "\fI$radiobutton\fR\->\fBflash\fR" 4
342.IX Item "$radiobutton->flash"
343Flashes the radiobutton. This is accomplished by redisplaying the radiobutton
344several times, alternating between active and normal colors. At
345the end of the flash the radiobutton is left in the same normal/active
346state as when the command was invoked.
347This command is ignored if the radiobutton's state is \fBdisabled\fR.
348.IP "\fI$radiobutton\fR\->\fBinvoke\fR" 4
349.IX Item "$radiobutton->invoke"
350Does just what would have happened if the user invoked the radiobutton
351with the mouse: selects the button and invokes
352its associated Tcl command, if there is one.
353The return value is the return value from the Tcl command, or an
354empty string if there is no command associated with the radiobutton.
355This command is ignored if the radiobutton's state is \fBdisabled\fR.
356.IP "\fI$radiobutton\fR\->\fBselect\fR" 4
357.IX Item "$radiobutton->select"
358Selects the radiobutton and sets the associated variable to the
359value corresponding to this widget.
360.SH "BINDINGS"
361.IX Header "BINDINGS"
362Tk automatically creates class bindings for radiobuttons that give them
363the following default behavior:
364.IP "[1]" 4
365.IX Item "[1]"
366On Unix systems, a radiobutton activates whenever the mouse passes
367over it and deactivates whenever the mouse leaves the radiobutton. On
368Mac and Windows systems, when mouse button 1 is pressed over a
369radiobutton, the button activates whenever the mouse pointer is inside
370the button, and deactivates whenever the mouse pointer leaves the
371button.
372.IP "[2]" 4
373.IX Item "[2]"
374When mouse button 1 is pressed over a radiobutton it is invoked (it
375becomes selected and the command associated with the button is
376invoked, if there is one).
377.IP "[3]" 4
378.IX Item "[3]"
379When a radiobutton has the input focus, the space key causes the radiobutton
380to be invoked.
381.Sp
382If the radiobutton's state is \fBdisabled\fR then none of the above
383actions occur: the radiobutton is completely non\-responsive.
384.Sp
385The behavior of radiobuttons can be changed by defining new bindings for
386individual widgets or by redefining the class bindings.
387.SH "KEYWORDS"
388.IX Header "KEYWORDS"
389radiobutton, widget