<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
<!ENTITY pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkCheckButton">
<refmeta>
<refentrytitle role="top_of_page" id="GtkCheckButton.top_of_page">GtkCheckButton</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkCheckButton</refname>
<refpurpose>Create widgets with a discrete toggle button</refpurpose>
</refnamediv>

<refsect1 id="GtkCheckButton.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-check-button-new">gtk_check_button_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-check-button-new-with-label">gtk_check_button_new_with_label</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-check-button-new-with-mnemonic">gtk_check_button_new_with_mnemonic</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-check-button-get-label">gtk_check_button_get_label</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-check-button-set-label">gtk_check_button_set_label</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-check-button-get-use-underline">gtk_check_button_get_use_underline</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-check-button-set-use-underline">gtk_check_button_set_use_underline</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-check-button-set-group">gtk_check_button_set_group</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-check-button-get-active">gtk_check_button_get_active</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-check-button-set-active">gtk_check_button_set_active</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-check-button-get-inconsistent">gtk_check_button_get_inconsistent</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-check-button-set-inconsistent">gtk_check_button_set_inconsistent</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkCheckButton.properties" role="properties">
<title role="properties.title">Properties</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="properties_type" colwidth="150px"/>
<colspec colname="properties_name" colwidth="300px"/>
<colspec colname="properties_flags" colwidth="200px"/>
<tbody>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkCheckButton--active">active</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GtkCheckButton"><type>GtkCheckButton</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkCheckButton--group">group</link></entry><entry role="property_flags">Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkCheckButton--inconsistent">inconsistent</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="char"><type>char</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkCheckButton--label">label</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkCheckButton--use-underline">use-underline</link></entry><entry role="property_flags">Read / Write</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkCheckButton.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="signal_proto_type" colwidth="150px"/>
<colspec colname="signal_proto_name" colwidth="300px"/>
<colspec colname="signal_proto_flags" colwidth="200px"/>
<tbody>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkCheckButton-activate">activate</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-ACTION:CAPS">Action</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkCheckButton-toggled">toggled</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkCheckButton.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="GtkCheckButton-struct">GtkCheckButton</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkCheckButton.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
        <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkWidget">GtkWidget</link>
            <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkCheckButton
</screen>
</refsect1>
<refsect1 id="GtkCheckButton.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkCheckButton implements
 <link linkend="GtkAccessible">GtkAccessible</link>,  <link linkend="GtkBuildable">GtkBuildable</link>,  <link linkend="GtkConstraintTarget">GtkConstraintTarget</link> and  <link linkend="GtkActionable">GtkActionable</link>.</para>

</refsect1>

<refsect1 id="GtkCheckButton.includes"><title>Includes</title><synopsis>#include &lt;gtk/gtk.h&gt;
</synopsis></refsect1>

<refsect1 id="GtkCheckButton.description" role="desc">
<title role="desc.title">Description</title>
<para>A <link linkend="GtkCheckButton"><type>GtkCheckButton</type></link> places a label next to an indicator.</para>
<refsect2><title>CSS nodes</title><informalexample><programlisting role="example"><![CDATA[
checkbutton[.text-button]
├── check
╰── [label]
]]></programlisting></informalexample>
<para></para>
<para>A <link linkend="GtkCheckButton"><type>GtkCheckButton</type></link> has a main node with name checkbutton. If the
<link linkend="GtkCheckButton--label"><type>“label”</type></link> property is set, it contains a label child.
The indicator node is named check when no group is set, and radio
if the checkbutton is grouped together with other checkbuttons.</para>
</refsect2>
<refsect2><title>Accessibility</title><para>GtkCheckButton uses the <link linkend="GTK-ACCESSIBLE-ROLE-CHECKBOX:CAPS"><type>GTK_ACCESSIBLE_ROLE_CHECKBOX</type></link> role.</para>
</refsect2>

</refsect1>
<refsect1 id="GtkCheckButton.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-check-button-new" role="function">
<title>gtk_check_button_new&#160;()</title>
<indexterm zone="gtk-check-button-new"><primary>gtk_check_button_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_check_button_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new <link linkend="GtkCheckButton"><type>GtkCheckButton</type></link>.</para>
<refsect3 id="gtk-check-button-new.returns" role="returns">
<title>Returns</title>
<para> a <link linkend="GtkWidget"><type>GtkWidget</type></link>.</para>
</refsect3></refsect2>
<refsect2 id="gtk-check-button-new-with-label" role="function">
<title>gtk_check_button_new_with_label&#160;()</title>
<indexterm zone="gtk-check-button-new-with-label"><primary>gtk_check_button_new_with_label</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_check_button_new_with_label (<parameter>const <link linkend="char"><type>char</type></link> *label</parameter>);</programlisting>
<para>Creates a new <link linkend="GtkCheckButton"><type>GtkCheckButton</type></link> with a <link linkend="GtkLabel"><type>GtkLabel</type></link> next to it, if
<parameter>label</parameter>
 is non-<link linkend="NULL:CAPS"><literal>NULL</literal></link>.</para>
