<?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="GtkButton">
<refmeta>
<refentrytitle role="top_of_page" id="GtkButton.top_of_page">GtkButton</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkButton</refname>
<refpurpose>A widget that emits a signal when clicked on</refpurpose>
</refnamediv>

<refsect1 id="GtkButton.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-button-new">gtk_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-button-new-with-label">gtk_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-button-new-with-mnemonic">gtk_button_new_with_mnemonic</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-button-new-from-icon-name">gtk_button_new_from_icon_name</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-button-set-has-frame">gtk_button_set_has_frame</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-button-get-has-frame">gtk_button_get_has_frame</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-button-get-label">gtk_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-button-set-label">gtk_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-button-get-use-underline">gtk_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-button-set-use-underline">gtk_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-button-set-icon-name">gtk_button_set_icon_name</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-button-get-icon-name">gtk_button_get_icon_name</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-button-set-child">gtk_button_set_child</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-button-get-child">gtk_button_get_child</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkButton.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="GtkWidget"><type>GtkWidget</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkButton--child">child</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="GtkButton--has-frame">has-frame</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkButton--icon-name">icon-name</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkButton--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="GtkButton--use-underline">use-underline</link></entry><entry role="property_flags">Read / Write</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkButton.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="GtkButton-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="GtkButton-clicked">clicked</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-ACTION:CAPS">Action</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkButton.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="GtkButton-struct">GtkButton</link></entry></row>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="GtkButtonClass">GtkButtonClass</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkButton.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> GtkButton
                <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> <link linkend="GtkToggleButton">GtkToggleButton</link>
                <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> <link linkend="GtkLinkButton">GtkLinkButton</link>
                <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkLockButton">GtkLockButton</link>
</screen>
</refsect1>
<refsect1 id="GtkButton.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkButton implements
 <link linkend="AtkImplementorIface">AtkImplementorIface</link>,  <link linkend="GtkBuildable">GtkBuildable</link>,  <link linkend="GtkConstraintTarget">GtkConstraintTarget</link> and  <link linkend="GtkActionable">GtkActionable</link>.</para>

</refsect1>

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

<refsect1 id="GtkButton.description" role="desc">
<title role="desc.title">Description</title>
<para>The <link linkend="GtkButton"><type>GtkButton</type></link> widget is generally used to trigger a callback function that is
called when the button is pressed.  The various signals and how to use them
are outlined below.</para>
<para>The <link linkend="GtkButton"><type>GtkButton</type></link> widget can hold any valid child widget.  That is, it can hold
almost any other standard <link linkend="GtkWidget"><type>GtkWidget</type></link>.  The most commonly used child is the
<link linkend="GtkLabel"><type>GtkLabel</type></link>.</para>
<refsect2><title>CSS nodes</title><para>GtkButton has a single CSS node with name button. The node will get the
style classes .image-button or .text-button, if the content is just an
image or label, respectively. It may also receive the .flat style class.</para>
<para>Other style classes that are commonly used with GtkButton include
.suggested-action and .destructive-action. In special cases, buttons
can be made round by adding the .circular style class.</para>
<para>Button-like widgets like <link linkend="GtkToggleButton"><type>GtkToggleButton</type></link>, <link linkend="GtkMenuButton"><type>GtkMenuButton</type></link>, <link linkend="GtkVolumeButton"><type>GtkVolumeButton</type></link>,
<link linkend="GtkLockButton"><type>GtkLockButton</type></link>, <link linkend="GtkColorButton"><type>GtkColorButton</type></link> or <link linkend="GtkFontButton"><type>GtkFontButton</type></link> use style classes such as
.toggle, .popup, .scale, .lock, .color on the button node
to differentiate themselves from a plain GtkButton.</para>
</refsect2>

