KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /usr/share/gtk-doc/html/gtk/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/gtk-doc/html/gtk/GtkButton.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>GtkButton</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="index.html" title="GTK+ Reference Manual">
<link rel="up" href="ButtonWidgets.html" title="Buttons and Toggles">
<link rel="prev" href="ButtonWidgets.html" title="Buttons and Toggles">
<link rel="next" href="GtkCheckButton.html" title="GtkCheckButton">
<meta name="generator" content="GTK-Doc V1.6 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="gtk.html" title="Part&#160;I.&#160;GTK+ Overview">
<link rel="part" href="gtkbase.html" title="Part&#160;II.&#160;GTK+ Core Reference">
<link rel="part" href="gtkobjects.html" title="Part&#160;III.&#160;GTK+ Widgets and Objects">
<link rel="chapter" href="ch01.html" title="Object Hierarchy">
<link rel="chapter" href="ch02.html" title="Widget Gallery">
<link rel="chapter" href="WindowWidgets.html" title="Windows">
<link rel="chapter" href="DisplayWidgets.html" title="Display Widgets">
<link rel="chapter" href="ButtonWidgets.html" title="Buttons and Toggles">
<link rel="chapter" href="NumericEntry.html" title="Numeric/Text Data Entry">
<link rel="chapter" href="TextWidgetObjects.html" title="Multiline Text Editor">
<link rel="chapter" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets">
<link rel="chapter" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar">
<link rel="chapter" href="Actions.html" title="Action-based menus and toolbars">
<link rel="chapter" href="SelectorWidgets.html" title="Selectors (File/Font/Color/Input Devices)">
<link rel="chapter" href="LayoutContainers.html" title="Layout Containers">
<link rel="chapter" href="Ornaments.html" title="Ornaments">
<link rel="chapter" href="ScrollingWidgets.html" title="Scrolling">
<link rel="chapter" href="Printing.html" title="Printing">
<link rel="chapter" href="MiscObjects.html" title="Miscellaneous">
<link rel="chapter" href="AbstractObjects.html" title="Abstract Base Classes">
<link rel="chapter" href="PlugSocket.html" title="Cross-process Embedding">
<link rel="chapter" href="SpecialObjects.html" title="Special-purpose features">
<link rel="chapter" href="RecentDocuments.html" title="Recently Used Documents">
<link rel="chapter" href="DeprecatedObjects.html" title="Deprecated">
<link rel="part" href="migrating.html" title="Part&#160;IV.&#160;Migrating from Previous Versions of GTK+">
<link rel="chapter" href="gtk-migrating-checklist.html" title="Migration Checklist">
<link rel="chapter" href="gtk-migrating-GtkFileChooser.html" title="Migrating from GtkFileSelection to GtkFileChooser">
<link rel="chapter" href="gtk-migrating-GtkAction.html" title="Migrating from old menu and toolbar systems to GtkAction">
<link rel="chapter" href="gtk-migrating-GtkComboBox.html" title="Migrating from GtkOptionMenu and GtkCombo to GtkComboBox and 
         GtkComboBoxEntry">
<link rel="chapter" href="gtk-migrating-GtkIconView.html" title="Migrating from GnomeIconList to GtkIconView">
<link rel="chapter" href="gtk-migrating-GtkAboutDialog.html" title="Migrating from GnomeAbout to GtkAboutDialog">
<link rel="chapter" href="gtk-migrating-GtkColorButton.html" title="Migrating from GnomeColorPicker to GtkColorButton">
<link rel="chapter" href="gtk-migrating-GtkAssistant.html" title="Migrating from GnomeDruid to GtkAssistant">
<link rel="chapter" href="gtk-migrating-GtkRecentChooser.html" title="Migrating from EggRecent to GtkRecentChooser">
<link rel="chapter" href="gtk-migrating-GtkLinkButton.html" title="Migrating from GnomeHRef to GtkLinkButton">
<link rel="part" href="pt05.html" title="Part&#160;V.&#160;GTK+ Tools">
<link rel="glossary" href="glossary.html" title="Glossary">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="ButtonWidgets.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ButtonWidgets.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GTK+ Reference Manual</th>
<td><a accesskey="n" href="GtkCheckButton.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2902690" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#id2903995" class="shortcut">Description</a>
                  &#160;|&#160;
                  <a href="#id2903360" class="shortcut">Object Hierarchy</a>
                  &#160;|&#160;
                  <a href="#id2903461" class="shortcut">Implemented Interfaces</a>
                  &#160;|&#160;
                  <a href="#id2903484" class="shortcut">Properties</a>
                  &#160;|&#160;
                  <a href="#id2903653" class="shortcut">Style Properties</a>
                  &#160;|&#160;
                  <a href="#id2903789" class="shortcut">Signals</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="GtkButton"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2902690"></a><span class="refentrytitle">GtkButton</span>