<refsect3 id="gtk-check-button-new-with-label.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>label</para></entry>
<entry role="parameter_description"><para>the text for the check button. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-check-button-new-with-label.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkCheckButton"><type>GtkCheckButton</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-check-button-new-with-mnemonic" role="function">
<title>gtk_check_button_new_with_mnemonic&#160;()</title>
<indexterm zone="gtk-check-button-new-with-mnemonic"><primary>gtk_check_button_new_with_mnemonic</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_check_button_new_with_mnemonic (<parameter>const <link linkend="char"><type>char</type></link> *label</parameter>);</programlisting>
<para>Creates a new <link linkend="GtkCheckButton"><type>GtkCheckButton</type></link> containing a label. Underscores
in <parameter>label</parameter>
 indicate the mnemonic for the check button.</para>
<refsect3 id="gtk-check-button-new-with-mnemonic.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>label</para></entry>
<entry role="parameter_description"><para>The text of the button, with an underscore in front of the
mnemonic character. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-check-button-new-with-mnemonic.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkCheckButton"><type>GtkCheckButton</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-check-button-get-label" role="function">
<title>gtk_check_button_get_label&#160;()</title>
<indexterm zone="gtk-check-button-get-label"><primary>gtk_check_button_get_label</primary></indexterm>
<programlisting language="C">const <link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
gtk_check_button_get_label (<parameter><link linkend="GtkCheckButton"><type>GtkCheckButton</type></link> *self</parameter>);</programlisting>
<para>Returns the label of the checkbutton.</para>
<refsect3 id="gtk-check-button-get-label.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkCheckButton"><type>GtkCheckButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-check-button-get-label.returns" role="returns">
<title>Returns</title>
<para>The label <parameter>self</parameter>
shows next to the indicator.
If no label is shown, <link linkend="NULL:CAPS"><literal>NULL</literal></link> will be returned. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-check-button-set-label" role="function">
<title>gtk_check_button_set_label&#160;()</title>
<indexterm zone="gtk-check-button-set-label"><primary>gtk_check_button_set_label</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_check_button_set_label (<parameter><link linkend="GtkCheckButton"><type>GtkCheckButton</type></link> *self</parameter>,
                            <parameter>const <link linkend="char"><type>char</type></link> *label</parameter>);</programlisting>
<para>Sets the text of <parameter>self</parameter>
. If <link linkend="GtkCheckButton--use-underline"><type>“use-underline”</type></link> is <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>,
the underscore in <parameter>label</parameter>
 is interpreted as mnemonic indicator,
see <link linkend="gtk-check-button-set-use-underline"><function>gtk_check_button_set_use_underline()</function></link> for details on this behavior.</para>
<refsect3 id="gtk-check-button-set-label.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkCheckButton"><type>GtkCheckButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>label</para></entry>
<entry role="parameter_description"><para>The text shown next to the indicator, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>
to show no text. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-check-button-get-use-underline" role="function">
<title>gtk_check_button_get_use_underline&#160;()</title>
<indexterm zone="gtk-check-button-get-use-underline"><primary>gtk_check_button_get_use_underline</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_check_button_get_use_underline (<parameter><link linkend="GtkCheckButton"><type>GtkCheckButton</type></link> *self</parameter>);</programlisting>
<para>Returns the current value of the <link linkend="GtkCheckButton--use-underline"><type>“use-underline”</type></link> property.</para>
<refsect3 id="gtk-check-button-get-use-underline.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkCheckButton"><type>GtkCheckButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-check-button-get-use-underline.returns" role="returns">
<title>Returns</title>
<para> The value of the <link linkend="GtkCheckButton--use-underline"><type>“use-underline”</type></link> property.
See <link linkend="gtk-check-button-set-use-underline"><function>gtk_check_button_set_use_underline()</function></link> for details on how to set a new value.</para>
</refsect3></refsect2>
<refsect2 id="gtk-check-button-set-use-underline" role="function">
<title>gtk_check_button_set_use_underline&#160;()</title>
<indexterm zone="gtk-check-button-set-use-underline"><primary>gtk_check_button_set_use_underline</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_check_button_set_use_underline (<parameter><link linkend="GtkCheckButton"><type>GtkCheckButton</type></link> *self</parameter>,
                                    <parameter><link linkend="gboolean"><type>gboolean</type></link> setting</parameter>);</programlisting>
<para>Sets the new value of the <link linkend="GtkCheckButton--use-underline"><type>“use-underline”</type></link> property.
See also <link linkend="gtk-check-button-get-use-underline"><function>gtk_check_button_get_use_underline()</function></link>.</para>
<para>If <parameter>setting</parameter>
 is <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>, an underscore character in <parameter>self</parameter>
