Blob Blame History Raw
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkDialog: GTK+ 2 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GTK+ 2 Reference Manual">
<link rel="up" href="WindowWidgets.html" title="Windows">
<link rel="prev" href="WindowWidgets.html" title="Windows">
<link rel="next" href="GtkInvisible.html" title="GtkInvisible">
<meta name="generator" content="GTK-Doc V1.26.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#GtkDialog.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#GtkDialog.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces">  <span class="dim">|</span> 
                  <a href="#GtkDialog.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties">  <span class="dim">|</span> 
                  <a href="#GtkDialog.properties" class="shortcut">Properties</a></span><span id="nav_style_properties">  <span class="dim">|</span> 
                  <a href="#GtkDialog.style-properties" class="shortcut">Style Properties</a></span><span id="nav_signals">  <span class="dim">|</span> 
                  <a href="#GtkDialog.signals" class="shortcut">Signals</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="WindowWidgets.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="WindowWidgets.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GtkInvisible.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GtkDialog"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GtkDialog.top_of_page"></a>GtkDialog</span></h2>
<p>GtkDialog</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GtkDialog.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-new" title="gtk_dialog_new ()">gtk_dialog_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-new-with-buttons" title="gtk_dialog_new_with_buttons ()">gtk_dialog_new_with_buttons</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()">gtk_dialog_run</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-response" title="gtk_dialog_response ()">gtk_dialog_response</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-add-button" title="gtk_dialog_add_button ()">gtk_dialog_add_button</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-add-buttons" title="gtk_dialog_add_buttons ()">gtk_dialog_add_buttons</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-add-action-widget" title="gtk_dialog_add_action_widget ()">gtk_dialog_add_action_widget</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-get-has-separator" title="gtk_dialog_get_has_separator ()">gtk_dialog_get_has_separator</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-set-default-response" title="gtk_dialog_set_default_response ()">gtk_dialog_set_default_response</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-set-has-separator" title="gtk_dialog_set_has_separator ()">gtk_dialog_set_has_separator</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-set-response-sensitive" title="gtk_dialog_set_response_sensitive ()">gtk_dialog_set_response_sensitive</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-get-response-for-widget" title="gtk_dialog_get_response_for_widget ()">gtk_dialog_get_response_for_widget</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-get-widget-for-response" title="gtk_dialog_get_widget_for_response ()">gtk_dialog_get_widget_for_response</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-get-action-area" title="gtk_dialog_get_action_area ()">gtk_dialog_get_action_area</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-get-content-area" title="gtk_dialog_get_content_area ()">gtk_dialog_get_content_area</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-alternative-dialog-button-order" title="gtk_alternative_dialog_button_order ()">gtk_alternative_dialog_button_order</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-set-alternative-button-order" title="gtk_dialog_set_alternative_button_order ()">gtk_dialog_set_alternative_button_order</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-set-alternative-button-order-from-array" title="gtk_dialog_set_alternative_button_order_from_array ()">gtk_dialog_set_alternative_button_order_from_array</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkDialog.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody><tr>
<td class="property_type"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
<td class="property_name"><a class="link" href="GtkDialog.html#GtkDialog--has-separator" title="The “has-separator” property">has-separator</a></td>
<td class="property_flags">Read / Write</td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkDialog.style-properties"></a><h2>Style Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="style_properties_type">
<col width="300px" class="style_properties_name">
<col width="200px" class="style_properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type"><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
<td class="property_name"><a class="link" href="GtkDialog.html#GtkDialog--s-action-area-border" title="The “action-area-border” style property">action-area-border</a></td>
<td class="property_flags">Read</td>
</tr>
<tr>
<td class="property_type"><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
<td class="property_name"><a class="link" href="GtkDialog.html#GtkDialog--s-button-spacing" title="The “button-spacing” style property">button-spacing</a></td>
<td class="property_flags">Read</td>
</tr>
<tr>
<td class="property_type"><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
<td class="property_name"><a class="link" href="GtkDialog.html#GtkDialog--s-content-area-border" title="The “content-area-border” style property">content-area-border</a></td>
<td class="property_flags">Read</td>
</tr>
<tr>
<td class="property_type"><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
<td class="property_name"><a class="link" href="GtkDialog.html#GtkDialog--s-content-area-spacing" title="The “content-area-spacing” style property">content-area-spacing</a></td>
<td class="property_flags">Read</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkDialog.signals"></a><h2>Signals</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="signals_return">
<col width="300px" class="signals_name">
<col width="200px" class="signals_flags">
</colgroup>
<tbody>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GtkDialog.html#GtkDialog-close" title="The “close” signal">close</a></td>
<td class="signal_flags"><a href="../gobject/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></td>
</tr>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GtkDialog.html#GtkDialog-response" title="The “response” signal">response</a></td>
<td class="signal_flags"><a href="../gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkDialog.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GtkDialog.html#GtkDialog-struct" title="struct GtkDialog">GtkDialog</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="GtkDialog.html#GtkDialogFlags" title="enum GtkDialogFlags">GtkDialogFlags</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="GtkDialog.html#GtkResponseType" title="enum GtkResponseType">GtkResponseType</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkDialog.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    <a href="../gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
    <span class="lineart">╰──</span> <a href="../gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
        <span class="lineart">╰──</span> <a class="link" href="GtkObject.html" title="GtkObject">GtkObject</a>
            <span class="lineart">╰──</span> <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
                <span class="lineart">╰──</span> <a class="link" href="GtkContainer.html" title="GtkContainer">GtkContainer</a>
                    <span class="lineart">╰──</span> <a class="link" href="GtkBin.html" title="GtkBin">GtkBin</a>
                        <span class="lineart">╰──</span> <a class="link" href="GtkWindow.html" title="GtkWindow">GtkWindow</a>
                            <span class="lineart">╰──</span> GtkDialog
                                <span class="lineart">├──</span> <a class="link" href="GtkAboutDialog.html" title="GtkAboutDialog">GtkAboutDialog</a>
                                <span class="lineart">├──</span> <a class="link" href="GtkColorSelectionDialog.html" title="GtkColorSelectionDialog">GtkColorSelectionDialog</a>
                                <span class="lineart">├──</span> <a class="link" href="GtkFileChooserDialog.html" title="GtkFileChooserDialog">GtkFileChooserDialog</a>
                                <span class="lineart">├──</span> <a class="link" href="GtkFileSelection.html" title="GtkFileSelection">GtkFileSelection</a>
                                <span class="lineart">├──</span> <a class="link" href="GtkFontSelectionDialog.html" title="GtkFontSelectionDialog">GtkFontSelectionDialog</a>
                                <span class="lineart">├──</span> <a class="link" href="GtkInputDialog.html" title="GtkInputDialog">GtkInputDialog</a>
                                <span class="lineart">├──</span> <a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog">GtkMessageDialog</a>
                                <span class="lineart">├──</span> <a class="link" href="GtkPageSetupUnixDialog.html" title="GtkPageSetupUnixDialog">GtkPageSetupUnixDialog</a>
                                <span class="lineart">├──</span> <a class="link" href="GtkPrintUnixDialog.html" title="GtkPrintUnixDialog">GtkPrintUnixDialog</a>
                                <span class="lineart">╰──</span> <a class="link" href="GtkRecentChooserDialog.html" title="GtkRecentChooserDialog">GtkRecentChooserDialog</a>
