<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
<!ENTITY pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkDialog">
<refmeta>
<refentrytitle role="top_of_page" id="GtkDialog.top_of_page">GtkDialog</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkDialog</refname>
<refpurpose>Create popup windows</refpurpose>
</refnamediv>

<refsect1 id="GtkDialog.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-dialog-new">gtk_dialog_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-dialog-new-with-buttons">gtk_dialog_new_with_buttons</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-dialog-response">gtk_dialog_response</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-dialog-add-button">gtk_dialog_add_button</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-dialog-add-buttons">gtk_dialog_add_buttons</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-dialog-add-action-widget">gtk_dialog_add_action_widget</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-dialog-set-default-response">gtk_dialog_set_default_response</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-dialog-set-response-sensitive">gtk_dialog_set_response_sensitive</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gint"><returnvalue>gint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-dialog-get-response-for-widget">gtk_dialog_get_response_for_widget</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-dialog-get-widget-for-response">gtk_dialog_get_widget_for_response</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-dialog-get-content-area">gtk_dialog_get_content_area</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-dialog-get-header-bar">gtk_dialog_get_header_bar</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkDialog.properties" role="properties">
<title role="properties.title">Properties</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="properties_type" colwidth="150px"/>
<colspec colname="properties_name" colwidth="300px"/>
<colspec colname="properties_flags" colwidth="200px"/>
<tbody>
<row><entry role="property_type"><link linkend="gint"><type>gint</type></link></entry><entry role="property_name"><link linkend="GtkDialog--use-header-bar">use-header-bar</link></entry><entry role="property_flags">Read / Write / Construct&#160;Only</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkDialog.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="signal_proto_type" colwidth="150px"/>
<colspec colname="signal_proto_name" colwidth="300px"/>
<colspec colname="signal_proto_flags" colwidth="200px"/>
<tbody>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkDialog-close">close</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-ACTION:CAPS">Action</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkDialog-response">response</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkDialog.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="GtkDialog-struct">GtkDialog</link></entry></row>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="GtkDialogClass">GtkDialogClass</link></entry></row>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="GtkDialogFlags">GtkDialogFlags</link></entry></row>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="GtkResponseType">GtkResponseType</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkDialog.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
        <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkWidget">GtkWidget</link>
            <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkWindow">GtkWindow</link>
                <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkDialog
                    <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> <link linkend="GtkAboutDialog">GtkAboutDialog</link>
                    <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> <link linkend="GtkAppChooserDialog">GtkAppChooserDialog</link>
                    <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> <link linkend="GtkColorChooserDialog">GtkColorChooserDialog</link>
                    <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> <link linkend="GtkFileChooserDialog">GtkFileChooserDialog</link>
                    <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> <link linkend="GtkFontChooserDialog">GtkFontChooserDialog</link>
                    <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> <link linkend="GtkMessageDialog">GtkMessageDialog</link>
                    <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> <link linkend="GtkPageSetupUnixDialog">GtkPageSetupUnixDialog</link>
                    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkPrintUnixDialog">GtkPrintUnixDialog</link>
</screen>
</refsect1>
<refsect1 id="GtkDialog.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkDialog implements
 <link linkend="AtkImplementorIface">AtkImplementorIface</link>,  <link linkend="GtkBuildable">GtkBuildable</link>,  <link linkend="GtkConstraintTarget">GtkConstraintTarget</link>,  <link linkend="GtkNative">GtkNative</link>,  <link linkend="GtkShortcutManager">GtkShortcutManager</link> and  <link linkend="GtkRoot">GtkRoot</link>.</para>

</refsect1>

<refsect1 id="GtkDialog.includes"><title>Includes</title><synopsis>#include &lt;gtk/gtk.h&gt;
</synopsis></refsect1>