's label indicates
a mnemonic accelerator key. This behavior is similar to <link linkend="GtkLabel--use-underline"><type>“use-underline”</type></link>.</para>
<refsect3 id="gtk-check-button-set-use-underline.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkCheckButton"><type>GtkCheckButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>setting</para></entry>
<entry role="parameter_description"><para>the new value to set</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-check-button-set-group" role="function">
<title>gtk_check_button_set_group&#160;()</title>
<indexterm zone="gtk-check-button-set-group"><primary>gtk_check_button_set_group</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_check_button_set_group (<parameter><link linkend="GtkCheckButton"><type>GtkCheckButton</type></link> *self</parameter>,
                            <parameter><link linkend="GtkCheckButton"><type>GtkCheckButton</type></link> *group</parameter>);</programlisting>
<para>Adds <parameter>self</parameter>
 to the group of <parameter>group</parameter>
. In a group of multiple check buttons,
only one button can be active at a time.</para>
<para>Setting the group of a check button also changes the css name of the
indicator widget's CSS node to 'radio'.</para>
<para>The behavior of a checkbutton in a group is also commonly known as
a 'radio button'.</para>
<para>Note that the same effect can be achieved via the <link linkend="GtkActionable"><type>GtkActionable</type></link>
api, by using the same action with parameter type and state type 's'
for all buttons in the group, and giving each button its own target
value.</para>
<refsect3 id="gtk-check-button-set-group.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkCheckButton"><type>GtkCheckButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>group</para></entry>
<entry role="parameter_description"><para>another <link linkend="GtkCheckButton"><type>GtkCheckButton</type></link> to
form a group with. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-check-button-get-active" role="function">
<title>gtk_check_button_get_active&#160;()</title>
<indexterm zone="gtk-check-button-get-active"><primary>gtk_check_button_get_active</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_check_button_get_active (<parameter><link linkend="GtkCheckButton"><type>GtkCheckButton</type></link> *self</parameter>);</programlisting>
<para>Returns the current value of the <link linkend="GtkCheckButton--active"><type>“active”</type></link> property.</para>
<refsect3 id="gtk-check-button-get-active.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkCheckButton"><type>GtkCheckButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-check-button-get-active.returns" role="returns">
<title>Returns</title>
<para> The value of the <link linkend="GtkCheckButton--active"><type>“active”</type></link> property.
See <link linkend="gtk-check-button-set-active"><function>gtk_check_button_set_active()</function></link> for details on how to set a new value.</para>
</refsect3></refsect2>
<refsect2 id="gtk-check-button-set-active" role="function">
<title>gtk_check_button_set_active&#160;()</title>
<indexterm zone="gtk-check-button-set-active"><primary>gtk_check_button_set_active</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_check_button_set_active (<parameter><link linkend="GtkCheckButton"><type>GtkCheckButton</type></link> *self</parameter>,
                             <parameter><link linkend="gboolean"><type>gboolean</type></link> setting</parameter>);</programlisting>
<para>Sets the new value of the <link linkend="GtkCheckButton--active"><type>“active”</type></link> property.
See also <link linkend="gtk-check-button-get-active"><function>gtk_check_button_get_active()</function></link>.</para>
<para>Setting <link linkend="GtkCheckButton--active"><type>“active”</type></link> to <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> will add the <literal>:checked:</literal> state to
both the checkbutton and the indicator CSS node.</para>
<refsect3 id="gtk-check-button-set-active.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>self</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkCheckButton"><type>GtkCheckButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>setting</para></entry>
<entry role="parameter_description"><para>the new value to set</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-check-button-get-inconsistent" role="function">
<title>gtk_check_button_get_inconsistent&#160;()</title>
<indexterm zone="gtk-check-button-get-inconsistent"><primary>gtk_check_button_get_inconsistent</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_check_button_get_inconsistent (<parameter><link linkend="GtkCheckButton"><type>GtkCheckButton</type></link> *check_button</parameter>);</programlisting>
<para>Returns whether the check button is in an inconsistent state.</para>
<refsect3 id="gtk-check-button-get-inconsistent.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>check_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkCheckButton"><type>GtkCheckButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-check-button-get-inconsistent.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if <parameter>check_button</parameter>
is currently in an 'in between' state, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise.</para>
</refsect3></refsect2>
<refsect2 id="gtk-check-button-set-inconsistent" role="function">
<title>gtk_check_button_set_inconsistent&#160;()</title>
<indexterm zone="gtk-check-button-set-inconsistent"><primary>gtk_check_button_set_inconsistent</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_check_button_set_inconsistent (<parameter><link linkend="GtkCheckButton"><type>GtkCheckButton</type></link> *check_button</parameter>,
                                   <parameter><link linkend="gboolean"><type>gboolean</type></link> inconsistent</parameter>);</programlisting>