</pre>
</div>
<div class="refsect1">
<a name="GtkDialog.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
GtkDialog implements
 AtkImplementorIface and  <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a>.</p>
</div>
<div class="refsect1">
<a name="GtkDialog.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gtk/gtk.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GtkDialog.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="GtkDialog.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gtk-dialog-new"></a><h3>gtk_dialog_new ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_dialog_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-new-with-buttons"></a><h3>gtk_dialog_new_with_buttons ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_dialog_new_with_buttons (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *title</code></em>,
                             <em class="parameter"><code><a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a> *parent</code></em>,
                             <em class="parameter"><code><a class="link" href="GtkDialog.html#GtkDialogFlags" title="enum GtkDialogFlags"><span class="type">GtkDialogFlags</span></a> flags</code></em>,
                             <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_button_text</code></em>,
                             <em class="parameter"><code>...</code></em>);</pre>
<p>Creates a new <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> with title <em class="parameter"><code>title</code></em>
 (or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for the default
title; see <a class="link" href="GtkWindow.html#gtk-window-set-title" title="gtk_window_set_title ()"><code class="function">gtk_window_set_title()</code></a>) and transient parent <em class="parameter"><code>parent</code></em>
 (or
<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for none; see <a class="link" href="GtkWindow.html#gtk-window-set-transient-for" title="gtk_window_set_transient_for ()"><code class="function">gtk_window_set_transient_for()</code></a>). The <em class="parameter"><code>flags</code></em>

