<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<refentry id="class-gtkradiobutton">
  <refnamediv>
    <refname>gtk.RadioButton</refname>
    <refpurpose>a choice of one of multiple check buttons.</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>gtk.RadioButton</classname></ooclass>
      <ooclass><classname><link
linkend="class-gtkcheckbutton">gtk.CheckButton</link></classname></ooclass>
      <constructorsynopsis language="python">
	<methodname><link
linkend="constructor-gtkradiobutton">gtk.RadioButton</link></methodname>
	<methodparam><parameter
		       role="keyword">group</parameter>
	  <initializer>None</initializer></methodparam>
	<methodparam><parameter
		       role="keyword">label</parameter>
	  <initializer>None</initializer></methodparam>
	<methodparam><parameter role="keyword">use_underline</parameter>
	  <initializer>True</initializer></methodparam>
      </constructorsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkradiobutton--get-group">get_group</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkradiobutton--set-group">set_group</link></methodname>
	<methodparam><parameter
		       role="keyword">group</parameter></methodparam>
      </methodsynopsis>
    </classsynopsis>

  </refsect1>

  <refsect1>
    <title>Ancestry</title>

<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
  +-- <link linkend="class-gtkobject">gtk.Object</link>
    +-- <link linkend="class-gtkwidget">gtk.Widget</link>
      +-- <link linkend="class-gtkcontainer">gtk.Container</link>
        +-- <link linkend="class-gtkbin">gtk.Bin</link>
          +-- <link linkend="class-gtkbutton">gtk.Button</link>
            +-- <link linkend="class-gtktogglebutton">gtk.ToggleButton</link>
              +-- <link linkend="class-gtkcheckbutton">gtk.CheckButton</link>
                +-- <link linkend="class-gtkradiobutton">gtk.RadioButton</link>
</synopsis>

  </refsect1>
  
  <refsect1>
		<title>Implemented Interfaces</title>
		<para>
			<link linkend="class-gtkradiobutton"><classname>gtk.RadioButton</classname></link>
			implements 
			<link linkend="class-gtkbuildable"><classname>gtk.Buildable</classname></link>
		</para>
	</refsect1>

  <refsect1 id="properties-gtkradiobutton">
    <title>gtk.RadioButton Properties</title>

    <para><link linkend="properties-gtkobject">gtk.Object Properties</link></para>
    <para><link linkend="properties-gtkwidget">gtk.Widget Properties</link></para>
    <para><link linkend="properties-gtkcontainer">gtk.Container Properties</link></para>
    <para><link linkend="properties-gtkbutton">gtk.Button Properties</link></para>
    <para><link linkend="properties-gtktogglebutton">gtk.ToggleButton Properties</link></para>

    <blockquote role="properties">
      <informaltable pgwide="1" frame="none">
	<tgroup cols="3">
	  <colspec column="1" colwidth="1in"/>
	  <colspec column="2" colwidth="1in"/>
	  <colspec column="3" colwidth="4in"/>
	  <tbody>

	    <row valign="top">
	      <entry>"group"</entry>
	      <entry>Write</entry>
	      <entry>The group that the radiobutton is in.</entry>
	    </row>

	  </tbody>
	</tgroup>
      </informaltable>
    </blockquote>

  </refsect1>

  <refsect1 id="style-properties-gtkradiobutton">
    <title>gtk.RadioButton Style Properties</title>

    <para><link linkend="style-properties-gtkwidget">gtk.Widget Style Properties</link></para>
    <para><link linkend="style-properties-gtkbutton">gtk.Button Style Properties</link></para>
    <para><link linkend="style-properties-gtkcheckbutton">gtk.CheckButton Style Properties</link></para>

  </refsect1>

  <refsect1 id="signal-prototypes-gtkradiobutton">
    <title>gtk.RadioButton Signal Prototypes</title>

    <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkobject">gtk.Object Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkwidget">gtk.Widget Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkcontainer">gtk.Container Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkbutton">gtk.Button Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtktogglebutton">gtk.ToggleButton Signal Prototypes</link></para>

    <variablelist>
      <varlistentry>
        <term>"<link linkend="signal-gtkradiobutton--group-changed">group-changed</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>radiobutton</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
    </variablelist>

  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>A single <link
linkend="class-gtkradiobutton"><classname>gtk.RadioButton</classname></link>
performs the same basic function as a <link
linkend="class-gtkcheckbutton"><classname>gtk.CheckButton</classname></link>, 
as it's 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. 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 <link
linkend="class-gtkradiobutton"><classname>gtk.RadioButton</classname></link>
is used to give the user a choice of one of many options.</para>

    <para>Radio button widgets are created with <link
linkend="constructor-gtkradiobutton">gtk.RadioButton</link>() passing
<literal>None</literal> as the <parameter>group</parameter> (first) argument
if this is the first radio button in a group. In subsequent calls, pass a
reference to a <link
linkend="class-gtkradiobutton"><classname>gtk.RadioButton</classname></link>
as the first argument to specify the group. The second (optional) argument
to <link linkend="constructor-gtkradiobutton">gtk.RadioButton</link>() is a
label that is used to specify the text of the button. The label text is
parsed for mnemonic characters (preceded by an underscore) to specify an
accelerator for the radiobutton. See <link
linkend="class-gtkaccelgroup"><classname>gtk.AccelGroup</classname></link>
and <link
linkend="class-gtkaccellabel"><classname>gtk.AccelLabel</classname></link>
for more information on mnemonic accelerators.</para>

    <para>To retrieve the group a <link