</h2>
<p>GtkButton &#8212; A widget that creates a signal when clicked on</p>
</td>
<td valign="top" align="right"><img src="button.png"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">

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


            <a href="GtkButton.html#GtkButton-struct">GtkButton</a>;
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  <a href="GtkButton.html#gtk-button-new">gtk_button_new</a>                  (void);
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  <a href="GtkButton.html#gtk-button-new-with-label">gtk_button_new_with_label</a>       (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *label);
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  <a href="GtkButton.html#gtk-button-new-with-mnemonic">gtk_button_new_with_mnemonic</a>    (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *label);
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  <a href="GtkButton.html#gtk-button-new-from-stock">gtk_button_new_from_stock</a>       (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *stock_id);
void        <a href="GtkButton.html#gtk-button-pressed">gtk_button_pressed</a>              (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button);
void        <a href="GtkButton.html#gtk-button-released">gtk_button_released</a>             (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button);
void        <a href="GtkButton.html#gtk-button-clicked">gtk_button_clicked</a>              (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button);
void        <a href="GtkButton.html#gtk-button-enter">gtk_button_enter</a>                (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button);
void        <a href="GtkButton.html#gtk-button-leave">gtk_button_leave</a>                (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button);
void        <a href="GtkButton.html#gtk-button-set-relief">gtk_button_set_relief</a>           (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                             <a href="gtk-Standard-Enumerations.html#GtkReliefStyle">GtkReliefStyle</a> newstyle);
<a href="gtk-Standard-Enumerations.html#GtkReliefStyle">GtkReliefStyle</a> <a href="GtkButton.html#gtk-button-get-relief">gtk_button_get_relief</a>        (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button);
const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* <a href="GtkButton.html#gtk-button-get-label">gtk_button_get_label</a>           (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button);
void        <a href="GtkButton.html#gtk-button-set-label">gtk_button_set_label</a>            (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *label);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <a href="GtkButton.html#gtk-button-get-use-stock">gtk_button_get_use_stock</a>        (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button);
void        <a href="GtkButton.html#gtk-button-set-use-stock">gtk_button_set_use_stock</a>        (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                             <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> use_stock);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <a href="GtkButton.html#gtk-button-get-use-underline">gtk_button_get_use_underline</a>    (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button);
void        <a href="GtkButton.html#gtk-button-set-use-underline">gtk_button_set_use_underline</a>    (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                             <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> use_underline);
void        <a href="GtkButton.html#gtk-button-set-focus-on-click">gtk_button_set_focus_on_click</a>   (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                             <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> focus_on_click);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    <a href="GtkButton.html#gtk-button-get-focus-on-click">gtk_button_get_focus_on_click</a>   (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button);
void        <a href="GtkButton.html#gtk-button-set-alignment">gtk_button_set_alignment</a>        (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                             <a
href="../glib/glib-Basic-Types.html#gfloat"
>gfloat</a> xalign,
                                             <a
href="../glib/glib-Basic-Types.html#gfloat"
>gfloat</a> yalign);
void        <a href="GtkButton.html#gtk-button-get-alignment">gtk_button_get_alignment</a>        (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                             <a
href="../glib/glib-Basic-Types.html#gfloat"
>gfloat</a> *xalign,
                                             <a
href="../glib/glib-Basic-Types.html#gfloat"
>gfloat</a> *yalign);
void        <a href="GtkButton.html#gtk-button-set-image">gtk_button_set_image</a>            (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                             <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *image);
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  <a href="GtkButton.html#gtk-button-get-image">gtk_button_get_image</a>            (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button);
void        <a href="GtkButton.html#gtk-button-set-image-position">gtk_button_set_image_position</a>   (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                             <a href="gtk-Standard-Enumerations.html#GtkPositionType">GtkPositionType</a> position);
<a href="gtk-Standard-Enumerations.html#GtkPositionType">GtkPositionType</a> <a href="GtkButton.html#gtk-button-get-image-position">gtk_button_get_image_position</a>
                                            (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button);


</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2903360"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">

  <a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
   +----<a
href="../gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned"
>GInitiallyUnowned</a>
         +----<a href="GtkObject.html" title="GtkObject">GtkObject</a>
               +----<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
                     +----<a href="GtkContainer.html" title="GtkContainer">GtkContainer</a>
                           +----<a href="GtkBin.html" title="GtkBin">GtkBin</a>
                                 +----GtkButton
                                       +----<a href="GtkToggleButton.html" title="GtkToggleButton">GtkToggleButton</a>
                                       +----<a href="GtkColorButton.html" title="GtkColorButton">GtkColorButton</a>
                                       +----<a href="GtkFontButton.html" title="GtkFontButton">GtkFontButton</a>
                                       +----<a href="GtkLinkButton.html" title="GtkLinkButton">GtkLinkButton</a>
                                       +----<a href="GtkOptionMenu.html" title="GtkOptionMenu">GtkOptionMenu</a>
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2903461"></a><h2>Implemented Interfaces</h2>
<p>
GtkButton implements
 AtkImplementorIface.</p>
