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>GtkLinkButton</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="ButtonWidgets.html" title="Buttons and Toggles">
9
<link rel="prev" href="GtkToggleButton.html" title="GtkToggleButton">
10
<link rel="next" href="NumericEntry.html" title="Numeric/Text Data Entry">
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="GtkToggleButton.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
62
<td><a accesskey="u" href="ButtonWidgets.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="NumericEntry.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="#id2989020" class="shortcut">Top</a>
69
<a href="#id2989356" class="shortcut">Description</a>
71
<a href="#id2989230" class="shortcut">Object Hierarchy</a>
73
<a href="#id2989300" class="shortcut">Implemented Interfaces</a>
75
<a href="#id2989322" class="shortcut">Properties</a></nobr></td></tr>
77
<div class="refentry" lang="en">
78
<a name="GtkLinkButton"></a><div class="titlepage"></div>
79
<div class="refnamediv"><table width="100%"><tr>
82
<a name="id2989020"></a><span class="refentrytitle">GtkLinkButton</span>
84
<p>GtkLinkButton — Create buttons bound to a URL</p>
86
<td valign="top" align="right"><img src="link-button.png"></td>
88
<div class="refsynopsisdiv">
90
<pre class="synopsis">
92
#include <gtk/gtk.h>
95
<a href="GtkLinkButton.html#GtkLinkButton-struct">GtkLinkButton</a>;
96
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* <a href="GtkLinkButton.html#gtk-link-button-new">gtk_link_button_new</a> (const gchar *uri);
97
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* <a href="GtkLinkButton.html#gtk-link-button-new-with-label">gtk_link_button_new_with_label</a> (const gchar *uri,
99
const gchar* <a href="GtkLinkButton.html#gtk-link-button-get-uri">gtk_link_button_get_uri</a> (<a href="GtkLinkButton.html" title="GtkLinkButton">GtkLinkButton</a> *link_button);
100
void <a href="GtkLinkButton.html#gtk-link-button-set-uri">gtk_link_button_set_uri</a> (<a href="GtkLinkButton.html" title="GtkLinkButton">GtkLinkButton</a> *link_button,
102
void (<a href="GtkLinkButton.html#GtkLinkButtonUriFunc">*GtkLinkButtonUriFunc</a>) (<a href="GtkLinkButton.html" title="GtkLinkButton">GtkLinkButton</a> *button,
105
<a href="GtkLinkButton.html#GtkLinkButtonUriFunc">GtkLinkButtonUriFunc</a> <a href="GtkLinkButton.html#gtk-link-button-set-uri-hook">gtk_link_button_set_uri_hook</a> (<a href="GtkLinkButton.html#GtkLinkButtonUriFunc">GtkLinkButtonUriFunc</a> func,
107
GDestroyNotify destroy);
112
<div class="refsect1" lang="en">
113
<a name="id2989230"></a><h2>Object Hierarchy</h2>
114
<pre class="synopsis">
117
+----GInitiallyUnowned
118
+----<a href="GtkObject.html" title="GtkObject">GtkObject</a>
119
+----<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
120
+----<a href="GtkContainer.html" title="GtkContainer">GtkContainer</a>
121
+----<a href="GtkBin.html" title="GtkBin">GtkBin</a>
122
+----<a href="GtkButton.html" title="GtkButton">GtkButton</a>
126
<div class="refsect1" lang="en">
127
<a name="id2989300"></a><h2>Implemented Interfaces</h2>
129
GtkLinkButton implements
130
AtkImplementorIface.</p>
132
<div class="refsect1" lang="en">
133
<a name="id2989322"></a><h2>Properties</h2>
134
<pre class="synopsis">
136
"<a href="GtkLinkButton.html#GtkLinkButton--uri">uri</a>" gchararray : Read / Write
139
<div class="refsect1" lang="en">
140
<a name="id2989356"></a><h2>Description</h2>
142
A <a href="GtkLinkButton.html" title="GtkLinkButton"><span class="type">GtkLinkButton</span></a> is a <a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> with a hyperlink, similar to the one
143
used by web browsers, which triggers an action when clicked. It is useful
144
to show quick links to resources.
147
A link button is created by calling either <a href="GtkLinkButton.html#gtk-link-button-new"><code class="function">gtk_link_button_new()</code></a> or
148
<a href="GtkLinkButton.html#gtk-link-button-new-with-label"><code class="function">gtk_link_button_new_with_label()</code></a>. If using the former, the URI you pass
149
to the constructor is used as a label for the widget.
152
The URI bound to a <a href="GtkLinkButton.html" title="GtkLinkButton"><span class="type">GtkLinkButton</span></a> can be set specifically using
153
<a href="GtkLinkButton.html#gtk-link-button-set-uri"><code class="function">gtk_link_button_set_uri()</code></a>, and retrieved using <a href="GtkLinkButton.html#gtk-link-button-get-uri"><code class="function">gtk_link_button_get_uri()</code></a>.
156
<a href="GtkLinkButton.html" title="GtkLinkButton"><span class="type">GtkLinkButton</span></a> offers a global hook, which is called when the used clicks
157
on it: see <a href="GtkLinkButton.html#gtk-link-button-set-uri-hook"><code class="function">gtk_link_button_set_uri_hook()</code></a>.
160
<a href="GtkLinkButton.html" title="GtkLinkButton"><span class="type">GtkLinkButton</span></a> was added in GTK+ 2.10.
163
<div class="refsect1" lang="en">
164
<a name="id2989487"></a><h2>Details</h2>
165
<div class="refsect2" lang="en">
166
<a name="id2989498"></a><h3>
167
<a name="GtkLinkButton-struct"></a>GtkLinkButton</h3>
168
<a class="indexterm" name="id2989511"></a><pre class="programlisting">typedef struct _GtkLinkButton GtkLinkButton;</pre>
170
The <a href="GtkLinkButton.html" title="GtkLinkButton"><span class="type">GtkLinkButton</span></a> struct contains private data only, and should be
171
manipulated using the functions below.
175
<div class="refsect2" lang="en">
176
<a name="id2989536"></a><h3>
177
<a name="gtk-link-button-new"></a>gtk_link_button_new ()</h3>
178
<a class="indexterm" name="id2989552"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* gtk_link_button_new (const gchar *uri);</pre>
180
Creates a new <a href="GtkLinkButton.html" title="GtkLinkButton"><span class="type">GtkLinkButton</span></a> with the URI as its text.</p>
184
<div class="variablelist"><table border="0">
185
<col align="left" valign="top">
188
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
193
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
194
<td> a new link button widget.
200
<p class="since">Since 2.10
204
<div class="refsect2" lang="en">
205
<a name="id2989628"></a><h3>
206
<a name="gtk-link-button-new-with-label"></a>gtk_link_button_new_with_label ()</h3>
207
<a class="indexterm" name="id2989643"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* gtk_link_button_new_with_label (const gchar *uri,
208
const gchar *label);</pre>
210
Creates a new <a href="GtkLinkButton.html" title="GtkLinkButton"><span class="type">GtkLinkButton</span></a> containing a label.</p>
214
<div class="variablelist"><table border="0">
215
<col align="left" valign="top">
218
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
223
<td><span class="term"><em class="parameter"><code>label</code></em> :</span></td>
224
<td> the text of the button
228
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
229
<td> a new link button widget.
235
<p class="since">Since 2.10
239
<div class="refsect2" lang="en">
240
<a name="id2989742"></a><h3>
241
<a name="gtk-link-button-get-uri"></a>gtk_link_button_get_uri ()</h3>
242
<a class="indexterm" name="id2989757"></a><pre class="programlisting">const gchar* gtk_link_button_get_uri (<a href="GtkLinkButton.html" title="GtkLinkButton">GtkLinkButton</a> *link_button);</pre>
244
Retrieves the URI set using <a href="GtkLinkButton.html#gtk-link-button-set-uri"><code class="function">gtk_link_button_set_uri()</code></a>.</p>
248
<div class="variablelist"><table border="0">
249
<col align="left" valign="top">
252
<td><span class="term"><em class="parameter"><code>link_button</code></em> :</span></td>
253
<td> a <a href="GtkLinkButton.html" title="GtkLinkButton"><span class="type">GtkLinkButton</span></a>
257
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
258
<td> a valid URI. The returned string is owned by the link button
259
and should not be modified or freed.
265
<p class="since">Since 2.10
269
<div class="refsect2" lang="en">
270
<a name="id2989847"></a><h3>
271
<a name="gtk-link-button-set-uri"></a>gtk_link_button_set_uri ()</h3>
272
<a class="indexterm" name="id2989863"></a><pre class="programlisting">void gtk_link_button_set_uri (<a href="GtkLinkButton.html" title="GtkLinkButton">GtkLinkButton</a> *link_button,
273
const gchar *uri);</pre>
275
Sets <em class="parameter"><code>uri</code></em> as the URI where the <a href="GtkLinkButton.html" title="GtkLinkButton"><span class="type">GtkLinkButton</span></a> points.</p>
279
<div class="variablelist"><table border="0">
280
<col align="left" valign="top">
283
<td><span class="term"><em class="parameter"><code>link_button</code></em> :</span></td>
284
<td> a <a href="GtkLinkButton.html" title="GtkLinkButton"><span class="type">GtkLinkButton</span></a>
288
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
294
<p class="since">Since 2.10
298
<div class="refsect2" lang="en">
299
<a name="id2989964"></a><h3>
300
<a name="GtkLinkButtonUriFunc"></a>GtkLinkButtonUriFunc ()</h3>
301
<a class="indexterm" name="id2989977"></a><pre class="programlisting">void (*GtkLinkButtonUriFunc) (<a href="GtkLinkButton.html" title="GtkLinkButton">GtkLinkButton</a> *button,
303
gpointer user_data);</pre>
305
The type of a function which is called when the <a href="GtkLinkButton.html" title="GtkLinkButton"><span class="type">GtkLinkButton</span></a> is
308
<div class="variablelist"><table border="0">
309
<col align="left" valign="top">
312
<td><span class="term"><em class="parameter"><code>button</code></em> :</span></td>
313
<td>the <a href="GtkLinkButton.html" title="GtkLinkButton"><span class="type">GtkLinkButton</span></a> which was clicked
317
<td><span class="term"><em class="parameter"><code>link</code></em> :</span></td>
318
<td>the URI to which the clicked <a href="GtkLinkButton.html" title="GtkLinkButton"><span class="type">GtkLinkButton</span></a> points
322
<td><span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
330
<div class="refsect2" lang="en">
331
<a name="id2990094"></a><h3>
332
<a name="gtk-link-button-set-uri-hook"></a>gtk_link_button_set_uri_hook ()</h3>
333
<a class="indexterm" name="id2990110"></a><pre class="programlisting"><a href="GtkLinkButton.html#GtkLinkButtonUriFunc">GtkLinkButtonUriFunc</a> gtk_link_button_set_uri_hook (<a href="GtkLinkButton.html#GtkLinkButtonUriFunc">GtkLinkButtonUriFunc</a> func,
335
GDestroyNotify destroy);</pre>
337
Sets <em class="parameter"><code>func</code></em> as the function that should be invoked every time a user clicks
338
a <a href="GtkLinkButton.html" title="GtkLinkButton"><span class="type">GtkLinkButton</span></a>. This function is called before every callback registered
339
for the "clicked" signal.</p>
343
<div class="variablelist"><table border="0">
344
<col align="left" valign="top">
347
<td><span class="term"><em class="parameter"><code>func</code></em> :</span></td>
348
<td> a function called each time a <a href="GtkLinkButton.html" title="GtkLinkButton"><span class="type">GtkLinkButton</span></a> is clicked, or <a
349
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
350
><code class="literal">NULL</code></a>
354
<td><span class="term"><em class="parameter"><code>data</code></em> :</span></td>
355
<td> user data to be passed to <em class="parameter"><code>func</code></em>, or <a
356
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
357
><code class="literal">NULL</code></a>
361
<td><span class="term"><em class="parameter"><code>destroy</code></em> :</span></td>
362
<td> a <span class="type">GDestroyNotify</span> that gets called when <em class="parameter"><code>data</code></em> is no longer needed, or <a
363
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
364
><code class="literal">NULL</code></a>
368
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
369
<td> the previously set hook function.
375
<p class="since">Since 2.10
379
<div class="refsect1" lang="en">
380
<a name="id2990301"></a><h2>Property Details</h2>
381
<div class="refsect2" lang="en">
382
<a name="id2990311"></a><h3>
383
<a name="GtkLinkButton--uri"></a>The "<code class="literal">uri</code>" property</h3>
384
<a class="indexterm" name="id2990327"></a><pre class="programlisting"> "uri" gchararray : Read / Write</pre>
386
The URI bound to this button.</p>
390
<p>Default value: "http://www.gtk.org"</p>
395
<div class="refsect1" lang="en">
396
<a name="id2990364"></a><h2>See Also</h2>
398
<a href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>