964 lines
49 KiB
HTML
964 lines
49 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
<html>
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||
<title>GtkMessageDialog: GTK+ 3 Reference Manual</title>
|
||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||
<link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
|
||
<link rel="up" href="WindowWidgets.html" title="Windows">
|
||
<link rel="prev" href="GtkDialog.html" title="GtkDialog">
|
||
<link rel="next" href="GtkAboutDialog.html" title="GtkAboutDialog">
|
||
<meta name="generator" content="GTK-Doc V1.33.0 (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="#GtkMessageDialog.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
|
||
<a href="#GtkMessageDialog.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces"> <span class="dim">|</span>
|
||
<a href="#GtkMessageDialog.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties"> <span class="dim">|</span>
|
||
<a href="#GtkMessageDialog.properties" class="shortcut">Properties</a></span><span id="nav_style_properties"> <span class="dim">|</span>
|
||
<a href="#GtkMessageDialog.style-properties" class="shortcut">Style Properties</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="GtkDialog.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
|
||
<td><a accesskey="n" href="GtkAboutDialog.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
|
||
</tr></table>
|
||
<div class="refentry">
|
||
<a name="GtkMessageDialog"></a><div class="titlepage"></div>
|
||
<div class="refnamediv"><table width="100%"><tr>
|
||
<td valign="top">
|
||
<h2><span class="refentrytitle"><a name="GtkMessageDialog.top_of_page"></a>GtkMessageDialog</span></h2>
|
||
<p>GtkMessageDialog — A convenient message window</p>
|
||
</td>
|
||
<td class="gallery_image" valign="top" align="right"><img src="messagedialog.png"></td>
|
||
</tr></table></div>
|
||
<div class="refsect1">
|
||
<a name="GtkMessageDialog.functions"></a><h2>Functions</h2>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="functions_proto_type">
|
||
<col class="functions_proto_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="GtkMessageDialog.html#gtk-message-dialog-new" title="gtk_message_dialog_new ()">gtk_message_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="GtkMessageDialog.html#gtk-message-dialog-new-with-markup" title="gtk_message_dialog_new_with_markup ()">gtk_message_dialog_new_with_markup</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="GtkMessageDialog.html#gtk-message-dialog-set-markup" title="gtk_message_dialog_set_markup ()">gtk_message_dialog_set_markup</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="GtkMessageDialog.html#gtk-message-dialog-set-image" title="gtk_message_dialog_set_image ()">gtk_message_dialog_set_image</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="GtkMessageDialog.html#gtk-message-dialog-get-image" title="gtk_message_dialog_get_image ()">gtk_message_dialog_get_image</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="GtkMessageDialog.html#gtk-message-dialog-format-secondary-text" title="gtk_message_dialog_format_secondary_text ()">gtk_message_dialog_format_secondary_text</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="GtkMessageDialog.html#gtk-message-dialog-format-secondary-markup" title="gtk_message_dialog_format_secondary_markup ()">gtk_message_dialog_format_secondary_markup</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="GtkMessageDialog.html#gtk-message-dialog-get-message-area" title="gtk_message_dialog_get_message_area ()">gtk_message_dialog_get_message_area</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkMessageDialog.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 class="link" href="GtkMessageDialog.html#GtkButtonsType" title="enum GtkButtonsType"><span class="type">GtkButtonsType</span></a></td>
|
||
<td class="property_name"><a class="link" href="GtkMessageDialog.html#GtkMessageDialog--buttons" title="The “buttons” property">buttons</a></td>
|
||
<td class="property_flags">Write / Construct Only</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type">
|
||
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *</td>
|
||
<td class="property_name"><a class="link" href="GtkMessageDialog.html#GtkMessageDialog--image" title="The “image” property">image</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type">
|
||
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *</td>
|
||
<td class="property_name"><a class="link" href="GtkMessageDialog.html#GtkMessageDialog--message-area" title="The “message-area” property">message-area</a></td>
|
||
<td class="property_flags">Read</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><a class="link" href="GtkMessageDialog.html#GtkMessageType" title="enum GtkMessageType"><span class="type">GtkMessageType</span></a></td>
|
||
<td class="property_name"><a class="link" href="GtkMessageDialog.html#GtkMessageDialog--message-type" title="The “message-type” property">message-type</a></td>
|
||
<td class="property_flags">Read / Write / Construct</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type">
|
||
<span class="type">char</span> *</td>
|
||
<td class="property_name"><a class="link" href="GtkMessageDialog.html#GtkMessageDialog--secondary-text" title="The “secondary-text” property">secondary-text</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">gboolean</span></td>
|
||
<td class="property_name"><a class="link" href="GtkMessageDialog.html#GtkMessageDialog--secondary-use-markup" title="The “secondary-use-markup” property">secondary-use-markup</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type">
|
||
<span class="type">char</span> *</td>
|
||
<td class="property_name"><a class="link" href="GtkMessageDialog.html#GtkMessageDialog--text" title="The “text” property">text</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">gboolean</span></td>
|
||
<td class="property_name"><a class="link" href="GtkMessageDialog.html#GtkMessageDialog--use-markup" title="The “use-markup” property">use-markup</a></td>
|
||
<td class="property_flags">Read / Write</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkMessageDialog.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"><span class="type">int</span></td>
|
||
<td class="property_name"><a class="link" href="GtkMessageDialog.html#GtkMessageDialog--s-message-border" title="The “message-border” style property">message-border</a></td>
|
||
<td class="property_flags">Read</td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkMessageDialog.other"></a><h2>Types and Values</h2>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="other_proto_type">
|
||
<col class="other_proto_name">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="datatype_keyword">struct</td>
|
||
<td class="function_name"><a class="link" href="GtkMessageDialog.html#GtkMessageDialog-struct" title="struct GtkMessageDialog">GtkMessageDialog</a></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="datatype_keyword">enum</td>
|
||
<td class="function_name"><a class="link" href="GtkMessageDialog.html#GtkMessageType" title="enum GtkMessageType">GtkMessageType</a></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="datatype_keyword">enum</td>
|
||
<td class="function_name"><a class="link" href="GtkMessageDialog.html#GtkButtonsType" title="enum GtkButtonsType">GtkButtonsType</a></td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkMessageDialog.object-hierarchy"></a><h2>Object Hierarchy</h2>
|
||
<pre class="screen"> GObject
|
||
<span class="lineart">╰──</span> GInitiallyUnowned
|
||
<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> <a class="link" href="GtkDialog.html" title="GtkDialog">GtkDialog</a>
|
||
<span class="lineart">╰──</span> GtkMessageDialog
|
||
</pre>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkMessageDialog.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
|
||
<p>
|
||
GtkMessageDialog implements
|
||
AtkImplementorIface and <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a>.</p>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkMessageDialog.includes"></a><h2>Includes</h2>
|
||
<pre class="synopsis">#include <gtk/gtk.h>
|
||
</pre>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkMessageDialog.description"></a><h2>Description</h2>
|
||
<p><a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a> presents a dialog with some message text. It’s simply a
|
||
convenience widget; you could construct the equivalent of <a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a>
|
||
from <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> without too much effort, but <a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a> saves typing.</p>
|
||
<p>One difference from <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> is that <a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a> sets the
|
||
<a class="link" href="GtkWindow.html#GtkWindow--skip-taskbar-hint" title="The “skip-taskbar-hint” property"><span class="type">“skip-taskbar-hint”</span></a> property to <code class="literal">TRUE</code>, so that the dialog is hidden
|
||
from the taskbar by default.</p>
|
||
<p>The easiest way to do a modal message dialog is to use <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a>, though
|
||
you can also pass in the <a class="link" href="GtkDialog.html#GTK-DIALOG-MODAL:CAPS"><code class="literal">GTK_DIALOG_MODAL</code></a> flag, <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a> automatically
|
||
makes the dialog modal and waits for the user to respond to it. <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a>
|
||
returns when any dialog button is clicked.</p>
|
||
<p>An example for using a modal dialog:</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</pre></td>
|
||
<td class="listing_code"><pre class="programlisting"><span class="n">GtkDialogFlags</span> <span class="n">flags</span> <span class="o">=</span> <span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">;</span>
|
||
<span class="n">dialog</span> <span class="o">=</span> <span class="n">gtk_message_dialog_new</span> <span class="p">(</span><span class="n">parent_window</span><span class="p">,</span>
|
||
<span class="n">flags</span><span class="p">,</span>
|
||
<span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span>
|
||
<span class="n">GTK_BUTTONS_CLOSE</span><span class="p">,</span>
|
||
<span class="s">"Error reading “%s”: %s"</span><span class="p">,</span>
|
||
<span class="n">filename</span><span class="p">,</span>
|
||
<span class="n">g_strerror</span> <span class="p">(</span><span class="n">errno</span><span class="p">));</span>
|
||
<span class="n">gtk_dialog_run</span> <span class="p">(</span><span class="n">GTK_DIALOG</span> <span class="p">(</span><span class="n">dialog</span><span class="p">));</span>
|
||
<span class="n">gtk_widget_destroy</span> <span class="p">(</span><span class="n">dialog</span><span class="p">);</span></pre></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<p></p>
|
||
<p>You might do a non-modal <a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a> as follows:</p>
|
||
<p>An example for a non-modal dialog:</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</pre></td>
|
||
<td class="listing_code"><pre class="programlisting"><span class="n">GtkDialogFlags</span> <span class="n">flags</span> <span class="o">=</span> <span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">;</span>
|
||
<span class="n">dialog</span> <span class="o">=</span> <span class="n">gtk_message_dialog_new</span> <span class="p">(</span><span class="n">parent_window</span><span class="p">,</span>
|
||
<span class="n">flags</span><span class="p">,</span>
|
||
<span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span>
|
||
<span class="n">GTK_BUTTONS_CLOSE</span><span class="p">,</span>
|
||
<span class="s">"Error reading “%s”: %s"</span><span class="p">,</span>
|
||
<span class="n">filename</span><span class="p">,</span>
|
||
<span class="n">g_strerror</span> <span class="p">(</span><span class="n">errno</span><span class="p">));</span>
|
||
|
||
<span class="c1">// Destroy the dialog when the user responds to it</span>
|
||
<span class="c1">// (e.g. clicks a button)</span>
|
||
|
||
<span class="n">g_signal_connect_swapped</span> <span class="p">(</span><span class="n">dialog</span><span class="p">,</span> <span class="s">"response"</span><span class="p">,</span>
|
||
<span class="n">G_CALLBACK</span> <span class="p">(</span><span class="n">gtk_widget_destroy</span><span class="p">),</span>
|
||
<span class="n">dialog</span><span class="p">);</span></pre></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<p></p>
|
||
<div class="refsect2">
|
||
<a name="id-1.3.6.4.10.12"></a><h3>GtkMessageDialog as GtkBuildable</h3>
|
||
<p>The GtkMessageDialog implementation of the GtkBuildable interface exposes
|
||
the message area as an internal child with the name “message_area”.</p>
|
||
</div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkMessageDialog.functions_details"></a><h2>Functions</h2>
|
||
<div class="refsect2">
|
||
<a name="gtk-message-dialog-new"></a><h3>gtk_message_dialog_new ()</h3>
|
||
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
gtk_message_dialog_new (<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><a class="link" href="GtkMessageDialog.html#GtkMessageType" title="enum GtkMessageType"><span class="type">GtkMessageType</span></a> type</code></em>,
|
||
<em class="parameter"><code><a class="link" href="GtkMessageDialog.html#GtkButtonsType" title="enum GtkButtonsType"><span class="type">GtkButtonsType</span></a> buttons</code></em>,
|
||
<em class="parameter"><code>const <span class="type">gchar</span> *message_format</code></em>,
|
||
<em class="parameter"><code>...</code></em>);</pre>
|
||
<p>Creates a new message dialog, which is a simple dialog with some text
|
||
the user may want to see. When the user clicks a button a “response”
|
||
signal is emitted with response IDs from <a class="link" href="GtkDialog.html#GtkResponseType" title="enum GtkResponseType"><span class="type">GtkResponseType</span></a>. See
|
||
<a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> for more details.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-message-dialog-new.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>parent</p></td>
|
||
<td class="parameter_description"><p>transient parent, or <code class="literal">NULL</code> for none. </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>flags</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>type</p></td>
|
||
<td class="parameter_description"><p>type of message</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>buttons</p></td>
|
||
<td class="parameter_description"><p>set of buttons to use</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>message_format</p></td>
|
||
<td class="parameter_description"><p>printf()-style format string, or <code class="literal">NULL</code>. </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>...</p></td>
|
||
<td class="parameter_description"><p>arguments for <em class="parameter"><code>message_format</code></em>
|
||
</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-message-dialog-new.returns"></a><h4>Returns</h4>
|
||
<p>a new <a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</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>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-message-dialog-new-with-markup"></a><h3>gtk_message_dialog_new_with_markup ()</h3>
|
||
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
gtk_message_dialog_new_with_markup (<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><a class="link" href="GtkMessageDialog.html#GtkMessageType" title="enum GtkMessageType"><span class="type">GtkMessageType</span></a> type</code></em>,
|
||
<em class="parameter"><code><a class="link" href="GtkMessageDialog.html#GtkButtonsType" title="enum GtkButtonsType"><span class="type">GtkButtonsType</span></a> buttons</code></em>,
|
||
<em class="parameter"><code>const <span class="type">gchar</span> *message_format</code></em>,
|
||
<em class="parameter"><code>...</code></em>);</pre>
|
||
<p>Creates a new message dialog, which is a simple dialog with some text that
|
||
is marked up with the Pango text markup language.
|
||
When the user clicks a button a “response” signal is emitted with
|
||
response IDs from <a class="link" href="GtkDialog.html#GtkResponseType" title="enum GtkResponseType"><span class="type">GtkResponseType</span></a>. See <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> for more details.</p>
|
||
<p>Special XML characters in the <code class="function">printf()</code> arguments passed to this
|
||
function will automatically be escaped as necessary.
|
||
(See <code class="function">g_markup_printf_escaped()</code> for how this is implemented.)
|
||
Usually this is what you want, but if you have an existing
|
||
Pango markup string that you want to use literally as the
|
||
label, then you need to use <a class="link" href="GtkMessageDialog.html#gtk-message-dialog-set-markup" title="gtk_message_dialog_set_markup ()"><code class="function">gtk_message_dialog_set_markup()</code></a>
|
||
instead, since you can’t pass the markup string either
|
||
as the format (it might contain “%” characters) or as a string
|
||
argument.</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</pre></td>
|
||
<td class="listing_code"><pre class="programlisting"><span class="n">GtkWidget</span> <span class="o">*</span><span class="n">dialog</span><span class="p">;</span>
|
||
<span class="n">GtkDialogFlags</span> <span class="n">flags</span> <span class="o">=</span> <span class="n">GTK_DIALOG_DESTROY_WITH_PARENT</span><span class="p">;</span>
|
||
<span class="n">dialog</span> <span class="o">=</span> <span class="n">gtk_message_dialog_new</span> <span class="p">(</span><span class="n">parent_window</span><span class="p">,</span>
|
||
<span class="n">flags</span><span class="p">,</span>
|
||
<span class="n">GTK_MESSAGE_ERROR</span><span class="p">,</span>
|
||
<span class="n">GTK_BUTTONS_CLOSE</span><span class="p">,</span>
|
||
<span class="nb">NULL</span><span class="p">);</span>
|
||
<span class="n">gtk_message_dialog_set_markup</span> <span class="p">(</span><span class="n">GTK_MESSAGE_DIALOG</span> <span class="p">(</span><span class="n">dialog</span><span class="p">),</span>
|
||
<span class="n">markup</span><span class="p">);</span></pre></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<p></p>
|
||
<div class="refsect3">
|
||
<a name="gtk-message-dialog-new-with-markup.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>parent</p></td>
|
||
<td class="parameter_description"><p>transient parent, or <code class="literal">NULL</code> for none. </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>flags</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>type</p></td>
|
||
<td class="parameter_description"><p>type of message</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>buttons</p></td>
|
||
<td class="parameter_description"><p>set of buttons to use</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>message_format</p></td>
|
||
<td class="parameter_description"><p>printf()-style format string, or <code class="literal">NULL</code>. </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>...</p></td>
|
||
<td class="parameter_description"><p>arguments for <em class="parameter"><code>message_format</code></em>
|
||
</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-message-dialog-new-with-markup.returns"></a><h4>Returns</h4>
|
||
<p> a new <a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a></p>
|
||
</div>
|
||
<p class="since">Since: 2.4</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-message-dialog-set-markup"></a><h3>gtk_message_dialog_set_markup ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_message_dialog_set_markup (<em class="parameter"><code><a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a> *message_dialog</code></em>,
|
||
<em class="parameter"><code>const <span class="type">gchar</span> *str</code></em>);</pre>
|
||
<p>Sets the text of the message dialog to be <em class="parameter"><code>str</code></em>
|
||
, which is marked
|
||
up with the Pango text markup language.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-message-dialog-set-markup.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>message_dialog</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>str</p></td>
|
||
<td class="parameter_description"><p>markup string (see Pango markup format)</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.4</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-message-dialog-set-image"></a><h3>gtk_message_dialog_set_image ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_message_dialog_set_image (<em class="parameter"><code><a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a> *dialog</code></em>,
|
||
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *image</code></em>);</pre>
|
||
<div class="warning">
|
||
<p><code class="literal">gtk_message_dialog_set_image</code> has been deprecated since version 3.12 and should not be used in newly-written code.</p>
|
||
<p>Use <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> to create dialogs with images</p>
|
||
</div>
|
||
<p>Sets the dialog’s image to <em class="parameter"><code>image</code></em>
|
||
.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-message-dialog-set-image.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="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>image</p></td>
|
||
<td class="parameter_description"><p>the image</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.10</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-message-dialog-get-image"></a><h3>gtk_message_dialog_get_image ()</h3>
|
||
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
gtk_message_dialog_get_image (<em class="parameter"><code><a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a> *dialog</code></em>);</pre>
|
||
<div class="warning">
|
||
<p><code class="literal">gtk_message_dialog_get_image</code> has been deprecated since version 3.12 and should not be used in newly-written code.</p>
|
||
<p>Use <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> for dialogs with images</p>
|
||
</div>
|
||
<p>Gets the dialog’s image.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-message-dialog-get-image.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="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-message-dialog-get-image.returns"></a><h4>Returns</h4>
|
||
<p>the dialog’s image. </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: 2.14</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-message-dialog-format-secondary-text"></a><h3>gtk_message_dialog_format_secondary_text ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_message_dialog_format_secondary_text
|
||
(<em class="parameter"><code><a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a> *message_dialog</code></em>,
|
||
<em class="parameter"><code>const <span class="type">gchar</span> *message_format</code></em>,
|
||
<em class="parameter"><code>...</code></em>);</pre>
|
||
<p>Sets the secondary text of the message dialog to be <em class="parameter"><code>message_format</code></em>
|
||
|
||
(with <code class="function">printf()</code>-style).</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-message-dialog-format-secondary-text.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>message_dialog</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>message_format</p></td>
|
||
<td class="parameter_description"><p>printf()-style format string, or <code class="literal">NULL</code>. </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>...</p></td>
|
||
<td class="parameter_description"><p>arguments for <em class="parameter"><code>message_format</code></em>
|
||
</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.6</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-message-dialog-format-secondary-markup"></a><h3>gtk_message_dialog_format_secondary_markup ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_message_dialog_format_secondary_markup
|
||
(<em class="parameter"><code><a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a> *message_dialog</code></em>,
|
||
<em class="parameter"><code>const <span class="type">gchar</span> *message_format</code></em>,
|
||
<em class="parameter"><code>...</code></em>);</pre>
|
||
<p>Sets the secondary text of the message dialog to be <em class="parameter"><code>message_format</code></em>
|
||
(with
|
||
<code class="function">printf()</code>-style), which is marked up with the
|
||
Pango text markup language.</p>
|
||
<p>Due to an oversight, this function does not escape special XML characters
|
||
like <a class="link" href="GtkMessageDialog.html#gtk-message-dialog-new-with-markup" title="gtk_message_dialog_new_with_markup ()"><code class="function">gtk_message_dialog_new_with_markup()</code></a> does. Thus, if the arguments
|
||
may contain special XML characters, you should use <code class="function">g_markup_printf_escaped()</code>
|
||
to escape it.</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</pre></td>
|
||
<td class="listing_code"><pre class="programlisting"><span class="n">gchar</span> <span class="o">*</span><span class="n">msg</span><span class="p">;</span>
|
||
|
||
<span class="n">msg</span> <span class="o">=</span> <span class="n">g_markup_printf_escaped</span> <span class="p">(</span><span class="n">message_format</span><span class="p">,</span> <span class="p">...);</span>
|
||
<span class="n">gtk_message_dialog_format_secondary_markup</span> <span class="p">(</span><span class="n">message_dialog</span><span class="p">,</span>
|
||
<span class="s">"%s"</span><span class="p">,</span> <span class="n">msg</span><span class="p">);</span>
|
||
<span class="n">g_free</span> <span class="p">(</span><span class="n">msg</span><span class="p">);</span></pre></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<p></p>
|
||
<div class="refsect3">
|
||
<a name="gtk-message-dialog-format-secondary-markup.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>message_dialog</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>message_format</p></td>
|
||
<td class="parameter_description"><p>printf()-style markup string (see
|
||
Pango markup format), or <code class="literal">NULL</code></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>...</p></td>
|
||
<td class="parameter_description"><p>arguments for <em class="parameter"><code>message_format</code></em>
|
||
</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.6</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-message-dialog-get-message-area"></a><h3>gtk_message_dialog_get_message_area ()</h3>
|
||
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
gtk_message_dialog_get_message_area (<em class="parameter"><code><a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a> *message_dialog</code></em>);</pre>
|
||
<p>Returns the message area of the dialog. This is the box where the
|
||
dialog’s primary and secondary labels are packed. You can add your
|
||
own extra content to that box and it will appear below those labels.
|
||
See <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> for the corresponding
|
||
function in the parent <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-message-dialog-get-message-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>message_dialog</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-message-dialog-get-message-area.returns"></a><h4>Returns</h4>
|
||
<p>A <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> corresponding to the
|
||
“message area” in the <em class="parameter"><code>message_dialog</code></em>
|
||
. </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: 2.22</p>
|
||
</div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkMessageDialog.other_details"></a><h2>Types and Values</h2>
|
||
<div class="refsect2">
|
||
<a name="GtkMessageDialog-struct"></a><h3>struct GtkMessageDialog</h3>
|
||
<pre class="programlisting">struct GtkMessageDialog;</pre>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkMessageType"></a><h3>enum GtkMessageType</h3>
|
||
<p>The type of message being displayed in the dialog.</p>
|
||
<div class="refsect3">
|
||
<a name="GtkMessageType.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-MESSAGE-INFO:CAPS"></a>GTK_MESSAGE_INFO</p></td>
|
||
<td class="enum_member_description">
|
||
<p>Informational message</p>
|
||
</td>
|
||
<td class="enum_member_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="enum_member_name"><p><a name="GTK-MESSAGE-WARNING:CAPS"></a>GTK_MESSAGE_WARNING</p></td>
|
||
<td class="enum_member_description">
|
||
<p>Non-fatal warning message</p>
|
||
</td>
|
||
<td class="enum_member_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="enum_member_name"><p><a name="GTK-MESSAGE-QUESTION:CAPS"></a>GTK_MESSAGE_QUESTION</p></td>
|
||
<td class="enum_member_description">
|
||
<p>Question requiring a choice</p>
|
||
</td>
|
||
<td class="enum_member_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="enum_member_name"><p><a name="GTK-MESSAGE-ERROR:CAPS"></a>GTK_MESSAGE_ERROR</p></td>
|
||
<td class="enum_member_description">
|
||
<p>Fatal error message</p>
|
||
</td>
|
||
<td class="enum_member_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="enum_member_name"><p><a name="GTK-MESSAGE-OTHER:CAPS"></a>GTK_MESSAGE_OTHER</p></td>
|
||
<td class="enum_member_description">
|
||
<p>None of the above</p>
|
||
</td>
|
||
<td class="enum_member_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkButtonsType"></a><h3>enum GtkButtonsType</h3>
|
||
<p>Prebuilt sets of buttons for the dialog. If
|
||
none of these choices are appropriate, simply use <a class="link" href="GtkMessageDialog.html#GTK-BUTTONS-NONE:CAPS"><code class="literal">GTK_BUTTONS_NONE</code></a>
|
||
then call <a class="link" href="GtkDialog.html#gtk-dialog-add-buttons" title="gtk_dialog_add_buttons ()"><code class="function">gtk_dialog_add_buttons()</code></a>.</p>
|
||
<div class="blockquote"><blockquote class="blockquote"><p>Please note that <a class="link" href="GtkMessageDialog.html#GTK-BUTTONS-OK:CAPS"><code class="literal">GTK_BUTTONS_OK</code></a>, <a class="link" href="GtkMessageDialog.html#GTK-BUTTONS-YES-NO:CAPS"><code class="literal">GTK_BUTTONS_YES_NO</code></a>
|
||
and <a class="link" href="GtkMessageDialog.html#GTK-BUTTONS-OK-CANCEL:CAPS"><code class="literal">GTK_BUTTONS_OK_CANCEL</code></a> are discouraged by the
|
||
<a class="ulink" href="http://library.gnome.org/devel/hig-book/stable/" target="_top">GNOME Human Interface Guidelines</a>.</p></blockquote></div>
|
||
<div class="refsect3">
|
||
<a name="GtkButtonsType.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-BUTTONS-NONE:CAPS"></a>GTK_BUTTONS_NONE</p></td>
|
||
<td class="enum_member_description">
|
||
<p>no buttons at all</p>
|
||
</td>
|
||
<td class="enum_member_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="enum_member_name"><p><a name="GTK-BUTTONS-OK:CAPS"></a>GTK_BUTTONS_OK</p></td>
|
||
<td class="enum_member_description">
|
||
<p>an OK button</p>
|
||
</td>
|
||
<td class="enum_member_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="enum_member_name"><p><a name="GTK-BUTTONS-CLOSE:CAPS"></a>GTK_BUTTONS_CLOSE</p></td>
|
||
<td class="enum_member_description">
|
||
<p>a Close button</p>
|
||
</td>
|
||
<td class="enum_member_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="enum_member_name"><p><a name="GTK-BUTTONS-CANCEL:CAPS"></a>GTK_BUTTONS_CANCEL</p></td>
|
||
<td class="enum_member_description">
|
||
<p>a Cancel button</p>
|
||
</td>
|
||
<td class="enum_member_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="enum_member_name"><p><a name="GTK-BUTTONS-YES-NO:CAPS"></a>GTK_BUTTONS_YES_NO</p></td>
|
||
<td class="enum_member_description">
|
||
<p>Yes and No buttons</p>
|
||
</td>
|
||
<td class="enum_member_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="enum_member_name"><p><a name="GTK-BUTTONS-OK-CANCEL:CAPS"></a>GTK_BUTTONS_OK_CANCEL</p></td>
|
||
<td class="enum_member_description">
|
||
<p>OK and Cancel buttons</p>
|
||
</td>
|
||
<td class="enum_member_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkMessageDialog.property-details"></a><h2>Property Details</h2>
|
||
<div class="refsect2">
|
||
<a name="GtkMessageDialog--buttons"></a><h3>The <code class="literal">“buttons”</code> property</h3>
|
||
<pre class="programlisting"> “buttons” <a class="link" href="GtkMessageDialog.html#GtkButtonsType" title="enum GtkButtonsType"><span class="type">GtkButtonsType</span></a></pre>
|
||
<p>The buttons shown in the message dialog.</p>
|
||
<p>Owner: GtkMessageDialog</p>
|
||
<p>Flags: Write / Construct Only</p>
|
||
<p>Default value: GTK_BUTTONS_NONE</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkMessageDialog--image"></a><h3>The <code class="literal">“image”</code> property</h3>
|
||
<pre class="programlisting"> “image” <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *</pre>
|
||
<p>The image for this dialog.</p>
|
||
<div class="warning">
|
||
<p><code class="literal">GtkMessageDialog:image</code> has been deprecated since version 3.12 and should not be used in newly-written code.</p>
|
||
<p>Use <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> to create dialogs with images</p>
|
||
</div>
|
||
<p>Owner: GtkMessageDialog</p>
|
||
<p>Flags: Read / Write</p>
|
||
<p class="since">Since: 2.10</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkMessageDialog--message-area"></a><h3>The <code class="literal">“message-area”</code> property</h3>
|
||
<pre class="programlisting"> “message-area” <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *</pre>
|
||
<p>The <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> that corresponds to the message area of this dialog. See
|
||
<a class="link" href="GtkMessageDialog.html#gtk-message-dialog-get-message-area" title="gtk_message_dialog_get_message_area ()"><code class="function">gtk_message_dialog_get_message_area()</code></a> for a detailed description of this
|
||
area.</p>
|
||
<p>Owner: GtkMessageDialog</p>
|
||
<p>Flags: Read</p>
|
||
<p class="since">Since: 2.22</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkMessageDialog--message-type"></a><h3>The <code class="literal">“message-type”</code> property</h3>
|
||
<pre class="programlisting"> “message-type” <a class="link" href="GtkMessageDialog.html#GtkMessageType" title="enum GtkMessageType"><span class="type">GtkMessageType</span></a></pre>
|
||
<p>The type of the message.</p>
|
||
<p>Owner: GtkMessageDialog</p>
|
||
<p>Flags: Read / Write / Construct</p>
|
||
<p>Default value: GTK_MESSAGE_INFO</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkMessageDialog--secondary-text"></a><h3>The <code class="literal">“secondary-text”</code> property</h3>
|
||
<pre class="programlisting"> “secondary-text” <span class="type">char</span> *</pre>
|
||
<p>The secondary text of the message dialog.</p>
|
||
<p>Owner: GtkMessageDialog</p>
|
||
<p>Flags: Read / Write</p>
|
||
<p>Default value: NULL</p>
|
||
<p class="since">Since: 2.10</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkMessageDialog--secondary-use-markup"></a><h3>The <code class="literal">“secondary-use-markup”</code> property</h3>
|
||
<pre class="programlisting"> “secondary-use-markup” <span class="type">gboolean</span></pre>
|
||
<p><code class="literal">TRUE</code> if the secondary text of the dialog includes Pango markup.
|
||
|
||
See <a href="https://developer.gnome.org/pango/pango-Markup.html#pango-parse-markup"><code class="function">pango_parse_markup()</code></a>.</p>
|
||
<p>Owner: GtkMessageDialog</p>
|
||
<p>Flags: Read / Write</p>
|
||
<p>Default value: FALSE</p>
|
||
<p class="since">Since: 2.10</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkMessageDialog--text"></a><h3>The <code class="literal">“text”</code> property</h3>
|
||
<pre class="programlisting"> “text” <span class="type">char</span> *</pre>
|
||
<p>The primary text of the message dialog. If the dialog has
|
||
|
||
a secondary text, this will appear as the title.</p>
|
||
<p>Owner: GtkMessageDialog</p>
|
||
<p>Flags: Read / Write</p>
|
||
<p>Default value: ""</p>
|
||
<p class="since">Since: 2.10</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkMessageDialog--use-markup"></a><h3>The <code class="literal">“use-markup”</code> property</h3>
|
||
<pre class="programlisting"> “use-markup” <span class="type">gboolean</span></pre>
|
||
<p><code class="literal">TRUE</code> if the primary text of the dialog includes Pango markup.
|
||
|
||
See <a href="https://developer.gnome.org/pango/pango-Markup.html#pango-parse-markup"><code class="function">pango_parse_markup()</code></a>.</p>
|
||
<p>Owner: GtkMessageDialog</p>
|
||
<p>Flags: Read / Write</p>
|
||
<p>Default value: FALSE</p>
|
||
<p class="since">Since: 2.10</p>
|
||
</div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkMessageDialog.style-property-details"></a><h2>Style Property Details</h2>
|
||
<div class="refsect2">
|
||
<a name="GtkMessageDialog--s-message-border"></a><h3>The <code class="literal">“message-border”</code> style property</h3>
|
||
<pre class="programlisting"> “message-border” <span class="type">int</span></pre>
|
||
<p>Width of border around the label in the message dialog.</p>
|
||
<p>Owner: GtkMessageDialog</p>
|
||
<p>Flags: Read</p>
|
||
<p>Allowed values: >= 0</p>
|
||
<p>Default value: 12</p>
|
||
</div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkMessageDialog.see-also"></a><h2>See Also</h2>
|
||
<p><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p>
|
||
</div>
|
||
</div>
|
||
<div class="footer">
|
||
<hr>Generated by GTK-Doc V1.33.0</div>
|
||
</body>
|
||
</html> |