Initial packaging to sync OBS with git/gerrit
[profile/ivi/gtk3.git] / docs / reference / gtk / html / GtkButton.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>GtkButton</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
8 <link rel="up" href="ButtonWidgets.html" title="Buttons and Toggles">
9 <link rel="prev" href="ButtonWidgets.html" title="Buttons and Toggles">
10 <link rel="next" href="GtkCheckButton.html" title="GtkCheckButton">
11 <meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
16 <tr valign="middle">
17 <td><a accesskey="p" href="ButtonWidgets.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="ButtonWidgets.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GTK+ 3 Reference Manual</th>
21 <td><a accesskey="n" href="GtkCheckButton.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#GtkButton.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#GtkButton.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#GtkButton.object-hierarchy" class="shortcut">Object Hierarchy</a>
29                    | 
30                   <a href="#GtkButton.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
31                    | 
32                   <a href="#GtkButton.properties" class="shortcut">Properties</a>
33                    | 
34                   <a href="#GtkButton.style-properties" class="shortcut">Style Properties</a>
35                    | 
36                   <a href="#GtkButton.signals" class="shortcut">Signals</a>
37 </td></tr>
38 </table>
39 <div class="refentry">
40 <a name="GtkButton"></a><div class="titlepage"></div>
41 <div class="refnamediv"><table width="100%"><tr>
42 <td valign="top">
43 <h2><span class="refentrytitle"><a name="GtkButton.top_of_page"></a>GtkButton</span></h2>
44 <p>GtkButton — A widget that emits a signal when clicked on</p>
45 </td>
46 <td valign="top" align="right"><img src="button.png"></td>
47 </tr></table></div>
48 <div class="refsynopsisdiv">
49 <a name="GtkButton.synopsis"></a><h2>Synopsis</h2>
50 <pre class="synopsis">
51 #include &lt;gtk/gtk.h&gt;
52
53 struct              <a class="link" href="GtkButton.html#GtkButton-struct" title="struct GtkButton">GtkButton</a>;
54 <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="GtkButton.html#gtk-button-new" title="gtk_button_new ()">gtk_button_new</a>                      (<em class="parameter"><code><span class="type">void</span></code></em>);
55 <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="GtkButton.html#gtk-button-new-with-label" title="gtk_button_new_with_label ()">gtk_button_new_with_label</a>           (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);
56 <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="GtkButton.html#gtk-button-new-with-mnemonic" title="gtk_button_new_with_mnemonic ()">gtk_button_new_with_mnemonic</a>        (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);
57 <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="GtkButton.html#gtk-button-new-from-stock" title="gtk_button_new_from_stock ()">gtk_button_new_from_stock</a>           (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *stock_id</code></em>);
58 <span class="returnvalue">void</span>                <a class="link" href="GtkButton.html#gtk-button-pressed" title="gtk_button_pressed ()">gtk_button_pressed</a>                  (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);
59 <span class="returnvalue">void</span>                <a class="link" href="GtkButton.html#gtk-button-released" title="gtk_button_released ()">gtk_button_released</a>                 (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);
60 <span class="returnvalue">void</span>                <a class="link" href="GtkButton.html#gtk-button-clicked" title="gtk_button_clicked ()">gtk_button_clicked</a>                  (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);
61 <span class="returnvalue">void</span>                <a class="link" href="GtkButton.html#gtk-button-enter" title="gtk_button_enter ()">gtk_button_enter</a>                    (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);
62 <span class="returnvalue">void</span>                <a class="link" href="GtkButton.html#gtk-button-leave" title="gtk_button_leave ()">gtk_button_leave</a>                    (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);
63 <span class="returnvalue">void</span>                <a class="link" href="GtkButton.html#gtk-button-set-relief" title="gtk_button_set_relief ()">gtk_button_set_relief</a>               (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
64                                                          <em class="parameter"><code><a class="link" href="gtk3-Standard-Enumerations.html#GtkReliefStyle" title="enum GtkReliefStyle"><span class="type">GtkReliefStyle</span></a> newstyle</code></em>);
65 <a class="link" href="gtk3-Standard-Enumerations.html#GtkReliefStyle" title="enum GtkReliefStyle"><span class="returnvalue">GtkReliefStyle</span></a>      <a class="link" href="GtkButton.html#gtk-button-get-relief" title="gtk_button_get_relief ()">gtk_button_get_relief</a>               (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);
66 const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="GtkButton.html#gtk-button-get-label" title="gtk_button_get_label ()">gtk_button_get_label</a>                (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);
67 <span class="returnvalue">void</span>                <a class="link" href="GtkButton.html#gtk-button-set-label" title="gtk_button_set_label ()">gtk_button_set_label</a>                (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
68                                                          <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);
69 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GtkButton.html#gtk-button-get-use-stock" title="gtk_button_get_use_stock ()">gtk_button_get_use_stock</a>            (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);
70 <span class="returnvalue">void</span>                <a class="link" href="GtkButton.html#gtk-button-set-use-stock" title="gtk_button_set_use_stock ()">gtk_button_set_use_stock</a>            (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
71                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> use_stock</code></em>);
72 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GtkButton.html#gtk-button-get-use-underline" title="gtk_button_get_use_underline ()">gtk_button_get_use_underline</a>        (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);
73 <span class="returnvalue">void</span>                <a class="link" href="GtkButton.html#gtk-button-set-use-underline" title="gtk_button_set_use_underline ()">gtk_button_set_use_underline</a>        (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
74                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> use_underline</code></em>);
75 <span class="returnvalue">void</span>                <a class="link" href="GtkButton.html#gtk-button-set-focus-on-click" title="gtk_button_set_focus_on_click ()">gtk_button_set_focus_on_click</a>       (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
76                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> focus_on_click</code></em>);
77 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GtkButton.html#gtk-button-get-focus-on-click" title="gtk_button_get_focus_on_click ()">gtk_button_get_focus_on_click</a>       (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);
78 <span class="returnvalue">void</span>                <a class="link" href="GtkButton.html#gtk-button-set-alignment" title="gtk_button_set_alignment ()">gtk_button_set_alignment</a>            (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
79                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a> xalign</code></em>,
80                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a> yalign</code></em>);
81 <span class="returnvalue">void</span>                <a class="link" href="GtkButton.html#gtk-button-get-alignment" title="gtk_button_get_alignment ()">gtk_button_get_alignment</a>            (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
82                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a> *xalign</code></em>,
83                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a> *yalign</code></em>);
84 <span class="returnvalue">void</span>                <a class="link" href="GtkButton.html#gtk-button-set-image" title="gtk_button_set_image ()">gtk_button_set_image</a>                (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
85                                                          <em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *image</code></em>);
86 <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="GtkButton.html#gtk-button-get-image" title="gtk_button_get_image ()">gtk_button_get_image</a>                (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);
87 <span class="returnvalue">void</span>                <a class="link" href="GtkButton.html#gtk-button-set-image-position" title="gtk_button_set_image_position ()">gtk_button_set_image_position</a>       (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
88                                                          <em class="parameter"><code><a class="link" href="gtk3-Standard-Enumerations.html#GtkPositionType" title="enum GtkPositionType"><span class="type">GtkPositionType</span></a> position</code></em>);
89 <a class="link" href="gtk3-Standard-Enumerations.html#GtkPositionType" title="enum GtkPositionType"><span class="returnvalue">GtkPositionType</span></a>     <a class="link" href="GtkButton.html#gtk-button-get-image-position" title="gtk_button_get_image_position ()">gtk_button_get_image_position</a>       (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);
90 <a href="http://developer.gnome.org/devel/gdk/gdk3-Windows.html#GdkWindow"><span class="returnvalue">GdkWindow</span></a> *         <a class="link" href="GtkButton.html#gtk-button-get-event-window" title="gtk_button_get_event_window ()">gtk_button_get_event_window</a>         (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);
91 </pre>
92 </div>
93 <div class="refsect1">
94 <a name="GtkButton.object-hierarchy"></a><h2>Object Hierarchy</h2>
95 <pre class="synopsis">
96   <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
97    +----<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
98          +----<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
99                +----<a class="link" href="GtkContainer.html" title="GtkContainer">GtkContainer</a>
100                      +----<a class="link" href="GtkBin.html" title="GtkBin">GtkBin</a>
101                            +----GtkButton
102                                  +----<a class="link" href="GtkToggleButton.html" title="GtkToggleButton">GtkToggleButton</a>
103                                  +----<a class="link" href="GtkColorButton.html" title="GtkColorButton">GtkColorButton</a>
104                                  +----<a class="link" href="GtkFontButton.html" title="GtkFontButton">GtkFontButton</a>
105                                  +----<a class="link" href="GtkLinkButton.html" title="GtkLinkButton">GtkLinkButton</a>
106                                  +----<a class="link" href="GtkLockButton.html" title="GtkLockButton">GtkLockButton</a>
107                                  +----<a class="link" href="GtkScaleButton.html" title="GtkScaleButton">GtkScaleButton</a>
108 </pre>
109 </div>
110 <div class="refsect1">
111 <a name="GtkButton.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
112 <p>
113 GtkButton implements
114  AtkImplementorIface,  <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a>,  <a class="link" href="GtkActionable.html" title="GtkActionable">GtkActionable</a> and  <a class="link" href="GtkActivatable.html" title="GtkActivatable">GtkActivatable</a>.</p>
115 </div>
116 <div class="refsect1">
117 <a name="GtkButton.properties"></a><h2>Properties</h2>
118 <pre class="synopsis">
119   "<a class="link" href="GtkButton.html#GtkButton--focus-on-click" title='The "focus-on-click" property'>focus-on-click</a>"           <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write
120   "<a class="link" href="GtkButton.html#GtkButton--image" title='The "image" property'>image</a>"                    <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>*            : Read / Write
121   "<a class="link" href="GtkButton.html#GtkButton--image-position" title='The "image-position" property'>image-position</a>"           <a class="link" href="gtk3-Standard-Enumerations.html#GtkPositionType" title="enum GtkPositionType"><span class="type">GtkPositionType</span></a>       : Read / Write
122   "<a class="link" href="GtkButton.html#GtkButton--label" title='The "label" property'>label</a>"                    <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct
123   "<a class="link" href="GtkButton.html#GtkButton--relief" title='The "relief" property'>relief</a>"                   <a class="link" href="gtk3-Standard-Enumerations.html#GtkReliefStyle" title="enum GtkReliefStyle"><span class="type">GtkReliefStyle</span></a>        : Read / Write
124   "<a class="link" href="GtkButton.html#GtkButton--use-stock" title='The "use-stock" property'>use-stock</a>"                <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct
125   "<a class="link" href="GtkButton.html#GtkButton--use-underline" title='The "use-underline" property'>use-underline</a>"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct
126   "<a class="link" href="GtkButton.html#GtkButton--xalign" title='The "xalign" property'>xalign</a>"                   <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a>                : Read / Write
127   "<a class="link" href="GtkButton.html#GtkButton--yalign" title='The "yalign" property'>yalign</a>"                   <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a>                : Read / Write
128 </pre>
129 </div>
130 <div class="refsect1">
131 <a name="GtkButton.style-properties"></a><h2>Style Properties</h2>
132 <pre class="synopsis">
133   "<a class="link" href="GtkButton.html#GtkButton--s-child-displacement-x" title='The "child-displacement-x" style property'>child-displacement-x</a>"     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read
134   "<a class="link" href="GtkButton.html#GtkButton--s-child-displacement-y" title='The "child-displacement-y" style property'>child-displacement-y</a>"     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read
135   "<a class="link" href="GtkButton.html#GtkButton--s-default-border" title='The "default-border" style property'>default-border</a>"           <a class="link" href="GtkStyleContext.html#GtkBorder"><span class="type">GtkBorder</span></a>*            : Read
136   "<a class="link" href="GtkButton.html#GtkButton--s-default-outside-border" title='The "default-outside-border" style property'>default-outside-border</a>"   <a class="link" href="GtkStyleContext.html#GtkBorder"><span class="type">GtkBorder</span></a>*            : Read
137   "<a class="link" href="GtkButton.html#GtkButton--s-displace-focus" title='The "displace-focus" style property'>displace-focus</a>"           <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read
138   "<a class="link" href="GtkButton.html#GtkButton--s-image-spacing" title='The "image-spacing" style property'>image-spacing</a>"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read
139   "<a class="link" href="GtkButton.html#GtkButton--s-inner-border" title='The "inner-border" style property'>inner-border</a>"             <a class="link" href="GtkStyleContext.html#GtkBorder"><span class="type">GtkBorder</span></a>*            : Read
140 </pre>
141 </div>
142 <div class="refsect1">
143 <a name="GtkButton.signals"></a><h2>Signals</h2>
144 <pre class="synopsis">
145   "<a class="link" href="GtkButton.html#GtkButton-activate" title='The "activate" signal'>activate</a>"                                       : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS"><code class="literal">Action</code></a>
146   "<a class="link" href="GtkButton.html#GtkButton-clicked" title='The "clicked" signal'>clicked</a>"                                        : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS"><code class="literal">Action</code></a>
147   "<a class="link" href="GtkButton.html#GtkButton-enter" title='The "enter" signal'>enter</a>"                                          : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a>
148   "<a class="link" href="GtkButton.html#GtkButton-leave" title='The "leave" signal'>leave</a>"                                          : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a>
149   "<a class="link" href="GtkButton.html#GtkButton-pressed" title='The "pressed" signal'>pressed</a>"                                        : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a>
150   "<a class="link" href="GtkButton.html#GtkButton-released" title='The "released" signal'>released</a>"                                       : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a>
151 </pre>
152 </div>
153 <div class="refsect1">
154 <a name="GtkButton.description"></a><h2>Description</h2>
155 <p>
156 The <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> widget is generally used to trigger a callback function that is
157 called when the button is pressed.  The various signals and how to use them
158 are outlined below.
159 </p>
160 <p>
161 The <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> widget can hold any valid child widget.  That is, it can hold
162 almost any other standard <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>.  The most commonly used child is the
163 <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>.
164 </p>
165 </div>
166 <div class="refsect1">
167 <a name="GtkButton.details"></a><h2>Details</h2>
168 <div class="refsect2">
169 <a name="GtkButton-struct"></a><h3>struct GtkButton</h3>
170 <pre class="programlisting">struct GtkButton;</pre>
171 </div>
172 <hr>
173 <div class="refsect2">
174 <a name="gtk-button-new"></a><h3>gtk_button_new ()</h3>
175 <pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_button_new                      (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
176 <p>
177 Creates a new <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> widget. To add a child widget to the button,
178 use <a class="link" href="GtkContainer.html#gtk-container-add" title="gtk_container_add ()"><code class="function">gtk_container_add()</code></a>.
179 </p>
180 <div class="variablelist"><table border="0">
181 <col align="left" valign="top">
182 <tbody><tr>
183 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
184 <td>The newly created <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> widget.</td>
185 </tr></tbody>
186 </table></div>
187 </div>
188 <hr>
189 <div class="refsect2">
190 <a name="gtk-button-new-with-label"></a><h3>gtk_button_new_with_label ()</h3>
191 <pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_button_new_with_label           (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);</pre>
192 <p>
193 Creates a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> widget with a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> child containing the given
194 text.
195 </p>
196 <div class="variablelist"><table border="0">
197 <col align="left" valign="top">
198 <tbody>
199 <tr>
200 <td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td>
201 <td>The text you want the <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> to hold.</td>
202 </tr>
203 <tr>
204 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
205 <td>The newly created <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> widget.</td>
206 </tr>
207 </tbody>
208 </table></div>
209 </div>
210 <hr>
211 <div class="refsect2">
212 <a name="gtk-button-new-with-mnemonic"></a><h3>gtk_button_new_with_mnemonic ()</h3>
213 <pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_button_new_with_mnemonic        (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);</pre>
214 <p>
215 Creates a new <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> containing a label.
216 If characters in <em class="parameter"><code>label</code></em> are preceded by an underscore, they are underlined.
217 If you need a literal underscore character in a label, use '__' (two
218 underscores). The first underlined character represents a keyboard
219 accelerator called a mnemonic.
220 Pressing Alt and that key activates the button.
221 </p>
222 <div class="variablelist"><table border="0">
223 <col align="left" valign="top">
224 <tbody>
225 <tr>
226 <td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td>
227 <td>The text of the button, with an underscore in front of the
228 mnemonic character</td>
229 </tr>
230 <tr>
231 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
232 <td>a new <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
233 </td>
234 </tr>
235 </tbody>
236 </table></div>
237 </div>
238 <hr>
239 <div class="refsect2">
240 <a name="gtk-button-new-from-stock"></a><h3>gtk_button_new_from_stock ()</h3>
241 <pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_button_new_from_stock           (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *stock_id</code></em>);</pre>
242 <p>
243 Creates a new <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> containing the image and text from a stock item.
244 Some stock ids have preprocessor macros like <a class="link" href="gtk3-Stock-Items.html#GTK-STOCK-OK:CAPS" title="GTK_STOCK_OK"><span class="type">GTK_STOCK_OK</span></a> and
245 <a class="link" href="gtk3-Stock-Items.html#GTK-STOCK-APPLY:CAPS" title="GTK_STOCK_APPLY"><span class="type">GTK_STOCK_APPLY</span></a>.
246 </p>
247 <p>
248 If <em class="parameter"><code>stock_id</code></em> is unknown, then it will be treated as a mnemonic
249 label (as for <a class="link" href="GtkButton.html#gtk-button-new-with-mnemonic" title="gtk_button_new_with_mnemonic ()"><code class="function">gtk_button_new_with_mnemonic()</code></a>).
250 </p>
251 <div class="variablelist"><table border="0">
252 <col align="left" valign="top">
253 <tbody>
254 <tr>
255 <td><p><span class="term"><em class="parameter"><code>stock_id</code></em> :</span></p></td>
256 <td>the name of the stock item</td>
257 </tr>
258 <tr>
259 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
260 <td>a new <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
261 </td>
262 </tr>
263 </tbody>
264 </table></div>
265 </div>
266 <hr>
267 <div class="refsect2">
268 <a name="gtk-button-pressed"></a><h3>gtk_button_pressed ()</h3>
269 <pre class="programlisting"><span class="returnvalue">void</span>                gtk_button_pressed                  (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);</pre>
270 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
271 <h3 class="title">Warning</h3>
272 <p><code class="literal">gtk_button_pressed</code> has been deprecated since version 2.20 and should not be used in newly-written code. Use the <a class="link" href="GtkWidget.html#GtkWidget-button-press-event" title='The "button-press-event" signal'><span class="type">"button-press-event"</span></a> signal.</p>
273 </div>
274 <p>
275 Emits a <a class="link" href="GtkButton.html#GtkButton-pressed" title='The "pressed" signal'><span class="type">"pressed"</span></a> signal to the given <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>.
276 </p>
277 <div class="variablelist"><table border="0">
278 <col align="left" valign="top">
279 <tbody><tr>
280 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
281 <td>The <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> you want to send the signal to.</td>
282 </tr></tbody>
283 </table></div>
284 </div>
285 <hr>
286 <div class="refsect2">
287 <a name="gtk-button-released"></a><h3>gtk_button_released ()</h3>
288 <pre class="programlisting"><span class="returnvalue">void</span>                gtk_button_released                 (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);</pre>
289 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
290 <h3 class="title">Warning</h3>
291 <p><code class="literal">gtk_button_released</code> has been deprecated since version 2.20 and should not be used in newly-written code. Use the <a class="link" href="GtkWidget.html#GtkWidget-button-release-event" title='The "button-release-event" signal'><span class="type">"button-release-event"</span></a> signal.</p>
292 </div>
293 <p>
294 Emits a <a class="link" href="GtkButton.html#GtkButton-released" title='The "released" signal'><span class="type">"released"</span></a> signal to the given <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>.
295 </p>
296 <div class="variablelist"><table border="0">
297 <col align="left" valign="top">
298 <tbody><tr>
299 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
300 <td>The <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> you want to send the signal to.</td>
301 </tr></tbody>
302 </table></div>
303 </div>
304 <hr>
305 <div class="refsect2">
306 <a name="gtk-button-clicked"></a><h3>gtk_button_clicked ()</h3>
307 <pre class="programlisting"><span class="returnvalue">void</span>                gtk_button_clicked                  (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);</pre>
308 <p>
309 Emits a <a class="link" href="GtkButton.html#GtkButton-clicked" title='The "clicked" signal'><span class="type">"clicked"</span></a> signal to the given <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>.
310 </p>
311 <div class="variablelist"><table border="0">
312 <col align="left" valign="top">
313 <tbody><tr>
314 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
315 <td>The <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> you want to send the signal to.</td>
316 </tr></tbody>
317 </table></div>
318 </div>
319 <hr>
320 <div class="refsect2">
321 <a name="gtk-button-enter"></a><h3>gtk_button_enter ()</h3>
322 <pre class="programlisting"><span class="returnvalue">void</span>                gtk_button_enter                    (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);</pre>
323 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
324 <h3 class="title">Warning</h3>
325 <p><code class="literal">gtk_button_enter</code> has been deprecated since version 2.20 and should not be used in newly-written code. Use the <a class="link" href="GtkWidget.html#GtkWidget-enter-notify-event" title='The "enter-notify-event" signal'><span class="type">"enter-notify-event"</span></a> signal.</p>
326 </div>
327 <p>
328 Emits a <a class="link" href="GtkButton.html#GtkButton-enter" title='The "enter" signal'><span class="type">"enter"</span></a> signal to the given <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>.
329 </p>
330 <div class="variablelist"><table border="0">
331 <col align="left" valign="top">
332 <tbody><tr>
333 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
334 <td>The <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> you want to send the signal to.</td>
335 </tr></tbody>
336 </table></div>
337 </div>
338 <hr>
339 <div class="refsect2">
340 <a name="gtk-button-leave"></a><h3>gtk_button_leave ()</h3>
341 <pre class="programlisting"><span class="returnvalue">void</span>                gtk_button_leave                    (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);</pre>
342 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
343 <h3 class="title">Warning</h3>
344 <p><code class="literal">gtk_button_leave</code> has been deprecated since version 2.20 and should not be used in newly-written code. Use the <a class="link" href="GtkWidget.html#GtkWidget-leave-notify-event" title='The "leave-notify-event" signal'><span class="type">"leave-notify-event"</span></a> signal.</p>
345 </div>
346 <p>
347 Emits a <a class="link" href="GtkButton.html#GtkButton-leave" title='The "leave" signal'><span class="type">"leave"</span></a> signal to the given <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>.
348 </p>
349 <div class="variablelist"><table border="0">
350 <col align="left" valign="top">
351 <tbody><tr>
352 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
353 <td>The <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> you want to send the signal to.</td>
354 </tr></tbody>
355 </table></div>
356 </div>
357 <hr>
358 <div class="refsect2">
359 <a name="gtk-button-set-relief"></a><h3>gtk_button_set_relief ()</h3>
360 <pre class="programlisting"><span class="returnvalue">void</span>                gtk_button_set_relief               (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
361                                                          <em class="parameter"><code><a class="link" href="gtk3-Standard-Enumerations.html#GtkReliefStyle" title="enum GtkReliefStyle"><span class="type">GtkReliefStyle</span></a> newstyle</code></em>);</pre>
362 <p>
363 Sets the relief style of the edges of the given <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> widget.
364 Three styles exist, GTK_RELIEF_NORMAL, GTK_RELIEF_HALF, GTK_RELIEF_NONE.
365 The default style is, as one can guess, GTK_RELIEF_NORMAL.
366 </p>
367 <p>
368
369 </p>
370 <div class="variablelist"><table border="0">
371 <col align="left" valign="top">
372 <tbody>
373 <tr>
374 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
375 <td>The <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> you want to set relief styles of.</td>
376 </tr>
377 <tr>
378 <td><p><span class="term"><em class="parameter"><code>newstyle</code></em> :</span></p></td>
379 <td>The GtkReliefStyle as described above.</td>
380 </tr>
381 </tbody>
382 </table></div>
383 </div>
384 <hr>
385 <div class="refsect2">
386 <a name="gtk-button-get-relief"></a><h3>gtk_button_get_relief ()</h3>
387 <pre class="programlisting"><a class="link" href="gtk3-Standard-Enumerations.html#GtkReliefStyle" title="enum GtkReliefStyle"><span class="returnvalue">GtkReliefStyle</span></a>      gtk_button_get_relief               (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);</pre>
388 <p>
389 Returns the current relief style of the given <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>.
390 </p>
391 <div class="variablelist"><table border="0">
392 <col align="left" valign="top">
393 <tbody>
394 <tr>
395 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
396 <td>The <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> you want the <a class="link" href="gtk3-Standard-Enumerations.html#GtkReliefStyle" title="enum GtkReliefStyle"><span class="type">GtkReliefStyle</span></a> from.</td>
397 </tr>
398 <tr>
399 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
400 <td>The current <a class="link" href="gtk3-Standard-Enumerations.html#GtkReliefStyle" title="enum GtkReliefStyle"><span class="type">GtkReliefStyle</span></a>
401 </td>
402 </tr>
403 </tbody>
404 </table></div>
405 </div>
406 <hr>
407 <div class="refsect2">
408 <a name="gtk-button-get-label"></a><h3>gtk_button_get_label ()</h3>
409 <pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       gtk_button_get_label                (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);</pre>
410 <p>
411 Fetches the text from the label of the button, as set by
412 <a class="link" href="GtkButton.html#gtk-button-set-label" title="gtk_button_set_label ()"><code class="function">gtk_button_set_label()</code></a>. If the label text has not 
413 been set the return value will be <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. This will be the 
414 case if you create an empty button with <a class="link" href="GtkButton.html#gtk-button-new" title="gtk_button_new ()"><code class="function">gtk_button_new()</code></a> to 
415 use as a container.
416 </p>
417 <div class="variablelist"><table border="0">
418 <col align="left" valign="top">
419 <tbody>
420 <tr>
421 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
422 <td>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
423 </td>
424 </tr>
425 <tr>
426 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
427 <td>The text of the label widget. This string is owned
428 by the widget and must not be modified or freed.</td>
429 </tr>
430 </tbody>
431 </table></div>
432 </div>
433 <hr>
434 <div class="refsect2">
435 <a name="gtk-button-set-label"></a><h3>gtk_button_set_label ()</h3>
436 <pre class="programlisting"><span class="returnvalue">void</span>                gtk_button_set_label                (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
437                                                          <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);</pre>
438 <p>
439 Sets the text of the label of the button to <em class="parameter"><code>str</code></em>. This text is
440 also used to select the stock item if <a class="link" href="GtkButton.html#gtk-button-set-use-stock" title="gtk_button_set_use_stock ()"><code class="function">gtk_button_set_use_stock()</code></a>
441 is used.
442 </p>
443 <p>
444 This will also clear any previously set labels.
445 </p>
446 <div class="variablelist"><table border="0">
447 <col align="left" valign="top">
448 <tbody>
449 <tr>
450 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
451 <td>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
452 </td>
453 </tr>
454 <tr>
455 <td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td>
456 <td>a string</td>
457 </tr>
458 </tbody>
459 </table></div>
460 </div>
461 <hr>
462 <div class="refsect2">
463 <a name="gtk-button-get-use-stock"></a><h3>gtk_button_get_use_stock ()</h3>
464 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_button_get_use_stock            (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);</pre>
465 <p>
466 Returns whether the button label is a stock item.
467 </p>
468 <div class="variablelist"><table border="0">
469 <col align="left" valign="top">
470 <tbody>
471 <tr>
472 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
473 <td>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
474 </td>
475 </tr>
476 <tr>
477 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
478 <td>
479 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the button label is used to
480 select a stock item instead of being
481 used directly as the label text.</td>
482 </tr>
483 </tbody>
484 </table></div>
485 </div>
486 <hr>
487 <div class="refsect2">
488 <a name="gtk-button-set-use-stock"></a><h3>gtk_button_set_use_stock ()</h3>
489 <pre class="programlisting"><span class="returnvalue">void</span>                gtk_button_set_use_stock            (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
490                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> use_stock</code></em>);</pre>
491 <p>
492 If <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, the label set on the button is used as a
493 stock id to select the stock item for the button.
494 </p>
495 <div class="variablelist"><table border="0">
496 <col align="left" valign="top">
497 <tbody>
498 <tr>
499 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
500 <td>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
501 </td>
502 </tr>
503 <tr>
504 <td><p><span class="term"><em class="parameter"><code>use_stock</code></em> :</span></p></td>
505 <td>
506 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the button should use a stock item</td>
507 </tr>
508 </tbody>
509 </table></div>
510 </div>
511 <hr>
512 <div class="refsect2">
513 <a name="gtk-button-get-use-underline"></a><h3>gtk_button_get_use_underline ()</h3>
514 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_button_get_use_underline        (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);</pre>
515 <p>
516 Returns whether an embedded underline in the button label indicates a
517 mnemonic. See <a class="link" href="GtkButton.html#gtk-button-set-use-underline" title="gtk_button_set_use_underline ()"><code class="function">gtk_button_set_use_underline()</code></a>.
518 </p>
519 <div class="variablelist"><table border="0">
520 <col align="left" valign="top">
521 <tbody>
522 <tr>
523 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
524 <td>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
525 </td>
526 </tr>
527 <tr>
528 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
529 <td>
530 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if an embedded underline in the button label
531 indicates the mnemonic accelerator keys.</td>
532 </tr>
533 </tbody>
534 </table></div>
535 </div>
536 <hr>
537 <div class="refsect2">
538 <a name="gtk-button-set-use-underline"></a><h3>gtk_button_set_use_underline ()</h3>
539 <pre class="programlisting"><span class="returnvalue">void</span>                gtk_button_set_use_underline        (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
540                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> use_underline</code></em>);</pre>
541 <p>
542 If true, an underline in the text of the button label indicates
543 the next character should be used for the mnemonic accelerator key.
544 </p>
545 <div class="variablelist"><table border="0">
546 <col align="left" valign="top">
547 <tbody>
548 <tr>
549 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
550 <td>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
551 </td>
552 </tr>
553 <tr>
554 <td><p><span class="term"><em class="parameter"><code>use_underline</code></em> :</span></p></td>
555 <td>
556 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if underlines in the text indicate mnemonics</td>
557 </tr>
558 </tbody>
559 </table></div>
560 </div>
561 <hr>
562 <div class="refsect2">
563 <a name="gtk-button-set-focus-on-click"></a><h3>gtk_button_set_focus_on_click ()</h3>
564 <pre class="programlisting"><span class="returnvalue">void</span>                gtk_button_set_focus_on_click       (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
565                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> focus_on_click</code></em>);</pre>
566 <p>
567 Sets whether the button will grab focus when it is clicked with the mouse.
568 Making mouse clicks not grab focus is useful in places like toolbars where
569 you don't want the keyboard focus removed from the main area of the
570 application.
571 </p>
572 <div class="variablelist"><table border="0">
573 <col align="left" valign="top">
574 <tbody>
575 <tr>
576 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
577 <td>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
578 </td>
579 </tr>
580 <tr>
581 <td><p><span class="term"><em class="parameter"><code>focus_on_click</code></em> :</span></p></td>
582 <td>whether the button grabs focus when clicked with the mouse</td>
583 </tr>
584 </tbody>
585 </table></div>
586 <p class="since">Since 2.4</p>
587 </div>
588 <hr>
589 <div class="refsect2">
590 <a name="gtk-button-get-focus-on-click"></a><h3>gtk_button_get_focus_on_click ()</h3>
591 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_button_get_focus_on_click       (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);</pre>
592 <p>
593 Returns whether the button grabs focus when it is clicked with the mouse.
594 See <a class="link" href="GtkButton.html#gtk-button-set-focus-on-click" title="gtk_button_set_focus_on_click ()"><code class="function">gtk_button_set_focus_on_click()</code></a>.
595 </p>
596 <div class="variablelist"><table border="0">
597 <col align="left" valign="top">
598 <tbody>
599 <tr>
600 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
601 <td>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
602 </td>
603 </tr>
604 <tr>
605 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
606 <td>
607 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the button grabs focus when it is clicked with
608 the mouse.</td>
609 </tr>
610 </tbody>
611 </table></div>
612 <p class="since">Since 2.4</p>
613 </div>
614 <hr>
615 <div class="refsect2">
616 <a name="gtk-button-set-alignment"></a><h3>gtk_button_set_alignment ()</h3>
617 <pre class="programlisting"><span class="returnvalue">void</span>                gtk_button_set_alignment            (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
618                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a> xalign</code></em>,
619                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a> yalign</code></em>);</pre>
620 <p>
621 Sets the alignment of the child. This property has no effect unless 
622 the child is a <a class="link" href="GtkMisc.html" title="GtkMisc"><span class="type">GtkMisc</span></a> or a <a class="link" href="GtkAlignment.html" title="GtkAlignment"><span class="type">GtkAlignment</span></a>.
623 </p>
624 <div class="variablelist"><table border="0">
625 <col align="left" valign="top">
626 <tbody>
627 <tr>
628 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
629 <td>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
630 </td>
631 </tr>
632 <tr>
633 <td><p><span class="term"><em class="parameter"><code>xalign</code></em> :</span></p></td>
634 <td>the horizontal position of the child, 0.0 is left aligned,
635 1.0 is right aligned</td>
636 </tr>
637 <tr>
638 <td><p><span class="term"><em class="parameter"><code>yalign</code></em> :</span></p></td>
639 <td>the vertical position of the child, 0.0 is top aligned,
640 1.0 is bottom aligned</td>
641 </tr>
642 </tbody>
643 </table></div>
644 <p class="since">Since 2.4</p>
645 </div>
646 <hr>
647 <div class="refsect2">
648 <a name="gtk-button-get-alignment"></a><h3>gtk_button_get_alignment ()</h3>
649 <pre class="programlisting"><span class="returnvalue">void</span>                gtk_button_get_alignment            (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
650                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a> *xalign</code></em>,
651                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a> *yalign</code></em>);</pre>
652 <p>
653 Gets the alignment of the child in the button.
654 </p>
655 <div class="variablelist"><table border="0">
656 <col align="left" valign="top">
657 <tbody>
658 <tr>
659 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
660 <td>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
661 </td>
662 </tr>
663 <tr>
664 <td><p><span class="term"><em class="parameter"><code>xalign</code></em> :</span></p></td>
665 <td>return location for horizontal alignment. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
666 </td>
667 </tr>
668 <tr>
669 <td><p><span class="term"><em class="parameter"><code>yalign</code></em> :</span></p></td>
670 <td>return location for vertical alignment. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
671 </td>
672 </tr>
673 </tbody>
674 </table></div>
675 <p class="since">Since 2.4</p>
676 </div>
677 <hr>
678 <div class="refsect2">
679 <a name="gtk-button-set-image"></a><h3>gtk_button_set_image ()</h3>
680 <pre class="programlisting"><span class="returnvalue">void</span>                gtk_button_set_image                (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
681                                                          <em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *image</code></em>);</pre>
682 <p>
683 Set the image of <em class="parameter"><code>button</code></em> to the given widget. Note that
684 it depends on the <a class="link" href="GtkSettings.html#GtkSettings--gtk-button-images" title='The "gtk-button-images" property'><span class="type">"gtk-button-images"</span></a> setting whether the
685 image will be displayed or not, you don't have to call
686 <a class="link" href="GtkWidget.html#gtk-widget-show" title="gtk_widget_show ()"><code class="function">gtk_widget_show()</code></a> on <em class="parameter"><code>image</code></em> yourself.
687 </p>
688 <div class="variablelist"><table border="0">
689 <col align="left" valign="top">
690 <tbody>
691 <tr>
692 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
693 <td>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
694 </td>
695 </tr>
696 <tr>
697 <td><p><span class="term"><em class="parameter"><code>image</code></em> :</span></p></td>
698 <td>a widget to set as the image for the button</td>
699 </tr>
700 </tbody>
701 </table></div>
702 <p class="since">Since 2.6</p>
703 </div>
704 <hr>
705 <div class="refsect2">
706 <a name="gtk-button-get-image"></a><h3>gtk_button_get_image ()</h3>
707 <pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_button_get_image                (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);</pre>
708 <p>
709 Gets the widget that is currenty set as the image of <em class="parameter"><code>button</code></em>.
710 This may have been explicitly set by <a class="link" href="GtkButton.html#gtk-button-set-image" title="gtk_button_set_image ()"><code class="function">gtk_button_set_image()</code></a>
711 or constructed by <a class="link" href="GtkButton.html#gtk-button-new-from-stock" title="gtk_button_new_from_stock ()"><code class="function">gtk_button_new_from_stock()</code></a>.
712 </p>
713 <div class="variablelist"><table border="0">
714 <col align="left" valign="top">
715 <tbody>
716 <tr>
717 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
718 <td>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
719 </td>
720 </tr>
721 <tr>
722 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
723 <td>a <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> in case there is no image. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
724 </td>
725 </tr>
726 </tbody>
727 </table></div>
728 <p class="since">Since 2.6</p>
729 </div>
730 <hr>
731 <div class="refsect2">
732 <a name="gtk-button-set-image-position"></a><h3>gtk_button_set_image_position ()</h3>
733 <pre class="programlisting"><span class="returnvalue">void</span>                gtk_button_set_image_position       (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>,
734                                                          <em class="parameter"><code><a class="link" href="gtk3-Standard-Enumerations.html#GtkPositionType" title="enum GtkPositionType"><span class="type">GtkPositionType</span></a> position</code></em>);</pre>
735 <p>
736 Sets the position of the image relative to the text 
737 inside the button.
738 </p>
739 <div class="variablelist"><table border="0">
740 <col align="left" valign="top">
741 <tbody>
742 <tr>
743 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
744 <td>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
745 </td>
746 </tr>
747 <tr>
748 <td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td>
749 <td>the position</td>
750 </tr>
751 </tbody>
752 </table></div>
753 <p class="since">Since 2.10</p>
754 </div>
755 <hr>
756 <div class="refsect2">
757 <a name="gtk-button-get-image-position"></a><h3>gtk_button_get_image_position ()</h3>
758 <pre class="programlisting"><a class="link" href="gtk3-Standard-Enumerations.html#GtkPositionType" title="enum GtkPositionType"><span class="returnvalue">GtkPositionType</span></a>     gtk_button_get_image_position       (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);</pre>
759 <p>
760 Gets the position of the image relative to the text 
761 inside the button.
762 </p>
763 <div class="variablelist"><table border="0">
764 <col align="left" valign="top">
765 <tbody>
766 <tr>
767 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
768 <td>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
769 </td>
770 </tr>
771 <tr>
772 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
773 <td>the position</td>
774 </tr>
775 </tbody>
776 </table></div>
777 <p class="since">Since 2.10</p>
778 </div>
779 <hr>
780 <div class="refsect2">
781 <a name="gtk-button-get-event-window"></a><h3>gtk_button_get_event_window ()</h3>
782 <pre class="programlisting"><a href="http://developer.gnome.org/devel/gdk/gdk3-Windows.html#GdkWindow"><span class="returnvalue">GdkWindow</span></a> *         gtk_button_get_event_window         (<em class="parameter"><code><a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button</code></em>);</pre>
783 <p>
784 Returns the button's event window if it is realized, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> otherwise.
785 This function should be rarely needed.
786 </p>
787 <div class="variablelist"><table border="0">
788 <col align="left" valign="top">
789 <tbody>
790 <tr>
791 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
792 <td>a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>
793 </td>
794 </tr>
795 <tr>
796 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
797 <td>
798 <em class="parameter"><code>button</code></em>'s event window. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
799 </td>
800 </tr>
801 </tbody>
802 </table></div>
803 <p class="since">Since 2.22</p>
804 </div>
805 </div>
806 <div class="refsect1">
807 <a name="GtkButton.property-details"></a><h2>Property Details</h2>
808 <div class="refsect2">
809 <a name="GtkButton--focus-on-click"></a><h3>The <code class="literal">"focus-on-click"</code> property</h3>
810 <pre class="programlisting">  "focus-on-click"           <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write</pre>
811 <p>Whether the button grabs focus when it is clicked with the mouse.</p>
812 <p>Default value: TRUE</p>
813 </div>
814 <hr>
815 <div class="refsect2">
816 <a name="GtkButton--image"></a><h3>The <code class="literal">"image"</code> property</h3>
817 <pre class="programlisting">  "image"                    <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>*            : Read / Write</pre>
818 <p>
819 The child widget to appear next to the button text.
820 </p>
821 <p class="since">Since 2.6</p>
822 </div>
823 <hr>
824 <div class="refsect2">
825 <a name="GtkButton--image-position"></a><h3>The <code class="literal">"image-position"</code> property</h3>
826 <pre class="programlisting">  "image-position"           <a class="link" href="gtk3-Standard-Enumerations.html#GtkPositionType" title="enum GtkPositionType"><span class="type">GtkPositionType</span></a>       : Read / Write</pre>
827 <p>
828 The position of the image relative to the text inside the button.
829 </p>
830 <p>Default value: GTK_POS_LEFT</p>
831 <p class="since">Since 2.10</p>
832 </div>
833 <hr>
834 <div class="refsect2">
835 <a name="GtkButton--label"></a><h3>The <code class="literal">"label"</code> property</h3>
836 <pre class="programlisting">  "label"                    <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct</pre>
837 <p>Text of the label widget inside the button, if the button contains a label widget.</p>
838 <p>Default value: NULL</p>
839 </div>
840 <hr>
841 <div class="refsect2">
842 <a name="GtkButton--relief"></a><h3>The <code class="literal">"relief"</code> property</h3>
843 <pre class="programlisting">  "relief"                   <a class="link" href="gtk3-Standard-Enumerations.html#GtkReliefStyle" title="enum GtkReliefStyle"><span class="type">GtkReliefStyle</span></a>        : Read / Write</pre>
844 <p>The border relief style.</p>
845 <p>Default value: GTK_RELIEF_NORMAL</p>
846 </div>
847 <hr>
848 <div class="refsect2">
849 <a name="GtkButton--use-stock"></a><h3>The <code class="literal">"use-stock"</code> property</h3>
850 <pre class="programlisting">  "use-stock"                <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct</pre>
851 <p>If set, the label is used to pick a stock item instead of being displayed.</p>
852 <p>Default value: FALSE</p>
853 </div>
854 <hr>
855 <div class="refsect2">
856 <a name="GtkButton--use-underline"></a><h3>The <code class="literal">"use-underline"</code> property</h3>
857 <pre class="programlisting">  "use-underline"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read / Write / Construct</pre>
858 <p>If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key.</p>
859 <p>Default value: FALSE</p>
860 </div>
861 <hr>
862 <div class="refsect2">
863 <a name="GtkButton--xalign"></a><h3>The <code class="literal">"xalign"</code> property</h3>
864 <pre class="programlisting">  "xalign"                   <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a>                : Read / Write</pre>
865 <p>
866 If the child of the button is a <a class="link" href="GtkMisc.html" title="GtkMisc"><span class="type">GtkMisc</span></a> or <a class="link" href="GtkAlignment.html" title="GtkAlignment"><span class="type">GtkAlignment</span></a>, this property
867 can be used to control its horizontal alignment. 0.0 is left aligned, 
868 1.0 is right aligned.
869 </p>
870 <p>Allowed values: [0,1]</p>
871 <p>Default value: 0.5</p>
872 <p class="since">Since 2.4</p>
873 </div>
874 <hr>
875 <div class="refsect2">
876 <a name="GtkButton--yalign"></a><h3>The <code class="literal">"yalign"</code> property</h3>
877 <pre class="programlisting">  "yalign"                   <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gfloat"><span class="type">gfloat</span></a>                : Read / Write</pre>
878 <p>
879 If the child of the button is a <a class="link" href="GtkMisc.html" title="GtkMisc"><span class="type">GtkMisc</span></a> or <a class="link" href="GtkAlignment.html" title="GtkAlignment"><span class="type">GtkAlignment</span></a>, this property 
880 can be used to control its vertical alignment. 0.0 is top aligned, 
881 1.0 is bottom aligned.
882 </p>
883 <p>Allowed values: [0,1]</p>
884 <p>Default value: 0.5</p>
885 <p class="since">Since 2.4</p>
886 </div>
887 </div>
888 <div class="refsect1">
889 <a name="GtkButton.style-property-details"></a><h2>Style Property Details</h2>
890 <div class="refsect2">
891 <a name="GtkButton--s-child-displacement-x"></a><h3>The <code class="literal">"child-displacement-x"</code> style property</h3>
892 <pre class="programlisting">  "child-displacement-x"     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read</pre>
893 <p>How far in the x direction to move the child when the button is depressed.</p>
894 <p>Default value: 0</p>
895 </div>
896 <hr>
897 <div class="refsect2">
898 <a name="GtkButton--s-child-displacement-y"></a><h3>The <code class="literal">"child-displacement-y"</code> style property</h3>
899 <pre class="programlisting">  "child-displacement-y"     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read</pre>
900 <p>How far in the y direction to move the child when the button is depressed.</p>
901 <p>Default value: 0</p>
902 </div>
903 <hr>
904 <div class="refsect2">
905 <a name="GtkButton--s-default-border"></a><h3>The <code class="literal">"default-border"</code> style property</h3>
906 <pre class="programlisting">  "default-border"           <a class="link" href="GtkStyleContext.html#GtkBorder"><span class="type">GtkBorder</span></a>*            : Read</pre>
907 <p>
908 The "default-border" style property defines the extra space to add
909 around a button that can become the default widget of its window.
910 For more information about default widgets, see <a class="link" href="GtkWidget.html#gtk-widget-grab-default" title="gtk_widget_grab_default ()"><code class="function">gtk_widget_grab_default()</code></a>.
911 </p>
912 </div>
913 <hr>
914 <div class="refsect2">
915 <a name="GtkButton--s-default-outside-border"></a><h3>The <code class="literal">"default-outside-border"</code> style property</h3>
916 <pre class="programlisting">  "default-outside-border"   <a class="link" href="GtkStyleContext.html#GtkBorder"><span class="type">GtkBorder</span></a>*            : Read</pre>
917 <p>
918 The "default-outside-border" style property defines the extra outside
919 space to add around a button that can become the default widget of its
920 window. Extra outside space is always drawn outside the button border.
921 For more information about default widgets, see <a class="link" href="GtkWidget.html#gtk-widget-grab-default" title="gtk_widget_grab_default ()"><code class="function">gtk_widget_grab_default()</code></a>.
922 </p>
923 </div>
924 <hr>
925 <div class="refsect2">
926 <a name="GtkButton--s-displace-focus"></a><h3>The <code class="literal">"displace-focus"</code> style property</h3>
927 <pre class="programlisting">  "displace-focus"           <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>              : Read</pre>
928 <p>
929 Whether the child_displacement_x/child_displacement_y properties
930 should also affect the focus rectangle.
931 </p>
932 <p>Default value: FALSE</p>
933 <p class="since">Since 2.6</p>
934 </div>
935 <hr>
936 <div class="refsect2">
937 <a name="GtkButton--s-image-spacing"></a><h3>The <code class="literal">"image-spacing"</code> style property</h3>
938 <pre class="programlisting">  "image-spacing"            <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read</pre>
939 <p>Spacing in pixels between the image and label.</p>
940 <p>Allowed values: &gt;= 0</p>
941 <p>Default value: 2</p>
942 </div>
943 <hr>
944 <div class="refsect2">
945 <a name="GtkButton--s-inner-border"></a><h3>The <code class="literal">"inner-border"</code> style property</h3>
946 <pre class="programlisting">  "inner-border"             <a class="link" href="GtkStyleContext.html#GtkBorder"><span class="type">GtkBorder</span></a>*            : Read</pre>
947 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
948 <h3 class="title">Warning</h3>
949 <p><code class="literal">GtkButton:inner-border</code> has been deprecated since version 3.4 and should not be used in newly-written code. Use the standard border and padding CSS properties;
950   the value of this style property is ignored.</p>
951 </div>
952 <p>
953 Sets the border between the button edges and child.
954 </p>
955 <p class="since">Since 2.10</p>
956 </div>
957 </div>
958 <div class="refsect1">
959 <a name="GtkButton.signal-details"></a><h2>Signal Details</h2>
960 <div class="refsect2">
961 <a name="GtkButton-activate"></a><h3>The <code class="literal">"activate"</code> signal</h3>
962 <pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *widget,
963                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>   user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS"><code class="literal">Action</code></a></pre>
964 <p>
965 The ::activate signal on GtkButton is an action signal and
966 emitting it causes the button to animate press then release.
967 Applications should never connect to this signal, but use the
968 <a class="link" href="GtkButton.html#GtkButton-clicked" title='The "clicked" signal'><span class="type">"clicked"</span></a> signal.
969 </p>
970 <div class="variablelist"><table border="0">
971 <col align="left" valign="top">
972 <tbody>
973 <tr>
974 <td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
975 <td>the object which received the signal.</td>
976 </tr>
977 <tr>
978 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
979 <td>user data set when the signal handler was connected.</td>
980 </tr>
981 </tbody>
982 </table></div>
983 </div>
984 <hr>
985 <div class="refsect2">
986 <a name="GtkButton-clicked"></a><h3>The <code class="literal">"clicked"</code> signal</h3>
987 <pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button,
988                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>   user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS"><code class="literal">Action</code></a></pre>
989 <p>
990 Emitted when the button has been activated (pressed and released).
991 </p>
992 <div class="variablelist"><table border="0">
993 <col align="left" valign="top">
994 <tbody>
995 <tr>
996 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
997 <td>the object that received the signal</td>
998 </tr>
999 <tr>
1000 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
1001 <td>user data set when the signal handler was connected.</td>
1002 </tr>
1003 </tbody>
1004 </table></div>
1005 </div>
1006 <hr>
1007 <div class="refsect2">
1008 <a name="GtkButton-enter"></a><h3>The <code class="literal">"enter"</code> signal</h3>
1009 <pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button,
1010                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>   user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a></pre>
1011 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
1012 <h3 class="title">Warning</h3>
1013 <p><code class="literal">GtkButton::enter</code> has been deprecated since version 2.8 and should not be used in newly-written code. Use the <a class="link" href="GtkWidget.html#GtkWidget-enter-notify-event" title='The "enter-notify-event" signal'><span class="type">"enter-notify-event"</span></a> signal.</p>
1014 </div>
1015 <p>
1016 Emitted when the pointer enters the button.
1017 </p>
1018 <div class="variablelist"><table border="0">
1019 <col align="left" valign="top">
1020 <tbody>
1021 <tr>
1022 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
1023 <td>the object that received the signal</td>
1024 </tr>
1025 <tr>
1026 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
1027 <td>user data set when the signal handler was connected.</td>
1028 </tr>
1029 </tbody>
1030 </table></div>
1031 </div>
1032 <hr>
1033 <div class="refsect2">
1034 <a name="GtkButton-leave"></a><h3>The <code class="literal">"leave"</code> signal</h3>
1035 <pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button,
1036                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>   user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a></pre>
1037 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
1038 <h3 class="title">Warning</h3>
1039 <p><code class="literal">GtkButton::leave</code> has been deprecated since version 2.8 and should not be used in newly-written code. Use the <a class="link" href="GtkWidget.html#GtkWidget-leave-notify-event" title='The "leave-notify-event" signal'><span class="type">"leave-notify-event"</span></a> signal.</p>
1040 </div>
1041 <p>
1042 Emitted when the pointer leaves the button.
1043 </p>
1044 <div class="variablelist"><table border="0">
1045 <col align="left" valign="top">
1046 <tbody>
1047 <tr>
1048 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
1049 <td>the object that received the signal</td>
1050 </tr>
1051 <tr>
1052 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
1053 <td>user data set when the signal handler was connected.</td>
1054 </tr>
1055 </tbody>
1056 </table></div>
1057 </div>
1058 <hr>
1059 <div class="refsect2">
1060 <a name="GtkButton-pressed"></a><h3>The <code class="literal">"pressed"</code> signal</h3>
1061 <pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button,
1062                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>   user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a></pre>
1063 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
1064 <h3 class="title">Warning</h3>
1065 <p><code class="literal">GtkButton::pressed</code> has been deprecated since version 2.8 and should not be used in newly-written code. Use the <a class="link" href="GtkWidget.html#GtkWidget-button-press-event" title='The "button-press-event" signal'><span class="type">"button-press-event"</span></a> signal.</p>
1066 </div>
1067 <p>
1068 Emitted when the button is pressed.
1069 </p>
1070 <div class="variablelist"><table border="0">
1071 <col align="left" valign="top">
1072 <tbody>
1073 <tr>
1074 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
1075 <td>the object that received the signal</td>
1076 </tr>
1077 <tr>
1078 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
1079 <td>user data set when the signal handler was connected.</td>
1080 </tr>
1081 </tbody>
1082 </table></div>
1083 </div>
1084 <hr>
1085 <div class="refsect2">
1086 <a name="GtkButton-released"></a><h3>The <code class="literal">"released"</code> signal</h3>
1087 <pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> *button,
1088                                                         <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>   user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a></pre>
1089 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
1090 <h3 class="title">Warning</h3>
1091 <p><code class="literal">GtkButton::released</code> has been deprecated since version 2.8 and should not be used in newly-written code. Use the <a class="link" href="GtkWidget.html#GtkWidget-button-release-event" title='The "button-release-event" signal'><span class="type">"button-release-event"</span></a> signal.</p>
1092 </div>
1093 <p>
1094 Emitted when the button is released.
1095 </p>
1096 <div class="variablelist"><table border="0">
1097 <col align="left" valign="top">
1098 <tbody>
1099 <tr>
1100 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
1101 <td>the object that received the signal</td>
1102 </tr>
1103 <tr>
1104 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
1105 <td>user data set when the signal handler was connected.</td>
1106 </tr>
1107 </tbody>
1108 </table></div>
1109 </div>
1110 </div>
1111 </div>
1112 <div class="footer">
1113 <hr>
1114           Generated by GTK-Doc V1.18</div>
1115 </body>
1116 </html>