<refentry id="GtkCheckButton">
<refmeta>
<refentrytitle>GtkCheckButton</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GtkCheckButton</refname><refpurpose>create widgets with a discrete toggle button.</refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>
<synopsis>

#include &lt;gtk/gtk.h&gt;


struct      <link linkend="GtkCheckButton-struct">GtkCheckButton</link>;
<link linkend="GtkWidget">GtkWidget</link>*  <link linkend="gtk-check-button-new">gtk_check_button_new</link>            (void);
<link linkend="GtkWidget">GtkWidget</link>*  <link linkend="gtk-check-button-new-with-label">gtk_check_button_new_with_label</link> (const <link linkend="gchar">gchar</link> *label);
<link linkend="GtkWidget">GtkWidget</link>*  <link linkend="gtk-check-button-new-with-mnemonic">gtk_check_button_new_with_mnemonic</link>
                                            (const <link linkend="gchar">gchar</link> *label);


</synopsis>
</refsynopsisdiv>

<refsect1>
<title>Object Hierarchy</title>
<synopsis>

  <link linkend="GObject">GObject</link>
   +----<link linkend="GtkObject">GtkObject</link>
         +----<link linkend="GtkWidget">GtkWidget</link>
               +----<link linkend="GtkContainer">GtkContainer</link>
                     +----<link linkend="GtkBin">GtkBin</link>
                           +----<link linkend="GtkButton">GtkButton</link>
                                 +----<link linkend="GtkToggleButton">GtkToggleButton</link>
                                       +----GtkCheckButton
</synopsis>

</refsect1>




<refsect1>
<title>Description</title>
<para>
A <link linkend="GtkCheckButton">GtkCheckButton</link> places a discrete <link linkend="GtkToggleButton">GtkToggleButton</link> next to a widget, (usually a <link linkend="GtkLabel">GtkLabel</link>). See the section on <link linkend="GtkToggleButton">GtkToggleButton</link> widgets for more information about toggle/check buttons.
</para>
<para>
The important signal ('toggled') is also inherited from <link linkend="GtkToggleButton">GtkToggleButton</link>.
</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GtkCheckButton-struct">struct GtkCheckButton</title>
<programlisting>struct GtkCheckButton;</programlisting>
<para>
<structfield>toggle_button</structfield> is a <link linkend="GtkToggleButton">GtkToggleButton</link> representing the actual toggle button that composes the check button.
</para></refsect2>
<refsect2>
<title><anchor id="gtk-check-button-new">gtk_check_button_new ()</title>
<programlisting><link linkend="GtkWidget">GtkWidget</link>*  gtk_check_button_new            (void);</programlisting>
<para>
Creates a new <link linkend="GtkCheckButton">GtkCheckButton</link>.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>a <link linkend="GtkWidget">GtkWidget</link>.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-check-button-new-with-label">gtk_check_button_new_with_label ()</title>
<programlisting><link linkend="GtkWidget">GtkWidget</link>*  gtk_check_button_new_with_label (const <link linkend="gchar">gchar</link> *label);</programlisting>
<para>
Creates a new <link linkend="GtkCheckButton">GtkCheckButton</link> with a <link linkend="GtkLabel">GtkLabel</link> to the right of it.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry>the text for the check button.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>a <link linkend="GtkWidget">GtkWidget</link>.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-check-button-new-with-mnemonic">gtk_check_button_new_with_mnemonic ()</title>
<programlisting><link linkend="GtkWidget">GtkWidget</link>*  gtk_check_button_new_with_mnemonic
                                            (const <link linkend="gchar">gchar</link> *label);</programlisting>
<para>
Creates a new <link linkend="GtkCheckButton">GtkCheckButton</link> containing a label. The label
will be created using <link linkend="gtk-label-new-with-mnemonic">gtk_label_new_with_mnemonic</link>(), so underscores
in <parameter>label</parameter> indicate the mnemonic for the check button.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>label</parameter>&nbsp;:</entry>
<entry> The text of the button, with an underscore in front of the
        mnemonic character
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry> a new <link linkend="GtkCheckButton">GtkCheckButton</link>
</entry></row>
</tbody></tgroup></informaltable></refsect2>

</refsect1>



<refsect1>
<title>See Also</title>
<para>
<variablelist>
<varlistentry>
<term><link linkend="GtkCheckMenuItem">GtkCheckMenuItem</link></term>
<listitem><para>add check buttons to your menus.</para></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="GtkButton">GtkButton</link></term>
<listitem><para>a more general button.</para></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="GtkToggleButton">GtkToggleButton</link></term>
<listitem><para><link linkend="GtkCheckButton">GtkCheckButton</link>'s parent.</para></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="GtkRadioButton">GtkRadioButton</link></term>
<listitem><para>group check buttons together.</para></listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>

</refentry>