</refsect1>
<refsect1 id="GtkButton.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-button-new" role="function">
<title>gtk_button_new&#160;()</title>
<indexterm zone="gtk-button-new"><primary>gtk_button_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_button_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new <link linkend="GtkButton"><type>GtkButton</type></link> widget. To add a child widget to the button,
use <link linkend="gtk-container-add"><function>gtk_container_add()</function></link>.</para>
<refsect3 id="gtk-button-new.returns" role="returns">
<title>Returns</title>
<para> The newly created <link linkend="GtkButton"><type>GtkButton</type></link> widget.</para>
</refsect3></refsect2>
<refsect2 id="gtk-button-new-with-label" role="function">
<title>gtk_button_new_with_label&#160;()</title>
<indexterm zone="gtk-button-new-with-label"><primary>gtk_button_new_with_label</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_button_new_with_label (<parameter>const <link linkend="gchar"><type>gchar</type></link> *label</parameter>);</programlisting>
<para>Creates a <link linkend="GtkButton"><type>GtkButton</type></link> widget with a <link linkend="GtkLabel"><type>GtkLabel</type></link> child containing the given
text.</para>
<refsect3 id="gtk-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 you want the <link linkend="GtkLabel"><type>GtkLabel</type></link> to hold.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-button-new-with-label.returns" role="returns">
<title>Returns</title>
<para> The newly created <link linkend="GtkButton"><type>GtkButton</type></link> widget.</para>
</refsect3></refsect2>
<refsect2 id="gtk-button-new-with-mnemonic" role="function">
<title>gtk_button_new_with_mnemonic&#160;()</title>
<indexterm zone="gtk-button-new-with-mnemonic"><primary>gtk_button_new_with_mnemonic</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_button_new_with_mnemonic (<parameter>const <link linkend="gchar"><type>gchar</type></link> *label</parameter>);</programlisting>
<para>Creates a new <link linkend="GtkButton"><type>GtkButton</type></link> containing a label.
If characters in <parameter>label</parameter>
 are preceded by an underscore, they are underlined.
If you need a literal underscore character in a label, use “__” (two
underscores). The first underlined character represents a keyboard
accelerator called a mnemonic.
Pressing Alt and that key activates the button.</para>
<refsect3 id="gtk-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"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-button-new-with-mnemonic.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkButton"><type>GtkButton</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-button-new-from-icon-name" role="function">
<title>gtk_button_new_from_icon_name&#160;()</title>
<indexterm zone="gtk-button-new-from-icon-name"><primary>gtk_button_new_from_icon_name</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_button_new_from_icon_name (<parameter>const <link linkend="gchar"><type>gchar</type></link> *icon_name</parameter>);</programlisting>
<para>Creates a new button containing an icon from the current icon theme.</para>
<para>If the icon name isn’t known, a “broken image” icon will be
displayed instead. If the current icon theme is changed, the icon
will be updated appropriately.</para>
<refsect3 id="gtk-button-new-from-icon-name.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>icon_name</para></entry>
<entry role="parameter_description"><para>an icon name or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-button-new-from-icon-name.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkButton"><type>GtkButton</type></link> displaying the themed icon</para>
</refsect3></refsect2>
<refsect2 id="gtk-button-set-has-frame" role="function">
<title>gtk_button_set_has_frame&#160;()</title>
<indexterm zone="gtk-button-set-has-frame"><primary>gtk_button_set_has_frame</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_button_set_has_frame (<parameter><link linkend="GtkButton"><type>GtkButton</type></link> *button</parameter>,
                          <parameter><link linkend="gboolean"><type>gboolean</type></link> has_frame</parameter>);</programlisting>
<para>Sets the style of the button. Buttons can has a flat appearance
or have a frame drawn around them.</para>
<refsect3 id="gtk-button-set-has-frame.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>button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkButton"><type>GtkButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>has_frame</para></entry>
<entry role="parameter_description"><para>whether the button should have a visible frame</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-button-get-has-frame" role="function">
<title>gtk_button_get_has_frame&#160;()</title>
<indexterm zone="gtk-button-get-has-frame"><primary>gtk_button_get_has_frame</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_button_get_has_frame (<parameter><link linkend="GtkButton"><type>GtkButton</type></link> *button</parameter>);</programlisting>
<para>Returns whether the button has a frame.</para>
<refsect3 id="gtk-button-get-has-frame.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>button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkButton"><type>GtkButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-button-get-has-frame.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the button has a frame</para>
</refsect3></refsect2>
<refsect2 id="gtk-button-get-label" role="function">
<title>gtk_button_get_label&#160;()</title>
<indexterm zone="gtk-button-get-label"><primary>gtk_button_get_label</primary></indexterm>
<programlisting language="C">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link>&#160;*
gtk_button_get_label (<parameter><link linkend="GtkButton"><type>GtkButton</type></link> *button</parameter>);</programlisting>
<para>Fetches the text from the label of the button, as set by
<link linkend="gtk-button-set-label"><function>gtk_button_set_label()</function></link>. If the label text has not
been set the return value will be <link linkend="NULL:CAPS"><literal>NULL</literal></link>. This will be the
case if you create an empty button with <link linkend="gtk-button-new"><function>gtk_button_new()</function></link> to
use as a container.</para>
<refsect3 id="gtk-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>button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkButton"><type>GtkButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-button-get-label.returns" role="returns">
<title>Returns</title>
<para>The text of the label widget. This string is owned
by the widget and must not be modified or freed. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-button-set-label" role="function">
<title>gtk_button_set_label&#160;()</title>
<indexterm zone="gtk-button-set-label"><primary>gtk_button_set_label</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_button_set_label (<parameter><link linkend="GtkButton"><type>GtkButton</type></link> *button</parameter>,
                      <parameter>const <link linkend="gchar"><type>gchar</type></link> *label</parameter>);</programlisting>