argument can be used to make the dialog modal (<a class="link" href="GtkDialog.html#GTK-DIALOG-MODAL:CAPS"><span class="type">GTK_DIALOG_MODAL</span></a>)
and/or to have it destroyed along with its transient parent
(<a class="link" href="GtkDialog.html#GTK-DIALOG-DESTROY-WITH-PARENT:CAPS"><span class="type">GTK_DIALOG_DESTROY_WITH_PARENT</span></a>). After <em class="parameter"><code>flags</code></em>
, button
text/response ID pairs should be listed, with a <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> pointer ending
the list. Button text can be either a stock ID such as
<a class="link" href="gtk2-Stock-Items.html#GTK-STOCK-OK:CAPS" title="GTK_STOCK_OK"><span class="type">GTK_STOCK_OK</span></a>, or some arbitrary text. A response ID can be
any positive number, or one of the values in the <a class="link" href="GtkDialog.html#GtkResponseType" title="enum GtkResponseType"><span class="type">GtkResponseType</span></a>
enumeration. If the user clicks one of these dialog buttons,
<a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> will emit the <a class="link" href="GtkDialog.html#GtkDialog-response" title="The “response” signal"><span class="type">“response”</span></a> signal with the corresponding
response ID. If a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> receives the <a class="link" href="GtkWidget.html#GtkWidget-delete-event" title="The “delete-event” signal"><span class="type">“delete-event”</span></a> signal, 
it will emit ::response with a response ID of <a class="link" href="GtkDialog.html#GTK-RESPONSE-DELETE-EVENT:CAPS"><span class="type">GTK_RESPONSE_DELETE_EVENT</span></a>.
However, destroying a dialog does not emit the ::response signal;
so be careful relying on ::response when using the 
<a class="link" href="GtkDialog.html#GTK-DIALOG-DESTROY-WITH-PARENT:CAPS"><span class="type">GTK_DIALOG_DESTROY_WITH_PARENT</span></a> flag. Buttons are from left to right,
so the first button in the list will be the leftmost button in the dialog.</p>
<p>Here's a simple example:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8</pre></td>
        <td class="listing_code"><pre class="programlisting">GtkWidget <span class="gtkdoc opt">*</span>dialog <span class="gtkdoc opt">=</span> <span class="function"><a href="GtkDialog.html#gtk-dialog-new-with-buttons">gtk_dialog_new_with_buttons</a></span> <span class="gtkdoc opt">(</span><span class="string">&quot;My dialog&quot;</span><span class="gtkdoc opt">,</span>
                                                 main_app_window<span class="gtkdoc opt">,</span>
                                                 GTK_DIALOG_MODAL <span class="gtkdoc opt">|</span> GTK_DIALOG_DESTROY_WITH_PARENT<span class="gtkdoc opt">,</span>
                                                 GTK_STOCK_OK<span class="gtkdoc opt">,</span>
                                                 GTK_RESPONSE_ACCEPT<span class="gtkdoc opt">,</span>
                                                 GTK_STOCK_CANCEL<span class="gtkdoc opt">,</span>
                                                 GTK_RESPONSE_REJECT<span class="gtkdoc opt">,</span>
                                                 NULL<span class="gtkdoc opt">);</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
<div class="refsect3">
<a name="gtk-dialog-new-with-buttons.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>title</p></td>
<td class="parameter_description"><p>Title of the dialog, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>parent</p></td>
<td class="parameter_description"><p>Transient parent of the dialog, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>from <a class="link" href="GtkDialog.html#GtkDialogFlags" title="enum GtkDialogFlags"><span class="type">GtkDialogFlags</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>first_button_text</p></td>
<td class="parameter_description"><p>stock ID or text to go in first button, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>Varargs</p></td>
<td class="parameter_description"><p>response ID for first button, then additional buttons, ending with <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-dialog-new-with-buttons.returns"></a><h4>Returns</h4>
<p> a new <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-run"></a><h3>gtk_dialog_run ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
gtk_dialog_run (<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>);</pre>
<p>Blocks in a recursive main loop until the <em class="parameter"><code>dialog</code></em>
 either emits the
<a class="link" href="GtkDialog.html#GtkDialog-response" title="The “response” signal"><span class="type">“response”</span></a> signal, or is destroyed. If the dialog is 
destroyed during the call to <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a>, <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a> returns 
<a class="link" href="GtkDialog.html#GTK-RESPONSE-NONE:CAPS"><span class="type">GTK_RESPONSE_NONE</span></a>. Otherwise, it returns the response ID from the 
::response signal emission.</p>
<p>Before entering the recursive main loop, <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a> calls
<a class="link" href="GtkWidget.html#gtk-widget-show" title="gtk_widget_show ()"><code class="function">gtk_widget_show()</code></a> on the dialog for you. Note that you still
need to show any children of the dialog yourself.</p>
<p>During <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a>, the default behavior of <a class="link" href="GtkWidget.html#GtkWidget-delete-event" title="The “delete-event” signal"><span class="type">“delete-event”</span></a> 
is disabled; if the dialog receives ::delete_event, it will not be
destroyed as windows usually are, and <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a> will return
<a class="link" href="GtkDialog.html#GTK-RESPONSE-DELETE-EVENT:CAPS"><span class="type">GTK_RESPONSE_DELETE_EVENT</span></a>. Also, during <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a> the dialog 
will be modal. You can force <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a> to return at any time by
calling <a class="link" href="GtkDialog.html#gtk-dialog-response" title="gtk_dialog_response ()"><code class="function">gtk_dialog_response()</code></a> to emit the ::response signal. Destroying 
the dialog during <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a> is a very bad idea, because your 
post-run code won't know whether the dialog was destroyed or not.</p>
<p>After <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a> returns, you are responsible for hiding or
destroying the dialog if you wish to do so.</p>
<p>Typical usage of this function might be:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11</pre></td>
        <td class="listing_code"><pre class="programlisting">gint result <span class="gtkdoc opt">=</span> <span class="function"><a href="GtkDialog.html#gtk-dialog-run">gtk_dialog_run</a></span> <span class="gtkdoc opt">(</span><span class="function">GTK_DIALOG</span> <span class="gtkdoc opt">(</span>dialog<span class="gtkdoc opt">));</span>