<refsect1 id="GtkDialog.description" role="desc">
<title role="desc.title">Description</title>
<para>Dialog boxes are a convenient way to prompt the user for a small amount
of input, e.g. to display a message, ask a question, or anything else
that does not require extensive effort on the user’s part.</para>
<para>GTK+ treats a dialog as a window split vertically. The top section is a
<link linkend="GtkBox"><type>GtkBox</type></link>, and is where widgets such as a <link linkend="GtkLabel"><type>GtkLabel</type></link> or a <link linkend="GtkEntry"><type>GtkEntry</type></link> should
be packed. The bottom area is known as the
“action area”. This is generally used for
packing buttons into the dialog which may perform functions such as
cancel, ok, or apply.</para>
<para><link linkend="GtkDialog"><type>GtkDialog</type></link> boxes are created with a call to <link linkend="gtk-dialog-new"><function>gtk_dialog_new()</function></link> or
<link linkend="gtk-dialog-new-with-buttons"><function>gtk_dialog_new_with_buttons()</function></link>. <link linkend="gtk-dialog-new-with-buttons"><function>gtk_dialog_new_with_buttons()</function></link> is
recommended; it allows you to set the dialog title, some convenient
flags, and add simple buttons.</para>
<para>A “modal” dialog (that is, one which freezes the rest of the application
from user input), can be created by calling <link linkend="gtk-window-set-modal"><function>gtk_window_set_modal()</function></link> on the
dialog. Use the <link linkend="GTK-WINDOW:CAPS"><function>GTK_WINDOW()</function></link> macro to cast the widget returned from
<link linkend="gtk-dialog-new"><function>gtk_dialog_new()</function></link> into a <link linkend="GtkWindow"><type>GtkWindow</type></link>. When using <link linkend="gtk-dialog-new-with-buttons"><function>gtk_dialog_new_with_buttons()</function></link>
you can also pass the <link linkend="GTK-DIALOG-MODAL:CAPS"><type>GTK_DIALOG_MODAL</type></link> flag to make a dialog modal.</para>
<para>If you add buttons to <link linkend="GtkDialog"><type>GtkDialog</type></link> using <link linkend="gtk-dialog-new-with-buttons"><function>gtk_dialog_new_with_buttons()</function></link>,
<link linkend="gtk-dialog-add-button"><function>gtk_dialog_add_button()</function></link>, <link linkend="gtk-dialog-add-buttons"><function>gtk_dialog_add_buttons()</function></link>, or
<link linkend="gtk-dialog-add-action-widget"><function>gtk_dialog_add_action_widget()</function></link>, clicking the button will emit a signal
called <link linkend="GtkDialog-response"><type>“response”</type></link> with a response ID that you specified. GTK+
will never assign a meaning to positive response IDs; these are entirely
user-defined. But for convenience, you can use the response IDs in the
<link linkend="GtkResponseType"><type>GtkResponseType</type></link> enumeration (these all have values less than zero). If
a dialog receives a delete event, the <link linkend="GtkDialog-response"><type>“response”</type></link> signal will
be emitted with a response ID of <link linkend="GTK-RESPONSE-DELETE-EVENT:CAPS"><type>GTK_RESPONSE_DELETE_EVENT</type></link>.</para>
<para>For the simple dialog in the following example, in reality you’d probably
use <link linkend="GtkMessageDialog"><type>GtkMessageDialog</type></link> to save yourself some effort. But you’d need to
create the dialog contents manually if you had more than a simple message
in the dialog.</para>
<para>An example for simple GtkDialog usage:</para>
<informalexample><programlisting role="example"><![CDATA[
// Function to open a dialog box with a message
void
quick_message (GtkWindow *parent, gchar *message)
{
 GtkWidget *dialog, *label, *content_area;
 GtkDialogFlags flags;

 // Create the widgets
 flags = GTK_DIALOG_DESTROY_WITH_PARENT;
 dialog = gtk_dialog_new_with_buttons ("Message",
                                       parent,
                                       flags,
                                       _("_OK"),
                                       GTK_RESPONSE_NONE,
                                       NULL);
 content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
 label = gtk_label_new (message);

 // Ensure that the dialog box is destroyed when the user responds

 g_signal_connect_swapped (dialog,
                           "response",
                           G_CALLBACK (gtk_window_destroy),
                           dialog);

 // Add the label, and show everything we’ve added

 gtk_box_append (GTK_BOX (content_area), label);
 gtk_widget_show (dialog);
}
]]></programlisting></informalexample>
<para></para>
<refsect2><title>GtkDialog as GtkBuildable</title><para>The GtkDialog implementation of the <link linkend="GtkBuildable"><type>GtkBuildable</type></link> interface exposes the
<parameter>content_area</parameter>
 and <parameter>action_area</parameter>
 as internal children with the names