<para>If the user has selected a range of elements (such as some text or
spreadsheet cells) that are affected by a check button, and the
current values in that range are inconsistent, you may want to
display the toggle in an "in between" state. Normally you would
turn off the inconsistent state again if the user checks the
check button. This has to be done manually,
gtk_check_button_set_inconsistent only affects visual appearance,
not the semantics of the button.</para>
<refsect3 id="gtk-check-button-set-inconsistent.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>check_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkCheckButton"><type>GtkCheckButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>inconsistent</para></entry>
<entry role="parameter_description"><para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if state is inconsistent</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkCheckButton.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkCheckButton-struct" role="struct">
<title>struct GtkCheckButton</title>
<indexterm zone="GtkCheckButton-struct"><primary>GtkCheckButton</primary></indexterm>
<programlisting language="C">struct GtkCheckButton;</programlisting>
</refsect2>

</refsect1>
<refsect1 id="GtkCheckButton.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkCheckButton--active" role="property"><title>The <literal>“active”</literal> property</title>
<indexterm zone="GtkCheckButton--active"><primary>GtkCheckButton:active</primary></indexterm>
<programlisting>  “active”                   <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>If the toggle button should be pressed in.</para><para>Owner: GtkCheckButton</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkCheckButton--group" role="property"><title>The <literal>“group”</literal> property</title>
<indexterm zone="GtkCheckButton--group"><primary>GtkCheckButton:group</primary></indexterm>
<programlisting>  “group”                    <link linkend="GtkCheckButton"><type>GtkCheckButton</type></link>&#160;*</programlisting>
<para>The check button whose group this widget belongs to.</para><para>Owner: GtkCheckButton</para>
<para>Flags: Write</para>
</refsect2>
<refsect2 id="GtkCheckButton--inconsistent" role="property"><title>The <literal>“inconsistent”</literal> property</title>
<indexterm zone="GtkCheckButton--inconsistent"><primary>GtkCheckButton:inconsistent</primary></indexterm>
<programlisting>  “inconsistent”             <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>If the check button is in an “in between” state.</para><para>Owner: GtkCheckButton</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkCheckButton--label" role="property"><title>The <literal>“label”</literal> property</title>
<indexterm zone="GtkCheckButton--label"><primary>GtkCheckButton:label</primary></indexterm>
<programlisting>  “label”                    <link linkend="char"><type>char</type></link>&#160;*</programlisting>
<para>Text of the label widget inside the button, if the button contains a label widget.</para><para>Owner: GtkCheckButton</para>
<para>Flags: Read / Write</para>
<para>Default value: NULL</para>
</refsect2>
<refsect2 id="GtkCheckButton--use-underline" role="property"><title>The <literal>“use-underline”</literal> property</title>
<indexterm zone="GtkCheckButton--use-underline"><primary>GtkCheckButton:use-underline</primary></indexterm>
<programlisting>  “use-underline”            <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key.</para><para>Owner: GtkCheckButton</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>

</refsect1>
<refsect1 id="GtkCheckButton.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkCheckButton-activate" role="signal"><title>The <literal>“activate”</literal> signal</title>
<indexterm zone="GtkCheckButton-activate"><primary>GtkCheckButton::activate</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkCheckButton"><type>GtkCheckButton</type></link> *widget,
               <link linkend="gpointer"><type>gpointer</type></link>        user_data)</programlisting>
<para>The ::activate signal on GtkCheckButton is an action signal and
emitting it causes the button to animate press then release.
Applications should never connect to this signal, but use the
<link linkend="GtkCheckButton-toggled"><type>“toggled”</type></link> signal.</para>
<refsect3 id="GtkCheckButton-activate.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>widget</para></entry>
<entry role="parameter_description"><para>the object which received the signal.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-ACTION:CAPS">Action</link></para>
</refsect2><refsect2 id="GtkCheckButton-toggled" role="signal"><title>The <literal>“toggled”</literal> signal</title>
<indexterm zone="GtkCheckButton-toggled"><primary>GtkCheckButton::toggled</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkCheckButton"><type>GtkCheckButton</type></link> *checkbutton,
               <link linkend="gpointer"><type>gpointer</type></link>        user_data)</programlisting>
<para>Emitted when the buttons's <link linkend="GtkCheckButton--active"><type>“active”</type></link> flag changes.</para>
<refsect3 id="GtkCheckButton-toggled.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-FIRST:CAPS">Run First</link></para>
</refsect2>
</refsect1>
<refsect1 id="GtkCheckButton.see-also">
<title>See Also</title>
<para><link linkend="GtkButton"><type>GtkButton</type></link>, <link linkend="GtkToggleButton"><type>GtkToggleButton</type></link></para>

</refsect1>

</refentry>