<span class="keyword">switch</span> <span class="gtkdoc opt">(</span>result<span class="gtkdoc opt">)</span>
  <span class="gtkdoc opt">{</span>
    <span class="keyword">case</span> GTK_RESPONSE_ACCEPT<span class="gtkdoc opt">:</span>
       <span class="function">do_application_specific_something</span> <span class="gtkdoc opt">();</span>
       <span class="keyword">break</span><span class="gtkdoc opt">;</span>
    <span class="keyword">default</span><span class="gtkdoc opt">:</span>
       <span class="function">do_nothing_since_dialog_was_cancelled</span> <span class="gtkdoc opt">();</span>
       <span class="keyword">break</span><span class="gtkdoc opt">;</span>
  <span class="gtkdoc opt">}</span>
<span class="function"><a href="GtkWidget.html#gtk-widget-destroy">gtk_widget_destroy</a></span> <span class="gtkdoc opt">(</span>dialog<span class="gtkdoc opt">);</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
<p>Note that even though the recursive main loop gives the effect of a
modal dialog (it prevents the user from interacting with other 
windows in the same window group while the dialog is run), callbacks 
such as timeouts, IO channel watches, DND drops, etc, <span class="emphasis"><em>will</em></span> 
be triggered during a <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a> call.</p>
<div class="refsect3">
<a name="gtk-dialog-run.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-dialog-run.returns"></a><h4>Returns</h4>
<p> response ID</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-response"></a><h3>gtk_dialog_response ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_dialog_response (<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>,
                     <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> response_id</code></em>);</pre>
<p>Emits the <a class="link" href="GtkDialog.html#GtkDialog-response" title="The “response” signal"><span class="type">“response”</span></a> signal with the given response ID. 
Used to indicate that the user has responded to the dialog in some way;
typically either you or <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a> will be monitoring the
::response signal and take appropriate action.</p>
<div class="refsect3">
<a name="gtk-dialog-response.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>response_id</p></td>
<td class="parameter_description"><p>response ID </p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-add-button"></a><h3>gtk_dialog_add_button ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_dialog_add_button (<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>,
                       <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *button_text</code></em>,
                       <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> response_id</code></em>);</pre>
<p>Adds a button with the given text (or a stock button, if <em class="parameter"><code>button_text</code></em>
 is a
stock ID) and sets things up so that clicking the button will emit the
<a class="link" href="GtkDialog.html#GtkDialog-response" title="The “response” signal"><span class="type">“response”</span></a> signal with the given <em class="parameter"><code>response_id</code></em>
. The button is 
appended to the end of the dialog's action area. The button widget is 
returned, but usually you don't need it.</p>
<div class="refsect3">
<a name="gtk-dialog-add-button.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>button_text</p></td>
<td class="parameter_description"><p>text of button, or stock ID</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>response_id</p></td>
<td class="parameter_description"><p>response ID for the button</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-dialog-add-button.returns"></a><h4>Returns</h4>
<p>the button widget that was added. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-add-buttons"></a><h3>gtk_dialog_add_buttons ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_dialog_add_buttons (<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>,
                        <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_button_text</code></em>,
                        <em class="parameter"><code>...</code></em>);</pre>
<p>Adds more buttons, same as calling <a class="link" href="GtkDialog.html#gtk-dialog-add-button" title="gtk_dialog_add_button ()"><code class="function">gtk_dialog_add_button()</code></a>
repeatedly.  The variable argument list should be <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated
as with <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>. Each button must have both
text and response ID.</p>
<div class="refsect3">
<a name="gtk-dialog-add-buttons.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>first_button_text</p></td>
<td class="parameter_description"><p>button text or stock ID</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>Varargs</p></td>
<td class="parameter_description"><p>response ID for first button, then more text-response_id pairs</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-add-action-widget"></a><h3>gtk_dialog_add_action_widget ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_dialog_add_action_widget (<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>,
                              <em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
                              <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> response_id</code></em>);</pre>