“content_area” and “action_area”.</para>
<para>GtkDialog supports a custom &lt;action-widgets> element, which can contain
multiple &lt;action-widget> elements. The “response” attribute specifies a
numeric response, and the content of the element is the id of widget
(which should be a child of the dialogs <parameter>action_area</parameter>
). To mark a response
as default, set the “default“ attribute of the &lt;action-widget> element
to true.</para>
<para>GtkDialog supports adding action widgets by specifying “action“ as
the “type“ attribute of a &lt;child> element. The widget will be added
either to the action area or the headerbar of the dialog, depending
on the “use-header-bar“ property. The response id has to be associated
with the action widget using the &lt;action-widgets> element.</para>
<para>An example of a <link linkend="GtkDialog"><type>GtkDialog</type></link> UI definition fragment:</para>
<informalexample><programlisting role="example"><![CDATA[
<object class="GtkDialog" id="dialog1">
  <child type="action">
    <object class="GtkButton" id="button_cancel"/>
  </child>
  <child type="action">
    <object class="GtkButton" id="button_ok">
    </object>
  </child>
  <action-widgets>
    <action-widget response="cancel">button_cancel</action-widget>
    <action-widget response="ok" default="true">button_ok</action-widget>
  </action-widgets>
</object>
]]></programlisting></informalexample>
<para></para>
</refsect2>

</refsect1>
<refsect1 id="GtkDialog.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-dialog-new" role="function">
<title>gtk_dialog_new&#160;()</title>
<indexterm zone="gtk-dialog-new"><primary>gtk_dialog_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_dialog_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new dialog box.</para>
<para>Widgets should not be packed into this <link linkend="GtkWindow"><type>GtkWindow</type></link>
directly, but into the <parameter>content_area</parameter>
 and <parameter>action_area</parameter>
, as described above.</para>
<refsect3 id="gtk-dialog-new.returns" role="returns">
<title>Returns</title>
<para> the new dialog as a <link linkend="GtkWidget"><type>GtkWidget</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-dialog-new-with-buttons" role="function">
<title>gtk_dialog_new_with_buttons&#160;()</title>
<indexterm zone="gtk-dialog-new-with-buttons"><primary>gtk_dialog_new_with_buttons</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_dialog_new_with_buttons (<parameter>const <link linkend="gchar"><type>gchar</type></link> *title</parameter>,
                             <parameter><link linkend="GtkWindow"><type>GtkWindow</type></link> *parent</parameter>,
                             <parameter><link linkend="GtkDialogFlags"><type>GtkDialogFlags</type></link> flags</parameter>,
                             <parameter>const <link linkend="gchar"><type>gchar</type></link> *first_button_text</parameter>,
                             <parameter>...</parameter>);</programlisting>
<para>Creates a new <link linkend="GtkDialog"><type>GtkDialog</type></link> with title <parameter>title</parameter>
 (or <link linkend="NULL:CAPS"><literal>NULL</literal></link> for the default
title; see <link linkend="gtk-window-set-title"><function>gtk_window_set_title()</function></link>) and transient parent <parameter>parent</parameter>
 (or
<link linkend="NULL:CAPS"><literal>NULL</literal></link> for none; see <link linkend="gtk-window-set-transient-for"><function>gtk_window_set_transient_for()</function></link>). The <parameter>flags</parameter>

