1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>GtkRecentChooserDialog</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
7
<link rel="home" href="index.html" title="GTK+ 2 Reference Manual">
8
<link rel="up" href="RecentDocuments.html" title="Recently Used Documents">
9
<link rel="prev" href="GtkRecentChooser.html" title="GtkRecentChooser">
10
<link rel="next" href="GtkRecentChooserMenu.html" title="GtkRecentChooserMenu">
11
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
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">
17
<td><a accesskey="p" href="GtkRecentChooser.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18
<td><a accesskey="u" href="RecentDocuments.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+ 2 Reference Manual</th>
21
<td><a accesskey="n" href="GtkRecentChooserMenu.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23
<tr><td colspan="5" class="shortcuts">
24
<a href="#GtkRecentChooserDialog.synopsis" class="shortcut">Top</a>
26
<a href="#GtkRecentChooserDialog.description" class="shortcut">Description</a>
28
<a href="#GtkRecentChooserDialog.object-hierarchy" class="shortcut">Object Hierarchy</a>
30
<a href="#GtkRecentChooserDialog.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
33
<div class="refentry">
34
<a name="GtkRecentChooserDialog"></a><div class="titlepage"></div>
35
<div class="refnamediv"><table width="100%"><tr>
37
<h2><span class="refentrytitle"><a name="GtkRecentChooserDialog.top_of_page"></a>GtkRecentChooserDialog</span></h2>
38
<p>GtkRecentChooserDialog — Displays recently used files in a dialog</p>
40
<td valign="top" align="right"><img src="recentchooserdialog.png"></td>
42
<div class="refsynopsisdiv">
43
<a name="GtkRecentChooserDialog.synopsis"></a><h2>Synopsis</h2>
44
<pre class="synopsis">
45
#include <gtk/gtk.h>
47
struct <a class="link" href="GtkRecentChooserDialog.html#GtkRecentChooserDialog-struct" title="struct GtkRecentChooserDialog">GtkRecentChooserDialog</a>;
48
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> * <a class="link" href="GtkRecentChooserDialog.html#gtk-recent-chooser-dialog-new" title="gtk_recent_chooser_dialog_new ()">gtk_recent_chooser_dialog_new</a> (<em class="parameter"><code>const <span class="type">gchar</span> *title</code></em>,
49
<em class="parameter"><code><a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a> *parent</code></em>,
50
<em class="parameter"><code>const <span class="type">gchar</span> *first_button_text</code></em>,
51
<em class="parameter"><code>...</code></em>);
52
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> * <a class="link" href="GtkRecentChooserDialog.html#gtk-recent-chooser-dialog-new-for-manager" title="gtk_recent_chooser_dialog_new_for_manager ()">gtk_recent_chooser_dialog_new_for_manager</a>
53
(<em class="parameter"><code>const <span class="type">gchar</span> *title</code></em>,
54
<em class="parameter"><code><a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a> *parent</code></em>,
55
<em class="parameter"><code><a class="link" href="GtkRecentManager.html" title="GtkRecentManager"><span class="type">GtkRecentManager</span></a> *manager</code></em>,
56
<em class="parameter"><code>const <span class="type">gchar</span> *first_button_text</code></em>,
57
<em class="parameter"><code>...</code></em>);
60
<div class="refsect1">
61
<a name="GtkRecentChooserDialog.object-hierarchy"></a><h2>Object Hierarchy</h2>
62
<pre class="synopsis">
64
+----GInitiallyUnowned
65
+----<a class="link" href="GtkObject.html" title="GtkObject">GtkObject</a>
66
+----<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
67
+----<a class="link" href="GtkContainer.html" title="GtkContainer">GtkContainer</a>
68
+----<a class="link" href="GtkBin.html" title="GtkBin">GtkBin</a>
69
+----<a class="link" href="GtkWindow.html" title="GtkWindow">GtkWindow</a>
70
+----<a class="link" href="GtkDialog.html" title="GtkDialog">GtkDialog</a>
71
+----GtkRecentChooserDialog
74
<div class="refsect1">
75
<a name="GtkRecentChooserDialog.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
77
GtkRecentChooserDialog implements
78
AtkImplementorIface, <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a> and <a class="link" href="GtkRecentChooser.html" title="GtkRecentChooser">GtkRecentChooser</a>.</p>
80
<div class="refsect1">
81
<a name="GtkRecentChooserDialog.description"></a><h2>Description</h2>
83
<a class="link" href="GtkRecentChooserDialog.html" title="GtkRecentChooserDialog"><span class="type">GtkRecentChooserDialog</span></a> is a dialog box suitable for displaying the recently
84
used documents. This widgets works by putting a <a class="link" href="GtkRecentChooserWidget.html" title="GtkRecentChooserWidget"><span class="type">GtkRecentChooserWidget</span></a> inside
85
a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a>. It exposes the <a class="link" href="GtkRecentChooser.html#GtkRecentChooserIface" title="struct GtkRecentChooserIface"><span class="type">GtkRecentChooserIface</span></a> interface, so you can use
86
all the <a class="link" href="GtkRecentChooser.html" title="GtkRecentChooser"><span class="type">GtkRecentChooser</span></a> functions on the recent chooser dialog as well as
87
those for <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a>.
90
Note that <a class="link" href="GtkRecentChooserDialog.html" title="GtkRecentChooserDialog"><span class="type">GtkRecentChooserDialog</span></a> does not have any methods of its own.
91
Instead, you should use the functions that work on a <a class="link" href="GtkRecentChooser.html" title="GtkRecentChooser"><span class="type">GtkRecentChooser</span></a>.
94
<a name="gtkrecentchooser-typical-usage"></a><p class="title"><b>Example 60. Typical usage</b></p>
95
<div class="example-contents">
97
In the simplest of cases, you can use the following code to use
98
a <a class="link" href="GtkRecentChooserDialog.html" title="GtkRecentChooserDialog"><span class="type">GtkRecentChooserDialog</span></a> to select a recently used file:
100
<pre class="programlisting">
102
dialog = gtk_recent_chooser_dialog_new ("Recent Documents",
104
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
105
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
107
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
110
info = gtk_recent_chooser_get_current_item (GTK_RECENT_CHOOSER (dialog));
111
open_file (gtk_recent_info_get_uri (info));
112
gtk_recent_info_unref (info);
114
gtk_widget_destroy (dialog);
118
<br class="example-break"><p>
119
Recently used files are supported since GTK+ 2.10.
122
<div class="refsect1">
123
<a name="GtkRecentChooserDialog.details"></a><h2>Details</h2>
124
<div class="refsect2">
125
<a name="GtkRecentChooserDialog-struct"></a><h3>struct GtkRecentChooserDialog</h3>
126
<pre class="programlisting">struct GtkRecentChooserDialog;</pre>
131
<div class="refsect2">
132
<a name="gtk-recent-chooser-dialog-new"></a><h3>gtk_recent_chooser_dialog_new ()</h3>
133
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> * gtk_recent_chooser_dialog_new (<em class="parameter"><code>const <span class="type">gchar</span> *title</code></em>,
134
<em class="parameter"><code><a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a> *parent</code></em>,
135
<em class="parameter"><code>const <span class="type">gchar</span> *first_button_text</code></em>,
136
<em class="parameter"><code>...</code></em>);</pre>
138
Creates a new <a class="link" href="GtkRecentChooserDialog.html" title="GtkRecentChooserDialog"><span class="type">GtkRecentChooserDialog</span></a>. This function is analogous to
139
<a class="link" href="GtkDialog.html#gtk-dialog-new-with-buttons" title="gtk_dialog_new_with_buttons ()"><code class="function">gtk_dialog_new_with_buttons()</code></a>.
141
<div class="variablelist"><table border="0" class="variablelist">
143
<col align="left" valign="top">
148
<td><p><span class="term"><em class="parameter"><code>title</code></em> :</span></p></td>
149
<td>Title of the dialog, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
153
<td><p><span class="term"><em class="parameter"><code>parent</code></em> :</span></p></td>
154
<td>Transient parent of the dialog, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>,. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
158
<td><p><span class="term"><em class="parameter"><code>first_button_text</code></em> :</span></p></td>
159
<td>stock ID or text to go in the first button, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
163
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
164
<td>a new <a class="link" href="GtkRecentChooserDialog.html" title="GtkRecentChooserDialog"><span class="type">GtkRecentChooserDialog</span></a>
169
<p class="since">Since 2.10</p>
172
<div class="refsect2">
173
<a name="gtk-recent-chooser-dialog-new-for-manager"></a><h3>gtk_recent_chooser_dialog_new_for_manager ()</h3>
174
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> * gtk_recent_chooser_dialog_new_for_manager
175
(<em class="parameter"><code>const <span class="type">gchar</span> *title</code></em>,
176
<em class="parameter"><code><a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a> *parent</code></em>,
177
<em class="parameter"><code><a class="link" href="GtkRecentManager.html" title="GtkRecentManager"><span class="type">GtkRecentManager</span></a> *manager</code></em>,
178
<em class="parameter"><code>const <span class="type">gchar</span> *first_button_text</code></em>,
179
<em class="parameter"><code>...</code></em>);</pre>
181
Creates a new <a class="link" href="GtkRecentChooserDialog.html" title="GtkRecentChooserDialog"><span class="type">GtkRecentChooserDialog</span></a> with a specified recent manager.
184
This is useful if you have implemented your own recent manager, or if you
185
have a customized instance of a <a class="link" href="GtkRecentManager.html" title="GtkRecentManager"><span class="type">GtkRecentManager</span></a> object.
187
<div class="variablelist"><table border="0" class="variablelist">
189
<col align="left" valign="top">
194
<td><p><span class="term"><em class="parameter"><code>title</code></em> :</span></p></td>
195
<td>Title of the dialog, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
199
<td><p><span class="term"><em class="parameter"><code>parent</code></em> :</span></p></td>
200
<td>Transient parent of the dialog, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>,. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
204
<td><p><span class="term"><em class="parameter"><code>manager</code></em> :</span></p></td>
205
<td>a <a class="link" href="GtkRecentManager.html" title="GtkRecentManager"><span class="type">GtkRecentManager</span></a>
209
<td><p><span class="term"><em class="parameter"><code>first_button_text</code></em> :</span></p></td>
210
<td>stock ID or text to go in the first button, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
214
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
215
<td>a new <a class="link" href="GtkRecentChooserDialog.html" title="GtkRecentChooserDialog"><span class="type">GtkRecentChooserDialog</span></a>
220
<p class="since">Since 2.10</p>
223
<div class="refsect1">
224
<a name="GtkRecentChooserDialog.see-also"></a><h2>See Also</h2>
226
<a class="link" href="GtkRecentChooser.html" title="GtkRecentChooser"><span class="type">GtkRecentChooser</span></a>, <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a>
232
Generated by GTK-Doc V1.18</div>
b'\\ No newline at end of file'