<p>Adds an activatable widget to the action area of a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a>,
connecting a signal handler that will emit the <a class="link" href="GtkDialog.html#GtkDialog-response" title="The “response” signal"><span class="type">“response”</span></a> 
signal on the dialog when the widget is activated. The widget is 
appended to the end of the dialog's action area. If you want to add a
non-activatable widget, simply pack it into the <em class="parameter"><code>action_area</code></em>
 field 
of the <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> struct.</p>
<div class="refsect3">
<a name="gtk-dialog-add-action-widget.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>child</p></td>
<td class="parameter_description"><p>an activatable widget</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>response_id</p></td>
<td class="parameter_description"><p>response ID for <em class="parameter"><code>child</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-get-has-separator"></a><h3>gtk_dialog_get_has_separator ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gtk_dialog_get_has_separator (<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>);</pre>
<div class="warning">
<p><code class="literal">gtk_dialog_get_has_separator</code> has been deprecated since version 2.22 and should not be used in newly-written code.</p>
<p>This function will be removed in GTK+ 3</p>
</div>
<p>Accessor for whether the dialog has a separator.</p>
<div class="refsect3">
<a name="gtk-dialog-get-has-separator.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-dialog-get-has-separator.returns"></a><h4>Returns</h4>
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the dialog has a separator</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-set-default-response"></a><h3>gtk_dialog_set_default_response ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_dialog_set_default_response (<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>,
                                 <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> response_id</code></em>);</pre>
<p>Sets the last widget in the dialog's action area with the given <em class="parameter"><code>response_id</code></em>

as the default widget for the dialog. Pressing "Enter" normally activates
the default widget.</p>
<div class="refsect3">
<a name="gtk-dialog-set-default-response.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>response_id</p></td>
<td class="parameter_description"><p>a response ID</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-set-has-separator"></a><h3>gtk_dialog_set_has_separator ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_dialog_set_has_separator (<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>,
                              <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> setting</code></em>);</pre>
<div class="warning">
<p><code class="literal">gtk_dialog_set_has_separator</code> has been deprecated since version 2.22 and should not be used in newly-written code.</p>
<p>This function will be removed in GTK+ 3</p>
</div>
<p>Sets whether the dialog has a separator above the buttons.</p>
<div class="refsect3">
<a name="gtk-dialog-set-has-separator.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>setting</p></td>
<td class="parameter_description"><p><a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to have a separator</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-set-response-sensitive"></a><h3>gtk_dialog_set_response_sensitive ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_dialog_set_response_sensitive (<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>,
                                   <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> response_id</code></em>,
                                   <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> setting</code></em>);</pre>
<p>Calls <code class="literal">gtk_widget_set_sensitive (widget, <em class="parameter"><code>setting</code></em>
)</code> 
for each widget in the dialog's action area with the given <em class="parameter"><code>response_id</code></em>
.
A convenient way to sensitize/desensitize dialog buttons.</p>
<div class="refsect3">
<a name="gtk-dialog-set-response-sensitive.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>response_id</p></td>
<td class="parameter_description"><p>a response ID</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>setting</p></td>
<td class="parameter_description"><p><a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> for sensitive</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-get-response-for-widget"></a><h3>gtk_dialog_get_response_for_widget ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
gtk_dialog_get_response_for_widget (<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>,
                                    <em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
<p>Gets the response id of a widget in the action area
of a dialog.</p>
<div class="refsect3">
<a name="gtk-dialog-get-response-for-widget.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>widget</p></td>
<td class="parameter_description"><p>a widget in the action area of <em class="parameter"><code>dialog</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-dialog-get-response-for-widget.returns"></a><h4>Returns</h4>
<p> the response id of <em class="parameter"><code>widget</code></em>
, or <a class="link" href="GtkDialog.html#GTK-RESPONSE-NONE:CAPS"><code class="literal">GTK_RESPONSE_NONE</code></a>
if <em class="parameter"><code>widget</code></em>
doesn't have a response id set.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-8.html#api-index-2.8">2.8</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-get-widget-for-response"></a><h3>gtk_dialog_get_widget_for_response ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_dialog_get_widget_for_response (<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>,
                                    <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> response_id</code></em>);</pre>