argument can be used to make the dialog modal (<link linkend="GTK-DIALOG-MODAL:CAPS"><type>GTK_DIALOG_MODAL</type></link>)
and/or to have it destroyed along with its transient parent
(<link linkend="GTK-DIALOG-DESTROY-WITH-PARENT:CAPS"><type>GTK_DIALOG_DESTROY_WITH_PARENT</type></link>). After <parameter>flags</parameter>
, button
text/response ID pairs should be listed, with a <link linkend="NULL:CAPS"><literal>NULL</literal></link> pointer ending
the list. Button text can be arbitrary text. A response ID can be
any positive number, or one of the values in the <link linkend="GtkResponseType"><type>GtkResponseType</type></link>
enumeration. If the user clicks one of these dialog buttons,
<link linkend="GtkDialog"><type>GtkDialog</type></link> will emit the <link linkend="GtkDialog-response"><type>“response”</type></link> signal with the corresponding
response ID. If a <link linkend="GtkDialog"><type>GtkDialog</type></link> receives a delete event,
it will emit ::response with a response ID of <link linkend="GTK-RESPONSE-DELETE-EVENT:CAPS"><type>GTK_RESPONSE_DELETE_EVENT</type></link>.
However, destroying a dialog does not emit the ::response signal;
so be careful relying on ::response when using the
<link linkend="GTK-DIALOG-DESTROY-WITH-PARENT:CAPS"><type>GTK_DIALOG_DESTROY_WITH_PARENT</type></link> flag. Buttons are from left to right,
so the first button in the list will be the leftmost button in the dialog.</para>
<para>Here’s a simple example:</para>
<informalexample><programlisting role="example"><![CDATA[
 GtkWidget *main_app_window; // Window the dialog should show up on
 GtkWidget *dialog;
 GtkDialogFlags flags = GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT;
 dialog = gtk_dialog_new_with_buttons ("My dialog",
                                       main_app_window,
                                       flags,
                                       _("_OK"),
                                       GTK_RESPONSE_ACCEPT,
                                       _("_Cancel"),
                                       GTK_RESPONSE_REJECT,
                                       NULL);
]]></programlisting></informalexample>
<para></para>
<refsect3 id="gtk-dialog-new-with-buttons.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>title</para></entry>
<entry role="parameter_description"><para>Title of the dialog, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>parent</para></entry>
<entry role="parameter_description"><para>Transient parent of the dialog, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>flags</para></entry>
<entry role="parameter_description"><para>from <link linkend="GtkDialogFlags"><type>GtkDialogFlags</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>first_button_text</para></entry>
<entry role="parameter_description"><para>text to go in first button, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>...</para></entry>
<entry role="parameter_description"><para>response ID for first button, then additional buttons, ending with <link linkend="NULL:CAPS"><literal>NULL</literal></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-dialog-new-with-buttons.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkDialog"><type>GtkDialog</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-dialog-response" role="function">
<title>gtk_dialog_response&#160;()</title>
<indexterm zone="gtk-dialog-response"><primary>gtk_dialog_response</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_dialog_response (<parameter><link linkend="GtkDialog"><type>GtkDialog</type></link> *dialog</parameter>,
                     <parameter><link linkend="gint"><type>gint</type></link> response_id</parameter>);</programlisting>
<para>Emits the <link linkend="GtkDialog-response"><type>“response”</type></link> signal with the given response ID.</para>
<para>Used to indicate that the user has responded to the dialog in some way.</para>
<refsect3 id="gtk-dialog-response.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>dialog</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkDialog"><type>GtkDialog</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>response_id</para></entry>
<entry role="parameter_description"><para>response ID</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-dialog-add-button" role="function">
<title>gtk_dialog_add_button&#160;()</title>
<indexterm zone="gtk-dialog-add-button"><primary>gtk_dialog_add_button</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_dialog_add_button (<parameter><link linkend="GtkDialog"><type>GtkDialog</type></link> *dialog</parameter>,
                       <parameter>const <link linkend="gchar"><type>gchar</type></link> *button_text</parameter>,
                       <parameter><link linkend="gint"><type>gint</type></link> response_id</parameter>);</programlisting>
<para>Adds a button with the given text and sets things up so that
clicking the button will emit the <link linkend="GtkDialog-response"><type>“response”</type></link> signal with
the given <parameter>response_id</parameter>
. 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.</para>
<refsect3 id="gtk-dialog-add-button.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>dialog</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkDialog"><type>GtkDialog</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>button_text</para></entry>
<entry role="parameter_description"><para>text of button</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>response_id</para></entry>
<entry role="parameter_description"><para>response ID for the button</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-dialog-add-button.returns" role="returns">
<title>Returns</title>
<para>the <link linkend="GtkButton"><type>GtkButton</type></link> widget that was added. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-dialog-add-buttons" role="function">
<title>gtk_dialog_add_buttons&#160;()</title>
<indexterm zone="gtk-dialog-add-buttons"><primary>gtk_dialog_add_buttons</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_dialog_add_buttons (<parameter><link linkend="GtkDialog"><type>GtkDialog</type></link> *dialog</parameter>,
                        <parameter>const <link linkend="gchar"><type>gchar</type></link> *first_button_text</parameter>,
                        <parameter>...</parameter>);</programlisting>