<para>Sets the text of the label of the button to <parameter>label</parameter>
.</para>
<para>This will also clear any previously set labels.</para>
<refsect3 id="gtk-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>button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkButton"><type>GtkButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>label</para></entry>
<entry role="parameter_description"><para>a string</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-button-get-use-underline" role="function">
<title>gtk_button_get_use_underline&#160;()</title>
<indexterm zone="gtk-button-get-use-underline"><primary>gtk_button_get_use_underline</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_button_get_use_underline (<parameter><link linkend="GtkButton"><type>GtkButton</type></link> *button</parameter>);</programlisting>
<para>Returns whether an embedded underline in the button label indicates a
mnemonic. See <link linkend="gtk-button-set-use-underline"><function>gtk_button_set_use_underline()</function></link>.</para>
<refsect3 id="gtk-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>button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkButton"><type>GtkButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-button-get-use-underline.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if an embedded underline in the button label
indicates the mnemonic accelerator keys.</para>
</refsect3></refsect2>
<refsect2 id="gtk-button-set-use-underline" role="function">
<title>gtk_button_set_use_underline&#160;()</title>
<indexterm zone="gtk-button-set-use-underline"><primary>gtk_button_set_use_underline</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_button_set_use_underline (<parameter><link linkend="GtkButton"><type>GtkButton</type></link> *button</parameter>,
                              <parameter><link linkend="gboolean"><type>gboolean</type></link> use_underline</parameter>);</programlisting>
<para>If true, an underline in the text of the button label indicates
the next character should be used for the mnemonic accelerator key.</para>
<refsect3 id="gtk-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>button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkButton"><type>GtkButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>use_underline</para></entry>
<entry role="parameter_description"><para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if underlines in the text indicate mnemonics</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-button-set-icon-name" role="function">
<title>gtk_button_set_icon_name&#160;()</title>
<indexterm zone="gtk-button-set-icon-name"><primary>gtk_button_set_icon_name</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_button_set_icon_name (<parameter><link linkend="GtkButton"><type>GtkButton</type></link> *button</parameter>,
                          <parameter>const <link linkend="char"><type>char</type></link> *icon_name</parameter>);</programlisting>
<para>Adds a <link linkend="GtkImage"><type>GtkImage</type></link> with the given icon name as a child. If <parameter>button</parameter>
 already
contains a child widget, that child widget will be removed and replaced
with the image.</para>
<refsect3 id="gtk-button-set-icon-name.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>button</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkButton"><type>GtkButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>icon_name</para></entry>
<entry role="parameter_description"><para>An icon name</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-button-get-icon-name" role="function">
<title>gtk_button_get_icon_name&#160;()</title>
<indexterm zone="gtk-button-get-icon-name"><primary>gtk_button_get_icon_name</primary></indexterm>
<programlisting language="C">const <link linkend="char"><returnvalue>char</returnvalue></link>&#160;*
gtk_button_get_icon_name (<parameter><link linkend="GtkButton"><type>GtkButton</type></link> *button</parameter>);</programlisting>
<para>Returns the icon name set via <link linkend="gtk-button-set-icon-name"><function>gtk_button_set_icon_name()</function></link>.</para>
<refsect3 id="gtk-button-get-icon-name.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>button</para></entry>
<entry role="parameter_description"><para>A <link linkend="GtkButton"><type>GtkButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-button-get-icon-name.returns" role="returns">
<title>Returns</title>
<para>The icon name set via <link linkend="gtk-button-set-icon-name"><function>gtk_button_set_icon_name()</function></link>. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-button-set-child" role="function">
<title>gtk_button_set_child&#160;()</title>
<indexterm zone="gtk-button-set-child"><primary>gtk_button_set_child</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_button_set_child (<parameter><link linkend="GtkButton"><type>GtkButton</type></link> *button</parameter>,
                      <parameter><link linkend="GtkWidget"><type>GtkWidget</type></link> *child</parameter>);</programlisting>