<p>Gets the widget button that uses the given response ID in the action area
of a dialog.</p>
<div class="refsect3">
<a name="gtk-dialog-get-widget-for-response.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>response_id</p></td>
<td class="parameter_description"><p>the response ID used by the <em class="parameter"><code>dialog</code></em>
widget</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-dialog-get-widget-for-response.returns"></a><h4>Returns</h4>
<p>the <em class="parameter"><code>widget</code></em>
button that uses the given <em class="parameter"><code>response_id</code></em>
, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-20.html#api-index-2.20">2.20</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-get-action-area"></a><h3>gtk_dialog_get_action_area ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_dialog_get_action_area (<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>);</pre>
<p>Returns the action area of <em class="parameter"><code>dialog</code></em>
.</p>
<div class="refsect3">
<a name="gtk-dialog-get-action-area.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-dialog-get-action-area.returns"></a><h4>Returns</h4>
<p>the action area. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-14.html#api-index-2.14">2.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-get-content-area"></a><h3>gtk_dialog_get_content_area ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_dialog_get_content_area (<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>);</pre>
<p>Returns the content area of <em class="parameter"><code>dialog</code></em>
.</p>
<div class="refsect3">
<a name="gtk-dialog-get-content-area.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-dialog-get-content-area.returns"></a><h4>Returns</h4>
<p>the content area <a class="link" href="GtkVBox.html" title="GtkVBox"><span class="type">GtkVBox</span></a>. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-14.html#api-index-2.14">2.14</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-alternative-dialog-button-order"></a><h3>gtk_alternative_dialog_button_order ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gtk_alternative_dialog_button_order (<em class="parameter"><code><a href="../html/GdkScreen.html#GdkScreen-struct"><span class="type">GdkScreen</span></a> *screen</code></em>);</pre>
<p>Returns <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if dialogs are expected to use an alternative
button order on the screen <em class="parameter"><code>screen</code></em>
. See
<a class="link" href="GtkDialog.html#gtk-dialog-set-alternative-button-order" title="gtk_dialog_set_alternative_button_order ()"><code class="function">gtk_dialog_set_alternative_button_order()</code></a> for more details
about alternative button order. </p>
<p>If you need to use this function, you should probably connect
to the ::notify:gtk-alternative-button-order signal on the
<a class="link" href="GtkSettings.html" title="GtkSettings"><span class="type">GtkSettings</span></a> object associated to <em class="parameter"><code>screen</code></em>
, in order to be 
notified if the button order setting changes.</p>
<div class="refsect3">
<a name="gtk-alternative-dialog-button-order.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>screen</p></td>
<td class="parameter_description"><p>a <a href="../html/GdkScreen.html#GdkScreen-struct"><span class="type">GdkScreen</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to use the default screen. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-alternative-dialog-button-order.returns"></a><h4>Returns</h4>
<p> Whether the alternative button order should be used</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-6.html#api-index-2.6">2.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-set-alternative-button-order"></a><h3>gtk_dialog_set_alternative_button_order ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_dialog_set_alternative_button_order
                               (<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>,
                                <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> first_response_id</code></em>,
                                <em class="parameter"><code>...</code></em>);</pre>
<p>Sets an alternative button order. If the 
<a class="link" href="GtkSettings.html#GtkSettings--gtk-alternative-button-order" title="The “gtk-alternative-button-order” property"><span class="type">“gtk-alternative-button-order”</span></a> setting is set to <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, 
the dialog buttons are reordered according to the order of the 
response ids passed to this function.</p>
<p>By default, GTK+ dialogs use the button order advocated by the Gnome </p>
<a class="ulink" href="http://developer.gnome.org/projects/gup/hig/2.0/" target="_top">Human 
Interface Guidelines</a> with the affirmative button at the far 
<p>right, and the cancel button left of it. But the builtin GTK+ dialogs
and <a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a>s do provide an alternative button order,
which is more suitable on some platforms, e.g. Windows.</p>
<p>Use this function after adding all the buttons to your dialog, as the 
following example shows:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19</pre></td>
        <td class="listing_code"><pre class="programlisting">cancel_button <span class="gtkdoc opt">=</span> <span class="function"><a href="GtkDialog.html#gtk-dialog-add-button">gtk_dialog_add_button</a></span> <span class="gtkdoc opt">(</span><span class="function">GTK_DIALOG</span> <span class="gtkdoc opt">(</span>dialog<span class="gtkdoc opt">),</span>
                                       GTK_STOCK_CANCEL<span class="gtkdoc opt">,</span>
                                       GTK_RESPONSE_CANCEL<span class="gtkdoc opt">);</span>
 
ok_button <span class="gtkdoc opt">=</span> <span class="function"><a href="GtkDialog.html#gtk-dialog-add-button">gtk_dialog_add_button</a></span> <span class="gtkdoc opt">(</span><span class="function">GTK_DIALOG</span> <span class="gtkdoc opt">(</span>dialog<span class="gtkdoc opt">),</span>
                                   GTK_STOCK_OK<span class="gtkdoc opt">,</span>
                                   GTK_RESPONSE_OK<span class="gtkdoc opt">);</span>
  
