gtk3/docs/reference/gtk/html/GtkRecentAction.html
2021-12-26 18:40:54 +00:00

336 lines
19 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkRecentAction: 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="DeprecatedObjects.html" title="Deprecated">
<link rel="prev" href="GtkRadioAction.html" title="GtkRadioAction">
<link rel="next" href="GtkActivatable.html" title="GtkActivatable">
<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="#GtkRecentAction.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
<a href="#GtkRecentAction.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces">  <span class="dim">|</span> 
<a href="#GtkRecentAction.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties">  <span class="dim">|</span> 
<a href="#GtkRecentAction.properties" class="shortcut">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="DeprecatedObjects.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GtkRadioAction.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GtkActivatable.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GtkRecentAction"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GtkRecentAction.top_of_page"></a>GtkRecentAction</span></h2>
<p>GtkRecentAction — An action of which represents a list of recently used files</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GtkRecentAction.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="GtkAction.html" title="GtkAction"><span class="returnvalue">GtkAction</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkRecentAction.html#gtk-recent-action-new" title="gtk_recent_action_new ()">gtk_recent_action_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkAction.html" title="GtkAction"><span class="returnvalue">GtkAction</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkRecentAction.html#gtk-recent-action-new-for-manager" title="gtk_recent_action_new_for_manager ()">gtk_recent_action_new_for_manager</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="GtkRecentAction.html#gtk-recent-action-get-show-numbers" title="gtk_recent_action_get_show_numbers ()">gtk_recent_action_get_show_numbers</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="GtkRecentAction.html#gtk-recent-action-set-show-numbers" title="gtk_recent_action_set_show_numbers ()">gtk_recent_action_set_show_numbers</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkRecentAction.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"><span class="type">gboolean</span></td>
<td class="property_name"><a class="link" href="GtkRecentAction.html#GtkRecentAction--show-numbers" title="The “show-numbers” property">show-numbers</a></td>
<td class="property_flags">Read / Write</td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkRecentAction.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="GtkRecentAction.html#GtkRecentAction-struct" title="struct GtkRecentAction">GtkRecentAction</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkRecentAction.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> GObject
<span class="lineart">╰──</span> <a class="link" href="GtkAction.html" title="GtkAction">GtkAction</a>
<span class="lineart">╰──</span> GtkRecentAction
</pre>
</div>
<div class="refsect1">
<a name="GtkRecentAction.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
GtkRecentAction implements
<a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a> and <a class="link" href="GtkRecentChooser.html" title="GtkRecentChooser">GtkRecentChooser</a>.</p>
</div>
<div class="refsect1">
<a name="GtkRecentAction.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gtk/gtk.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GtkRecentAction.description"></a><h2>Description</h2>
<p>A <a class="link" href="GtkRecentAction.html" title="GtkRecentAction"><span class="type">GtkRecentAction</span></a> represents a list of recently used files, which
can be shown by widgets such as <a class="link" href="GtkRecentChooserDialog.html" title="GtkRecentChooserDialog"><span class="type">GtkRecentChooserDialog</span></a> or
<a class="link" href="GtkRecentChooserMenu.html" title="GtkRecentChooserMenu"><span class="type">GtkRecentChooserMenu</span></a>.</p>
<p>To construct a submenu showing recently used files, use a <a class="link" href="GtkRecentAction.html" title="GtkRecentAction"><span class="type">GtkRecentAction</span></a>
as the action for a <code class="literal">&lt;menuitem&gt;</code>. To construct a menu toolbutton showing
the recently used files in the popup menu, use a <a class="link" href="GtkRecentAction.html" title="GtkRecentAction"><span class="type">GtkRecentAction</span></a> as the
action for a <code class="literal">&lt;toolitem&gt;</code> element.</p>
</div>
<div class="refsect1">
<a name="GtkRecentAction.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gtk-recent-action-new"></a><h3>gtk_recent_action_new ()</h3>
<pre class="programlisting"><a class="link" href="GtkAction.html" title="GtkAction"><span class="returnvalue">GtkAction</span></a> *
gtk_recent_action_new (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *label</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *tooltip</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *stock_id</code></em>);</pre>
<div class="warning"><p><code class="literal">gtk_recent_action_new</code> has been deprecated since version 3.10 and should not be used in newly-written code.</p></div>
<p>Creates a new <a class="link" href="GtkRecentAction.html" title="GtkRecentAction"><span class="type">GtkRecentAction</span></a> object. To add the action to
a <a class="link" href="GtkActionGroup.html" title="GtkActionGroup"><span class="type">GtkActionGroup</span></a> and set the accelerator for the action,
call <a class="link" href="GtkActionGroup.html#gtk-action-group-add-action-with-accel" title="gtk_action_group_add_action_with_accel ()"><code class="function">gtk_action_group_add_action_with_accel()</code></a>.</p>
<div class="refsect3">
<a name="gtk-recent-action-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>name</p></td>
<td class="parameter_description"><p>a unique name for the action</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>label</p></td>
<td class="parameter_description"><p>the label displayed in menu items and on buttons,
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>tooltip</p></td>
<td class="parameter_description"><p>a tooltip for the action, 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>stock_id</p></td>
<td class="parameter_description"><p>the stock icon to display in widgets representing
the action, 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>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-recent-action-new.returns"></a><h4>Returns</h4>
<p> the newly created <a class="link" href="GtkRecentAction.html" title="GtkRecentAction"><span class="type">GtkRecentAction</span></a>.</p>
</div>
<p class="since">Since: 2.12</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-recent-action-new-for-manager"></a><h3>gtk_recent_action_new_for_manager ()</h3>
<pre class="programlisting"><a class="link" href="GtkAction.html" title="GtkAction"><span class="returnvalue">GtkAction</span></a> *
gtk_recent_action_new_for_manager (<em class="parameter"><code>const <span class="type">gchar</span> *name</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *label</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *tooltip</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *stock_id</code></em>,
<em class="parameter"><code><a class="link" href="GtkRecentManager.html" title="GtkRecentManager"><span class="type">GtkRecentManager</span></a> *manager</code></em>);</pre>
<div class="warning"><p><code class="literal">gtk_recent_action_new_for_manager</code> has been deprecated since version 3.10 and should not be used in newly-written code.</p></div>
<p>Creates a new <a class="link" href="GtkRecentAction.html" title="GtkRecentAction"><span class="type">GtkRecentAction</span></a> object. To add the action to
a <a class="link" href="GtkActionGroup.html" title="GtkActionGroup"><span class="type">GtkActionGroup</span></a> and set the accelerator for the action,
call <a class="link" href="GtkActionGroup.html#gtk-action-group-add-action-with-accel" title="gtk_action_group_add_action_with_accel ()"><code class="function">gtk_action_group_add_action_with_accel()</code></a>.</p>
<div class="refsect3">
<a name="gtk-recent-action-new-for-manager.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>name</p></td>
<td class="parameter_description"><p>a unique name for the action</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>label</p></td>
<td class="parameter_description"><p>the label displayed in menu items and on buttons,
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>tooltip</p></td>
<td class="parameter_description"><p>a tooltip for the action, 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>stock_id</p></td>
<td class="parameter_description"><p>the stock icon to display in widgets representing
the action, 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>manager</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkRecentManager.html" title="GtkRecentManager"><span class="type">GtkRecentManager</span></a>, or <code class="literal">NULL</code> for using the default
<a class="link" href="GtkRecentManager.html" title="GtkRecentManager"><span class="type">GtkRecentManager</span></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-recent-action-new-for-manager.returns"></a><h4>Returns</h4>
<p> the newly created <a class="link" href="GtkRecentAction.html" title="GtkRecentAction"><span class="type">GtkRecentAction</span></a></p>
</div>
<p class="since">Since: 2.12</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-recent-action-get-show-numbers"></a><h3>gtk_recent_action_get_show_numbers ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gtk_recent_action_get_show_numbers (<em class="parameter"><code><a class="link" href="GtkRecentAction.html" title="GtkRecentAction"><span class="type">GtkRecentAction</span></a> *action</code></em>);</pre>
<div class="warning"><p><code class="literal">gtk_recent_action_get_show_numbers</code> has been deprecated since version 3.10 and should not be used in newly-written code.</p></div>
<p>Returns the value set by <a class="link" href="GtkRecentChooserMenu.html#gtk-recent-chooser-menu-set-show-numbers" title="gtk_recent_chooser_menu_set_show_numbers ()"><code class="function">gtk_recent_chooser_menu_set_show_numbers()</code></a>.</p>
<div class="refsect3">
<a name="gtk-recent-action-get-show-numbers.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>action</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkRecentAction.html" title="GtkRecentAction"><span class="type">GtkRecentAction</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-recent-action-get-show-numbers.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if numbers should be shown.</p>
</div>
<p class="since">Since: 2.12</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-recent-action-set-show-numbers"></a><h3>gtk_recent_action_set_show_numbers ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_recent_action_set_show_numbers (<em class="parameter"><code><a class="link" href="GtkRecentAction.html" title="GtkRecentAction"><span class="type">GtkRecentAction</span></a> *action</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> show_numbers</code></em>);</pre>
<div class="warning"><p><code class="literal">gtk_recent_action_set_show_numbers</code> has been deprecated since version 3.10 and should not be used in newly-written code.</p></div>
<p>Sets whether a number should be added to the items shown by the
widgets representing <em class="parameter"><code>action</code></em>
. The numbers are shown to provide
a unique character for a mnemonic to be used inside the menu item's
label. Only the first ten items get a number to avoid clashes.</p>
<div class="refsect3">
<a name="gtk-recent-action-set-show-numbers.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>action</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkRecentAction.html" title="GtkRecentAction"><span class="type">GtkRecentAction</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>show_numbers</p></td>
<td class="parameter_description"><p><code class="literal">TRUE</code> if the shown items should be numbered</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.12</p>
</div>
</div>
<div class="refsect1">
<a name="GtkRecentAction.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GtkRecentAction-struct"></a><h3>struct GtkRecentAction</h3>
<pre class="programlisting">struct GtkRecentAction;</pre>
</div>
</div>
<div class="refsect1">
<a name="GtkRecentAction.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GtkRecentAction--show-numbers"></a><h3>The <code class="literal">“show-numbers”</code> property</h3>
<pre class="programlisting"> “show-numbers” <span class="type">gboolean</span></pre>
<p>Whether the items should be displayed with a number.</p>
<div class="warning"><p><code class="literal">GtkRecentAction:show-numbers</code> has been deprecated since version 3.10 and should not be used in newly-written code.</p></div>
<p>Owner: GtkRecentAction</p>
<p>Flags: Read / Write</p>
<p>Default value: FALSE</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>