</div>
<div class="refsect1" lang="en">
<a name="id2903484"></a><h2>Properties</h2>
<pre class="synopsis">

  "<a href="GtkButton.html#GtkButton--focus-on-click">focus-on-click</a>"       <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read / Write
  "<a href="GtkButton.html#GtkButton--image">image</a>"                <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>             : Read / Write
  "<a href="GtkButton.html#GtkButton--image-position">image-position</a>"       <a href="gtk-Standard-Enumerations.html#GtkPositionType">GtkPositionType</a>       : Read / Write
  "<a href="GtkButton.html#GtkButton--label">label</a>"                <a
href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray"
>gchararray</a>            : Read / Write / Construct
  "<a href="GtkButton.html#GtkButton--relief">relief</a>"               <a href="gtk-Standard-Enumerations.html#GtkReliefStyle">GtkReliefStyle</a>        : Read / Write
  "<a href="GtkButton.html#GtkButton--use-stock">use-stock</a>"            <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read / Write / Construct
  "<a href="GtkButton.html#GtkButton--use-underline">use-underline</a>"        <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read / Write / Construct
  "<a href="GtkButton.html#GtkButton--xalign">xalign</a>"               <a
href="../glib/glib-Basic-Types.html#gfloat"
>gfloat</a>                : Read / Write
  "<a href="GtkButton.html#GtkButton--yalign">yalign</a>"               <a
href="../glib/glib-Basic-Types.html#gfloat"
>gfloat</a>                : Read / Write
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2903653"></a><h2>Style Properties</h2>
<pre class="synopsis">

  "<a href="GtkButton.html#GtkButton--child-displacement-x">child-displacement-x</a>" <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read
  "<a href="GtkButton.html#GtkButton--child-displacement-y">child-displacement-y</a>" <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read
  "<a href="GtkButton.html#GtkButton--default-border">default-border</a>"       <a href="GtkStyle.html#GtkBorder">GtkBorder</a>             : Read
  "<a href="GtkButton.html#GtkButton--default-outside-border">default-outside-border</a>" <a href="GtkStyle.html#GtkBorder">GtkBorder</a>             : Read
  "<a href="GtkButton.html#GtkButton--displace-focus">displace-focus</a>"       <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read
  "<a href="GtkButton.html#GtkButton--image-spacing">image-spacing</a>"        <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read
  "<a href="GtkButton.html#GtkButton--inner-border">inner-border</a>"         <a href="GtkStyle.html#GtkBorder">GtkBorder</a>             : Read
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2903789"></a><h2>Signals</h2>
<pre class="synopsis">