<span class="function"><a href="GtkWidget.html#gtk-widget-grab-default">gtk_widget_grab_default</a></span> <span class="gtkdoc opt">(</span>ok_button<span class="gtkdoc opt">);</span>
  
help_button <span class="gtkdoc opt">=</span> <span class="function"><a href="GtkDialog.html#gtk-dialog-add-button">gtk_dialog_add_button</a></span> <span class="gtkdoc opt">(</span><span class="function">GTK_DIALOG</span> <span class="gtkdoc opt">(</span>dialog<span class="gtkdoc opt">),</span>
                                     GTK_STOCK_HELP<span class="gtkdoc opt">,</span>
                                     GTK_RESPONSE_HELP<span class="gtkdoc opt">);</span>
 
<span class="function"><a href="GtkDialog.html#gtk-dialog-set-alternative-button-order">gtk_dialog_set_alternative_button_order</a></span> <span class="gtkdoc opt">(</span><span class="function">GTK_DIALOG</span> <span class="gtkdoc opt">(</span>dialog<span class="gtkdoc opt">),</span>
                                         GTK_RESPONSE_OK<span class="gtkdoc opt">,</span>
                                         GTK_RESPONSE_CANCEL<span class="gtkdoc opt">,</span>
                                         GTK_RESPONSE_HELP<span class="gtkdoc opt">,</span>
                                         <span class="gtkdoc opt">-</span><span class="number">1</span><span class="gtkdoc opt">);</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
<div class="refsect3">
<a name="gtk-dialog-set-alternative-button-order.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>first_response_id</p></td>
<td class="parameter_description"><p>a response id used by one <em class="parameter"><code>dialog</code></em>
's buttons</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>Varargs</p></td>
<td class="parameter_description"><p>a list of more response ids of <em class="parameter"><code>dialog</code></em>
's buttons, terminated by -1</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-6.html#api-index-2.6">2.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-set-alternative-button-order-from-array"></a><h3>gtk_dialog_set_alternative_button_order_from_array ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_dialog_set_alternative_button_order_from_array
                               (<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>,
                                <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_params</code></em>,
                                <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *new_order</code></em>);</pre>