<para>Adds more buttons, same as calling <link linkend="gtk-dialog-add-button"><function>gtk_dialog_add_button()</function></link>
repeatedly.  The variable argument list should be <link linkend="NULL:CAPS"><literal>NULL</literal></link>-terminated
as with <link linkend="gtk-dialog-new-with-buttons"><function>gtk_dialog_new_with_buttons()</function></link>. Each button must have both
text and response ID.</para>
<refsect3 id="gtk-dialog-add-buttons.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>dialog</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkDialog"><type>GtkDialog</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>first_button_text</para></entry>
<entry role="parameter_description"><para>button text</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>...</para></entry>
<entry role="parameter_description"><para>response ID for first button, then more text-response_id pairs</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-dialog-add-action-widget" role="function">
<title>gtk_dialog_add_action_widget&#160;()</title>
<indexterm zone="gtk-dialog-add-action-widget"><primary>gtk_dialog_add_action_widget</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_dialog_add_action_widget (<parameter><link linkend="GtkDialog"><type>GtkDialog</type></link> *dialog</parameter>,
                              <parameter><link linkend="GtkWidget"><type>GtkWidget</type></link> *child</parameter>,
                              <parameter><link linkend="gint"><type>gint</type></link> response_id</parameter>);</programlisting>
<para>Adds an activatable widget to the action area of a <link linkend="GtkDialog"><type>GtkDialog</type></link>,
connecting a signal handler that will emit the <link linkend="GtkDialog-response"><type>“response”</type></link>
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 <parameter>action_area</parameter>
 field
of the <link linkend="GtkDialog"><type>GtkDialog</type></link> struct.</para>
<refsect3 id="gtk-dialog-add-action-widget.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>dialog</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkDialog"><type>GtkDialog</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>child</para></entry>
<entry role="parameter_description"><para>an activatable widget</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>response_id</para></entry>
<entry role="parameter_description"><para>response ID for <parameter>child</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-dialog-set-default-response" role="function">
<title>gtk_dialog_set_default_response&#160;()</title>
<indexterm zone="gtk-dialog-set-default-response"><primary>gtk_dialog_set_default_response</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_dialog_set_default_response (<parameter><link linkend="GtkDialog"><type>GtkDialog</type></link> *dialog</parameter>,
                                 <parameter><link linkend="gint"><type>gint</type></link> response_id</parameter>);</programlisting>
<para>Sets the last widget in the dialog’s action area with the given <parameter>response_id</parameter>

as the default widget for the dialog. Pressing “Enter” normally activates
the default widget.</para>
<refsect3 id="gtk-dialog-set-default-response.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>dialog</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkDialog"><type>GtkDialog</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>response_id</para></entry>
<entry role="parameter_description"><para>a response ID</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-dialog-set-response-sensitive" role="function">
<title>gtk_dialog_set_response_sensitive&#160;()</title>
<indexterm zone="gtk-dialog-set-response-sensitive"><primary>gtk_dialog_set_response_sensitive</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_dialog_set_response_sensitive (<parameter><link linkend="GtkDialog"><type>GtkDialog</type></link> *dialog</parameter>,
                                   <parameter><link linkend="gint"><type>gint</type></link> response_id</parameter>,
                                   <parameter><link linkend="gboolean"><type>gboolean</type></link> setting</parameter>);</programlisting>
