1117 lines
57 KiB
HTML
1117 lines
57 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>GtkInfoBar: 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="DisplayWidgets.html" title="Display Widgets">
|
||
<link rel="prev" href="GtkSpinner.html" title="GtkSpinner">
|
||
<link rel="next" href="GtkProgressBar.html" title="GtkProgressBar">
|
||
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
|
||
<link rel="stylesheet" href="style.css" type="text/css">
|
||
</head>
|
||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
|
||
<td width="100%" align="left" class="shortcuts">
|
||
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
|
||
<a href="#GtkInfoBar.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
|
||
<a href="#GtkInfoBar.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces"> <span class="dim">|</span>
|
||
<a href="#GtkInfoBar.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties"> <span class="dim">|</span>
|
||
<a href="#GtkInfoBar.properties" class="shortcut">Properties</a></span><span id="nav_style_properties"> <span class="dim">|</span>
|
||
<a href="#GtkInfoBar.style-properties" class="shortcut">Style Properties</a></span><span id="nav_signals"> <span class="dim">|</span>
|
||
<a href="#GtkInfoBar.signals" class="shortcut">Signals</a></span>
|
||
</td>
|
||
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
|
||
<td><a accesskey="u" href="DisplayWidgets.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
|
||
<td><a accesskey="p" href="GtkSpinner.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
|
||
<td><a accesskey="n" href="GtkProgressBar.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
|
||
</tr></table>
|
||
<div class="refentry">
|
||
<a name="GtkInfoBar"></a><div class="titlepage"></div>
|
||
<div class="refnamediv"><table width="100%"><tr>
|
||
<td valign="top">
|
||
<h2><span class="refentrytitle"><a name="GtkInfoBar.top_of_page"></a>GtkInfoBar</span></h2>
|
||
<p>GtkInfoBar — Report important messages to the user</p>
|
||
</td>
|
||
<td class="gallery_image" valign="top" align="right"><img src="info-bar.png"></td>
|
||
</tr></table></div>
|
||
<div class="refsect1">
|
||
<a name="GtkInfoBar.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="GtkInfoBar.html#gtk-info-bar-new" title="gtk_info_bar_new ()">gtk_info_bar_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="GtkInfoBar.html#gtk-info-bar-new-with-buttons" title="gtk_info_bar_new_with_buttons ()">gtk_info_bar_new_with_buttons</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkInfoBar.html#gtk-info-bar-add-action-widget" title="gtk_info_bar_add_action_widget ()">gtk_info_bar_add_action_widget</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkInfoBar.html#gtk-info-bar-add-button" title="gtk_info_bar_add_button ()">gtk_info_bar_add_button</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkInfoBar.html#gtk-info-bar-add-buttons" title="gtk_info_bar_add_buttons ()">gtk_info_bar_add_buttons</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkInfoBar.html#gtk-info-bar-set-response-sensitive" title="gtk_info_bar_set_response_sensitive ()">gtk_info_bar_set_response_sensitive</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="GtkInfoBar.html#gtk-info-bar-set-default-response" title="gtk_info_bar_set_default_response ()">gtk_info_bar_set_default_response</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkInfoBar.html#gtk-info-bar-response" title="gtk_info_bar_response ()">gtk_info_bar_response</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkInfoBar.html#gtk-info-bar-set-message-type" title="gtk_info_bar_set_message_type ()">gtk_info_bar_set_message_type</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<a class="link" href="GtkMessageDialog.html#GtkMessageType" title="enum GtkMessageType"><span class="returnvalue">GtkMessageType</span></a>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkInfoBar.html#gtk-info-bar-get-message-type" title="gtk_info_bar_get_message_type ()">gtk_info_bar_get_message_type</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="GtkInfoBar.html#gtk-info-bar-get-action-area" title="gtk_info_bar_get_action_area ()">gtk_info_bar_get_action_area</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkInfoBar.html#gtk-info-bar-get-content-area" title="gtk_info_bar_get_content_area ()">gtk_info_bar_get_content_area</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">gboolean</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkInfoBar.html#gtk-info-bar-get-show-close-button" title="gtk_info_bar_get_show_close_button ()">gtk_info_bar_get_show_close_button</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkInfoBar.html#gtk-info-bar-set-show-close-button" title="gtk_info_bar_set_show_close_button ()">gtk_info_bar_set_show_close_button</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">gboolean</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GtkInfoBar.html#gtk-info-bar-get-revealed" title="gtk_info_bar_get_revealed ()">gtk_info_bar_get_revealed</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="GtkInfoBar.html#gtk-info-bar-set-revealed" title="gtk_info_bar_set_revealed ()">gtk_info_bar_set_revealed</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkInfoBar.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#GtkMessageType" title="enum GtkMessageType"><span class="type">GtkMessageType</span></a></td>
|
||
<td class="property_name"><a class="link" href="GtkInfoBar.html#GtkInfoBar--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">gboolean</span></td>
|
||
<td class="property_name"><a class="link" href="GtkInfoBar.html#GtkInfoBar--revealed" title="The “revealed” property">revealed</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="GtkInfoBar.html#GtkInfoBar--show-close-button" title="The “show-close-button” property">show-close-button</a></td>
|
||
<td class="property_flags">Read / Write / Construct</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkInfoBar.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="GtkInfoBar.html#GtkInfoBar--s-action-area-border" title="The “action-area-border” style property">action-area-border</a></td>
|
||
<td class="property_flags">Read</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">int</span></td>
|
||
<td class="property_name"><a class="link" href="GtkInfoBar.html#GtkInfoBar--s-button-spacing" title="The “button-spacing” style property">button-spacing</a></td>
|
||
<td class="property_flags">Read</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">int</span></td>
|
||
<td class="property_name"><a class="link" href="GtkInfoBar.html#GtkInfoBar--s-content-area-border" title="The “content-area-border” style property">content-area-border</a></td>
|
||
<td class="property_flags">Read</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type"><span class="type">int</span></td>
|
||
<td class="property_name"><a class="link" href="GtkInfoBar.html#GtkInfoBar--s-content-area-spacing" title="The “content-area-spacing” style property">content-area-spacing</a></td>
|
||
<td class="property_flags">Read</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkInfoBar.signals"></a><h2>Signals</h2>
|
||
<div class="informaltable"><table class="informaltable" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="signal_proto_type">
|
||
<col width="300px" class="signal_proto_name">
|
||
<col width="200px" class="signal_proto_flags">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="signal_type"><span class="returnvalue">void</span></td>
|
||
<td class="signal_name"><a class="link" href="GtkInfoBar.html#GtkInfoBar-close" title="The “close” signal">close</a></td>
|
||
<td class="signal_flags">Action</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="signal_type"><span class="returnvalue">void</span></td>
|
||
<td class="signal_name"><a class="link" href="GtkInfoBar.html#GtkInfoBar-response" title="The “response” signal">response</a></td>
|
||
<td class="signal_flags">Run Last</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkInfoBar.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="GtkInfoBar.html#GtkInfoBar-struct" title="struct GtkInfoBar">GtkInfoBar</a></td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkInfoBar.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="GtkBox.html" title="GtkBox">GtkBox</a>
|
||
<span class="lineart">╰──</span> GtkInfoBar
|
||
</pre>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkInfoBar.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
|
||
<p>
|
||
GtkInfoBar implements
|
||
AtkImplementorIface, <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a> and <a class="link" href="gtk3-Orientable.html#GtkOrientable">GtkOrientable</a>.</p>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkInfoBar.includes"></a><h2>Includes</h2>
|
||
<pre class="synopsis">#include <gtk/gtk.h>
|
||
</pre>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkInfoBar.description"></a><h2>Description</h2>
|
||
<p><a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a> is a widget that can be used to show messages to
|
||
the user without showing a dialog. It is often temporarily shown
|
||
at the top or bottom of a document. In contrast to <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a>, which
|
||
has a action area at the bottom, <a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a> has an action area
|
||
at the side.</p>
|
||
<p>The API of <a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a> is very similar to <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a>, allowing you
|
||
to add buttons to the action area with <a class="link" href="GtkInfoBar.html#gtk-info-bar-add-button" title="gtk_info_bar_add_button ()"><code class="function">gtk_info_bar_add_button()</code></a> or
|
||
<a class="link" href="GtkInfoBar.html#gtk-info-bar-new-with-buttons" title="gtk_info_bar_new_with_buttons ()"><code class="function">gtk_info_bar_new_with_buttons()</code></a>. The sensitivity of action widgets
|
||
can be controlled with <a class="link" href="GtkInfoBar.html#gtk-info-bar-set-response-sensitive" title="gtk_info_bar_set_response_sensitive ()"><code class="function">gtk_info_bar_set_response_sensitive()</code></a>.
|
||
To add widgets to the main content area of a <a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a>, use
|
||
<a class="link" href="GtkInfoBar.html#gtk-info-bar-get-content-area" title="gtk_info_bar_get_content_area ()"><code class="function">gtk_info_bar_get_content_area()</code></a> and add your widgets to the container.</p>
|
||
<p>Similar to <a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a>, the contents of a <a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a> can by
|
||
classified as error message, warning, informational message, etc,
|
||
by using <a class="link" href="GtkInfoBar.html#gtk-info-bar-set-message-type" title="gtk_info_bar_set_message_type ()"><code class="function">gtk_info_bar_set_message_type()</code></a>. GTK+ may use the message type
|
||
to determine how the message is displayed.</p>
|
||
<p>A simple example for using a <a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a>:</p>
|
||
<div class="informalexample">
|
||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||
<tbody>
|
||
<tr>
|
||
<td class="listing_lines" align="right"><pre>1
|
||
2
|
||
3
|
||
4
|
||
5
|
||
6
|
||
7
|
||
8
|
||
9
|
||
10
|
||
11
|
||
12
|
||
13
|
||
14
|
||
15
|
||
16
|
||
17
|
||
18
|
||
19
|
||
20
|
||
21
|
||
22
|
||
23
|
||
24
|
||
25
|
||
26
|
||
27
|
||
28
|
||
29
|
||
30
|
||
31
|
||
32</pre></td>
|
||
<td class="listing_code"><pre class="programlisting"><span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">widget</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">message_label</span><span class="p">,</span><span class="w"> </span><span class="o">*</span><span class="n">content_area</span><span class="p">;</span><span class="w"></span>
|
||
<span class="n">GtkWidget</span><span class="w"> </span><span class="o">*</span><span class="n">grid</span><span class="p">;</span><span class="w"></span>
|
||
<span class="n">GtkInfoBar</span><span class="w"> </span><span class="o">*</span><span class="n">bar</span><span class="p">;</span><span class="w"></span>
|
||
|
||
<span class="c1">// set up info bar</span>
|
||
<span class="n">widget</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_info_bar_new</span><span class="w"> </span><span class="p">();</span><span class="w"></span>
|
||
<span class="n">bar</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">GTK_INFO_BAR</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">);</span><span class="w"></span>
|
||
<span class="n">grid</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_grid_new</span><span class="w"> </span><span class="p">();</span><span class="w"></span>
|
||
|
||
<span class="n">gtk_widget_set_no_show_all</span><span class="w"> </span><span class="p">(</span><span class="n">widget</span><span class="p">,</span><span class="w"> </span><span class="n">TRUE</span><span class="p">);</span><span class="w"></span>
|
||
<span class="n">message_label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_label_new</span><span class="w"> </span><span class="p">(</span><span class="s">""</span><span class="p">);</span><span class="w"></span>
|
||
<span class="n">content_area</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gtk_info_bar_get_content_area</span><span class="w"> </span><span class="p">(</span><span class="n">bar</span><span class="p">);</span><span class="w"></span>
|
||
<span class="n">gtk_container_add</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_CONTAINER</span><span class="w"> </span><span class="p">(</span><span class="n">content_area</span><span class="p">),</span><span class="w"></span>
|
||
<span class="w"> </span><span class="n">message_label</span><span class="p">);</span><span class="w"></span>
|
||
<span class="n">gtk_info_bar_add_button</span><span class="w"> </span><span class="p">(</span><span class="n">bar</span><span class="p">,</span><span class="w"></span>
|
||
<span class="w"> </span><span class="n">_</span><span class="p">(</span><span class="s">"_OK"</span><span class="p">),</span><span class="w"></span>
|
||
<span class="w"> </span><span class="n">GTK_RESPONSE_OK</span><span class="p">);</span><span class="w"></span>
|
||
<span class="n">g_signal_connect</span><span class="w"> </span><span class="p">(</span><span class="n">bar</span><span class="p">,</span><span class="w"></span>
|
||
<span class="w"> </span><span class="s">"response"</span><span class="p">,</span><span class="w"></span>
|
||
<span class="w"> </span><span class="n">G_CALLBACK</span><span class="w"> </span><span class="p">(</span><span class="n">gtk_widget_hide</span><span class="p">),</span><span class="w"></span>
|
||
<span class="w"> </span><span class="nb">NULL</span><span class="p">);</span><span class="w"></span>
|
||
<span class="n">gtk_grid_attach</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_GRID</span><span class="w"> </span><span class="p">(</span><span class="n">grid</span><span class="p">),</span><span class="w"></span>
|
||
<span class="w"> </span><span class="n">widget</span><span class="p">,</span><span class="w"></span>
|
||
<span class="w"> </span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">);</span><span class="w"></span>
|
||
|
||
<span class="c1">// ...</span>
|
||
|
||
<span class="c1">// show an error message</span>
|
||
<span class="n">gtk_label_set_text</span><span class="w"> </span><span class="p">(</span><span class="n">GTK_LABEL</span><span class="w"> </span><span class="p">(</span><span class="n">message_label</span><span class="p">),</span><span class="w"> </span><span class="s">"An error occurred!"</span><span class="p">);</span><span class="w"></span>
|
||
<span class="n">gtk_info_bar_set_message_type</span><span class="w"> </span><span class="p">(</span><span class="n">bar</span><span class="p">,</span><span class="w"></span>
|
||
<span class="w"> </span><span class="n">GTK_MESSAGE_ERROR</span><span class="p">);</span><span class="w"></span>
|
||
<span class="n">gtk_widget_show</span><span class="w"> </span><span class="p">(</span><span class="n">bar</span><span class="p">);</span><span class="w"></span></pre></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<p></p>
|
||
<div class="refsect2">
|
||
<a name="id-1.3.8.5.11.8"></a><h3>GtkInfoBar as GtkBuildable</h3>
|
||
<p>The GtkInfoBar implementation of the GtkBuildable interface exposes
|
||
the content area and action area as internal children with the names
|
||
“content_area” and “action_area”.</p>
|
||
<p>GtkInfoBar supports a custom <code class="literal"><action-widgets></code> element, which can contain
|
||
multiple <code class="literal"><action-widget></code> 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 <em class="parameter"><code>action_area</code></em>
|
||
).</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="id-1.3.8.5.11.9"></a><h3>CSS nodes</h3>
|
||
<p>GtkInfoBar has a single CSS node with name infobar. The node may get
|
||
one of the style classes .info, .warning, .error or .question, depending
|
||
on the message type.</p>
|
||
</div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkInfoBar.functions_details"></a><h2>Functions</h2>
|
||
<div class="refsect2">
|
||
<a name="gtk-info-bar-new"></a><h3>gtk_info_bar_new ()</h3>
|
||
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
gtk_info_bar_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
|
||
<p>Creates a new <a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a> object.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-info-bar-new.returns"></a><h4>Returns</h4>
|
||
<p> a new <a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a> object</p>
|
||
</div>
|
||
<p class="since">Since: 2.18</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-info-bar-new-with-buttons"></a><h3>gtk_info_bar_new_with_buttons ()</h3>
|
||
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
gtk_info_bar_new_with_buttons (<em class="parameter"><code>const <span class="type">gchar</span> *first_button_text</code></em>,
|
||
<em class="parameter"><code>...</code></em>);</pre>
|
||
<p>Creates a new <a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a> with buttons. Button text/response ID
|
||
pairs should be listed, with a <code class="literal">NULL</code> pointer ending the list.
|
||
Button text can be either a stock ID such as <a class="link" href="gtk3-Stock-Items.html#GTK-STOCK-OK:CAPS" title="GTK_STOCK_OK"><code class="literal">GTK_STOCK_OK</code></a>, or
|
||
some arbitrary text. A response ID can be any positive number,
|
||
or one of the values in the <a class="link" href="GtkDialog.html#GtkResponseType" title="enum GtkResponseType"><span class="type">GtkResponseType</span></a> enumeration. If the
|
||
user clicks one of these dialog buttons, GtkInfoBar will emit
|
||
the “response” signal with the corresponding response ID.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-info-bar-new-with-buttons.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>first_button_text</p></td>
|
||
<td class="parameter_description"><p>stock ID or text to go in first button, 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>response ID for first button, then additional buttons, ending
|
||
with <code class="literal">NULL</code></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-info-bar-new-with-buttons.returns"></a><h4>Returns</h4>
|
||
<p> a new <a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a></p>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-info-bar-add-action-widget"></a><h3>gtk_info_bar_add_action_widget ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_info_bar_add_action_widget (<em class="parameter"><code><a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a> *info_bar</code></em>,
|
||
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
|
||
<em class="parameter"><code><span class="type">gint</span> response_id</code></em>);</pre>
|
||
<p>Add an activatable widget to the action area of a <a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a>,
|
||
connecting a signal handler that will emit the <a class="link" href="GtkInfoBar.html#GtkInfoBar-response" title="The “response” signal"><span class="type">“response”</span></a>
|
||
signal on the message area when the widget is activated. The widget
|
||
is appended to the end of the message areas action area.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-info-bar-add-action-widget.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>info_bar</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>child</p></td>
|
||
<td class="parameter_description"><p>an activatable widget</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>response_id</p></td>
|
||
<td class="parameter_description"><p>response ID for <em class="parameter"><code>child</code></em>
|
||
</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.18</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-info-bar-add-button"></a><h3>gtk_info_bar_add_button ()</h3>
|
||
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
gtk_info_bar_add_button (<em class="parameter"><code><a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a> *info_bar</code></em>,
|
||
<em class="parameter"><code>const <span class="type">gchar</span> *button_text</code></em>,
|
||
<em class="parameter"><code><span class="type">gint</span> response_id</code></em>);</pre>
|
||
<p>Adds a button with the given text and sets things up so that
|
||
clicking the button will emit the “response” signal with the given
|
||
response_id. The button is appended to the end of the info bars's
|
||
action area. The button widget is returned, but usually you don't
|
||
need it.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-info-bar-add-button.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>info_bar</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>button_text</p></td>
|
||
<td class="parameter_description"><p>text of button</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>response_id</p></td>
|
||
<td class="parameter_description"><p>response ID for the button</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-info-bar-add-button.returns"></a><h4>Returns</h4>
|
||
<p>the <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> widget
|
||
that was added. </p>
|
||
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> Gtk.Button]</span></p>
|
||
</div>
|
||
<p class="since">Since: 2.18</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-info-bar-add-buttons"></a><h3>gtk_info_bar_add_buttons ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_info_bar_add_buttons (<em class="parameter"><code><a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a> *info_bar</code></em>,
|
||
<em class="parameter"><code>const <span class="type">gchar</span> *first_button_text</code></em>,
|
||
<em class="parameter"><code>...</code></em>);</pre>
|
||
<p>Adds more buttons, same as calling <a class="link" href="GtkInfoBar.html#gtk-info-bar-add-button" title="gtk_info_bar_add_button ()"><code class="function">gtk_info_bar_add_button()</code></a>
|
||
repeatedly. The variable argument list should be <code class="literal">NULL</code>-terminated
|
||
as with <a class="link" href="GtkInfoBar.html#gtk-info-bar-new-with-buttons" title="gtk_info_bar_new_with_buttons ()"><code class="function">gtk_info_bar_new_with_buttons()</code></a>. Each button must have both
|
||
text and response ID.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-info-bar-add-buttons.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>info_bar</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>first_button_text</p></td>
|
||
<td class="parameter_description"><p>button text or stock ID</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>...</p></td>
|
||
<td class="parameter_description"><p>response ID for first button, then more text-response_id pairs,
|
||
ending with <code class="literal">NULL</code></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.18</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-info-bar-set-response-sensitive"></a><h3>gtk_info_bar_set_response_sensitive ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_info_bar_set_response_sensitive (<em class="parameter"><code><a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a> *info_bar</code></em>,
|
||
<em class="parameter"><code><span class="type">gint</span> response_id</code></em>,
|
||
<em class="parameter"><code><span class="type">gboolean</span> setting</code></em>);</pre>
|
||
<p>Calls gtk_widget_set_sensitive (widget, setting) for each
|
||
widget in the info bars’s action area with the given response_id.
|
||
A convenient way to sensitize/desensitize dialog buttons.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-info-bar-set-response-sensitive.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>info_bar</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>response_id</p></td>
|
||
<td class="parameter_description"><p>a response ID</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>setting</p></td>
|
||
<td class="parameter_description"><p>TRUE for sensitive</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.18</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-info-bar-set-default-response"></a><h3>gtk_info_bar_set_default_response ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_info_bar_set_default_response (<em class="parameter"><code><a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a> *info_bar</code></em>,
|
||
<em class="parameter"><code><span class="type">gint</span> response_id</code></em>);</pre>
|
||
<p>Sets the last widget in the info bar’s action area with
|
||
the given response_id as the default widget for the dialog.
|
||
Pressing “Enter” normally activates the default widget.</p>
|
||
<p>Note that this function currently requires <em class="parameter"><code>info_bar</code></em>
|
||
to
|
||
be added to a widget hierarchy.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-info-bar-set-default-response.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>info_bar</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>response_id</p></td>
|
||
<td class="parameter_description"><p>a response ID</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.18</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-info-bar-response"></a><h3>gtk_info_bar_response ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_info_bar_response (<em class="parameter"><code><a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a> *info_bar</code></em>,
|
||
<em class="parameter"><code><span class="type">gint</span> response_id</code></em>);</pre>
|
||
<p>Emits the “response” signal with the given <em class="parameter"><code>response_id</code></em>
|
||
.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-info-bar-response.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>info_bar</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>response_id</p></td>
|
||
<td class="parameter_description"><p>a response ID</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.18</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-info-bar-set-message-type"></a><h3>gtk_info_bar_set_message_type ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_info_bar_set_message_type (<em class="parameter"><code><a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a> *info_bar</code></em>,
|
||
<em class="parameter"><code><a class="link" href="GtkMessageDialog.html#GtkMessageType" title="enum GtkMessageType"><span class="type">GtkMessageType</span></a> message_type</code></em>);</pre>
|
||
<p>Sets the message type of the message area.</p>
|
||
<p>GTK+ uses this type to determine how the message is displayed.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-info-bar-set-message-type.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>info_bar</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>message_type</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkMessageDialog.html#GtkMessageType" title="enum GtkMessageType"><span class="type">GtkMessageType</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 2.18</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-info-bar-get-message-type"></a><h3>gtk_info_bar_get_message_type ()</h3>
|
||
<pre class="programlisting"><a class="link" href="GtkMessageDialog.html#GtkMessageType" title="enum GtkMessageType"><span class="returnvalue">GtkMessageType</span></a>
|
||
gtk_info_bar_get_message_type (<em class="parameter"><code><a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a> *info_bar</code></em>);</pre>
|
||
<p>Returns the message type of the message area.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-info-bar-get-message-type.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>info_bar</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-info-bar-get-message-type.returns"></a><h4>Returns</h4>
|
||
<p> the message type of the message area.</p>
|
||
</div>
|
||
<p class="since">Since: 2.18</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-info-bar-get-action-area"></a><h3>gtk_info_bar_get_action_area ()</h3>
|
||
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
gtk_info_bar_get_action_area (<em class="parameter"><code><a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a> *info_bar</code></em>);</pre>
|
||
<p>Returns the action area of <em class="parameter"><code>info_bar</code></em>
|
||
.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-info-bar-get-action-area.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>info_bar</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-info-bar-get-action-area.returns"></a><h4>Returns</h4>
|
||
<p>the action area. </p>
|
||
<p><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> Gtk.Box][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
|
||
</div>
|
||
<p class="since">Since: 2.18</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-info-bar-get-content-area"></a><h3>gtk_info_bar_get_content_area ()</h3>
|
||
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
|
||
gtk_info_bar_get_content_area (<em class="parameter"><code><a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a> *info_bar</code></em>);</pre>
|
||
<p>Returns the content area of <em class="parameter"><code>info_bar</code></em>
|
||
.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-info-bar-get-content-area.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>info_bar</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-info-bar-get-content-area.returns"></a><h4>Returns</h4>
|
||
<p>the content area. </p>
|
||
<p><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> Gtk.Box][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
|
||
</div>
|
||
<p class="since">Since: 2.18</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-info-bar-get-show-close-button"></a><h3>gtk_info_bar_get_show_close_button ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||
gtk_info_bar_get_show_close_button (<em class="parameter"><code><a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a> *info_bar</code></em>);</pre>
|
||
<p>Returns whether the widget will display a standard close button.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-info-bar-get-show-close-button.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>info_bar</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-info-bar-get-show-close-button.returns"></a><h4>Returns</h4>
|
||
<p> <code class="literal">TRUE</code> if the widget displays standard close button</p>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-10.html#api-index-3.10">3.10</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-info-bar-set-show-close-button"></a><h3>gtk_info_bar_set_show_close_button ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_info_bar_set_show_close_button (<em class="parameter"><code><a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a> *info_bar</code></em>,
|
||
<em class="parameter"><code><span class="type">gboolean</span> setting</code></em>);</pre>
|
||
<p>If true, a standard close button is shown. When clicked it emits
|
||
the response <a class="link" href="GtkDialog.html#GTK-RESPONSE-CLOSE:CAPS"><code class="literal">GTK_RESPONSE_CLOSE</code></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-info-bar-set-show-close-button.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>info_bar</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>setting</p></td>
|
||
<td class="parameter_description"><p><code class="literal">TRUE</code> to include a close button</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-10.html#api-index-3.10">3.10</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-info-bar-get-revealed"></a><h3>gtk_info_bar_get_revealed ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||
gtk_info_bar_get_revealed (<em class="parameter"><code><a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a> *info_bar</code></em>);</pre>
|
||
<div class="refsect3">
|
||
<a name="gtk-info-bar-get-revealed.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>info_bar</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gtk-info-bar-get-revealed.returns"></a><h4>Returns</h4>
|
||
<p> the current value of the GtkInfoBar:revealed property.</p>
|
||
</div>
|
||
<p class="since">Since: 3.22.29</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gtk-info-bar-set-revealed"></a><h3>gtk_info_bar_set_revealed ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gtk_info_bar_set_revealed (<em class="parameter"><code><a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a> *info_bar</code></em>,
|
||
<em class="parameter"><code><span class="type">gboolean</span> revealed</code></em>);</pre>
|
||
<p>Sets the GtkInfoBar:revealed property to <em class="parameter"><code>revealed</code></em>
|
||
. This will cause
|
||
<em class="parameter"><code>info_bar</code></em>
|
||
to show up with a slide-in transition.</p>
|
||
<p>Note that this property does not automatically show <em class="parameter"><code>info_bar</code></em>
|
||
and thus won’t
|
||
have any effect if it is invisible.</p>
|
||
<div class="refsect3">
|
||
<a name="gtk-info-bar-set-revealed.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>info_bar</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>revealed</p></td>
|
||
<td class="parameter_description"><p>The new value of the property</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: 3.22.29</p>
|
||
</div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkInfoBar.other_details"></a><h2>Types and Values</h2>
|
||
<div class="refsect2">
|
||
<a name="GtkInfoBar-struct"></a><h3>struct GtkInfoBar</h3>
|
||
<pre class="programlisting">struct GtkInfoBar;</pre>
|
||
</div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkInfoBar.property-details"></a><h2>Property Details</h2>
|
||
<div class="refsect2">
|
||
<a name="GtkInfoBar--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>The type may be used to determine the appearance of the info bar.</p>
|
||
<p>Owner: GtkInfoBar</p>
|
||
<p>Flags: Read / Write / Construct</p>
|
||
<p>Default value: GTK_MESSAGE_INFO</p>
|
||
<p class="since">Since: 2.18</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkInfoBar--revealed"></a><h3>The <code class="literal">“revealed”</code> property</h3>
|
||
<pre class="programlisting"> “revealed” <span class="type">gboolean</span></pre>
|
||
<p>Controls whether the action bar shows its contents or not.</p>
|
||
<p>Owner: GtkInfoBar</p>
|
||
<p>Flags: Read / Write</p>
|
||
<p>Default value: TRUE</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkInfoBar--show-close-button"></a><h3>The <code class="literal">“show-close-button”</code> property</h3>
|
||
<pre class="programlisting"> “show-close-button” <span class="type">gboolean</span></pre>
|
||
<p>Whether to include a standard close button.</p>
|
||
<p>Owner: GtkInfoBar</p>
|
||
<p>Flags: Read / Write / Construct</p>
|
||
<p>Default value: FALSE</p>
|
||
<p class="since">Since: <a class="link" href="api-index-3-10.html#api-index-3.10">3.10</a></p>
|
||
</div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkInfoBar.style-property-details"></a><h2>Style Property Details</h2>
|
||
<div class="refsect2">
|
||
<a name="GtkInfoBar--s-action-area-border"></a><h3>The <code class="literal">“action-area-border”</code> style property</h3>
|
||
<pre class="programlisting"> “action-area-border” <span class="type">int</span></pre>
|
||
<p>Width of the border around the action area of the info bar.</p>
|
||
<div class="warning">
|
||
<p><code class="literal">GtkInfoBar:action-area-border</code> has been deprecated since version 3.6 and should not be used in newly-written code.</p>
|
||
<p>Use <a class="link" href="GtkContainer.html#gtk-container-set-border-width" title="gtk_container_set_border_width ()"><code class="function">gtk_container_set_border_width()</code></a></p>
|
||
</div>
|
||
<p>Owner: GtkInfoBar</p>
|
||
<p>Flags: Read</p>
|
||
<p>Allowed values: >= 0</p>
|
||
<p>Default value: 5</p>
|
||
<p class="since">Since: 2.18</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkInfoBar--s-button-spacing"></a><h3>The <code class="literal">“button-spacing”</code> style property</h3>
|
||
<pre class="programlisting"> “button-spacing” <span class="type">int</span></pre>
|
||
<p>Spacing between buttons in the action area of the info bar.</p>
|
||
<div class="warning">
|
||
<p><code class="literal">GtkInfoBar:button-spacing</code> has been deprecated since version 3.6 and should not be used in newly-written code.</p>
|
||
<p>Use <a class="link" href="GtkBox.html#gtk-box-set-spacing" title="gtk_box_set_spacing ()"><code class="function">gtk_box_set_spacing()</code></a></p>
|
||
</div>
|
||
<p>Owner: GtkInfoBar</p>
|
||
<p>Flags: Read</p>
|
||
<p>Allowed values: >= 0</p>
|
||
<p>Default value: 6</p>
|
||
<p class="since">Since: 2.18</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkInfoBar--s-content-area-border"></a><h3>The <code class="literal">“content-area-border”</code> style property</h3>
|
||
<pre class="programlisting"> “content-area-border” <span class="type">int</span></pre>
|
||
<p>The width of the border around the content
|
||
content area of the info bar.</p>
|
||
<div class="warning">
|
||
<p><code class="literal">GtkInfoBar:content-area-border</code> has been deprecated since version 3.6 and should not be used in newly-written code.</p>
|
||
<p>Use <a class="link" href="GtkContainer.html#gtk-container-set-border-width" title="gtk_container_set_border_width ()"><code class="function">gtk_container_set_border_width()</code></a></p>
|
||
</div>
|
||
<p>Owner: GtkInfoBar</p>
|
||
<p>Flags: Read</p>
|
||
<p>Allowed values: >= 0</p>
|
||
<p>Default value: 8</p>
|
||
<p class="since">Since: 2.18</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkInfoBar--s-content-area-spacing"></a><h3>The <code class="literal">“content-area-spacing”</code> style property</h3>
|
||
<pre class="programlisting"> “content-area-spacing” <span class="type">int</span></pre>
|
||
<p>The default spacing used between elements of the
|
||
content area of the info bar.</p>
|
||
<div class="warning">
|
||
<p><code class="literal">GtkInfoBar:content-area-spacing</code> has been deprecated since version 3.6 and should not be used in newly-written code.</p>
|
||
<p>Use <a class="link" href="GtkBox.html#gtk-box-set-spacing" title="gtk_box_set_spacing ()"><code class="function">gtk_box_set_spacing()</code></a></p>
|
||
</div>
|
||
<p>Owner: GtkInfoBar</p>
|
||
<p>Flags: Read</p>
|
||
<p>Allowed values: >= 0</p>
|
||
<p>Default value: 16</p>
|
||
<p class="since">Since: 2.18</p>
|
||
</div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkInfoBar.signal-details"></a><h2>Signal Details</h2>
|
||
<div class="refsect2">
|
||
<a name="GtkInfoBar-close"></a><h3>The <code class="literal">“close”</code> signal</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
user_function (<a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a> *infobar,
|
||
<span class="type">gpointer</span> user_data)</pre>
|
||
<p>The ::close signal is a
|
||
<a class="link" href="gtk3-Bindings.html#GtkBindingSignal" title="struct GtkBindingSignal">keybinding signal</a>
|
||
which gets emitted when the user uses a keybinding to dismiss
|
||
the info bar.</p>
|
||
<p>The default binding for this signal is the Escape key.</p>
|
||
<div class="refsect3">
|
||
<a name="GtkInfoBar-close.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>user_data</p></td>
|
||
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<p>Flags: Action</p>
|
||
<p class="since">Since: 2.18</p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GtkInfoBar-response"></a><h3>The <code class="literal">“response”</code> signal</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
user_function (<a class="link" href="GtkInfoBar.html" title="GtkInfoBar"><span class="type">GtkInfoBar</span></a> *info_bar,
|
||
<span class="type">int</span> response_id,
|
||
<span class="type">gpointer</span> user_data)</pre>
|
||
<p>Emitted when an action widget is clicked or the application programmer
|
||
calls <a class="link" href="GtkDialog.html#gtk-dialog-response" title="gtk_dialog_response ()"><code class="function">gtk_dialog_response()</code></a>. The <em class="parameter"><code>response_id</code></em>
|
||
depends on which action
|
||
widget was clicked.</p>
|
||
<div class="refsect3">
|
||
<a name="GtkInfoBar-response.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>info_bar</p></td>
|
||
<td class="parameter_description"><p>the object on which the signal is emitted</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>response_id</p></td>
|
||
<td class="parameter_description"><p>the response ID</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>user_data</p></td>
|
||
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p>Flags: Run Last</p>
|
||
<p class="since">Since: 2.18</p>
|
||
</div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GtkInfoBar.see-also"></a><h2>See Also</h2>
|
||
<p><a class="link" href="GtkStatusbar.html" title="GtkStatusbar"><span class="type">GtkStatusbar</span></a>, <a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a></p>
|
||
</div>
|
||
</div>
|
||
<div class="footer">
|
||
<hr>Generated by GTK-Doc V1.33.1</div>
|
||
</body>
|
||
</html> |