57
57
<a name="GimpFileEntry.synopsis"></a><h2>Synopsis</h2>
58
58
<pre class="synopsis">
59
59
<a class="link" href="GimpFileEntry.html#GimpFileEntry-struct" title="GimpFileEntry">GimpFileEntry</a>;
60
GtkWidget* <a class="link" href="GimpFileEntry.html#gimp-file-entry-new" title="gimp_file_entry_new ()">gimp_file_entry_new</a> (const gchar *title,
61
const gchar *filename,
63
gboolean check_valid);
64
gchar* <a class="link" href="GimpFileEntry.html#gimp-file-entry-get-filename" title="gimp_file_entry_get_filename ()">gimp_file_entry_get_filename</a> (<a class="link" href="GimpFileEntry.html" title="GimpFileEntry">GimpFileEntry</a> *entry);
61
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
62
>GtkWidget</a>* <a class="link" href="GimpFileEntry.html#gimp-file-entry-new" title="gimp_file_entry_new ()">gimp_file_entry_new</a> (const <a
63
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
66
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
69
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
70
>gboolean</a> dir_only,
72
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
73
>gboolean</a> check_valid);
75
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
76
>gchar</a>* <a class="link" href="GimpFileEntry.html#gimp-file-entry-get-filename" title="gimp_file_entry_get_filename ()">gimp_file_entry_get_filename</a> (<a class="link" href="GimpFileEntry.html" title="GimpFileEntry">GimpFileEntry</a> *entry);
65
77
void <a class="link" href="GimpFileEntry.html#gimp-file-entry-set-filename" title="gimp_file_entry_set_filename ()">gimp_file_entry_set_filename</a> (<a class="link" href="GimpFileEntry.html" title="GimpFileEntry">GimpFileEntry</a> *entry,
66
const gchar *filename);
79
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
80
>gchar</a> *filename);
69
83
<div class="refsect1" lang="en">
70
84
<a name="GimpFileEntry.object-hierarchy"></a><h2>Object Hierarchy</h2>
71
85
<pre class="synopsis">
73
+----GInitiallyUnowned
87
href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject"
90
href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned"
91
>GInitiallyUnowned</a>
93
href="/usr/share/gtk-doc/html/gtk/GtkObject.html"
96
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
99
href="/usr/share/gtk-doc/html/gtk/GtkContainer.html"
102
href="/usr/share/gtk-doc/html/gtk/GtkBox.html"
105
href="/usr/share/gtk-doc/html/gtk/GtkHBox.html"
79
107
+----GimpFileEntry
83
111
<a name="GimpFileEntry.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
85
113
GimpFileEntry implements
86
AtkImplementorIface and GtkBuildable.</p>
114
AtkImplementorIface and <a
115
href="/usr/share/gtk-doc/html/gtk/gtk-gtkbuildable.html#GtkBuildable"
116
>GtkBuildable</a>.</p>
88
118
<div class="refsect1" lang="en">
89
119
<a name="GimpFileEntry.signals"></a><h2>Signals</h2>
97
127
This widget is used to enter filenames or directories.
100
There is a <span class="type">GtkEntry</span> for entering the filename manually and a "..."
101
button which will pop up a <span class="type">GtkFileSelection</span> dialog.
131
href="/usr/share/gtk-doc/html/gtk/GtkEntry.html"
132
><span class="type">GtkEntry</span></a> for entering the filename manually and a "..."
133
button which will pop up a <a
134
href="/usr/share/gtk-doc/html/gtk/GtkFileSelection.html"
135
><span class="type">GtkFileSelection</span></a> dialog.
104
138
You can restrict the <span class="type">GimpFileSelection</span> to directories. In this case
105
the filename listbox of the <span class="type">GtkFileSelection</span> dialog will be hidden.
139
the filename listbox of the <a
140
href="/usr/share/gtk-doc/html/gtk/GtkFileSelection.html"
141
><span class="type">GtkFileSelection</span></a> dialog will be hidden.
108
If you specify <em class="parameter"><code>check_valid</code></em> as <span class="type">TRUE</span> in <a class="link" href="GimpFileEntry.html#gimp-file-entry-new" title="gimp_file_entry_new ()"><code class="function">gimp_file_entry_new()</code></a>
144
If you specify <em class="parameter"><code>check_valid</code></em> as <a
145
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
146
><span class="type">TRUE</span></a> in <a class="link" href="GimpFileEntry.html#gimp-file-entry-new" title="gimp_file_entry_new ()"><code class="function">gimp_file_entry_new()</code></a>
109
147
the entered filename will be checked for validity and a pixmap will be
110
148
shown which indicates if the file exists or not.
131
169
<div class="refsect2" lang="en">
132
170
<a name="gimp-file-entry-new"></a><h3>gimp_file_entry_new ()</h3>
133
<pre class="programlisting">GtkWidget* gimp_file_entry_new (const gchar *title,
134
const gchar *filename,
136
gboolean check_valid);</pre>
171
<pre class="programlisting"><a
172
href="/usr/share/gtk-doc/html/gtk/GtkWidget.html"
173
>GtkWidget</a>* gimp_file_entry_new (const <a
174
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
177
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
178
>gchar</a> *filename,
180
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
181
>gboolean</a> dir_only,
183
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
184
>gboolean</a> check_valid);</pre>
137
185
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
138
186
<h3 class="title">Warning</h3>
139
187
<p><code class="literal">gimp_file_entry_new</code> is deprecated and should not be used in newly-written code.</p>
142
You should use <span class="type">GtkFileChooserButton</span> instead.</p>
191
href="/usr/share/gtk-doc/html/gtk/GtkFileChooserButton.html"
192
><span class="type">GtkFileChooserButton</span></a> instead.</p>
160
210
<td><p><span class="term"><em class="parameter"><code>dir_only</code></em> :</span></p></td>
161
<td> <code class="literal">TRUE</code> if the file entry should accept directories only.
212
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
213
><code class="literal">TRUE</code></a> if the file entry should accept directories only.
165
217
<td><p><span class="term"><em class="parameter"><code>check_valid</code></em> :</span></p></td>
166
<td> <code class="literal">TRUE</code> if the widget should check if the entered file
219
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
220
><code class="literal">TRUE</code></a> if the widget should check if the entered file
179
233
<div class="refsect2" lang="en">
180
234
<a name="gimp-file-entry-get-filename"></a><h3>gimp_file_entry_get_filename ()</h3>
181
<pre class="programlisting">gchar* gimp_file_entry_get_filename (<a class="link" href="GimpFileEntry.html" title="GimpFileEntry">GimpFileEntry</a> *entry);</pre>
235
<pre class="programlisting"><a
236
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
237
>gchar</a>* gimp_file_entry_get_filename (<a class="link" href="GimpFileEntry.html" title="GimpFileEntry">GimpFileEntry</a> *entry);</pre>
182
238
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
183
239
<h3 class="title">Warning</h3>
184
240
<p><code class="literal">gimp_file_entry_get_filename</code> is deprecated and should not be used in newly-written code.</p>
187
Note that you have to <code class="function">g_free()</code> the returned string.</p>
243
Note that you have to <a
244
href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
245
><code class="function">g_free()</code></a> the returned string.</p>
208
266
<div class="refsect2" lang="en">
209
267
<a name="gimp-file-entry-set-filename"></a><h3>gimp_file_entry_set_filename ()</h3>
210
268
<pre class="programlisting">void gimp_file_entry_set_filename (<a class="link" href="GimpFileEntry.html" title="GimpFileEntry">GimpFileEntry</a> *entry,
211
const gchar *filename);</pre>
270
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
271
>gchar</a> *filename);</pre>
212
272
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
213
273
<h3 class="title">Warning</h3>
214
274
<p><code class="literal">gimp_file_entry_set_filename</code> is deprecated and should not be used in newly-written code.</p>
217
If you specified <em class="parameter"><code>check_valid</code></em> as <code class="literal">TRUE</code> in <a class="link" href="GimpFileEntry.html#gimp-file-entry-new" title="gimp_file_entry_new ()"><code class="function">gimp_file_entry_new()</code></a>
277
If you specified <em class="parameter"><code>check_valid</code></em> as <a
278
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
279
><code class="literal">TRUE</code></a> in <a class="link" href="GimpFileEntry.html#gimp-file-entry-new" title="gimp_file_entry_new ()"><code class="function">gimp_file_entry_new()</code></a>
218
280
the <a class="link" href="GimpFileEntry.html" title="GimpFileEntry"><span class="type">GimpFileEntry</span></a> will immediately check the validity of the file
242
304
<div class="refsect2" lang="en">
243
305
<a name="GimpFileEntry-filename-changed"></a><h3>The <code class="literal">"filename-changed"</code> signal</h3>
244
306
<pre class="programlisting">void user_function (<a class="link" href="GimpFileEntry.html" title="GimpFileEntry">GimpFileEntry</a> *arg0,
245
gpointer user_data) : Run First</pre>
308
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"
309
>gpointer</a> user_data) : Run First</pre>
247
311
This signal is emitted whenever the user changes the filename.</p>