<para>Calls <literal>gtk_widget_set_sensitive (widget, @setting)</literal>
for each widget in the dialog’s action area with the given <parameter>response_id</parameter>
.
A convenient way to sensitize/desensitize dialog buttons.</para>
<refsect3 id="gtk-dialog-set-response-sensitive.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>dialog</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkDialog"><type>GtkDialog</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>response_id</para></entry>
<entry role="parameter_description"><para>a response ID</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>setting</para></entry>
<entry role="parameter_description"><para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> for sensitive</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-dialog-get-response-for-widget" role="function">
<title>gtk_dialog_get_response_for_widget&#160;()</title>
<indexterm zone="gtk-dialog-get-response-for-widget"><primary>gtk_dialog_get_response_for_widget</primary></indexterm>
<programlisting language="C"><link linkend="gint"><returnvalue>gint</returnvalue></link>
gtk_dialog_get_response_for_widget (<parameter><link linkend="GtkDialog"><type>GtkDialog</type></link> *dialog</parameter>,
                                    <parameter><link linkend="GtkWidget"><type>GtkWidget</type></link> *widget</parameter>);</programlisting>
<para>Gets the response id of a widget in the action area
of a dialog.</para>
<refsect3 id="gtk-dialog-get-response-for-widget.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>dialog</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkDialog"><type>GtkDialog</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>widget</para></entry>
<entry role="parameter_description"><para>a widget in the action area of <parameter>dialog</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-dialog-get-response-for-widget.returns" role="returns">
<title>Returns</title>
<para> the response id of <parameter>widget</parameter>
, or <link linkend="GTK-RESPONSE-NONE:CAPS"><literal>GTK_RESPONSE_NONE</literal></link>
if <parameter>widget</parameter>
doesn’t have a response id set.</para>
</refsect3></refsect2>
<refsect2 id="gtk-dialog-get-widget-for-response" role="function">
<title>gtk_dialog_get_widget_for_response&#160;()</title>
<indexterm zone="gtk-dialog-get-widget-for-response"><primary>gtk_dialog_get_widget_for_response</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_dialog_get_widget_for_response (<parameter><link linkend="GtkDialog"><type>GtkDialog</type></link> *dialog</parameter>,
                                    <parameter><link linkend="gint"><type>gint</type></link> response_id</parameter>);</programlisting>