"<a href="GtkButton.html#GtkButton-activate">activate</a>"  void        user_function      (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *widget,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>   user_data)      : Run first / Action
"<a href="GtkButton.html#GtkButton-clicked">clicked</a>"   void        user_function      (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>   user_data)      : Run first / Action
"<a href="GtkButton.html#GtkButton-enter">enter</a>"     void        user_function      (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>   user_data)      : Run first
"<a href="GtkButton.html#GtkButton-leave">leave</a>"     void        user_function      (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>   user_data)      : Run first
"<a href="GtkButton.html#GtkButton-pressed">pressed</a>"   void        user_function      (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>   user_data)      : Run first
"<a href="GtkButton.html#GtkButton-released">released</a>"  void        user_function      (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>   user_data)      : Run first
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2903995"></a><h2>Description</h2>
<p>
The <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> widget is generally used to attach a function to that
is called when the button is pressed.  The various signals and how to use
them are outlined below.
</p>
<p>
The <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> widget can hold any valid child widget.  That is it can
hold most any other standard <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>.  The most commonly used child is
the <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2904049"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2904059"></a><h3>
<a name="GtkButton-struct"></a>GtkButton</h3>
<a class="indexterm" name="id2904072"></a><pre class="programlisting">typedef struct _GtkButton GtkButton;</pre>
<p>
This should not be accessed directly.  Use the accessor functions below.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2904088"></a><h3>
<a name="gtk-button-new"></a>gtk_button_new ()</h3>
<a class="indexterm" name="id2904100"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  gtk_button_new                  (void);</pre>
<p>
Creates a new <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> widget. To add a child widget to the button,
use <a href="GtkContainer.html#gtk-container-add"><code class="function">gtk_container_add()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>The newly created <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> widget.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2904165"></a><h3>
<a name="gtk-button-new-with-label"></a>gtk_button_new_with_label ()</h3>
<a class="indexterm" name="id2904179"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  gtk_button_new_with_label       (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *label);</pre>
<p>
Creates a <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> widget with a <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> child containing the given
text.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em>&#160;:</span></td>
<td>The text you want the <a href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> to hold.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>The newly created <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> widget.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2904269"></a><h3>
<a name="gtk-button-new-with-mnemonic"></a>gtk_button_new_with_mnemonic ()</h3>
<a class="indexterm" name="id2904282"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  gtk_button_new_with_mnemonic    (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *label);</pre>
<p>
Creates a new <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> containing a label.
If characters in <em class="parameter"><code>label</code></em> 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.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em>&#160;:</span></td>
<td> The text of the button, with an underscore in front of the
        mnemonic character
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> a new <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2904370"></a><h3>
<a name="gtk-button-new-from-stock"></a>gtk_button_new_from_stock ()</h3>
<a class="indexterm" name="id2904384"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  gtk_button_new_from_stock       (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *stock_id);</pre>
<p>
Creates a new <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> containing the image and text from a stock item.
Some stock ids have preprocessor macros like <a href="gtk-Stock-Items.html#GTK-STOCK-OK:CAPS"><span class="type">GTK_STOCK_OK</span></a> and
<a href="gtk-Stock-Items.html#GTK-STOCK-APPLY:CAPS"><span class="type">GTK_STOCK_APPLY</span></a>.
</p>
<p>
If <em class="parameter"><code>stock_id</code></em> is unknown, then it will be treated as a mnemonic
label (as for <a href="GtkButton.html#gtk-button-new-with-mnemonic"><code class="function">gtk_button_new_with_mnemonic()</code></a>).</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>stock_id</code></em>&#160;:</span></td>
<td> the name of the stock item 
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> a new <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2904501"></a><h3>
<a name="gtk-button-pressed"></a>gtk_button_pressed ()</h3>
<a class="indexterm" name="id2904514"></a><pre class="programlisting">void        gtk_button_pressed              (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button);</pre>
<p>
Emits a <a href="GtkButton.html#GtkButton-pressed"><span class="type">GtkButton::pressed</span></a> signal to the given <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></td>
<td>The <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> you want to send the signal to.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2904584"></a><h3>
<a name="gtk-button-released"></a>gtk_button_released ()</h3>
<a class="indexterm" name="id2904598"></a><pre class="programlisting">void        gtk_button_released             (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button);</pre>
<p>
Emits a <a href="GtkButton.html#GtkButton-released"><span class="type">GtkButton::released</span></a> signal to the given <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></td>
<td>The <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> you want to send the signal to.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2904669"></a><h3>
<a name="gtk-button-clicked"></a>gtk_button_clicked ()</h3>
<a class="indexterm" name="id2904682"></a><pre class="programlisting">void        gtk_button_clicked              (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button);</pre>
<p>
Emits a <a href="GtkButton.html#GtkButton-clicked"><span class="type">GtkButton::clicked</span></a> signal to the given <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></td>
<td>The <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> you want to send the signal to.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2904753"></a><h3>
<a name="gtk-button-enter"></a>gtk_button_enter ()</h3>
<a class="indexterm" name="id2904766"></a><pre class="programlisting">void        gtk_button_enter                (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button);</pre>
<p>
Emits a <a href="GtkButton.html#GtkButton-enter"><span class="type">GtkButton::enter</span></a> signal to the given <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></td>
<td>The <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> you want to send the signal to.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2904837"></a><h3>
<a name="gtk-button-leave"></a>gtk_button_leave ()</h3>
<a class="indexterm" name="id2904850"></a><pre class="programlisting">void        gtk_button_leave                (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button);</pre>
<p>
Emits a <a href="GtkButton.html#GtkButton-leave"><span class="type">GtkButton::leave</span></a> signal to the given <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></td>
<td>The <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> you want to send the signal to.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2904921"></a><h3>
<a name="gtk-button-set-relief"></a>gtk_button_set_relief ()</h3>
<a class="indexterm" name="id2904934"></a><pre class="programlisting">void        gtk_button_set_relief           (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                             <a href="gtk-Standard-Enumerations.html#GtkReliefStyle">GtkReliefStyle</a> newstyle);</pre>
<p>
Sets the relief style of the edges of the given <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> widget.
Three styles exist, GTK_RELIEF_NORMAL, GTK_RELIEF_HALF, GTK_RELIEF_NONE.
The default style is, as one can guess, GTK_RELIEF_NORMAL.


