1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5
<title>GtkToolButton</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
7
<link rel="start" href="index.html" title="GTK+ Reference Manual">
8
<link rel="up" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar">
9
<link rel="prev" href="GtkSeparatorToolItem.html" title="GtkSeparatorToolItem">
10
<link rel="next" href="GtkMenuToolButton.html" title="GtkMenuToolButton">
11
<meta name="generator" content="GTK-Doc V1.7 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
13
<link rel="part" href="gtk.html" title="Part I. GTK+ Overview">
14
<link rel="part" href="gtkbase.html" title="Part II. GTK+ Core Reference">
15
<link rel="part" href="gtkobjects.html" title="Part III. GTK+ Widgets and Objects">
16
<link rel="chapter" href="ch01.html" title="Object Hierarchy">
17
<link rel="chapter" href="ch02.html" title="Widget Gallery">
18
<link rel="chapter" href="WindowWidgets.html" title="Windows">
19
<link rel="chapter" href="DisplayWidgets.html" title="Display Widgets">
20
<link rel="chapter" href="ButtonWidgets.html" title="Buttons and Toggles">
21
<link rel="chapter" href="NumericEntry.html" title="Numeric/Text Data Entry">
22
<link rel="chapter" href="TextWidgetObjects.html" title="Multiline Text Editor">
23
<link rel="chapter" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets">
24
<link rel="chapter" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar">
25
<link rel="chapter" href="Actions.html" title="Action-based menus and toolbars">
26
<link rel="chapter" href="SelectorWidgets.html" title="Selectors (File/Font/Color/Input Devices)">
27
<link rel="chapter" href="LayoutContainers.html" title="Layout Containers">
28
<link rel="chapter" href="Ornaments.html" title="Ornaments">
29
<link rel="chapter" href="ScrollingWidgets.html" title="Scrolling">
30
<link rel="chapter" href="Printing.html" title="Printing">
31
<link rel="chapter" href="MiscObjects.html" title="Miscellaneous">
32
<link rel="chapter" href="AbstractObjects.html" title="Abstract Base Classes">
33
<link rel="chapter" href="PlugSocket.html" title="Cross-process Embedding">
34
<link rel="chapter" href="SpecialObjects.html" title="Special-purpose features">
35
<link rel="chapter" href="RecentDocuments.html" title="Recently Used Documents">
36
<link rel="chapter" href="DeprecatedObjects.html" title="Deprecated">
37
<link rel="part" href="migrating.html" title="Part IV. Migrating from Previous Versions of GTK+">
38
<link rel="chapter" href="gtk-migrating-checklist.html" title="Migration Checklist">
39
<link rel="chapter" href="gtk-migrating-GtkFileChooser.html" title="Migrating from GtkFileSelection to GtkFileChooser">
40
<link rel="chapter" href="gtk-migrating-GtkAction.html" title="Migrating from old menu and toolbar systems to GtkAction">
41
<link rel="chapter" href="gtk-migrating-GtkComboBox.html" title="Migrating from GtkOptionMenu and GtkCombo to GtkComboBox and GtkComboBoxEntry">
42
<link rel="chapter" href="gtk-migrating-GtkIconView.html" title="Migrating from GnomeIconList to GtkIconView">
43
<link rel="chapter" href="gtk-migrating-GtkAboutDialog.html" title="Migrating from GnomeAbout to GtkAboutDialog">
44
<link rel="chapter" href="gtk-migrating-GtkColorButton.html" title="Migrating from GnomeColorPicker to GtkColorButton">
45
<link rel="chapter" href="gtk-migrating-GtkAssistant.html" title="Migrating from GnomeDruid to GtkAssistant">
46
<link rel="chapter" href="gtk-migrating-GtkRecentChooser.html" title="Migrating from EggRecent to GtkRecentChooser">
47
<link rel="chapter" href="gtk-migrating-GtkLinkButton.html" title="Migrating from GnomeHRef to GtkLinkButton">
48
<link rel="part" href="pt05.html" title="Part V. GTK+ Tools">
49
<link rel="glossary" href="glossary.html" title="Glossary">
50
<link rel="index" href="ix01.html" title="Index">
51
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
52
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
53
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
54
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
55
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
56
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
58
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
59
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
61
<td><a accesskey="p" href="GtkSeparatorToolItem.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
62
<td><a accesskey="u" href="MenusAndCombos.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
63
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
64
<th width="100%" align="center">GTK+ Reference Manual</th>
65
<td><a accesskey="n" href="GtkMenuToolButton.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
67
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3401414" class="shortcut">Top</a>
69
<a href="#id3402113" class="shortcut">Description</a>
71
<a href="#id3401821" class="shortcut">Object Hierarchy</a>
73
<a href="#id3401906" class="shortcut">Implemented Interfaces</a>
75
<a href="#id3401929" class="shortcut">Properties</a>
77
<a href="#id3402050" class="shortcut">Style Properties</a>
79
<a href="#id3402084" class="shortcut">Signals</a></nobr></td></tr>
81
<div class="refentry" lang="en">
82
<a name="GtkToolButton"></a><div class="titlepage"></div>
83
<div class="refnamediv"><table width="100%"><tr>
86
<a name="id3401414"></a><span class="refentrytitle">GtkToolButton</span>
88
<p>GtkToolButton — A GtkToolItem subclass that displays buttons</p>
90
<td valign="top" align="right"></td>
92
<div class="refsynopsisdiv">
94
<pre class="synopsis">
96
#include <gtk/gtk.h>
99
<a href="GtkToolButton.html#GtkToolButton-struct">GtkToolButton</a>;
100
<a href="GtkToolItem.html" title="GtkToolItem">GtkToolItem</a>* <a href="GtkToolButton.html#gtk-tool-button-new">gtk_tool_button_new</a> (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *icon_widget,
102
<a href="GtkToolItem.html" title="GtkToolItem">GtkToolItem</a>* <a href="GtkToolButton.html#gtk-tool-button-new-from-stock">gtk_tool_button_new_from_stock</a> (const gchar *stock_id);
103
void <a href="GtkToolButton.html#gtk-tool-button-set-label">gtk_tool_button_set_label</a> (<a href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *button,
105
const gchar* <a href="GtkToolButton.html#gtk-tool-button-get-label">gtk_tool_button_get_label</a> (<a href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *button);
106
void <a href="GtkToolButton.html#gtk-tool-button-set-use-underline">gtk_tool_button_set_use_underline</a> (<a href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *button,
107
gboolean use_underline);
108
gboolean <a href="GtkToolButton.html#gtk-tool-button-get-use-underline">gtk_tool_button_get_use_underline</a> (<a href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *button);
109
void <a href="GtkToolButton.html#gtk-tool-button-set-stock-id">gtk_tool_button_set_stock_id</a> (<a href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *button,
110
const gchar *stock_id);
111
const gchar* <a href="GtkToolButton.html#gtk-tool-button-get-stock-id">gtk_tool_button_get_stock_id</a> (<a href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *button);
112
void <a href="GtkToolButton.html#gtk-tool-button-set-icon-name">gtk_tool_button_set_icon_name</a> (<a href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *button,
113
const gchar *icon_name);
114
const gchar* <a href="GtkToolButton.html#gtk-tool-button-get-icon-name">gtk_tool_button_get_icon_name</a> (<a href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *button);
115
void <a href="GtkToolButton.html#gtk-tool-button-set-icon-widget">gtk_tool_button_set_icon_widget</a> (<a href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *button,
116
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *icon_widget);
117
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* <a href="GtkToolButton.html#gtk-tool-button-get-icon-widget">gtk_tool_button_get_icon_widget</a> (<a href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *button);
118
void <a href="GtkToolButton.html#gtk-tool-button-set-label-widget">gtk_tool_button_set_label_widget</a> (<a href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *button,
119
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *label_widget);
120
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* <a href="GtkToolButton.html#gtk-tool-button-get-label-widget">gtk_tool_button_get_label_widget</a> (<a href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *button);
125
<div class="refsect1" lang="en">
126
<a name="id3401821"></a><h2>Object Hierarchy</h2>
127
<pre class="synopsis">
130
+----GInitiallyUnowned
131
+----<a href="GtkObject.html" title="GtkObject">GtkObject</a>
132
+----<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
133
+----<a href="GtkContainer.html" title="GtkContainer">GtkContainer</a>
134
+----<a href="GtkBin.html" title="GtkBin">GtkBin</a>
135
+----<a href="GtkToolItem.html" title="GtkToolItem">GtkToolItem</a>
137
+----<a href="GtkMenuToolButton.html" title="GtkMenuToolButton">GtkMenuToolButton</a>
138
+----<a href="GtkToggleToolButton.html" title="GtkToggleToolButton">GtkToggleToolButton</a>
141
<div class="refsect1" lang="en">
142
<a name="id3401906"></a><h2>Implemented Interfaces</h2>
144
GtkToolButton implements
145
AtkImplementorIface.</p>
147
<div class="refsect1" lang="en">
148
<a name="id3401929"></a><h2>Properties</h2>
149
<pre class="synopsis">
151
"<a href="GtkToolButton.html#GtkToolButton--icon-name">icon-name</a>" gchararray : Read / Write
152
"<a href="GtkToolButton.html#GtkToolButton--icon-widget">icon-widget</a>" <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> : Read / Write
153
"<a href="GtkToolButton.html#GtkToolButton--label">label</a>" gchararray : Read / Write
154
"<a href="GtkToolButton.html#GtkToolButton--label-widget">label-widget</a>" <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> : Read / Write
155
"<a href="GtkToolButton.html#GtkToolButton--stock-id">stock-id</a>" gchararray : Read / Write
156
"<a href="GtkToolButton.html#GtkToolButton--use-underline">use-underline</a>" gboolean : Read / Write
159
<div class="refsect1" lang="en">
160
<a name="id3402050"></a><h2>Style Properties</h2>
161
<pre class="synopsis">
163
"<a href="GtkToolButton.html#GtkToolButton--icon-spacing">icon-spacing</a>" gint : Read / Write
166
<div class="refsect1" lang="en">
167
<a name="id3402084"></a><h2>Signals</h2>
168
<pre class="synopsis">
170
"<a href="GtkToolButton.html#GtkToolButton-clicked">clicked</a>" : Run First / Action
173
<div class="refsect1" lang="en">
174
<a name="id3402113"></a><h2>Description</h2>
176
<a href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a>s are <span class="type">GtkToolItems</span> containing buttons.
179
Use <a href="GtkToolButton.html#gtk-tool-button-new"><code class="function">gtk_tool_button_new()</code></a> to create a new <a href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a>. Use
180
<code class="function">gtk_tool_button_new_with_stock()</code> to create a <a href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a>
181
containing a stock item.
184
The label of a <a href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a> is determined by the properties
185
"label_widget", "label", and "stock_id". If "label_widget" is
187
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
188
><code class="literal">NULL</code></a>, then that widget is used as the label. Otherwise, if
190
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
191
><code class="literal">NULL</code></a>, that string is used as the label. Otherwise, if
193
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
194
><code class="literal">NULL</code></a>, the label is determined by the stock
195
item. Otherwise, the button does not have a label.
198
The icon of a <a href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a> is determined by the properties
199
"icon_widget" and "stock_id". If "icon_widget" is non-<a
200
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
201
><code class="literal">NULL</code></a>, then
202
that widget is used as the icon. Otherwise, if "stock_id" is
204
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
205
><code class="literal">NULL</code></a>, the icon is determined by the stock item. Otherwise,
206
the button does not have a label.
209
<div class="refsect1" lang="en">
210
<a name="id3402273"></a><h2>Details</h2>
211
<div class="refsect2" lang="en">
212
<a name="id3402283"></a><h3>
213
<a name="GtkToolButton-struct"></a>GtkToolButton</h3>
214
<a class="indexterm" name="id3402296"></a><pre class="programlisting">typedef struct _GtkToolButton GtkToolButton;</pre>
216
The <a href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a> struct contains only private. It should only be
217
accessed with the function described below.
221
<div class="refsect2" lang="en">
222
<a name="id3402322"></a><h3>
223
<a name="gtk-tool-button-new"></a>gtk_tool_button_new ()</h3>
224
<a class="indexterm" name="id3402337"></a><pre class="programlisting"><a href="GtkToolItem.html" title="GtkToolItem">GtkToolItem</a>* gtk_tool_button_new (<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *icon_widget,
225
const gchar *label);</pre>
227
Creates a new <a href="GtkToolButton.html" title="GtkToolButton"><code class="literal">GtkToolButton</code></a> using <em class="parameter"><code>icon_widget</code></em> as icon and <em class="parameter"><code>label</code></em> as
232
<div class="variablelist"><table border="0">
233
<col align="left" valign="top">
236
<td><span class="term"><em class="parameter"><code>icon_widget</code></em> :</span></td>
237
<td> a widget that will be used as icon widget, or <a
238
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
239
><code class="literal">NULL</code></a>
243
<td><span class="term"><em class="parameter"><code>label</code></em> :</span></td>
244
<td> a string that will be used as label, or <a
245
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
246
><code class="literal">NULL</code></a>
250
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
251
<td> A new <a href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a>
257
<p class="since">Since 2.4
261
<div class="refsect2" lang="en">
262
<a name="id3402477"></a><h3>
263
<a name="gtk-tool-button-new-from-stock"></a>gtk_tool_button_new_from_stock ()</h3>
264
<a class="indexterm" name="id3402493"></a><pre class="programlisting"><a href="GtkToolItem.html" title="GtkToolItem">GtkToolItem</a>* gtk_tool_button_new_from_stock (const gchar *stock_id);</pre>
266
Creates a new <a href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a> containing the image and text from a
267
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>
268
and <a href="gtk-Stock-Items.html#GTK-STOCK-APPLY:CAPS"><span class="type">GTK_STOCK_APPLY</span></a>.
271
It is an error if <em class="parameter"><code>stock_id</code></em> is not a name of a stock item.</p>
275
<div class="variablelist"><table border="0">
276
<col align="left" valign="top">
279
<td><span class="term"><em class="parameter"><code>stock_id</code></em> :</span></td>
280
<td> the name of the stock item
284
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
285
<td> A new <a href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a>
291
<p class="since">Since 2.4
295
<div class="refsect2" lang="en">
296
<a name="id3402607"></a><h3>
297
<a name="gtk-tool-button-set-label"></a>gtk_tool_button_set_label ()</h3>
298
<a class="indexterm" name="id3402622"></a><pre class="programlisting">void gtk_tool_button_set_label (<a href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *button,
299
const gchar *label);</pre>
301
Sets <em class="parameter"><code>label</code></em> as the label used for the tool button. The "label" property
302
only has an effect if not overridden by a non-<a
303
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
304
><code class="literal">NULL</code></a> "label_widget" property.
305
If both the "label_widget" and "label" properties are <a
306
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
307
><code class="literal">NULL</code></a>, the label
308
is determined by the "stock_id" property. If the "stock_id" property is also
310
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
311
><code class="literal">NULL</code></a>, <em class="parameter"><code>button</code></em> will not have a label.</p>
315
<div class="variablelist"><table border="0">
316
<col align="left" valign="top">
319
<td><span class="term"><em class="parameter"><code>button</code></em> :</span></td>
320
<td> a <a href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a>
324
<td><span class="term"><em class="parameter"><code>label</code></em> :</span></td>
325
<td> a string that will be used as label, or <a
326
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
327
><code class="literal">NULL</code></a>.
332
<p class="since">Since 2.4
336
<div class="refsect2" lang="en">
337
<a name="id3402765"></a><h3>
338
<a name="gtk-tool-button-get-label"></a>gtk_tool_button_get_label ()</h3>
339
<a class="indexterm" name="id3402782"></a><pre class="programlisting">const gchar* gtk_tool_button_get_label (<a href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *button);</pre>
341
Returns the label used by the tool button, or <a
342
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
343
><code class="literal">NULL</code></a> if the tool button
344
doesn't have a label. or uses a the label from a stock item. The returned
345
string is owned by GTK+, and must not be modified or freed.</p>
349
<div class="variablelist"><table border="0">
350
<col align="left" valign="top">
353
<td><span class="term"><em class="parameter"><code>button</code></em> :</span></td>
354
<td> a <a href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a>
358
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
359
<td> The label, or <a
360
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
361
><code class="literal">NULL</code></a>
367
<p class="since">Since 2.4
371
<div class="refsect2" lang="en">
372
<a name="id3402881"></a><h3>
373
<a name="gtk-tool-button-set-use-underline"></a>gtk_tool_button_set_use_underline ()</h3>
374
<a class="indexterm" name="id3402898"></a><pre class="programlisting">void gtk_tool_button_set_use_underline (<a href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *button,
375
gboolean use_underline);</pre>
377
If set, an underline in the label property indicates that the next character
378
should be used for the mnemonic accelerator key in the overflow menu. For
379
example, if the label property is "_Open" and <em class="parameter"><code>use_underline</code></em> is <code class="literal">TRUE</code>,
380
the label on the tool button will be "Open" and the item on the overflow
381
menu will have an underlined 'O'.
384
Labels shown on tool buttons never have mnemonics on them; this property
385
only affects the menu item on the overflow menu.</p>
389
<div class="variablelist"><table border="0">
390
<col align="left" valign="top">
393
<td><span class="term"><em class="parameter"><code>button</code></em> :</span></td>
394
<td> a <a href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a>
398
<td><span class="term"><em class="parameter"><code>use_underline</code></em> :</span></td>
399
<td> whether the button label has the form "_Open"
404
<p class="since">Since 2.4
408
<div class="refsect2" lang="en">
409
<a name="id3403012"></a><h3>
410
<a name="gtk-tool-button-get-use-underline"></a>gtk_tool_button_get_use_underline ()</h3>
411
<a class="indexterm" name="id3403028"></a><pre class="programlisting">gboolean gtk_tool_button_get_use_underline (<a href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *button);</pre>
413
Returns whether underscores in the label property are used as mnemonics
414
on menu items on the overflow menu. See <a href="GtkToolButton.html#gtk-tool-button-set-use-underline"><code class="function">gtk_tool_button_set_use_underline()</code></a>.</p>
418
<div class="variablelist"><table border="0">
419
<col align="left" valign="top">
422
<td><span class="term"><em class="parameter"><code>button</code></em> :</span></td>
423
<td> a <a href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a>
427
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
428
<td> <code class="literal">TRUE</code> if underscores in the label property are used as
429
mnemonics on menu items on the overflow menu.
435
<p class="since">Since 2.4
439
<div class="refsect2" lang="en">
440
<a name="id3403127"></a><h3>
441
<a name="gtk-tool-button-set-stock-id"></a>gtk_tool_button_set_stock_id ()</h3>
442
<a class="indexterm" name="id3403143"></a><pre class="programlisting">void gtk_tool_button_set_stock_id (<a href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *button,
443
const gchar *stock_id);</pre>
445
Sets the name of the stock item. See <a href="GtkToolButton.html#gtk-tool-button-new-from-stock"><code class="function">gtk_tool_button_new_from_stock()</code></a>.
446
The stock_id property only has an effect if not
448
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
449
><code class="literal">NULL</code></a> "label" and "icon_widget" properties.</p>
453
<div class="variablelist"><table border="0">
454
<col align="left" valign="top">
457
<td><span class="term"><em class="parameter"><code>button</code></em> :</span></td>
458
<td> a <a href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a>
462
<td><span class="term"><em class="parameter"><code>stock_id</code></em> :</span></td>
463
<td> a name of a stock item, or <a
464
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
465
><code class="literal">NULL</code></a>
470
<p class="since">Since 2.4
474
<div class="refsect2" lang="en">
475
<a name="id3403265"></a><h3>
476
<a name="gtk-tool-button-get-stock-id"></a>gtk_tool_button_get_stock_id ()</h3>
477
<a class="indexterm" name="id3403281"></a><pre class="programlisting">const gchar* gtk_tool_button_get_stock_id (<a href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *button);</pre>
479
Returns the name of the stock item. See <a href="GtkToolButton.html#gtk-tool-button-set-stock-id"><code class="function">gtk_tool_button_set_stock_id()</code></a>.
480
The returned string is owned by GTK+ and must not be freed or modifed.</p>
484
<div class="variablelist"><table border="0">
485
<col align="left" valign="top">
488
<td><span class="term"><em class="parameter"><code>button</code></em> :</span></td>
489
<td> a <a href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a>
493
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
494
<td> the name of the stock item for <em class="parameter"><code>button</code></em>.
500
<p class="since">Since 2.4
504
<div class="refsect2" lang="en">
505
<a name="id3403376"></a><h3>
506
<a name="gtk-tool-button-set-icon-name"></a>gtk_tool_button_set_icon_name ()</h3>
507
<a class="indexterm" name="id3403392"></a><pre class="programlisting">void gtk_tool_button_set_icon_name (<a href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *button,
508
const gchar *icon_name);</pre>
510
Sets the icon for the tool button from a named themed icon.
511
See the docs for <a href="GtkIconTheme.html" title="GtkIconTheme"><span class="type">GtkIconTheme</span></a> for more details.
512
The "icon_name" property only has an effect if not
514
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
515
><code class="literal">NULL</code></a> "label", "icon_widget" and "stock_id"
520
<div class="variablelist"><table border="0">
521
<col align="left" valign="top">
524
<td><span class="term"><em class="parameter"><code>button</code></em> :</span></td>
525
<td> a <a href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a>
529
<td><span class="term"><em class="parameter"><code>icon_name</code></em> :</span></td>
530
<td> the name of the themed icon
535
<p class="since">Since 2.8
539
<div class="refsect2" lang="en">
540
<a name="id3403501"></a><h3>
541
<a name="gtk-tool-button-get-icon-name"></a>gtk_tool_button_get_icon_name ()</h3>
542
<a class="indexterm" name="id3403517"></a><pre class="programlisting">const gchar* gtk_tool_button_get_icon_name (<a href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *button);</pre>
544
Returns the name of the themed icon for the tool button,
545
see <a href="GtkToolButton.html#gtk-tool-button-set-icon-name"><code class="function">gtk_tool_button_set_icon_name()</code></a>.</p>
549
<div class="variablelist"><table border="0">
550
<col align="left" valign="top">
553
<td><span class="term"><em class="parameter"><code>button</code></em> :</span></td>
554
<td> a <a href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a>
558
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
559
<td> the icon name or <a
560
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
561
><code class="literal">NULL</code></a> if the tool button has
568
<p class="since">Since 2.8
572
<div class="refsect2" lang="en">
573
<a name="id3403617"></a><h3>
574
<a name="gtk-tool-button-set-icon-widget"></a>gtk_tool_button_set_icon_widget ()</h3>
575
<a class="indexterm" name="id3403633"></a><pre class="programlisting">void gtk_tool_button_set_icon_widget (<a href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *button,
576
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *icon_widget);</pre>
578
Sets <em class="parameter"><code>icon</code></em> as the widget used as icon on <em class="parameter"><code>button</code></em>. If <em class="parameter"><code>icon_widget</code></em> is
580
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
581
><code class="literal">NULL</code></a> the icon is determined by the "stock_id" property. If the
582
"stock_id" property is also <a
583
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
584
><code class="literal">NULL</code></a>, <em class="parameter"><code>button</code></em> will not have an icon.</p>
588
<div class="variablelist"><table border="0">
589
<col align="left" valign="top">
592
<td><span class="term"><em class="parameter"><code>button</code></em> :</span></td>
593
<td> a <a href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a>
597
<td><span class="term"><em class="parameter"><code>icon_widget</code></em> :</span></td>
598
<td> the widget used as icon, or <a
599
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
600
><code class="literal">NULL</code></a>
605
<p class="since">Since 2.4
609
<div class="refsect2" lang="en">
610
<a name="id3403776"></a><h3>
611
<a name="gtk-tool-button-get-icon-widget"></a>gtk_tool_button_get_icon_widget ()</h3>
612
<a class="indexterm" name="id3403792"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* gtk_tool_button_get_icon_widget (<a href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *button);</pre>
614
Return the widget used as icon widget on <em class="parameter"><code>button</code></em>. See
615
<a href="GtkToolButton.html#gtk-tool-button-set-icon-widget"><code class="function">gtk_tool_button_set_icon_widget()</code></a>.</p>
619
<div class="variablelist"><table border="0">
620
<col align="left" valign="top">
623
<td><span class="term"><em class="parameter"><code>button</code></em> :</span></td>
624
<td> a <a href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a>
628
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
629
<td> The widget used as icon on <em class="parameter"><code>button</code></em>, or <a
630
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
631
><code class="literal">NULL</code></a>.
637
<p class="since">Since 2.4
641
<div class="refsect2" lang="en">
642
<a name="id3403902"></a><h3>
643
<a name="gtk-tool-button-set-label-widget"></a>gtk_tool_button_set_label_widget ()</h3>
644
<a class="indexterm" name="id3403918"></a><pre class="programlisting">void gtk_tool_button_set_label_widget (<a href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *button,
645
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *label_widget);</pre>
647
Sets <em class="parameter"><code>label_widget</code></em> as the widget that will be used as the label
648
for <em class="parameter"><code>button</code></em>. If <em class="parameter"><code>label_widget</code></em> is <a
649
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
650
><code class="literal">NULL</code></a> the "label" property is used
651
as label. If "label" is also <a
652
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
653
><code class="literal">NULL</code></a>, the label in the stock item
654
determined by the "stock_id" property is used as label. If
655
"stock_id" is also <a
656
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
657
><code class="literal">NULL</code></a>, <em class="parameter"><code>button</code></em> does not have a label.</p>
661
<div class="variablelist"><table border="0">
662
<col align="left" valign="top">
665
<td><span class="term"><em class="parameter"><code>button</code></em> :</span></td>
666
<td> a <a href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a>
670
<td><span class="term"><em class="parameter"><code>label_widget</code></em> :</span></td>
671
<td> the widget used as label, or <a
672
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
673
><code class="literal">NULL</code></a>
678
<p class="since">Since 2.4
682
<div class="refsect2" lang="en">
683
<a name="id3404073"></a><h3>
684
<a name="gtk-tool-button-get-label-widget"></a>gtk_tool_button_get_label_widget ()</h3>
685
<a class="indexterm" name="id3404089"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* gtk_tool_button_get_label_widget (<a href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *button);</pre>
687
Returns the widget used as label on <em class="parameter"><code>button</code></em>. See
688
<a href="GtkToolButton.html#gtk-tool-button-set-label-widget"><code class="function">gtk_tool_button_set_label_widget()</code></a>.</p>
692
<div class="variablelist"><table border="0">
693
<col align="left" valign="top">
696
<td><span class="term"><em class="parameter"><code>button</code></em> :</span></td>
697
<td> a <a href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a>
701
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
702
<td> The widget used as label on <em class="parameter"><code>button</code></em>, or <a
703
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
704
><code class="literal">NULL</code></a>.
710
<p class="since">Since 2.4
714
<div class="refsect1" lang="en">
715
<a name="id3404200"></a><h2>Property Details</h2>
716
<div class="refsect2" lang="en">
717
<a name="id3404211"></a><h3>
718
<a name="GtkToolButton--icon-name"></a>The "<code class="literal">icon-name</code>" property</h3>
719
<a class="indexterm" name="id3404227"></a><pre class="programlisting"> "icon-name" gchararray : Read / Write</pre>
721
The name of the themed icon displayed on the item.
722
This property only has an effect if not overridden by "label",
723
"icon_widget" or "stock_id" properties.</p>
727
<p>Default value: NULL</p>
732
<div class="refsect2" lang="en">
733
<a name="id3404264"></a><h3>
734
<a name="GtkToolButton--icon-widget"></a>The "<code class="literal">icon-widget</code>" property</h3>
735
<a class="indexterm" name="id3404281"></a><pre class="programlisting"> "icon-widget" <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> : Read / Write</pre>
736
<p>Icon widget to display in the item.</p>
739
<div class="refsect2" lang="en">
740
<a name="id3404304"></a><h3>
741
<a name="GtkToolButton--label"></a>The "<code class="literal">label</code>" property</h3>
742
<a class="indexterm" name="id3404320"></a><pre class="programlisting"> "label" gchararray : Read / Write</pre>
743
<p>Text to show in the item.</p>
744
<p>Default value: NULL</p>
747
<div class="refsect2" lang="en">
748
<a name="id3404347"></a><h3>
749
<a name="GtkToolButton--label-widget"></a>The "<code class="literal">label-widget</code>" property</h3>
750
<a class="indexterm" name="id3404364"></a><pre class="programlisting"> "label-widget" <a href="GtkWidget.html" title="GtkWidget">GtkWidget</a> : Read / Write</pre>
751
<p>Widget to use as the item label.</p>
754
<div class="refsect2" lang="en">
755
<a name="id3404387"></a><h3>
756
<a name="GtkToolButton--stock-id"></a>The "<code class="literal">stock-id</code>" property</h3>
757
<a class="indexterm" name="id3404404"></a><pre class="programlisting"> "stock-id" gchararray : Read / Write</pre>
758
<p>The stock icon displayed on the item.</p>
759
<p>Default value: NULL</p>
762
<div class="refsect2" lang="en">
763
<a name="id3404430"></a><h3>
764
<a name="GtkToolButton--use-underline"></a>The "<code class="literal">use-underline</code>" property</h3>
765
<a class="indexterm" name="id3404447"></a><pre class="programlisting"> "use-underline" gboolean : Read / Write</pre>
766
<p>If set, an underline in the label property indicates that the next character should be used for the mnemonic accelerator key in the overflow menu.</p>
767
<p>Default value: FALSE</p>
770
<div class="refsect1" lang="en">
771
<a name="id3404477"></a><h2>Style Property Details</h2>
772
<div class="refsect2" lang="en">
773
<a name="id3404488"></a><h3>
774
<a name="GtkToolButton--icon-spacing"></a>The "<code class="literal">icon-spacing</code>" style property</h3>
775
<a class="indexterm" name="id3404505"></a><pre class="programlisting"> "icon-spacing" gint : Read / Write</pre>
776
<p>Spacing in pixels between the icon and label.</p>
777
<p>Allowed values: >= 0</p>
778
<p>Default value: 0</p>
781
<div class="refsect1" lang="en">
782
<a name="id3404536"></a><h2>Signal Details</h2>
783
<div class="refsect2" lang="en">
784
<a name="id3404547"></a><h3>
785
<a name="GtkToolButton-clicked"></a>The "clicked" signal</h3>
786
<a class="indexterm" name="id3404558"></a><pre class="programlisting">void user_function (<a href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *toolbutton,
787
gpointer user_data) : Run First / Action</pre>
789
This signal is emitted when the tool button is clicked with the mouse
790
or activated with the keyboard.</p>
794
<div class="variablelist"><table border="0">
795
<col align="left" valign="top">
798
<td><span class="term"><em class="parameter"><code>toolbutton</code></em> :</span></td>
799
<td> the object that emitted the signal
803
<td><span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
804
<td>user data set when the signal handler was connected.</td>
810
<div class="refsect1" lang="en">
811
<a name="id3404634"></a><h2>See Also</h2>
814
<div class="variablelist"><table border="0">
815
<col align="left" valign="top">
818
<td><span class="term"><a href="GtkToolbar.html" title="GtkToolbar"><span class="type">GtkToolbar</span></a></span></td>
819
<td><p>The toolbar widget</p></td>
822
<td><span class="term"><a href="GtkMenuToolButton.html" title="GtkMenuToolButton"><span class="type">GtkMenuToolButton</span></a></span></td>
823
<td><p>A subclass of <a href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a> that displays on
824
the toolbar a button with an additional dropdown
828
<td><span class="term"><a href="GtkToggleToolButton.html" title="GtkToggleToolButton"><span class="type">GtkToggleToolButton</span></a></span></td>
829
<td><p>A subclass of <a href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a> that displays toggle
830
buttons on the toolbar</p></td>
833
<td><span class="term"><a href="GtkRadioToolButton.html" title="GtkRadioToolButton"><span class="type">GtkRadioToolButton</span></a></span></td>
834
<td><p>A subclass of <a href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a> that displays radio
835
buttons on the toolbar</p></td>
838
<td><span class="term"><a href="GtkSeparatorToolItem.html" title="GtkSeparatorToolItem"><span class="type">GtkSeparatorToolItem</span></a></span></td>
839
<td><p>A subclass of <a href="GtkToolItem.html" title="GtkToolItem"><span class="type">GtkToolItem</span></a> that separates groups of
840
items on a toolbar</p></td>