<para>Gets the widget button that uses the given response ID in the action area
of a dialog.</para>
<refsect3 id="gtk-dialog-get-widget-for-response.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>dialog</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkDialog"><type>GtkDialog</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>response_id</para></entry>
<entry role="parameter_description"><para>the response ID used by the <parameter>dialog</parameter>
widget</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-dialog-get-widget-for-response.returns" role="returns">
<title>Returns</title>
<para>the <parameter>widget</parameter>
button that uses the given
<parameter>response_id</parameter>
, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-dialog-get-content-area" role="function">
<title>gtk_dialog_get_content_area&#160;()</title>
<indexterm zone="gtk-dialog-get-content-area"><primary>gtk_dialog_get_content_area</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_dialog_get_content_area (<parameter><link linkend="GtkDialog"><type>GtkDialog</type></link> *dialog</parameter>);</programlisting>
<para>Returns the content area of <parameter>dialog</parameter>
.</para>
<refsect3 id="gtk-dialog-get-content-area.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>dialog</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkDialog"><type>GtkDialog</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-dialog-get-content-area.returns" role="returns">
<title>Returns</title>
<para>the content area <link linkend="GtkBox"><type>GtkBox</type></link>. </para>
<para><emphasis role="annotation">[<acronym>type</acronym> Gtk.Box][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-dialog-get-header-bar" role="function">
<title>gtk_dialog_get_header_bar&#160;()</title>
<indexterm zone="gtk-dialog-get-header-bar"><primary>gtk_dialog_get_header_bar</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_dialog_get_header_bar (<parameter><link linkend="GtkDialog"><type>GtkDialog</type></link> *dialog</parameter>);</programlisting>
<para>Returns the header bar of <parameter>dialog</parameter>
. Note that the
headerbar is only used by the dialog if the
<link linkend="GtkDialog--use-header-bar"><type>“use-header-bar”</type></link> property is <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>.</para>
<refsect3 id="gtk-dialog-get-header-bar.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>dialog</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkDialog"><type>GtkDialog</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-dialog-get-header-bar.returns" role="returns">
<title>Returns</title>
<para>the header bar. </para>
<para><emphasis role="annotation">[<acronym>type</acronym> Gtk.HeaderBar][<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkDialog.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkDialog-struct" role="struct">
<title>struct GtkDialog</title>
<indexterm zone="GtkDialog-struct"><primary>GtkDialog</primary></indexterm>
<programlisting language="C">struct GtkDialog;</programlisting>
<para>The <link linkend="GtkDialog-struct"><type>GtkDialog</type></link> contains only private fields
and should not be directly accessed.</para>
</refsect2>
<refsect2 id="GtkDialogClass" role="struct">
<title>struct GtkDialogClass</title>
<indexterm zone="GtkDialogClass"><primary>GtkDialogClass</primary></indexterm>
<programlisting language="C">struct GtkDialogClass {
  GtkWindowClass parent_class;

  void (* response) (GtkDialog *dialog, gint response_id);

  /* Keybinding signals */

  void (* close)    (GtkDialog *dialog);
};
</programlisting>
<refsect3 id="GtkDialogClass.members" role="struct_members">
<title>Members</title>
<informaltable role="struct_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="struct_members_name" colwidth="300px"/>
<colspec colname="struct_members_description"/>
<colspec colname="struct_members_annotations" colwidth="200px"/>
<tbody>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkDialogClass.response">response</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Signal emitted when an action widget is activated.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="GtkDialogClass.close">close</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>Signal emitted when the user uses a keybinding to close the dialog.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3>
</refsect2>
<refsect2 id="GtkDialogFlags" role="enum">
<title>enum GtkDialogFlags</title>
<indexterm zone="GtkDialogFlags"><primary>GtkDialogFlags</primary></indexterm>
<para>Flags used to influence dialog construction.</para>
<refsect3 id="GtkDialogFlags.members" role="enum_members">
<title>Members</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="enum_members_name" colwidth="300px"/>
<colspec colname="enum_members_description"/>
<colspec colname="enum_members_annotations" colwidth="200px"/>
<tbody>
<row role="constant"><entry role="enum_member_name"><para id="GTK-DIALOG-MODAL:CAPS">GTK_DIALOG_MODAL</para></entry>
<entry role="enum_member_description"><para>Make the constructed dialog modal,
see <link linkend="gtk-window-set-modal"><function>gtk_window_set_modal()</function></link></para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-DIALOG-DESTROY-WITH-PARENT:CAPS">GTK_DIALOG_DESTROY_WITH_PARENT</para></entry>
<entry role="enum_member_description"><para>Destroy the dialog when its
parent is destroyed, see <link linkend="gtk-window-set-destroy-with-parent"><function>gtk_window_set_destroy_with_parent()</function></link></para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-DIALOG-USE-HEADER-BAR:CAPS">GTK_DIALOG_USE_HEADER_BAR</para></entry>
<entry role="enum_member_description"><para>Create dialog with actions in header
bar instead of action area</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="GtkResponseType" role="enum">
<title>enum GtkResponseType</title>
<indexterm zone="GtkResponseType"><primary>GtkResponseType</primary></indexterm>
<para>Predefined values for use as response ids in <link linkend="gtk-dialog-add-button"><function>gtk_dialog_add_button()</function></link>.
All predefined values are negative; GTK+ leaves values of 0 or greater for
application-defined response ids.</para>
<refsect3 id="GtkResponseType.members" role="enum_members">
<title>Members</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="enum_members_name" colwidth="300px"/>
<colspec colname="enum_members_description"/>
<colspec colname="enum_members_annotations" colwidth="200px"/>
<tbody>
<row role="constant"><entry role="enum_member_name"><para id="GTK-RESPONSE-NONE:CAPS">GTK_RESPONSE_NONE</para></entry>
<entry role="enum_member_description"><para>Returned if an action widget has no response id,
or if the dialog gets programmatically hidden or destroyed</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-RESPONSE-REJECT:CAPS">GTK_RESPONSE_REJECT</para></entry>
<entry role="enum_member_description"><para>Generic response id, not used by GTK+ dialogs</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-RESPONSE-ACCEPT:CAPS">GTK_RESPONSE_ACCEPT</para></entry>
<entry role="enum_member_description"><para>Generic response id, not used by GTK+ dialogs</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-RESPONSE-DELETE-EVENT:CAPS">GTK_RESPONSE_DELETE_EVENT</para></entry>
<entry role="enum_member_description"><para>Returned if the dialog is deleted</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-RESPONSE-OK:CAPS">GTK_RESPONSE_OK</para></entry>
<entry role="enum_member_description"><para>Returned by OK buttons in GTK+ dialogs</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-RESPONSE-CANCEL:CAPS">GTK_RESPONSE_CANCEL</para></entry>
<entry role="enum_member_description"><para>Returned by Cancel buttons in GTK+ dialogs</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-RESPONSE-CLOSE:CAPS">GTK_RESPONSE_CLOSE</para></entry>
<entry role="enum_member_description"><para>Returned by Close buttons in GTK+ dialogs</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-RESPONSE-YES:CAPS">GTK_RESPONSE_YES</para></entry>
<entry role="enum_member_description"><para>Returned by Yes buttons in GTK+ dialogs</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-RESPONSE-NO:CAPS">GTK_RESPONSE_NO</para></entry>
<entry role="enum_member_description"><para>Returned by No buttons in GTK+ dialogs</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-RESPONSE-APPLY:CAPS">GTK_RESPONSE_APPLY</para></entry>
<entry role="enum_member_description"><para>Returned by Apply buttons in GTK+ dialogs</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-RESPONSE-HELP:CAPS">GTK_RESPONSE_HELP</para></entry>
<entry role="enum_member_description"><para>Returned by Help buttons in GTK+ dialogs</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkDialog.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkDialog--use-header-bar" role="property"><title>The <literal>“use-header-bar”</literal> property</title>
<indexterm zone="GtkDialog--use-header-bar"><primary>GtkDialog:use-header-bar</primary></indexterm>
<programlisting>  “use-header-bar”           <link linkend="gint"><type>gint</type></link></programlisting>
<para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the dialog uses a <link linkend="GtkHeaderBar"><type>GtkHeaderBar</type></link> for action buttons
instead of the action-area.</para>
<para>For technical reasons, this property is declared as an integer
property, but you should only set it to <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> or <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>.</para>
<para>Owner: GtkDialog</para>
<para>Flags: Read / Write / Construct&#160;Only</para>
<para>Allowed values: [-1,1]</para>
<para>Default value: -1</para>
</refsect2>

</refsect1>
<refsect1 id="GtkDialog.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkDialog-close" role="signal"><title>The <literal>“close”</literal> signal</title>
<indexterm zone="GtkDialog-close"><primary>GtkDialog::close</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkDialog"><type>GtkDialog</type></link> *dialog,
               <link linkend="gpointer"><type>gpointer</type></link>   user_data)</programlisting>
<para>The ::close signal is a
<link linkend="GtkBindingSignal">keybinding signal</link>
which gets emitted when the user uses a keybinding to close
the dialog.</para>
<para>The default binding for this signal is the Escape key.</para>
<refsect3 id="GtkDialog-close.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-ACTION:CAPS">Action</link></para>
</refsect2><refsect2 id="GtkDialog-response" role="signal"><title>The <literal>“response”</literal> signal</title>
<indexterm zone="GtkDialog-response"><primary>GtkDialog::response</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkDialog"><type>GtkDialog</type></link> *dialog,
               <link linkend="gint"><type>gint</type></link>       response_id,
               <link linkend="gpointer"><type>gpointer</type></link>   user_data)</programlisting>
<para>Emitted when an action widget is clicked, the dialog receives a
delete event, or the application programmer calls <link linkend="gtk-dialog-response"><function>gtk_dialog_response()</function></link>.
On a delete event, the response ID is <link linkend="GTK-RESPONSE-DELETE-EVENT:CAPS"><type>GTK_RESPONSE_DELETE_EVENT</type></link>.
Otherwise, it depends on which action widget was clicked.</para>
<refsect3 id="GtkDialog-response.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>dialog</para></entry>
<entry role="parameter_description"><para>the object on which the signal is emitted</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>response_id</para></entry>
<entry role="parameter_description"><para>the response ID</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2>
</refsect1>
<refsect1 id="GtkDialog.see-also">
<title>See Also</title>
<para><link linkend="GtkBox"><type>GtkBox</type></link>, <link linkend="GtkWindow"><type>GtkWindow</type></link>, <link linkend="GtkButton"><type>GtkButton</type></link></para>

</refsect1>

</refentry>