<para>Sets the child widget of <parameter>button</parameter>
.</para>
<refsect3 id="gtk-button-set-child.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>button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkButton"><type>GtkButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>child</para></entry>
<entry role="parameter_description"><para>the child widget. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-button-get-child" role="function">
<title>gtk_button_get_child&#160;()</title>
<indexterm zone="gtk-button-get-child"><primary>gtk_button_get_child</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_button_get_child (<parameter><link linkend="GtkButton"><type>GtkButton</type></link> *button</parameter>);</programlisting>
<para>Gets the child widget of <parameter>button</parameter>
.</para>
<refsect3 id="gtk-button-get-child.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>button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkButton"><type>GtkButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-button-get-child.returns" role="returns">
<title>Returns</title>
<para>the child widget of <parameter>button</parameter>
. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>

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

  void (* clicked)  (GtkButton *button);
  void (* activate) (GtkButton *button);
};
</programlisting>
<refsect3 id="GtkButtonClass.members" role="struct_members">
<title>Members</title>
<informaltable role="struct_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="struct_members_name" colwidth="300px"/>
<colspec colname="struct_members_description"/>
<colspec colname="struct_members_annotations" colwidth="200px"/>
<tbody>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkButtonClass.clicked">clicked</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Signal emitted when the button has been activated (pressed and released).</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkButtonClass.activate">activate</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Signal that causes the button to animate press then
release. Applications should never connect to this signal, but use
the <parameter>clicked</parameter>
signal.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3>
</refsect2>

</refsect1>
<refsect1 id="GtkButton.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkButton--child" role="property"><title>The <literal>“child”</literal> property</title>
<indexterm zone="GtkButton--child"><primary>GtkButton:child</primary></indexterm>
<programlisting>  “child”                    <link linkend="GtkWidget"><type>GtkWidget</type></link>&#160;*</programlisting>
<para>The child widget.</para><para>Owner: GtkButton</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkButton--has-frame" role="property"><title>The <literal>“has-frame”</literal> property</title>
<indexterm zone="GtkButton--has-frame"><primary>GtkButton:has-frame</primary></indexterm>
<programlisting>  “has-frame”                <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Whether the button has a frame.</para><para>Owner: GtkButton</para>
<para>Flags: Read / Write</para>
<para>Default value: TRUE</para>
</refsect2>
<refsect2 id="GtkButton--icon-name" role="property"><title>The <literal>“icon-name”</literal> property</title>
<indexterm zone="GtkButton--icon-name"><primary>GtkButton:icon-name</primary></indexterm>
<programlisting>  “icon-name”                <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>The name of the icon used to automatically populate the button.</para><para>Owner: GtkButton</para>
<para>Flags: Read / Write</para>
<para>Default value: NULL</para>
</refsect2>
<refsect2 id="GtkButton--label" role="property"><title>The <literal>“label”</literal> property</title>
<indexterm zone="GtkButton--label"><primary>GtkButton:label</primary></indexterm>
<programlisting>  “label”                    <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>Text of the label widget inside the button, if the button contains a label widget.</para><para>Owner: GtkButton</para>
<para>Flags: Read / Write</para>
<para>Default value: NULL</para>
</refsect2>
<refsect2 id="GtkButton--use-underline" role="property"><title>The <literal>“use-underline”</literal> property</title>
<indexterm zone="GtkButton--use-underline"><primary>GtkButton: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: GtkButton</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>

</refsect1>
<refsect1 id="GtkButton.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkButton-activate" role="signal"><title>The <literal>“activate”</literal> signal</title>
<indexterm zone="GtkButton-activate"><primary>GtkButton::activate</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkButton"><type>GtkButton</type></link> *widget,
               <link linkend="gpointer"><type>gpointer</type></link>   user_data)</programlisting>
<para>The ::activate signal on GtkButton 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="GtkButton-clicked"><type>“clicked”</type></link> signal.</para>
<refsect3 id="GtkButton-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="GtkButton-clicked" role="signal"><title>The <literal>“clicked”</literal> signal</title>
<indexterm zone="GtkButton-clicked"><primary>GtkButton::clicked</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkButton"><type>GtkButton</type></link> *button,
               <link linkend="gpointer"><type>gpointer</type></link>   user_data)</programlisting>
<para>Emitted when the button has been activated (pressed and released).</para>
<refsect3 id="GtkButton-clicked.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>button</para></entry>
<entry role="parameter_description"><para>the object that 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>
</refsect1>

</refentry>