</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></td>
<td>The <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> you want to set relief styles of.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>newstyle</code></em>&#160;:</span></td>
<td>The GtkReliefStyle as described above.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2905026"></a><h3>
<a name="gtk-button-get-relief"></a>gtk_button_get_relief ()</h3>
<a class="indexterm" name="id2905038"></a><pre class="programlisting"><a href="gtk-Standard-Enumerations.html#GtkReliefStyle">GtkReliefStyle</a> gtk_button_get_relief        (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button);</pre>
<p>
Returns the current relief style of the given <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></td>
<td>The <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> you want the <a href="gtk-Standard-Enumerations.html#GtkReliefStyle"><span class="type">GtkReliefStyle</span></a> from.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>The current <a href="gtk-Standard-Enumerations.html#GtkReliefStyle"><span class="type">GtkReliefStyle</span></a>


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2905129"></a><h3>
<a name="gtk-button-get-label"></a>gtk_button_get_label ()</h3>
<a class="indexterm" name="id2905142"></a><pre class="programlisting">const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a>* gtk_button_get_label           (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button);</pre>
<p>
Fetches the text from the label of the button, as set by
<a href="GtkButton.html#gtk-button-set-label"><code class="function">gtk_button_set_label()</code></a>. If the label text has not 
been set the return value will be <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>. This will be the 
case if you create an empty button with <a href="GtkButton.html#gtk-button-new"><code class="function">gtk_button_new()</code></a> to 
use as a container.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></td>
<td> a <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> The text of the label widget. This string is owned
by the widget and must not be modified or freed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2905247"></a><h3>
<a name="gtk-button-set-label"></a>gtk_button_set_label ()</h3>
<a class="indexterm" name="id2905260"></a><pre class="programlisting">void        gtk_button_set_label            (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                             const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *label);</pre>
<p>
Sets the text of the label of the button to <em class="parameter"><code>str</code></em>. This text is
also used to select the stock item if <a href="GtkButton.html#gtk-button-set-use-stock"><code class="function">gtk_button_set_use_stock()</code></a>
is used.
</p>
<p>
This will also clear any previously set labels.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></td>
<td> a <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>label</code></em>&#160;:</span></td>
<td> a string
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2905361"></a><h3>
<a name="gtk-button-get-use-stock"></a>gtk_button_get_use_stock ()</h3>
<a class="indexterm" name="id2905374"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    gtk_button_get_use_stock        (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button);</pre>
<p>
Returns whether the button label is a stock item.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></td>
<td> a <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the button label is used to
              select a stock item instead of being
              used directly as the label text.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2905454"></a><h3>
<a name="gtk-button-set-use-stock"></a>gtk_button_set_use_stock ()</h3>
<a class="indexterm" name="id2905467"></a><pre class="programlisting">void        gtk_button_set_use_stock        (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                             <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> use_stock);</pre>
<p>
If true, the label set on the button is used as a
stock id to select the stock item for the button.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></td>
<td> a <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>use_stock</code></em>&#160;:</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the button should use a stock item
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2905558"></a><h3>
<a name="gtk-button-get-use-underline"></a>gtk_button_get_use_underline ()</h3>
<a class="indexterm" name="id2905572"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    gtk_button_get_use_underline    (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button);</pre>
<p>
Returns whether an embedded underline in the button label indicates a
mnemonic. See <a href="GtkButton.html#gtk-button-set-use-underline"><code class="function">gtk_button_set_use_underline()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></td>
<td> a <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if an embedded underline in the button label
              indicates the mnemonic accelerator keys.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2905664"></a><h3>
<a name="gtk-button-set-use-underline"></a>gtk_button_set_use_underline ()</h3>
<a class="indexterm" name="id2905677"></a><pre class="programlisting">void        gtk_button_set_use_underline    (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                             <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> use_underline);</pre>
<p>
If true, an underline in the text of the button label indicates
the next character should be used for the mnemonic accelerator key.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></td>
<td> a <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>use_underline</code></em>&#160;:</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if underlines in the text indicate mnemonics
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2905769"></a><h3>
<a name="gtk-button-set-focus-on-click"></a>gtk_button_set_focus_on_click ()</h3>
<a class="indexterm" name="id2905784"></a><pre class="programlisting">void        gtk_button_set_focus_on_click   (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                             <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> focus_on_click);</pre>
<p>
Sets whether the button will grab focus when it is clicked with the mouse.
Making mouse clicks not grab focus is useful in places like toolbars where
you don't want the keyboard focus removed from the main area of the
application.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></td>
<td> a <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>focus_on_click</code></em>&#160;:</span></td>
<td> whether the button grabs focus when clicked with the mouse
</td>
</tr>
</tbody>
</table></div>
<p>Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2905872"></a><h3>
<a name="gtk-button-get-focus-on-click"></a>gtk_button_get_focus_on_click ()</h3>
<a class="indexterm" name="id2905888"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>    gtk_button_get_focus_on_click   (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button);</pre>
<p>
Returns whether the button grabs focus when it is clicked with the mouse.
See <a href="GtkButton.html#gtk-button-set-focus-on-click"><code class="function">gtk_button_set_focus_on_click()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></td>
<td> a <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if the button grabs focus when it is clicked with
              the mouse.

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2905984"></a><h3>
<a name="gtk-button-set-alignment"></a>gtk_button_set_alignment ()</h3>
<a class="indexterm" name="id2905999"></a><pre class="programlisting">void        gtk_button_set_alignment        (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                             <a
href="../glib/glib-Basic-Types.html#gfloat"
>gfloat</a> xalign,
                                             <a
href="../glib/glib-Basic-Types.html#gfloat"
>gfloat</a> yalign);</pre>
<p>
Sets the alignment of the child. This property has no effect unless 
the child is a <a href="GtkMisc.html" title="GtkMisc"><span class="type">GtkMisc</span></a> or a <span class="type">GtkAligment</span>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></td>
<td> a <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>xalign</code></em>&#160;:</span></td>
<td> the horizontal position of the child, 0.0 is left aligned, 
  1.0 is right aligned
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>yalign</code></em>&#160;:</span></td>
<td> the vertical position of the child, 0.0 is top aligned, 
  1.0 is bottom aligned
