.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Gtk2::RadioButton 3" .TH Gtk2::RadioButton 3 2023-07-25 "perl v5.38.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Gtk2::RadioButton \- wrapper for GtkRadioButton .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 4 \& # first group \& $foo1 = Gtk2::RadioButton\->new (undef, \*(AqFoo One\*(Aq); \& $foo2 = Gtk2::RadioButton\->new ($foo1, \*(AqFoo Two\*(Aq); \& $foo3 = Gtk2::RadioButton\->new ($foo2, \*(AqFoo Three\*(Aq); \& \& # second group, using the group reference \& $bar1 = Gtk2::RadioButton\->new (undef, \*(AqBar One\*(Aq); \& $group = $bar1\->get_group; \& $bar2 = Gtk2::RadioButton\->new ($group, \*(AqBar Two\*(Aq); \& $bar3 = Gtk2::RadioButton\->new ($group, \*(AqBar Three\*(Aq); \& \& # move bar3 from the bar group to the foo group. \& $bar\->set_group ($foo\->get_group); \& \& # iterate over the widgets in the group \& $group = $foo1\->get_group; \& foreach my $r (@$group) { \& $r\->set_sensitive ($whatever); \& } .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" A single radio button performs the same basic function as a Gtk2::CheckButton, as its position in the object hierarchy reflects. It is only when multiple radio buttons are grouped together that they become a different user interface component in their own right. .PP Every radio button is a member of some group of radio buttons. When one is selected, all other radio buttons in the same group are deselected. A Gtk2::RadioButton is one way of giving the user a choice from many options; Gtk2::OptionMenu and Gtk2::ComboBox (added in gtk+ 2.4) are alternatives. .PP Each constructor can take either a group or widget from that group where the group is wanted; this is an enhancement over the C API. Nevertheless, the _from_widget forms are provided for completeness. .SH HIERARCHY .IX Header "HIERARCHY" .Vb 10 \& Glib::Object \& +\-\-\-\-Glib::InitiallyUnowned \& +\-\-\-\-Gtk2::Object \& +\-\-\-\-Gtk2::Widget \& +\-\-\-\-Gtk2::Container \& +\-\-\-\-Gtk2::Bin \& +\-\-\-\-Gtk2::Button \& +\-\-\-\-Gtk2::ToggleButton \& +\-\-\-\-Gtk2::CheckButton \& +\-\-\-\-Gtk2::RadioButton .Ve .SH INTERFACES .IX Header "INTERFACES" .Vb 3 \& Glib::Object::_Unregistered::AtkImplementorIface \& Gtk2::Buildable \& Gtk2::Activatable .Ve .SH METHODS .IX Header "METHODS" .ie n .SS "widget = Gtk2::RadioButton\->\fBnew\fP ($member_or_listref=undef, $label=undef)" .el .SS "widget = Gtk2::RadioButton\->\fBnew\fP ($member_or_listref=undef, \f(CW$label\fP=undef)" .IX Subsection "widget = Gtk2::RadioButton->new ($member_or_listref=undef, $label=undef)" .IP \(bu 4 \&\f(CW$member_or_listref\fR (scalar) reference to radiobutton group or a Gtk2::RadioButton belonging to that group. .IP \(bu 4 \&\f(CW$label\fR (string) .PP Create a radio button. If \fR\f(CI$label\fR\fI\fR is provided, it will be interpreted as a mnemonic. If \fI\fR\f(CI$member_or_listref\fR\fI\fR is undef, the radio button will be created in a new group. .ie n .SS "widget = Gtk2::RadioButton\->\fBnew_from_widget\fP ($group, $label=undef)" .el .SS "widget = Gtk2::RadioButton\->\fBnew_from_widget\fP ($group, \f(CW$label\fP=undef)" .IX Subsection "widget = Gtk2::RadioButton->new_from_widget ($group, $label=undef)" .IP \(bu 4 \&\f(CW$group\fR (Gtk2::RadioButton or undef) .IP \(bu 4 \&\f(CW$label\fR (string) .ie n .SS "widget = Gtk2::RadioButton\->\fBnew_with_label\fP ($member_or_listref=undef, $label=undef)" .el .SS "widget = Gtk2::RadioButton\->\fBnew_with_label\fP ($member_or_listref=undef, \f(CW$label\fP=undef)" .IX Subsection "widget = Gtk2::RadioButton->new_with_label ($member_or_listref=undef, $label=undef)" .IP \(bu 4 \&\f(CW$member_or_listref\fR (scalar) reference to radiobutton group or a Gtk2::RadioButton belonging to that group. .IP \(bu 4 \&\f(CW$label\fR (string) .PP Create a radio button with a plain text label, which will not be interpreted as a mnemonic. .ie n .SS "widget = Gtk2::RadioButton\->\fBnew_with_label_from_widget\fP ($group, $label=undef)" .el .SS "widget = Gtk2::RadioButton\->\fBnew_with_label_from_widget\fP ($group, \f(CW$label\fP=undef)" .IX Subsection "widget = Gtk2::RadioButton->new_with_label_from_widget ($group, $label=undef)" .IP \(bu 4 \&\f(CW$group\fR (Gtk2::RadioButton or undef) .IP \(bu 4 \&\f(CW$label\fR (string) .ie n .SS "widget = Gtk2::RadioButton\->\fBnew_with_mnemonic\fP ($member_or_listref=undef, $label=undef)" .el .SS "widget = Gtk2::RadioButton\->\fBnew_with_mnemonic\fP ($member_or_listref=undef, \f(CW$label\fP=undef)" .IX Subsection "widget = Gtk2::RadioButton->new_with_mnemonic ($member_or_listref=undef, $label=undef)" .IP \(bu 4 \&\f(CW$member_or_listref\fR (scalar) reference to radiobutton group or a Gtk2::RadioButton belonging to that group. .IP \(bu 4 \&\f(CW$label\fR (string) .PP Create a radio button with a mnemonic; this is an alias for \f(CW\*(C`new\*(C'\fR. .ie n .SS "widget = Gtk2::RadioButton\->\fBnew_with_mnemonic_from_widget\fP ($group, $label=undef)" .el .SS "widget = Gtk2::RadioButton\->\fBnew_with_mnemonic_from_widget\fP ($group, \f(CW$label\fP=undef)" .IX Subsection "widget = Gtk2::RadioButton->new_with_mnemonic_from_widget ($group, $label=undef)" .IP \(bu 4 \&\f(CW$group\fR (Gtk2::RadioButton or undef) .IP \(bu 4 \&\f(CW$label\fR (string) .ie n .SS "arrayref = $radio_button\->\fBget_group\fP" .el .SS "arrayref = \f(CW$radio_button\fP\->\fBget_group\fP" .IX Subsection "arrayref = $radio_button->get_group" Return a reference to the radio group to which \fR\f(CI$radio_button\fR\fI\fR belongs. The group is a reference to an array of widget references; the array is \fBnot\fR magical, that is, it will not be updated automatically if the group changes; call \f(CW\*(C`get_group\*(C'\fR each time you want to use the group. .ie n .SS "$radio_button\->\fBset_group\fP ($member_or_listref)" .el .SS "\f(CW$radio_button\fP\->\fBset_group\fP ($member_or_listref)" .IX Subsection "$radio_button->set_group ($member_or_listref)" .IP \(bu 4 \&\f(CW$member_or_listref\fR (scalar) reference to the group or a Gtk2::RadioButton belonging to that group. .PP Assign \fR\f(CI$radio_button\fR\fI\fR to a new group. .SH PROPERTIES .IX Header "PROPERTIES" .IP "'group' (Gtk2::RadioButton : default undef : writable / private / static-nick / static-blurb)" 4 .IX Item "'group' (Gtk2::RadioButton : default undef : writable / private / static-nick / static-blurb)" The radio button whose group this widget belongs to. .SH SIGNALS .IX Header "SIGNALS" .IP "\fBgroup-changed\fR (Gtk2::RadioButton)" 4 .IX Item "group-changed (Gtk2::RadioButton)" .SH "SEE ALSO" .IX Header "SEE ALSO" Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container, Gtk2::Bin, Gtk2::Button, Gtk2::ToggleButton, Gtk2::CheckButton .SH COPYRIGHT .IX Header "COPYRIGHT" Copyright (C) 2003\-2011 by the gtk2\-perl team. .PP This software is licensed under the LGPL. See Gtk2 for a full notice.