<p>Sets an alternative button order. If the 
<a class="link" href="GtkSettings.html#GtkSettings--gtk-alternative-button-order" title="The “gtk-alternative-button-order” property"><span class="type">“gtk-alternative-button-order”</span></a> setting is set to <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, 
the dialog buttons are reordered according to the order of the 
response ids in <em class="parameter"><code>new_order</code></em>
.</p>
<p>See <a class="link" href="GtkDialog.html#gtk-dialog-set-alternative-button-order" title="gtk_dialog_set_alternative_button_order ()"><code class="function">gtk_dialog_set_alternative_button_order()</code></a> for more information.</p>
<p>This function is for use by language bindings.</p>
<div class="refsect3">
<a name="gtk-dialog-set-alternative-button-order-from-array.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_params</p></td>
<td class="parameter_description"><p>the number of response ids in <em class="parameter"><code>new_order</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>new_order</p></td>
<td class="parameter_description"><p>an array of response ids of
<em class="parameter"><code>dialog</code></em>
's buttons. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_params]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-6.html#api-index-2.6">2.6</a></p>
</div>
</div>
<div class="refsect1">
<a name="GtkDialog.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GtkDialog-struct"></a><h3>struct GtkDialog</h3>
<pre class="programlisting">struct GtkDialog {
  GtkWidget *GSEAL (vbox);
  GtkWidget *GSEAL (action_area);
};
</pre>
</div>
<hr>
<div class="refsect2">
<a name="GtkDialogFlags"></a><h3>enum GtkDialogFlags</h3>
<div class="refsect3">
<a name="GtkDialogFlags.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GTK-DIALOG-MODAL:CAPS"></a>GTK_DIALOG_MODAL</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-DIALOG-DESTROY-WITH-PARENT:CAPS"></a>GTK_DIALOG_DESTROY_WITH_PARENT</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-DIALOG-NO-SEPARATOR:CAPS"></a>GTK_DIALOG_NO_SEPARATOR</p></td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GtkResponseType"></a><h3>enum GtkResponseType</h3>
<div class="refsect3">
<a name="GtkResponseType.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GTK-RESPONSE-NONE:CAPS"></a>GTK_RESPONSE_NONE</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-RESPONSE-REJECT:CAPS"></a>GTK_RESPONSE_REJECT</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-RESPONSE-ACCEPT:CAPS"></a>GTK_RESPONSE_ACCEPT</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-RESPONSE-DELETE-EVENT:CAPS"></a>GTK_RESPONSE_DELETE_EVENT</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-RESPONSE-OK:CAPS"></a>GTK_RESPONSE_OK</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-RESPONSE-CANCEL:CAPS"></a>GTK_RESPONSE_CANCEL</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-RESPONSE-CLOSE:CAPS"></a>GTK_RESPONSE_CLOSE</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-RESPONSE-YES:CAPS"></a>GTK_RESPONSE_YES</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-RESPONSE-NO:CAPS"></a>GTK_RESPONSE_NO</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-RESPONSE-APPLY:CAPS"></a>GTK_RESPONSE_APPLY</p></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-RESPONSE-HELP:CAPS"></a>GTK_RESPONSE_HELP</p></td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="GtkDialog.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GtkDialog--has-separator"></a><h3>The <code class="literal">“has-separator”</code> property</h3>
<pre class="programlisting">  “has-separator”            <a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>When <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, the dialog has a separator bar above its buttons.</p>
<div class="warning">
<p><code class="literal">GtkDialog:has-separator</code> has been deprecated since version 2.22 and should not be used in newly-written code.</p>
<p>This property will be removed in GTK+ 3.</p>
</div>
<p>Flags: Read / Write</p>
<p>Default value: FALSE</p>
</div>
</div>
<div class="refsect1">
<a name="GtkDialog.style-property-details"></a><h2>Style Property Details</h2>
<div class="refsect2">
<a name="GtkDialog--s-action-area-border"></a><h3>The <code class="literal">“action-area-border”</code> style property</h3>
<pre class="programlisting">  “action-area-border”       <a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
<p>Width of border around the button area at the bottom of the dialog.</p>
<p>Flags: Read</p>
<p>Allowed values: &gt;= 0</p>
<p>Default value: 5</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkDialog--s-button-spacing"></a><h3>The <code class="literal">“button-spacing”</code> style property</h3>
<pre class="programlisting">  “button-spacing”           <a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
<p>Spacing between buttons.</p>
<p>Flags: Read</p>
<p>Allowed values: &gt;= 0</p>
<p>Default value: 6</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkDialog--s-content-area-border"></a><h3>The <code class="literal">“content-area-border”</code> style property</h3>
<pre class="programlisting">  “content-area-border”      <a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
<p>Width of border around the main dialog area.</p>
<p>Flags: Read</p>
<p>Allowed values: &gt;= 0</p>
<p>Default value: 2</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkDialog--s-content-area-spacing"></a><h3>The <code class="literal">“content-area-spacing”</code> style property</h3>
<pre class="programlisting">  “content-area-spacing”     <a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
<p>The default spacing used between elements of the
content area of the dialog, as returned by
<a class="link" href="GtkDialog.html#gtk-dialog-get-content-area" title="gtk_dialog_get_content_area ()"><code class="function">gtk_dialog_get_content_area()</code></a>, unless <a class="link" href="GtkBox.html#gtk-box-set-spacing" title="gtk_box_set_spacing ()"><code class="function">gtk_box_set_spacing()</code></a>
was called on that widget directly.</p>
<p>Flags: Read</p>
<p>Allowed values: &gt;= 0</p>
<p>Default value: 0</p>
<p class="since">Since: <a class="link" href="api-index-2-16.html#api-index-2.16">2.16</a></p>
</div>
</div>
<div class="refsect1">
<a name="GtkDialog.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="GtkDialog-close"></a><h3>The <code class="literal">“close”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog,
               <a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>   user_data)</pre>
<p>The ::close signal is a </p>
keybinding signal<p>which gets emitted when the user uses a keybinding to close
the dialog.</p>
<p>The default binding for this signal is the Escape key.</p>
<div class="refsect3">
<a name="GtkDialog-close.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p>Flags: <a href="../gobject/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GtkDialog-response"></a><h3>The <code class="literal">“response”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog,
               <a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a>       response_id,
               <a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>   user_data)</pre>
<p>Emitted when an action widget is clicked, the dialog receives a

delete event, or the application programmer calls <a class="link" href="GtkDialog.html#gtk-dialog-response" title="gtk_dialog_response ()"><code class="function">gtk_dialog_response()</code></a>.

On a delete event, the response ID is <a class="link" href="GtkDialog.html#GTK-RESPONSE-DELETE-EVENT:CAPS"><span class="type">GTK_RESPONSE_DELETE_EVENT</span></a>.

Otherwise, it depends on which action widget was clicked.</p>
<div class="refsect3">
<a name="GtkDialog-response.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>the object on which the signal is emitted</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>response_id</p></td>
<td class="parameter_description"><p>the response ID</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: <a href="../gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.26.1</div>
</body>
</html>