</td>
</tr>
</tbody>
</table></div>
<p>Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2906124"></a><h3>
<a name="gtk-button-get-alignment"></a>gtk_button_get_alignment ()</h3>
<a class="indexterm" name="id2906140"></a><pre class="programlisting">void        gtk_button_get_alignment        (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                             <a
href="../glib/glib-Basic-Types.html#gfloat"
>gfloat</a> *xalign,
                                             <a
href="../glib/glib-Basic-Types.html#gfloat"
>gfloat</a> *yalign);</pre>
<p>
Gets the alignment of the child in the button.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></td>
<td> a <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>xalign</code></em>&#160;:</span></td>
<td> return location for horizontal alignment
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>yalign</code></em>&#160;:</span></td>
<td> return location for vertical alignment
</td>
</tr>
</tbody>
</table></div>
<p>Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2906246"></a><h3>
<a name="gtk-button-set-image"></a>gtk_button_set_image ()</h3>
<a class="indexterm" name="id2906262"></a><pre class="programlisting">void        gtk_button_set_image            (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                             <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *image);</pre>
<p>
Set the image of <em class="parameter"><code>button</code></em> to the given widget. Note that
it depends on the gtk-button-images setting whether the
image will be displayed or not, you don't have to call
<a href="GtkWidget.html#gtk-widget-show"><code class="function">gtk_widget_show()</code></a> on <em class="parameter"><code>image</code></em> yourself.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></td>
<td> a <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></td>
<td> a widget to set as the image for the button
</td>
</tr>
</tbody>
</table></div>
<p>Since  2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2906371"></a><h3>
<a name="gtk-button-get-image"></a>gtk_button_get_image ()</h3>
<a class="indexterm" name="id2906386"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*  gtk_button_get_image            (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button);</pre>
<p>
Gets the widget that is currenty set as the image of <em class="parameter"><code>button</code></em>.
This may have been explicitly set by <a href="GtkButton.html#gtk-button-set-image"><code class="function">gtk_button_set_image()</code></a>
or constructed by <a href="GtkButton.html#gtk-button-new-from-stock"><code class="function">gtk_button_new_from_stock()</code></a>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></td>
<td> a <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> a <a href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> in case there is no image

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2906506"></a><h3>
<a name="gtk-button-set-image-position"></a>gtk_button_set_image_position ()</h3>
<a class="indexterm" name="id2906521"></a><pre class="programlisting">void        gtk_button_set_image_position   (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                             <a href="gtk-Standard-Enumerations.html#GtkPositionType">GtkPositionType</a> position);</pre>
<p>
Sets the position of the image relative to the text 
inside the button.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></td>
<td> a <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>position</code></em>&#160;:</span></td>
<td> the position
</td>
</tr>
</tbody>
</table></div>
<p>Since  2.10
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2906607"></a><h3>
<a name="gtk-button-get-image-position"></a>gtk_button_get_image_position ()</h3>
<a class="indexterm" name="id2906622"></a><pre class="programlisting"><a href="gtk-Standard-Enumerations.html#GtkPositionType">GtkPositionType</a> gtk_button_get_image_position
                                            (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button);</pre>
<p>
Gets the position of the image relative to the text 
inside the button.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></td>
<td> a <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the position