linkend="class-gtkradiobutton"><classname>gtk.RadioButton</classname></link>
is assigned to, use the <link
linkend="method-gtkradiobutton--get-group"><methodname>get_group</methodname>()</link> 
method. To remove a <link
linkend="class-gtkradiobutton"><classname>gtk.RadioButton</classname></link>
from one group and make it part of a new one, use the <link
linkend="method-gtkradiobutton--set-group"><methodname>set_group</methodname>()</link> 
method.</para>

  </refsect1>

  <refsect1 id="constructor-gtkradiobutton">
    <title>Constructor</title>

    <programlisting><constructorsynopsis language="python">
	<methodname>gtk.RadioButton</methodname>
	<methodparam><parameter
		       role="keyword">group</parameter>
	  <initializer>None</initializer></methodparam>
	<methodparam><parameter
		       role="keyword">label</parameter>
	  <initializer>None</initializer></methodparam>
	<methodparam><parameter role="keyword">use_underline</parameter>
	  <initializer>True</initializer></methodparam>
      </constructorsynopsis></programlisting>
    <variablelist>
      <varlistentry>
	<term><parameter role="keyword">group</parameter>&nbsp;:</term>
	<listitem><simpara>an existing <link
linkend="class-gtkradiobutton"><classname>gtk.RadioButton</classname></link>
or <literal>None</literal></simpara></listitem>
      </varlistentry>
      <varlistentry>
	<term><parameter role="keyword">label</parameter>&nbsp;:</term>
	<listitem><simpara>a string to use as the button text or
<literal>None</literal></simpara></listitem>
      </varlistentry>
      <varlistentry>
	<term><parameter role="keyword">use_underline</parameter>&nbsp;:</term>
	<listitem><simpara>if <literal>True</literal>, an underscore in the
label text indicates the next character should be underlined and used for the
mnemonic accelerator key if it is the first character so
marked. Available in PyGTK 2.4 and above.</simpara></listitem>
      </varlistentry>
      <varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	<listitem><simpara>a new <link
linkend="class-gtkradiobutton"><classname>gtk.RadioButton</classname></link>
widget</simpara></listitem>
      </varlistentry>
    </variablelist>

    <para>Creates a new <link
linkend="class-gtkradiobutton"><classname>gtk.RadioButton</classname></link>
widget with the label text specified by <parameter>label</parameter>, adding
it to the same group as <parameter>group</parameter>.
<parameter>label</parameter> is parsed for underscore characters that
indicate mnemonic accelerators. If <parameter>label</parameter> is
<literal>None</literal>, no label is created. If
<parameter>group</parameter> is <literal>None</literal>, the new radiobutton
becomes the first member of a new radiobutton group.</para>

    <para>In PyGTK 2.4 and above the <parameter>use_underline</parameter>
parameter is available and defaults to <literal>True</literal>. If
<parameter>use_underline</parameter> is set to <literal>False</literal> the
label text will not be parsed for mnemonic characters.</para>

  </refsect1>

  <refsect1>
    <title>Methods</title>

    <refsect2 id="method-gtkradiobutton--get-group">
      <title>gtk.RadioButton.get_group</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_group</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the list of radiobuttons in the same group that
contains the radiobutton or <literal>None</literal></simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_group</methodname>() method returns the list
of radiobuttons that are in the same group as the radiobutton or
<literal>None</literal> if the radiobutton is not in a group.</para>

    </refsect2>

    <refsect2 id="method-gtkradiobutton--set-group">
      <title>gtk.RadioButton.set_group</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_group</methodname>
	  <methodparam><parameter
		       role="keyword">group</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">group</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
	  linkend="class-gtkradiobutton"><classname>gtk.RadioButton</classname></link>
	  whose group the radiobutton will be added to or
<literal>None</literal></simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_group</methodname>() method adds the
radiobutton to the group of the radiobutton specified by
<parameter>group</parameter>.</para>

      <para>In PyGTK 2.6.2 and above, if <parameter>group</parameter> is
<literal>None</literal> the radiobutton is removed from its current
group.</para>

    </refsect2>

  </refsect1>

  <refsect1>
    <title>Signals</title>

    <refsect2 id="signal-gtkradiobutton--group-changed">
      <title>The "group-changed" gtk.RadioButton Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>radiobutton</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>radiobutton</parameter>&nbsp;:</term>
	  <listitem><simpara>the radiobutton that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
	<para>This signal is available in GTK+ 2.4 and above.</para>
      </note>

      <para>The "group-changed" signal is emitted when a <link
linkend="class-gtkradiobutton"><classname>gtk.RadioButton</classname></link>
is added to or removed from the group.</para>

    </refsect2>

  </refsect1>

</refentry>