</td>
</tr>
</tbody>
</table></div>
<p>Since  2.10
</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id2906698"></a><h2>Property Details</h2>
<div class="refsect2" lang="en">
<a name="id2906709"></a><h3>
<a name="GtkButton--focus-on-click"></a>The "<code class="literal">focus-on-click</code>" property</h3>
<a class="indexterm" name="id2906725"></a><pre class="programlisting">  "focus-on-click"       <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read / Write</pre>
<p>Whether the button grabs focus when it is clicked with the mouse.</p>
<p>Default value: TRUE</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2906752"></a><h3>
<a name="GtkButton--image"></a>The "<code class="literal">image</code>" property</h3>
<a class="indexterm" name="id2906768"></a><pre class="programlisting">  "image"                <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>             : Read / Write</pre>
<p>Child widget to appear next to the button text.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2906791"></a><h3>
<a name="GtkButton--image-position"></a>The "<code class="literal">image-position</code>" property</h3>
<a class="indexterm" name="id2906807"></a><pre class="programlisting">  "image-position"       <a href="gtk-Standard-Enumerations.html#GtkPositionType">GtkPositionType</a>       : Read / Write</pre>
<p>
The position of the image relative to the text inside the button.</p>
<p>

</p>
<p>Default value: GTK_POS_LEFT</p>
<p>Since  2.10
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2906844"></a><h3>
<a name="GtkButton--label"></a>The "<code class="literal">label</code>" property</h3>
<a class="indexterm" name="id2906859"></a><pre class="programlisting">  "label"                <a
href="../gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray"
>gchararray</a>            : Read / Write / Construct</pre>
<p>Text of the label widget inside the button, if the button contains a label widget.</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2906887"></a><h3>
<a name="GtkButton--relief"></a>The "<code class="literal">relief</code>" property</h3>
<a class="indexterm" name="id2906902"></a><pre class="programlisting">  "relief"               <a href="gtk-Standard-Enumerations.html#GtkReliefStyle">GtkReliefStyle</a>        : Read / Write</pre>
<p>The border relief style.</p>
<p>Default value: GTK_RELIEF_NORMAL</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2906929"></a><h3>
<a name="GtkButton--use-stock"></a>The "<code class="literal">use-stock</code>" property</h3>
<a class="indexterm" name="id2906946"></a><pre class="programlisting">  "use-stock"            <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read / Write / Construct</pre>
<p>If set, the label is used to pick a stock item instead of being displayed.</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2906973"></a><h3>
<a name="GtkButton--use-underline"></a>The "<code class="literal">use-underline</code>" property</h3>
<a class="indexterm" name="id2906990"></a><pre class="programlisting">  "use-underline"        <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read / Write / Construct</pre>
<p>If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key.</p>
<p>Default value: FALSE</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2907018"></a><h3>
<a name="GtkButton--xalign"></a>The "<code class="literal">xalign</code>" property</h3>
<a class="indexterm" name="id2907034"></a><pre class="programlisting">  "xalign"               <a
href="../glib/glib-Basic-Types.html#gfloat"
>gfloat</a>                : Read / Write</pre>
<p>
If the child of the button is a <a href="GtkMisc.html" title="GtkMisc"><span class="type">GtkMisc</span></a> or <a href="GtkAlignment.html" title="GtkAlignment"><span class="type">GtkAlignment</span></a>, this property 
can be used to control it's horizontal alignment. 0.0 is left aligned, 
1.0 is right aligned.</p>
<p>

</p>
<p>Allowed values: [0,1]</p>
<p>Default value: 0.5</p>
<p>Since  2.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2907091"></a><h3>
<a name="GtkButton--yalign"></a>The "<code class="literal">yalign</code>" property</h3>
<a class="indexterm" name="id2907107"></a><pre class="programlisting">  "yalign"               <a
href="../glib/glib-Basic-Types.html#gfloat"
>gfloat</a>                : Read / Write</pre>
<p>
If the child of the button is a <a href="GtkMisc.html" title="GtkMisc"><span class="type">GtkMisc</span></a> or <a href="GtkAlignment.html" title="GtkAlignment"><span class="type">GtkAlignment</span></a>, this property 
can be used to control it's vertical alignment. 0.0 is top aligned, 
1.0 is bottom aligned.</p>
<p>

</p>
<p>Allowed values: [0,1]</p>
<p>Default value: 0.5</p>
<p>Since  2.4
</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id2907165"></a><h2>Style Property Details</h2>
<div class="refsect2" lang="en">
<a name="id2907176"></a><h3>
<a name="GtkButton--child-displacement-x"></a>The "<code class="literal">child-displacement-x</code>" style property</h3>
<a class="indexterm" name="id2907194"></a><pre class="programlisting">  "child-displacement-x" <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read</pre>
<p>How far in the x direction to move the child when the button is depressed.</p>
<p>Default value: 0</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2907221"></a><h3>
<a name="GtkButton--child-displacement-y"></a>The "<code class="literal">child-displacement-y</code>" style property</h3>
<a class="indexterm" name="id2907238"></a><pre class="programlisting">  "child-displacement-y" <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read</pre>
<p>How far in the y direction to move the child when the button is depressed.</p>
<p>Default value: 0</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2907265"></a><h3>
<a name="GtkButton--default-border"></a>The "<code class="literal">default-border</code>" style property</h3>
<a class="indexterm" name="id2907282"></a><pre class="programlisting">  "default-border"       <a href="GtkStyle.html#GtkBorder">GtkBorder</a>             : Read</pre>
<p>Extra space to add for CAN_DEFAULT buttons.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2907304"></a><h3>
<a name="GtkButton--default-outside-border"></a>The "<code class="literal">default-outside-border</code>" style property</h3>
<a class="indexterm" name="id2907321"></a><pre class="programlisting">  "default-outside-border" <a href="GtkStyle.html#GtkBorder">GtkBorder</a>             : Read</pre>
<p>Extra space to add for CAN_DEFAULT buttons that is always drawn outside the border.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2907345"></a><h3>
<a name="GtkButton--displace-focus"></a>The "<code class="literal">displace-focus</code>" style property</h3>
<a class="indexterm" name="id2907362"></a><pre class="programlisting">  "displace-focus"       <a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a>              : Read</pre>
<p>
Whether the child_displacement_x/child_displacement_y properties should also 
affect the focus rectangle.</p>
<p>

</p>
<p>Default value: FALSE</p>
<p>Since  2.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2907398"></a><h3>
<a name="GtkButton--image-spacing"></a>The "<code class="literal">image-spacing</code>" style property</h3>
<a class="indexterm" name="id2907415"></a><pre class="programlisting">  "image-spacing"        <a
href="../glib/glib-Basic-Types.html#gint"
>gint</a>                  : Read</pre>
<p>Spacing in pixels between the image and label.</p>
<p>Allowed values: &gt;= 0</p>
<p>Default value: 2</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2907445"></a><h3>
<a name="GtkButton--inner-border"></a>The "<code class="literal">inner-border</code>" style property</h3>
<a class="indexterm" name="id2907462"></a><pre class="programlisting">  "inner-border"         <a href="GtkStyle.html#GtkBorder">GtkBorder</a>             : Read</pre>
<p>
Sets the border between the button edges and child.</p>
<p>

</p>
<p>Since  2.10
</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id2907496"></a><h2>Signal Details</h2>
<div class="refsect2" lang="en">
<a name="id2907506"></a><h3>
<a name="GtkButton-activate"></a>The "activate" signal</h3>
<a class="indexterm" name="id2907516"></a><pre class="programlisting">void        user_function                  (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *widget,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>   user_data)      : Run first / Action</pre>
<p>
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
"clicked" signal.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>widget</code></em>&#160;:</span></td>
<td> the object which received the signal.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2907590"></a><h3>
<a name="GtkButton-clicked"></a>The "clicked" signal</h3>
<a class="indexterm" name="id2907600"></a><pre class="programlisting">void        user_function                  (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>   user_data)      : Run first / Action</pre>
<p>
Emitted when the button has been activated (pressed and released).</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></td>
<td> the object that received the signal
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2907673"></a><h3>
<a name="GtkButton-enter"></a>The "enter" signal</h3>
<a class="indexterm" name="id2907683"></a><pre class="programlisting">void        user_function                  (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>   user_data)      : Run first</pre>
<p>
Emitted when the pointer enters the button.
</p>
<p>
<em class="parameter"><code>Deprecated</code></em>: Use the GtkWidget::enter-notify-event signal.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></td>
<td> the object that received the signal
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2907765"></a><h3>
<a name="GtkButton-leave"></a>The "leave" signal</h3>
<a class="indexterm" name="id2907775"></a><pre class="programlisting">void        user_function                  (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>   user_data)      : Run first</pre>
<p>
Emitted when the pointer leaves the button.
</p>
<p>
<em class="parameter"><code>Deprecated</code></em>: Use the GtkWidget::leave-notify-event signal.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></td>
<td> the object that received the signal
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2907857"></a><h3>
<a name="GtkButton-pressed"></a>The "pressed" signal</h3>
<a class="indexterm" name="id2907868"></a><pre class="programlisting">void        user_function                  (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>   user_data)      : Run first</pre>
<p>
Emitted when the button is pressed.
</p>
<p>
<em class="parameter"><code>Deprecated</code></em>: Use the GtkWidget::button-press-event signal.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></td>
<td> the object that received the signal
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2907949"></a><h3>
<a name="GtkButton-released"></a>The "released" signal</h3>
<a class="indexterm" name="id2907960"></a><pre class="programlisting">void        user_function                  (<a href="GtkButton.html" title="GtkButton">GtkButton</a> *button,
                                            <a
href="../glib/glib-Basic-Types.html#gpointer"
>gpointer</a>   user_data)      : Run first</pre>
<p>
Emitted when the button is released.
</p>
<p>
<em class="parameter"><code>Deprecated</code></em>: Use the GtkWidget::button-release-event signal.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>button</code></em>&#160;:</span></td>
<td> the object that received the signal
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</body>
</html>

Anon7 - 2021